#include "jam.h"
#include "lists.h"
#include "parse.h"
#include "compile.h"
#include "variable.h"
#include "expand.h"
#include "rules.h"
#include "newstr.h"
#include "search.h"
Functions | |
static void | debug_compile (int which, const char *s) |
int | glob (const char *s, const char *c) |
LIST * | compile_append (PARSE *parse, LOL *args, int *jmp) |
LIST * | compile_break (PARSE *parse, LOL *args, int *jmp) |
static int | lcmp (LIST *t, LIST *s) |
LIST * | compile_eval (PARSE *parse, LOL *args, int *jmp) |
LIST * | compile_foreach (PARSE *p, LOL *args, int *jmp) |
LIST * | compile_if (PARSE *p, LOL *args, int *jmp) |
LIST * | compile_include (PARSE *parse, LOL *args, int *jmp) |
LIST * | compile_list (PARSE *parse, LOL *args, int *jmp) |
LIST * | compile_local (PARSE *parse, LOL *args, int *jmp) |
LIST * | compile_null (PARSE *parse, LOL *args, int *jmp) |
LIST * | compile_on (PARSE *parse, LOL *args, int *jmp) |
LIST * | compile_rule (PARSE *parse, LOL *args, int *jmp) |
LIST * | evaluate_rule (const char *rulename, LOL *args, LIST *result) |
LIST * | compile_rules (PARSE *parse, LOL *args, int *jmp) |
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 *p, LOL *args, int *jmp) |
Variables | |
static const char * | set_names [] = { "=", "+=", "?=" } |
compile_append() - append list results of two statements compile_break() - compile 'break/continue/return' rule compile_eval() - evaluate if to determine which leg to compile compile_foreach() - compile the "for x in y" statement compile_if() - compile 'if' rule compile_include() - support for 'include' - call include() on file compile_list() - expand and return a list compile_local() - declare (and set) local variables compile_null() - do nothing -- a stub for parsing compile_on() - run rule under influence of on-target variables compile_rule() - compile a single user defined rule compile_rules() - compile a chain of rules compile_set() - compile the "set variable" statement compile_setcomp() - support for `rule` - save parse tree compile_setexec() - support for `actions` - save execution string compile_settings() - compile the "on =" (set variable on exec) statement compile_switch() - compile 'switch' rule
Internal routines:
debug_compile() - printf with indent to show rule expansion. evaluate_rule() - execute a rule invocation
append list results of two statements
parse->left more compile_append() by left-recursion parse->right single rule
compile 'break/continue/return' rule
parse->left results parse->num JMP_BREAK/CONTINUE/RETURN
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
compile 'if' rule
parse->left condition tree parse->right then tree parse->third else tree
support for 'include' - call include() on file
parse->left list of files to include (can only do 1)
expand and return a list
parse->string - character string to expand
declare (and set) local variables
parse->left list of variables parse->right list of values parse->third rules to execute
run rule under influence of on-target variables
parse->left target list; only first used parse->right rule to run
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.
compile a chain of rules
parse->left single rule parse->right more compile_rules() by right-recursion
static void debug_compile | ( | int | which, | |
const char * | s | |||
) | [static] |
int glob | ( | const char * | s, | |
const char * | c | |||
) |
evaluate if to determine which leg to compile
L0 If expression false - compile 'else' clause
const char* set_names[] = { "=", "+=", "?=" } [static] |