cosmetic fix in -configure-pkg-config-var-
[k8jam.git] / src / compile.h
blob9d96c611a1d7a462a1709fa26591fb9324df978b
1 /*
2 * Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
3 * This file is part of Jam - see jam.c for Copyright information.
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 * compile.h - compile parsed jam statements
21 #ifndef JAMH_COMPILE_H
22 #define JAMH_COMPILE_H
24 extern void compile_builtins (void);
26 extern LIST *compile_append (PARSE *parse, LOL *args, int *jmp);
27 extern LIST *compile_break (PARSE *parse, LOL *args, int *jmp);
28 extern LIST *compile_foreach (PARSE *parse, LOL *args, int *jmp);
29 extern LIST *compile_if (PARSE *parse, LOL *args, int *jmp);
30 extern LIST *compile_eval (PARSE *parse, LOL *args, int *jmp);
31 extern LIST *compile_include (PARSE *parse, LOL *args, int *jmp);
32 extern LIST *compile_list (PARSE *parse, LOL *args, int *jmp);
33 extern LIST *compile_local (PARSE *parse, LOL *args, int *jmp);
34 extern LIST *compile_null (PARSE *parse, LOL *args, int *jmp) JAMFA_CONST;
35 extern LIST *compile_on (PARSE *parse, LOL *args, int *jmp);
36 extern LIST *compile_rule (PARSE *parse, LOL *args, int *jmp);
37 extern LIST *compile_rules (PARSE *parse, LOL *args, int *jmp);
38 extern LIST *compile_set (PARSE *parse, LOL *args, int *jmp);
39 extern LIST *compile_setcomp (PARSE *parse, LOL *args, int *jmp);
40 extern LIST *compile_setexec (PARSE *parse, LOL *args, int *jmp);
41 extern LIST *compile_settings (PARSE *parse, LOL *args, int *jmp);
42 extern LIST *compile_switch (PARSE *parse, LOL *args, int *jmp);
43 extern LIST *compile_while (PARSE *parse, LOL *args, int *jmp);
45 extern LIST *evaluate_rule (const char *rulename, LOL *args, LIST *result);
48 /* conditions for compile_if() */
49 enum {
50 EXPR_NOT, /* ! cond */
51 EXPR_AND, /* cond && cond */
52 EXPR_OR, /* cond || cond */
54 EXPR_EXISTS, /* arg */
55 EXPR_EQUALS, /* arg = arg */
56 EXPR_NOTEQ, /* arg != arg */
57 EXPR_LESS, /* arg < arg */
58 EXPR_LESSEQ, /* arg <= arg */
59 EXPR_MORE, /* arg > arg */
60 EXPR_MOREEQ, /* arg >= arg */
61 EXPR_IN, /* arg in arg */
62 EXPR_ANYIN, /* arg any-in arg */
63 EXPR_REXPEQ /* arg ~= regexp */
67 /* Flags for compile_break() */
68 enum {
69 JMP_NONE, /* flow continues */
70 JMP_BREAK, /* break out of loop */
71 JMP_CONTINUE, /* step to end of loop */
72 JMP_RETURN /* return from rule */
76 #endif