Skip to content

Commit

Permalink
more yytname and yypact defines higher in the file, since bison needs…
Browse files Browse the repository at this point in the history
… to earlier that byacc; comment out dup token for L_ASTERISK
  • Loading branch information
Phil Shafer committed Apr 18, 2024
1 parent 82a3bb6 commit b17c4ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libxo/xo_xpath.y
Original file line number Diff line number Diff line change
@@ -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];

0 comments on commit b17c4ad

Please sign in to comment.