X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/01241d47b4f4484b56187120933da7055098ac92..676385e29c4aedfc05d20daf1ef20cd4ccc84856:/src/gram.h diff --git a/src/gram.h b/src/gram.h index b0f9daef..3254678f 100644 --- a/src/gram.h +++ b/src/gram.h @@ -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. */