Commit df94792d authored by Roland Levillain's avatar Roland Levillain

- src/parser.y: Handle `with-references' option as a MonoBURG

\%-directive.
parent cf8d7ff3
2006-01-19 Roland Levillain <roland@lrde.epita.fr>
* src/parser.y: Handle `with-references' option as a MonoBURG
\%-directive.
2006-01-19 Roland Levillain <roland@lrde.epita.fr>
Support Vcs.
......
......@@ -21,6 +21,7 @@
#include <assert.h>
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
......@@ -53,6 +54,7 @@ GList *include_dirs = NULL;
%token TERM
%token TERMPREFIX
%token NAMESPACE
%token WITH_REFERENCES
%token <ivalue> INTEGER
%type <tree> tree
......@@ -73,6 +75,12 @@ decls : /* empty */
warn_cxx ("`%namespace' directive");
namespaces = g_list_append (namespaces, $2);
} decls
| WITH_REFERENCES {
warn_cxx ("`%with-references' directive");
g_hash_table_insert (definedvars,
g_strdup ("__WITH_REFERENCES"),
GUINT_TO_POINTER (1));
} decls
| rule_list optcost optcode optcfunc {
GList *tmp;
for (tmp = $1; tmp; tmp = tmp->next) {
......@@ -396,6 +404,11 @@ yylex (void)
return NAMESPACE;
}
if (!strncmp (next, "with-references", 15) && isspace (next[15])) {
next += 15;
return WITH_REFERENCES;
}
return c;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment