X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/35f61cb998a30de542f554cd8c47a445af0ef886..e89a22bfab22e4d2ee73be49dcb66b51f8d0e892:/src/gram.h diff --git a/src/gram.h b/src/gram.h index 531d1d9a..e26582fe 100644 --- a/src/gram.h +++ b/src/gram.h @@ -59,6 +59,8 @@ RULE_TABLE[R].line -- the line where R was defined. + RULE_TABLE[R].useful -- TRUE iff the rule is used. + The right hand side is stored as symbol numbers in a portion of RITEM. @@ -119,6 +121,7 @@ typedef struct rule_s short precsym; short assoc; short line; + bool useful; } rule_t; extern struct rule_s *rule_table; @@ -144,4 +147,12 @@ extern int pure_parser; /* ERROR_TOKEN_NUMBER is the token number of the error token. */ extern int error_token_number; + + +/* Dump RITEM for traces. */ +void ritem_print PARAMS ((FILE *out)); + +/* Return the size of the longest rule RHS. */ +size_t ritem_longest_rhs PARAMS ((void)); + #endif /* !GRAM_H_ */