compile.h File Reference

Go to the source code of this file.

Defines

#define EXPR_NOT   0
#define EXPR_AND   1
#define EXPR_OR   2
#define EXPR_EXISTS   3
#define EXPR_EQUALS   4
#define EXPR_NOTEQ   5
#define EXPR_LESS   6
#define EXPR_LESSEQ   7
#define EXPR_MORE   8
#define EXPR_MOREEQ   9
#define EXPR_IN   10
#define JMP_NONE   0
#define JMP_BREAK   1
#define JMP_CONTINUE   2
#define JMP_RETURN   3

Functions

void compile_builtins ()
LISTcompile_append (PARSE *parse, LOL *args, int *jmp)
LISTcompile_break (PARSE *parse, LOL *args, int *jmp)
LISTcompile_foreach (PARSE *parse, LOL *args, int *jmp)
LISTcompile_if (PARSE *parse, LOL *args, int *jmp)
LISTcompile_eval (PARSE *parse, LOL *args, int *jmp)
LISTcompile_include (PARSE *parse, LOL *args, int *jmp)
LISTcompile_list (PARSE *parse, LOL *args, int *jmp)
LISTcompile_local (PARSE *parse, LOL *args, int *jmp)
LISTcompile_null (PARSE *parse, LOL *args, int *jmp)
LISTcompile_on (PARSE *parse, LOL *args, int *jmp)
LISTcompile_rule (PARSE *parse, LOL *args, int *jmp)
LISTcompile_rules (PARSE *parse, LOL *args, int *jmp)
LISTcompile_set (PARSE *parse, LOL *args, int *jmp)
LISTcompile_setcomp (PARSE *parse, LOL *args, int *jmp)
LISTcompile_setexec (PARSE *parse, LOL *args, int *jmp)
LISTcompile_settings (PARSE *parse, LOL *args, int *jmp)
LISTcompile_switch (PARSE *parse, LOL *args, int *jmp)
LISTcompile_while (PARSE *parse, LOL *args, int *jmp)
LISTevaluate_rule (const char *rulename, LOL *args, LIST *result)


Define Documentation

#define EXPR_AND   1

#define EXPR_EQUALS   4

#define EXPR_EXISTS   3

#define EXPR_IN   10

#define EXPR_LESS   6

#define EXPR_LESSEQ   7

#define EXPR_MORE   8

#define EXPR_MOREEQ   9

#define EXPR_NOT   0

#define EXPR_NOTEQ   5

#define EXPR_OR   2

#define JMP_BREAK   1

#define JMP_CONTINUE   2

#define JMP_NONE   0

#define JMP_RETURN   3


Function Documentation

LIST* compile_append ( PARSE parse,
LOL args,
int *  jmp 
)

append list results of two statements

parse->left more compile_append() by left-recursion parse->right single rule

LIST* compile_break ( PARSE parse,
LOL args,
int *  jmp 
)

compile 'break/continue/return' rule

parse->left results parse->num JMP_BREAK/CONTINUE/RETURN

void compile_builtins (  ) 

LIST* compile_eval ( PARSE parse,
LOL args,
int *  jmp 
)

LIST* compile_foreach ( PARSE p,
LOL args,
int *  jmp 
)

compile the "for x in y" statement

Compile_foreach() resets the given variable name to each specified value, executing the commands enclosed in braces for each iteration.

parse->string index variable parse->left variable values parse->right rule to compile

LIST* compile_if ( PARSE p,
LOL args,
int *  jmp 
)

compile 'if' rule

parse->left condition tree parse->right then tree parse->third else tree

LIST* compile_include ( PARSE parse,
LOL args,
int *  jmp 
)

support for 'include' - call include() on file

parse->left list of files to include (can only do 1)

LIST* compile_list ( PARSE parse,
LOL args,
int *  jmp 
)

expand and return a list

parse->string - character string to expand

LIST* compile_local ( PARSE parse,
LOL args,
int *  jmp 
)

declare (and set) local variables

parse->left list of variables parse->right list of values parse->third rules to execute

LIST* compile_null ( PARSE parse,
LOL args,
int *  jmp 
)

do nothing -- a stub for parsing

LIST* compile_on ( PARSE parse,
LOL args,
int *  jmp 
)

run rule under influence of on-target variables

parse->left target list; only first used parse->right rule to run

LIST* compile_rule ( PARSE parse,
LOL args,
int *  jmp 
)

compile a single user defined rule

parse->left list of rules to run parse->right parameters (list of lists) to rule, recursing left

Wrapped around evaluate_rule() so that headers() can share it.

LIST* compile_rules ( PARSE parse,
LOL args,
int *  jmp 
)

compile a chain of rules

parse->left single rule parse->right more compile_rules() by right-recursion

LIST* compile_set ( PARSE parse,
LOL args,
int *  jmp 
)

LIST* compile_setcomp ( PARSE parse,
LOL args,
int *  jmp 
)

LIST* compile_setexec ( PARSE parse,
LOL args,
int *  jmp 
)

LIST* compile_settings ( PARSE parse,
LOL args,
int *  jmp 
)

LIST* compile_switch ( PARSE parse,
LOL args,
int *  jmp 
)

LIST* compile_while ( PARSE parse,
LOL args,
int *  jmp 
)

LIST* evaluate_rule ( const char *  rulename,
LOL args,
LIST result 
)

execute a rule invocation


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