compile.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
00003  *
00004  * This file is part of Jam - see jam.c for Copyright information.
00005  */
00006 
00007 /*
00008  * compile.h - compile parsed jam statements
00009  *
00010  * Changes:
00011  *
00012  * 11/04/02 (seiwald) - const-ing for string literals
00013  * 10/22/02 (seiwald) - working return/break/continue statements
00014  * 03/02/02 (seiwald) - rules can be invoked via variable names
00015  * 02/28/02 (seiwald) - merge EXEC_xxx flags in with RULE_xxx 
00016  * 01/24/01 (seiwald) - 'while' statement
00017  * 01/22/01 (seiwald) - replace evaluate_if() with compile_eval()
00018  */
00019 
00020 void compile_builtins();
00021 
00022 LIST *compile_append( PARSE *parse, LOL *args, int *jmp );
00023 LIST *compile_break( PARSE *parse, LOL *args, int *jmp );
00024 LIST *compile_foreach( PARSE *parse, LOL *args, int *jmp );
00025 LIST *compile_if( PARSE *parse, LOL *args, int *jmp );
00026 LIST *compile_eval( PARSE *parse, LOL *args, int *jmp );
00027 LIST *compile_include( PARSE *parse, LOL *args, int *jmp );
00028 LIST *compile_list( PARSE *parse, LOL *args, int *jmp );
00029 LIST *compile_local( PARSE *parse, LOL *args, int *jmp );
00030 LIST *compile_null( PARSE *parse, LOL *args, int *jmp );
00031 LIST *compile_on( PARSE *parse, LOL *args, int *jmp );
00032 LIST *compile_rule( PARSE *parse, LOL *args, int *jmp );
00033 LIST *compile_rules( PARSE *parse, LOL *args, int *jmp );
00034 LIST *compile_set( PARSE *parse, LOL *args, int *jmp );
00035 LIST *compile_setcomp( PARSE *parse, LOL *args, int *jmp );
00036 LIST *compile_setexec( PARSE *parse, LOL *args, int *jmp );
00037 LIST *compile_settings( PARSE *parse, LOL *args, int *jmp );
00038 LIST *compile_switch( PARSE *parse, LOL *args, int *jmp );
00039 LIST *compile_while( PARSE *parse, LOL *args, int *jmp );
00040 
00041 LIST *evaluate_rule( const char *rulename, LOL *args, LIST *result );
00042 
00043 /* Conditions for compile_if() */
00044 
00045 # define EXPR_NOT   0   /* ! cond */
00046 # define EXPR_AND   1   /* cond && cond */
00047 # define EXPR_OR    2   /* cond || cond */
00048 
00049 # define EXPR_EXISTS    3   /* arg */
00050 # define EXPR_EQUALS    4   /* arg = arg */
00051 # define EXPR_NOTEQ     5   /* arg != arg */
00052 # define EXPR_LESS      6   /* arg < arg  */
00053 # define EXPR_LESSEQ    7   /* arg <= arg */
00054 # define EXPR_MORE      8   /* arg > arg  */
00055 # define EXPR_MOREEQ    9   /* arg >= arg */
00056 # define EXPR_IN        10  /* arg in arg */
00057 
00058 /* Flags for compile_return */
00059 
00060 # define JMP_NONE       0   /* flow continues */
00061 # define JMP_BREAK      1   /* break out of loop */
00062 # define JMP_CONTINUE   2   /* step to end of loop */
00063 # define JMP_RETURN     3   /* return from rule */

Generated on Thu Aug 17 15:54:32 2006 for MaJam by  doxygen 1.4.7