aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/bison/src/gram.h
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-07-08 15:54:05 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-07-08 15:54:05 +0000
commitfc7be18c76af2e700641f3598c4856baeef1428e (patch)
tree11dbca45eb321c3a4dd08b12152acc6ef5dd3fa9 /contrib/tools/bison/src/gram.h
parentec0e7ed6da6fb317741fd8468602949a1362eca5 (diff)
parentc92cb9d3a19331916f0c274d80e67f02a62caa9b (diff)
downloadydb-fc7be18c76af2e700641f3598c4856baeef1428e.tar.gz
Merge branch 'rightlib' into mergelibs-240708-1553
Diffstat (limited to 'contrib/tools/bison/src/gram.h')
-rw-r--r--contrib/tools/bison/src/gram.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/contrib/tools/bison/src/gram.h b/contrib/tools/bison/src/gram.h
index c1dd9a648a..83dd8aacf7 100644
--- a/contrib/tools/bison/src/gram.h
+++ b/contrib/tools/bison/src/gram.h
@@ -1,7 +1,7 @@
/* Data definitions for internal representation of Bison's input.
- Copyright (C) 1984, 1986, 1989, 1992, 2001-2007, 2009-2013 Free
- Software Foundation, Inc.
+ Copyright (C) 1984, 1986, 1989, 1992, 2001-2007, 2009-2015, 2018-2019
+ Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -115,7 +115,7 @@ extern int nvars;
typedef int item_number;
# define ITEM_NUMBER_MAX INT_MAX
extern item_number *ritem;
-extern unsigned int nritems;
+extern unsigned nritems;
/* There is weird relationship between OT1H item_number and OTOH
symbol_number and rule_number: we store the latter in
@@ -180,22 +180,27 @@ typedef struct
except if some rules are useless. */
rule_number number;
- symbol *lhs;
+ sym_content *lhs;
item_number *rhs;
/* This symbol provides both the associativity, and the precedence. */
- symbol *prec;
+ sym_content *prec;
int dprec;
int merger;
/* This symbol was attached to the rule via %prec. */
- symbol *precsym;
+ sym_content *precsym;
location location;
bool useful;
bool is_predicate;
+ /* Counts of the numbers of expected conflicts for this rule, or -1 if none
+ given. */
+ int expected_sr_conflicts;
+ int expected_rr_conflicts;
+
const char *action;
location action_location;
} rule;
@@ -220,7 +225,8 @@ bool rule_useless_in_parser_p (rule const *r);
/* Print this rule's number and lhs on OUT. If a PREVIOUS_LHS was
already displayed (by a previous call for another rule), avoid
useless repetitions. */
-void rule_lhs_print (rule const *r, symbol const *previous_lhs, FILE *out);
+void rule_lhs_print (rule const *r, sym_content const *previous_lhs,
+ FILE *out);
void rule_lhs_print_xml (rule const *r, FILE *out, int level);
/* Return the length of the RHS. */
@@ -270,4 +276,8 @@ void grammar_rules_useless_report (const char *message);
/* Free the packed grammar. */
void grammar_free (void);
+/* The version %required by the grammar file, as an int (100 * major +
+ minor). 0 if unspecified. */
+extern int required_version;
+
#endif /* !GRAM_H_ */