From b17c4ad66d58a396551b1825010074df63090e12 Mon Sep 17 00:00:00 2001 From: Phil Shafer Date: Thu, 18 Apr 2024 18:31:12 -0400 Subject: [PATCH] more yytname and yypact defines higher in the file, since bison needs to earlier that byacc; comment out dup token for L_ASTERISK --- libxo/xo_xpath.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libxo/xo_xpath.y b/libxo/xo_xpath.y index a6f1930e..5394c96d 100644 --- a/libxo/xo_xpath.y +++ b/libxo/xo_xpath.y @@ -79,7 +79,7 @@ * Literal tokens which _may_ preceed the multiplication operator */ %token M_MULTIPLICATION_TEST_LAST 45 /* Magic marker: highest token number */ -%token L_ASTERISK 46 "*" +%token L_ASTERISK 46 /* "*" */ %token L_CBRACK 47 "]" %token L_CPAREN 48 ")" %token L_DOT 49 "." @@ -211,6 +211,9 @@ #define yylex(_lvalp, _param) \ xo_xpath_yylex(_param, _lvalp) +#define yytname xo_xpath_yyname +#define yypact xo_xpath_yydefred + /* * Even if we don't want debug printfs, we still need the arrays with * names for our own nefarious purposes. @@ -830,9 +833,6 @@ xp_relational_expr : #define YYLAST ((sizeof(yytable) / sizeof(yytable[0])) - 1) #endif /* YYLAST */ -#define yytname xo_xpath_yyname -#define yypact xo_xpath_yydefred - const int xo_xparse_num_tokens = YYNTOKENS; const char *xo_xparse_keyword_string[YYNTOKENS]; const char *xo_xparse_token_name_fancy[YYNTOKENS];