diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-07-08 15:54:05 +0000 |
commit | fc7be18c76af2e700641f3598c4856baeef1428e (patch) | |
tree | 11dbca45eb321c3a4dd08b12152acc6ef5dd3fa9 /contrib/tools/bison/src/reduce.h | |
parent | ec0e7ed6da6fb317741fd8468602949a1362eca5 (diff) | |
parent | c92cb9d3a19331916f0c274d80e67f02a62caa9b (diff) | |
download | ydb-fc7be18c76af2e700641f3598c4856baeef1428e.tar.gz |
Merge branch 'rightlib' into mergelibs-240708-1553
Diffstat (limited to 'contrib/tools/bison/src/reduce.h')
-rw-r--r-- | contrib/tools/bison/src/reduce.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/contrib/tools/bison/src/reduce.h b/contrib/tools/bison/src/reduce.h index bc12ed0e50..9814962d76 100644 --- a/contrib/tools/bison/src/reduce.h +++ b/contrib/tools/bison/src/reduce.h @@ -1,7 +1,7 @@ /* Grammar reduction for Bison. - Copyright (C) 2000-2002, 2007, 2009-2013 Free Software Foundation, - Inc. + Copyright (C) 2000-2002, 2007, 2009-2015, 2018-2019 Free Software + Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -24,9 +24,19 @@ void reduce_grammar (void); void reduce_output (FILE *out); bool reduce_token_unused_in_grammar (symbol_number i); -bool reduce_nonterminal_useless_in_grammar (symbol_number i); + +/** Whether symbol \a i is useless in the grammar. + * \pre reduce_grammar was called before. + */ +bool reduce_nonterminal_useless_in_grammar (const sym_content *sym); + void reduce_free (void); -extern symbol_number nuseless_nonterminals; -extern rule_number nuseless_productions; +/** Map initial nterm numbers to the new ones. Built by + * reduce_grammar. Size nvars + nuseless_nonterminals. */ +extern symbol_number *nterm_map; + +extern unsigned nuseless_nonterminals; +extern unsigned nuseless_productions; + #endif /* !REDUCE_H_ */ |