Initial check-in introducing experimental GLR parsing. See entry in

ChangeLog dated 2002-06-27 from Paul Hilfinger for details.
This commit is contained in:
Paul Hilfinger
2002-06-28 02:26:44 +00:00
parent 01241d47b4
commit 676385e29c
31 changed files with 2422 additions and 1299 deletions

View File

@@ -68,6 +68,10 @@
RULES[R].assoc -- the associativity of R.
RULES[R].dprec -- the dynamic precedence level of R (for GLR parsing).
RULES[R].merger -- index of merging function for R (for GLR parsing).
RULES[R].line -- the line where R was defined.
RULES[R].useful -- TRUE iff the rule is used (i.e., FALSE if thrown
@@ -141,6 +145,9 @@ typedef struct rule_s
/* This symbol provides both the associativity, and the precedence. */
symbol_t *prec;
short dprec;
short merger;
/* This symbol was attached to the rule via %prec. */
symbol_t *precsym;
@@ -163,6 +170,12 @@ extern symbol_number_t *token_translations;
extern int max_user_token_number;
/* GLR_PARSER is nonzero if the input file says to use the GLR
(Generalized LR) parser, and to output some additional
information used by the GLR algorithm. */
extern int glr_parser;
/* PURE_PARSER is nonzero if should generate a parser that is all pure
and reentrant. */