2 std.h - MaLa standard parser module
4 Copyright (C) 2004, 2005, Christian Thaeter <chth@gmx.net>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation.
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, contact me.
23 #include "../engine/acogc.h"
25 #define MALA_PARSER(n,p,t,d,m) {ACOGC_ALIGNED_STRING (n), (MalaParserFunc)p, t, d, m}
27 #define MALA_SIMPLE_PARSER(name, parser) \
28 MALA_PARSER(name, parser, MALA_DATA_UNUSED, NULL, "--WORLD")
29 #define MALA_SIMPLE_PARSER_P(name, parser, parent) \
30 MALA_PARSER(name, mala_pass_parser, MALA_DATA_UNUSED, NULL, parent)
32 #define MALA_PASS_PARSER(name) \
33 MALA_PARSER(name, mala_pass_parser, MALA_DATA_UNUSED, NULL, "--WORLD")
34 #define MALA_PASS_PARSER_P(name,parent) \
35 MALA_PARSER(name, mala_pass_parser, MALA_DATA_UNUSED, NULL, parent)
38 #define MALA_SUBSTITUTE_PARSER(name,subst) \
39 MALA_PARSER(name, mala_substitute_parser, MALA_DATA_STRINGPOINTER, subst, "--WORLD")
40 #define MALA_SUBSTITUTE_PARSER_P(name,subst,parent) \
41 MALA_PARSER(name, mala_substitute_parser, MALA_DATA_STRINGPOINTER, subst, parent)
43 #define MALA_EXPAND_PARSER(name, expand) \
44 MALA_PARSER(name, mala_expand_parser, MALA_DATA_STRINGLIST, \
45 MALA_STATIC_STRINGLIST_INIT expand, "--WORLD")
46 #define MALA_EXPAND_PARSER_P(name, expand, parent) \
47 MALA_PARSER(name, mala_expand_parser, MALA_DATA_STRINGLIST, \
48 MALA_STATIC_STRINGLIST_INIT expand, parent)
50 #define MALA_MACRO_PARSER(name, macro) \
51 MALA_PARSER(name, mala_macro_parser, MALA_DATA_STRINGLIST, \
52 MALA_STATIC_STRINGLIST_INIT macro, "--WORLD")
53 #define MALA_MACRO_PARSER_P(name, macro, parent) \
54 MALA_PARSER(name, mala_macro_parser, MALA_DATA_STRINGLIST, \
55 MALA_STATIC_STRINGLIST_INIT macro, parent)
57 #define MALA_PARSER_BRIEF(name, brief) \
58 MALA_SUBSTITUTE_PARSER_P("--BRIEF_" name, brief, name)
60 #define MALA_PARSER_HELP(name, args) \
61 MALA_EXPAND_PARSER_P("--HELP_" name, args, name)
63 #define MALA_PARSER_EXAMPLE(name, example) \
64 MALA_SUBSTITUTE_PARSER_P("--EXAMPLE_" name, example, name)
66 #define MALA_PARSER_TYPE(name, explain) \
67 MALA_SUBSTITUTE_PARSER("--TYPE_" name, explain)
69 #define MALA_PARSER_RESULT_TYPE(name, args) \
70 MALA_EXPAND_PARSER_P("--RESULT-TYPE_" name, args, name)
72 #define MALA_PARSER_RESULT_USAGE(name, args) \
73 MALA_EXPAND_PARSER_P("--RESULT-USAGE_" name, args, name)
75 #define MALA_PARSER_SIGNATURE_TYPE(name, args) \
76 MALA_EXPAND_PARSER_P("--SIGNATURE-TYPE_" name, args, name)
78 #define MALA_PARSER_SIGNATURE_USAGE(name, args) \
79 MALA_EXPAND_PARSER_P("--SIGNATURE-USAGE_" name, args, name)
81 #define MALA_TRUE_PARSER(name) \
82 MALA_SUBSTITUTE_PARSER(name,"--TRUE")
83 #define MALA_FALSE_PARSER(name) \
84 MALA_SUBSTITUTE_PARSER(name,"--FALSE")
86 #include "std_macros.h"
87 #include "std_statements.h"
91 mala_module_std_init (MalaEngine self
);
93 #endif /* MALA_STD_H */
97 // c-file-style: "gnu"
99 // arch-tag: df02af8a-69d7-4d51-8acc-aa544cb3acbe