mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33: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/symtab.h
11
src/symtab.h
@@ -87,6 +87,17 @@ struct symbol_s
|
||||
#define NUMBER_UNDEFINED ((symbol_number_t) -1)
|
||||
|
||||
|
||||
/* Return the tag of this SYMBOL in a printable form. Warning: uses
|
||||
the QUOTEARG slot 0. */
|
||||
const char *symbol_tag_get PARAMS ((symbol_t *symbol));
|
||||
|
||||
/* Return the tag of this SYMBOL in a printable form. Use the
|
||||
QUOTEARG slot number N. */
|
||||
const char *symbol_tag_get_n PARAMS ((symbol_t *symbol, int n));
|
||||
|
||||
/* Print the tag of this SYMBOL. */
|
||||
void symbol_tag_print PARAMS ((symbol_t *symbol, FILE *out));
|
||||
|
||||
/* Fetch (or create) the symbol associated to KEY. */
|
||||
symbol_t *getsym PARAMS ((const char *key, location_t location));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user