mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
Copy BYacc's nice way to report the grammar.
* src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print): New. Don't print the rules' location, it is confusing and useless. (rule_print): Use grammar_rhs_print. * src/print.c (print_grammar): Use grammar_rules_print.
This commit is contained in:
11
src/gram.h
11
src/gram.h
@@ -168,15 +168,24 @@ extern int max_user_token_number;
|
||||
|
||||
extern int pure_parser;
|
||||
|
||||
/* Report the length of the RHS. */
|
||||
/* Return the length of the RHS. */
|
||||
int rule_rhs_length PARAMS ((rule_t *rule));
|
||||
|
||||
/* Print this RULE's RHS on OUT. */
|
||||
void rule_rhs_print PARAMS ((rule_t *rule, FILE *out));
|
||||
|
||||
/* Print this RULE on OUT. */
|
||||
void rule_print PARAMS ((rule_t *rule, FILE *out));
|
||||
|
||||
/* 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));
|
||||
|
||||
/* Print the grammar's rules on OUT. */
|
||||
void grammar_rules_print PARAMS ((FILE *out));
|
||||
|
||||
/* Dump the grammar. */
|
||||
void grammar_dump PARAMS ((FILE *out, const char *title));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user