Search the Community
Showing results for tags 'yacc'.
-
This code causes an error: yacc stack overflow on line 249 Global $g_R2 = '1|0.1382|0.0031' & @CRLF & _ '2|0.1696|0.003' & @CRLF & _ '3|0.1994|0.003' & @CRLF & _ '4|0.2292|0.003' & @CRLF & _ '5|0.2592|0.0028' & @CRLF & _ '6|0.2876|0.0026' & @CRLF & _ '7|0.3131|0.0021' & @CRLF & _ '8|0.3337|0.0023' & @CRLF & _ '9|0.3563|0.0024' & @CRLF & _ '10|0.3803|0.0027' & @CRLF & _ '11|0.4071|0.0032' & @CRLF & _ '12|0.4387|0.0037' & @CRLF & _ '13|0.4758|0.0044' & @CRLF & _ '14|0.5197|0.005' & @CRLF & _ '15|0.5693|0.0051' & @CRLF & _ '16|0.6202|0.0055' & @CRLF & _ '17|0.6751|0.0057' & @CRLF & _ '18|0.7322|0.006' & @CRLF & _ '19|0.7923|0.0062' & @CRLF & _ '20|0.8545|0.0065' & @CRLF & _ '21|0.9197|0.0065' & @CRLF & _ '22|0.9846|0.0062' & @CRLF & _ '23|1.0462|0.0064' & @CRLF & _ '24|1.1106|0.0066' & @CRLF & _ '25|1.1767|0.0069' & @CRLF & _ '26|1.2452|0.007' & @CRLF & _ '27|1.3148|0.0071' & @CRLF & _ '28|1.3863|0.0074' & @CRLF & _ '29|1.4605|0.0073' & @CRLF & _ '30|1.5334|0.0074' & @CRLF & _ '31|1.6071|0.0078' & @CRLF & _ '32|1.6847|0.0078' & @CRLF & _ '33|1.7628|0.0079' & @CRLF & _ '34|1.8418|0.008' & @CRLF & _ '35|1.9222|0.0082' & @CRLF & _ '36|2.0045|0.0083' & @CRLF & _ '37|2.0874|0.0083' & @CRLF & _ '38|2.1708|0.0084' & @CRLF & _ '39|2.2553|0.0086' & @CRLF & _ '40|2.3411|0.0088' & @CRLF & _ '41|2.4293|0.0086' & @CRLF & _ '42|2.5157|0.0089' & @CRLF & _ '43|2.6045|0.009' & @CRLF & _ '44|2.6944|0.0092' & @CRLF & _ '45|2.786|0.0092' & @CRLF & _ '46|2.8776|0.0094' & @CRLF & _ '47|2.9716|0.0093' & @CRLF & _ '48|3.0642|0.0093' & @CRLF & _ '49|3.1574|0.0094' & @CRLF & _ '50|3.2512|0.0095' & @CRLF & _ '51|3.346|0.0096' & @CRLF & _ '52|3.4425|0.0099' & @CRLF & _ '53|3.5413|0.0097' & @CRLF & _ '54|3.6387|0.01' & @CRLF & _ '55|3.739|0.0099' & @CRLF & _ '56|3.8383|0.0098' & @CRLF & _ '57|3.9364|0.0101' & @CRLF & _ '58|4.0377|0.0101' & @CRLF & _ '59|4.1387|0.0101' & @CRLF & _ '60|4.2394|0.01' & @CRLF & _ '61|4.3394|0.0099' & @CRLF & _ '62|4.4384|0.0103' & @CRLF & _ '63|4.5411|0.0103' & @CRLF & _ '64|4.6443|0.0104' & @CRLF & _ '65|4.7481|0.0105' & @CRLF & _ '66|4.8528|0.0106' & @CRLF & _ '67|4.959|0.0108' & @CRLF & _ '68|5.0673|0.0106' & @CRLF & _ '69|5.1737|0.0109' & @CRLF & _ '70|5.2824|0.0107' & @CRLF & _ '71|5.3895|0.011' & @CRLF & _ '72|5.4991|0.0108' & @CRLF & _ '73|5.6075|0.0112' & @CRLF & _ '74|5.7193|0.0112' & @CRLF & _ '75|5.8308|0.0111' & @CRLF & _ '76|5.9422|0.0111' & @CRLF & _ '77|6.0531|0.011' & @CRLF & _ '78|6.1635|0.011' & @CRLF & _ '79|6.273|0.0113' & @CRLF & _ '80|6.3864|0.0114' & @CRLF & _ '81|6.5004|0.0115' & @CRLF & _ '82|6.6154|0.0117' & @CRLF & _ '83|6.732|0.0114' & @CRLF & _ '84|6.8457|0.0115' & @CRLF & _ '85|6.9602|0.0116' & @CRLF & _ '86|7.0759|0.0117' & @CRLF & _ '87|7.1933|0.0115' & @CRLF & _ '88|7.3085|0.0117' & @CRLF & _ '89|7.4251|0.0119' & @CRLF & _ '90|7.544|0.0117' & @CRLF & _ '91|7.6612|0.012' & @CRLF & _ '92|7.7811|0.0119' & @CRLF & _ '93|7.8998|0.0117' & @CRLF & _ '94|8.0168|0.0119' & @CRLF & _ '95|8.136|0.0118' & @CRLF & _ '96|8.2539|0.0121' & @CRLF & _ '97|8.3746|0.012' & @CRLF & _ '98|8.4946|0.0119' & @CRLF & _ '99|8.6135|0.0122' & @CRLF & _ '100|8.7358|0.0122' & @CRLF & _ '101|8.858|0.0122' & @CRLF & _ '102|8.9802|0.0122' & @CRLF & _ '103|9.1025|0.0122' & @CRLF & _ '104|9.2247|0.0122' & @CRLF & _ '105|9.347|0.0122' & @CRLF & _ '106|9.4693|0.0122' & @CRLF & _ '107|9.5917|0.0122' & @CRLF & _ '108|9.714|0.0122' & @CRLF & _ '109|9.8364|0.0123' & @CRLF & _ '110|9.959|0.0123' & @CRLF & _ '111|10.0816|0.0123' & @CRLF & _ '112|10.2045|0.0123' & @CRLF & _ '113|10.3278|0.0124' & @CRLF & _ '114|10.4514|0.0124' & @CRLF & _ '115|10.5758|0.0126' & @CRLF & _ '116|10.7013|0.0127' & @CRLF & _ '117|10.8284|0.0124' & @CRLF & _ '118|10.9529|0.0126' & @CRLF & _ '119|11.0785|0.0127' & @CRLF & _ '120|11.2059|0.0125' & @CRLF & _ '121|11.3305|0.0126' & @CRLF & _ '122|11.4564|0.0123' & @CRLF & _ '123|11.5791|0.0128' & @CRLF & _ '124|11.7071|0.0126' & @CRLF & _ '125|11.8329|0.0128' & @CRLF & _ '126|11.9605|0.0125' & @CRLF & _ '127|12.0856|0.0127' & @CRLF & _ '128|12.2121|0.0129' & @CRLF & _ '129|12.3408|0.0127' & @CRLF & _ '130|12.4676|0.0129' & @CRLF & _ '131|12.5966|0.0127' & @CRLF & _ '132|12.7241|0.013' & @CRLF & _ '133|12.8541|0.0129' & @CRLF & _ '134|12.9829|0.0127' & @CRLF & _ '135|13.1099|0.0129' & @CRLF & _ '136|13.2393|0.0128' & @CRLF & _ '137|13.3673|0.0126' & @CRLF & _ '138|13.4929|0.0127' & @CRLF & _ '139|13.6202|0.013' & @CRLF & _ '140|13.7501|0.0129' & @CRLF & _ '141|13.8786|0.0127' & @CRLF & _ '142|14.0053|0.0129' & @CRLF & _ '143|14.1343|0.0127' & @CRLF & _ '144|14.2615|0.013' & @CRLF & _ '145|14.3912|0.0128' & @CRLF & _ '146|14.5196|0.0126' & @CRLF & _ '147|14.6458|0.0128' & @CRLF & _ '148|14.774|0.0126' & @CRLF & _ '149|14.9002|0.0128' & @CRLF & _ '150|15.0284|0.0126' & @CRLF & _ '151|15.1544|0.0128' & @CRLF & _ '152|15.2823|0.0126' & @CRLF & _ '153|15.408|0.0127' & @CRLF & _ '154|15.5353|0.0125' & @CRLF & _ '155|15.6602|0.0126' & @CRLF & _ '156|15.7863|0.0128' & @CRLF & _ '157|15.9145|0.0131' & @CRLF & _ '158|16.0455|0.013' & @CRLF & _ '159|16.1759|0.0124' & @CRLF & _ '160|16.3|0.0125' & @CRLF & _ '161|16.4252|0.0127' & @CRLF & _ '162|16.5518|0.0124' & @CRLF & _ '163|16.6756|0.0124' & @CRLF & _ '164|16.8001|0.0121' & @CRLF & _ '165|16.9206|0.012' & @CRLF & _ '166|17.0403|0.0123' & @CRLF & _ '167|17.1637|0.0124' & @CRLF & _ '168|17.2878|0.0125' & @CRLF & _ '169|17.4128|0.0121' & @CRLF & _ '170|17.5341|0.0121' & @CRLF & _ '171|17.6549|0.012' & @CRLF & _ '172|17.7751|0.0124' & @CRLF & _ '173|17.8994|0.012' & @CRLF & _ '174|18.0196|0.0119' & @CRLF & _ '175|18.1387|0.0123' & @CRLF & _ '176|18.2613|0.0123' & @CRLF & _ '177|18.3841|0.0123' & @CRLF & _ '178|18.5073|0.0124' & @CRLF & _ '179|18.631|0.0119' & @CRLF & _ '180|18.7501|0.0118' & @CRLF & _ '181|18.8679|0.0121' & @CRLF & _ '182|18.9885|0.012' & @CRLF & _ '183|19.1083|0.0119' & @CRLF & _ '184|19.2268|0.0117' & @CRLF & _ '185|19.3435|0.0119' & @CRLF & _ '186|19.4624|0.0117' & @CRLF & _ '187|19.5798|0.0115' & @CRLF & _ '188|19.6947|0.0116' & @CRLF & _ '189|19.811|0.0118' & @CRLF & _ '190|19.9295|0.0117' & @CRLF & _ '191|20.046|0.0114' & @CRLF & _ '192|20.1598|0.0115' & @CRLF & _ '193|20.2744|0.0116' & @CRLF & _ '194|20.3903|0.0113' & @CRLF & _ '195|20.5029|0.0113' & @CRLF & _ '196|20.616|0.0114' & @CRLF & _ '197|20.7296|0.0114' & @CRLF & _ '198|20.8439|0.0115' & @CRLF & _ '199|20.9593|0.0112' & @CRLF & _ '200|21.0713|0.0112' & @CRLF & _ '201|21.1833|0.0112' & @CRLF & _ '202|21.2952|0.0112' & @CRLF & _ '203|21.407|0.0112' & @CRLF & _ '204|21.5189|0.0112' & @CRLF & _ '205|21.6306|0.0112' & @CRLF & _ '206|21.7422|0.0111' & @CRLF & _ '207|21.8535|0.0111' & @CRLF & _ '208|21.9644|0.011' & @CRLF & _ '209|22.0748|0.0104' & @CRLF & _ '210|22.1792|0.0106' & @CRLF & _ '211|22.285|0.0103' & @CRLF & _ '212|22.3875|0.0103' & @CRLF & _ '213|22.4904|0.0103' & @CRLF & _ '214|22.5938|0.0104' & @CRLF & _ '215|22.698|0.01' & @CRLF & _ '216|22.7982|0.01' & @CRLF & _ '217|22.8977|0.0103' & @CRLF & _ '218|23.0011|0.0099' & @CRLF & _ '219|23.1001|0.0098' & @CRLF & _ '220|23.1977|0.0101' & @CRLF & _ '221|23.2982|0.01' & @CRLF & _ '222|23.3982|0.0099' & @CRLF & _ '223|23.4972|0.0097' & @CRLF & _ '224|23.5947|0.0095' & @CRLF & _ '225|23.69|0.0097' & @CRLF & _ '226|23.7872|0.0095' & @CRLF & _ '227|23.882|0.0094' & @CRLF & _ '228|23.9759|0.0092' & @CRLF & _ '229|24.0684|0.0093' & @CRLF & _ '230|24.1612|0.0093' & @CRLF & _ '231|24.2546|0.0089' & @CRLF & _ '232|24.3438|0.009' & @CRLF & _ '233|24.4343|0.009' & @CRLF & _ '234|24.5241|0.0089' & @CRLF & _ '235|24.613|0.0087' & @CRLF & _ '236|24.6997|0.0088' & @CRLF & _ '237|24.7874|0.0086' & @CRLF & _ '238|24.8731|0.0085' & @CRLF & _ '239|24.9582|0.0084' & @CRLF & _ '240|25.0426|0.0081' & @CRLF & _ '241|25.1235|0.0081' & @CRLF & _ '242|25.2041|0.008' & @CRLF & _ '243|25.2841|0.0079' & @CRLF & _ '244|25.3636|0.0078' & @CRLF & _ '245|25.442|0.0077' & @CRLF & _ '246|25.5188|0.0077' & @CRLF & _ '247|25.5958|0.0077' & @CRLF & _ '248|25.6732|0.0071' & @CRLF & _ '249|25.7444|0.0071' & @CRLF & _ '250|25.8154|0.0071' & @CRLF & _ '251|25.8862|0.0069' & @CRLF & _ '252|25.9548|0.0069' & @CRLF & _ '253|26.0239|0.0068' & @CRLF & _ '254|26.092|0.0067' & @CRLF & _ '255|26.1585|0.0064' & @CRLF & _ '256|26.2225|0.0063' & @CRLF & _ '257|26.2855|0.0061' & @CRLF & _ '258|26.3468|0.0062' & @CRLF & _ '259|26.4083|0.0062' & @CRLF & _ '260|26.47|0.0059' & @CRLF & _ '261|26.5295|0.0056'
- 13 replies
-
Hello, many of you already know I'm working on a new programming language and I need some help to figure out an issue in the parser. I'm posting it here with the hope that someone knowledgeable enough can point out the solution and to also document this issue as I may forget the details if I don't make progress and set it aside. Here's the parser: /* * This file is part of EasyCodeIt. * * Copyright (C) 2021 TheDcoder <TheDcoder@protonmail.com> * * EasyCodeIt is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ %define parse.trace %code requires { #define _GNU_SOURCE /* Required to enable (v)asprintf */ #include <stdbool.h> #include "parser/tree.h" #include "parser/parser_internal.h" } %union { double num; struct { char *str; size_t len; } str; bool boolean; struct Expression expr; struct ExpressionList expr_list; } %token UNKNOWN %token WS %token NL '\n' %token COMMENT %token DIRECTIVE %token <num> NUMBER %token <str> STRING %token <boolean> BOOL %token <str> WORD %token <str> MACRO %token <str> VARIABLE %token OPERATOR %token BRACKET %token DOT %token COMMA /* Keywords */ %token K_DIM "Dim" %token K_LOCAL "Local" %token K_GLOBAL "Global" %token K_ENUM "Enum" %token K_CONST "Const" %token K_STATIC "Static" %token K_CONTINUE_CASE "ContinueCase" %token K_CONTINUE_LOOP "ContinueLoop" %token K_DEFAULT "Default" %token K_NULL "Null" %token K_DO "Do" %token K_UNTIL "Until" %token K_WHILE "While" %token K_END_WHILE "WEnd" %token K_FOR "For" %token K_IN "In" %token K_TO "To" %token K_STEP "Step" %token K_NEXT "Next" %token K_EXIT "Exit" %token K_EXITLOOP "ExitLoop" %token K_FUNC "Func" %token K_RETURN "Return" %token K_END_FUNC "EndFunc" %token K_IF "If" %token K_ELSE "Else" %token K_ELSE_IF "ElseIf" %token K_END_IF "EndIf" %token K_REDIM "ReDim" %token K_SELECT "Select" %token K_SWITCH "Switch" %token K_CASE "Case" %token K_END_SELECT "EndSelect" %token K_END_SWITCH "EndSwitch" /* Operators */ %precedence '?' %precedence ':' %left AND "And" OR "Or" %left LT '<' GT '>' LTE "<=" GTE ">=" EQU '=' NEQ "<>" SEQU "==" %left '&' %left '+' '-' %left '*' '/' %left '^' %left NOT "Not" %precedence INVERSION %precedence '.' /* WORKAROUND: Bison can't handle "sandwich" operators which surround the 2nd part of a binary expression */ %precedence '[' %precedence '(' %precedence GROUPING %type <expr> expression %type <expr_list> expression_list %{ int yylex(); void yyerror(const char *s); %} %% top: /* nothing */ | expression_list {print_expr($1.expression);} expression: BOOL {$$ = expr_from_prim(&(struct Primitive){.type = PRI_BOOLEAN, .boolean = $1});} | NUMBER {$$ = expr_from_prim(&(struct Primitive){.type = PRI_NUMBER, .number = $1});} | STRING {$$ = expr_from_str($1.str, $1.len);} | WORD {$$ = expr_from_ident($1.str, $1.len);} | MACRO {$$ = expr_from_ident($1.str, $1.len);} | VARIABLE {$$ = expr_from_ident($1.str, $1.len);} | expression '?' expression ':' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3, &$5}, 3, OP_CON);} | expression "And" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_AND);} | expression "Or" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_OR);} | expression '<' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_LT);} | expression '>' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_GT);} | expression '=' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_EQU);} | expression "<=" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_LTE);} | expression ">=" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_GTE);} | expression "<>" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_NEQ);} | expression "==" expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_SEQU);} | expression '&' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_CAT);} | expression '+' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_ADD);} | expression '-' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_SUB);} | expression '*' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_MUL);} | expression '/' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_DIV);} | expression '^' expression {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_EXP);} | "Not" expression {$$ = expr_from_expr((struct Expression *[]){&$2}, 1, OP_NOT);} | '-' expression %prec INVERSION {$$ = expr_from_expr((struct Expression *[]){&$2}, 1, OP_INV);} /*| expression '.' WORD {$$ = expr_from_expr((struct Expression *[]){&$1, &(struct Expression){expr_from_ident($3.str, $3.len)}}, 2, OP_ACC);}*/ | expression '.' WORD { struct Expression ident_expr = expr_from_ident($3.str, $3.len); $$ = expr_from_expr((struct Expression *[]){&$1, &ident_expr}, 2, OP_ACC); } | expression '[' expression ']' {$$ = expr_from_expr((struct Expression *[]){&$1, &$3}, 2, OP_ACC);} | expression '(' expression_list ')' {$$ = expr_from_call(&$1, &$3);} | expression '(' ')' {$$ = expr_from_call(&$1, NULL);} /* | expression '(' expression_list ')' %prec CALL {$$ = expr_from_call(&$1, &$3);} | expression '(' ')' %prec CALL {$$ = expr_from_call(&$1, NULL);} */ | '(' expression ')' %prec GROUPING {$$ = $2;} expression_list: /* expression {$$ = (struct ExpressionList){.expression = , .list = NULL};} | expression ',' expression_list {$$ = (struct ExpressionList){.expression = &$1, .list = &$3};} */ expression {$$ = exprlist_from_expr(&$1, NULL);} /* | expression ',' expression_list {$$ = exprlist_from_expr(&$1, &$3);} | expression '\n' expression_list {$$ = exprlist_from_expr(&$1, &$3);} */ | expression_list ',' expression {$$ = exprlist_from_expr(&$3, &$1);} | expression_list '\n' expression {$$ = exprlist_from_expr(&$3, &$1);} %% #include "parser/parser.c" And the "parser output" by Bison: Terminals unused in grammar UNKNOWN WS NL COMMENT DIRECTIVE OPERATOR BRACKET DOT COMMA "Dim" "Local" "Global" "Enum" "Const" "Static" "ContinueCase" "ContinueLoop" "Default" "Null" "Do" "Until" "While" "WEnd" "For" "In" "To" "Step" "Next" "Exit" "ExitLoop" "Func" "Return" "EndFunc" "If" "Else" "ElseIf" "EndIf" "ReDim" "Select" "Switch" "Case" "EndSelect" "EndSwitch" AND OR LT GT LTE GTE EQU NEQ SEQU NOT Grammar 0 $accept: top $end 1 top: ε 2 | expression_list 3 expression: BOOL 4 | NUMBER 5 | STRING 6 | WORD 7 | MACRO 8 | VARIABLE 9 | expression '?' expression ':' expression 10 | expression "And" expression 11 | expression "Or" expression 12 | expression '<' expression 13 | expression '>' expression 14 | expression '=' expression 15 | expression "<=" expression 16 | expression ">=" expression 17 | expression "<>" expression 18 | expression "==" expression 19 | expression '&' expression 20 | expression '+' expression 21 | expression '-' expression 22 | expression '*' expression 23 | expression '/' expression 24 | expression '^' expression 25 | "Not" expression 26 | '-' expression 27 | expression '.' WORD 28 | expression '[' expression ']' 29 | expression '(' expression_list ')' 30 | expression '(' ')' 31 | '(' expression ')' 32 expression_list: expression 33 | expression_list ',' expression 34 | expression_list '\n' expression Terminals, with rules where they appear $end (0) 0 '\n' (10) 34 '&' (38) 19 '(' (40) 29 30 31 ')' (41) 29 30 31 '*' (42) 22 '+' (43) 20 ',' (44) 33 '-' (45) 21 26 '.' (46) 27 '/' (47) 23 ':' (58) 9 '<' (60) 12 '=' (61) 14 '>' (62) 13 '?' (63) 9 '[' (91) 28 ']' (93) 28 '^' (94) 24 error (256) UNKNOWN (258) WS (259) NL (260) COMMENT (261) DIRECTIVE (262) NUMBER <num> (263) 4 STRING <str> (264) 5 BOOL <boolean> (265) 3 WORD <str> (266) 6 27 MACRO <str> (267) 7 VARIABLE <str> (268) 8 OPERATOR (269) BRACKET (270) DOT (271) COMMA (272) "Dim" (273) "Local" (274) "Global" (275) "Enum" (276) "Const" (277) "Static" (278) "ContinueCase" (279) "ContinueLoop" (280) "Default" (281) "Null" (282) "Do" (283) "Until" (284) "While" (285) "WEnd" (286) "For" (287) "In" (288) "To" (289) "Step" (290) "Next" (291) "Exit" (292) "ExitLoop" (293) "Func" (294) "Return" (295) "EndFunc" (296) "If" (297) "Else" (298) "ElseIf" (299) "EndIf" (300) "ReDim" (301) "Select" (302) "Switch" (303) "Case" (304) "EndSelect" (305) "EndSwitch" (306) AND (307) "And" (308) 10 OR (309) "Or" (310) 11 LT (311) GT (312) LTE (313) "<=" (314) 15 GTE (315) ">=" (316) 16 EQU (317) NEQ (318) "<>" (319) 17 SEQU (320) "==" (321) 18 NOT (322) "Not" (323) 25 INVERSION (324) GROUPING (325) Nonterminals, with rules where they appear $accept (89) on left: 0 top (90) on left: 1 2 on right: 0 expression <expr> (91) on left: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 on right: 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 expression_list <expr_list> (92) on left: 32 33 34 on right: 2 29 33 34 State 0 0 $accept: • top $end NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 $default reduce using rule 1 (top) top go to state 10 expression go to state 11 expression_list go to state 12 State 1 4 expression: NUMBER • $default reduce using rule 4 (expression) State 2 5 expression: STRING • $default reduce using rule 5 (expression) State 3 3 expression: BOOL • $default reduce using rule 3 (expression) State 4 6 expression: WORD • $default reduce using rule 6 (expression) State 5 7 expression: MACRO • $default reduce using rule 7 (expression) State 6 8 expression: VARIABLE • $default reduce using rule 8 (expression) State 7 26 expression: '-' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 13 State 8 25 expression: "Not" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 14 State 9 31 expression: '(' • expression ')' NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 15 State 10 0 $accept: top • $end $end shift, and go to state 16 State 11 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' 32 expression_list: expression • '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 32 (expression_list) State 12 2 top: expression_list • 33 expression_list: expression_list • ',' expression 34 | expression_list • '\n' expression '\n' shift, and go to state 36 ',' shift, and go to state 37 $default reduce using rule 2 (top) State 13 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 26 | '-' expression • 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 26 (expression) State 14 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 25 | "Not" expression • 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 25 (expression) State 15 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' 31 | '(' expression • ')' '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 ')' shift, and go to state 38 State 16 0 $accept: top $end • $default accept State 17 9 expression: expression '?' • expression ':' expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 39 State 18 10 expression: expression "And" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 40 State 19 11 expression: expression "Or" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 41 State 20 12 expression: expression '<' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 42 State 21 13 expression: expression '>' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 43 State 22 15 expression: expression "<=" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 44 State 23 16 expression: expression ">=" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 45 State 24 14 expression: expression '=' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 46 State 25 17 expression: expression "<>" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 47 State 26 18 expression: expression "==" • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 48 State 27 19 expression: expression '&' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 49 State 28 20 expression: expression '+' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 50 State 29 21 expression: expression '-' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 51 State 30 22 expression: expression '*' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 52 State 31 23 expression: expression '/' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 53 State 32 24 expression: expression '^' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 54 State 33 27 expression: expression '.' • WORD WORD shift, and go to state 55 State 34 28 expression: expression '[' • expression ']' NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 56 State 35 29 expression: expression '(' • expression_list ')' 30 | expression '(' • ')' NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 ')' shift, and go to state 57 expression go to state 11 expression_list go to state 58 State 36 34 expression_list: expression_list '\n' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 59 State 37 33 expression_list: expression_list ',' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 60 State 38 31 expression: '(' expression ')' • $default reduce using rule 31 (expression) State 39 9 expression: expression • '?' expression ':' expression 9 | expression '?' expression • ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '?' shift, and go to state 17 ':' shift, and go to state 61 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 State 40 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 10 | expression "And" expression • 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 10 (expression) State 41 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 11 | expression "Or" expression • 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 11 (expression) State 42 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 12 | expression '<' expression • 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 12 (expression) State 43 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 13 | expression '>' expression • 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 13 (expression) State 44 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 15 | expression "<=" expression • 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 15 (expression) State 45 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 16 | expression ">=" expression • 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 16 (expression) State 46 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 14 | expression '=' expression • 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 14 (expression) State 47 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 17 | expression "<>" expression • 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 17 (expression) State 48 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 18 | expression "==" expression • 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 18 (expression) State 49 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 19 | expression '&' expression • 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 19 (expression) State 50 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 20 | expression '+' expression • 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 20 (expression) State 51 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 21 | expression '-' expression • 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 21 (expression) State 52 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 22 | expression '*' expression • 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 22 (expression) State 53 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 23 | expression '/' expression • 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 23 (expression) State 54 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 24 | expression '^' expression • 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 24 (expression) State 55 27 expression: expression '.' WORD • $default reduce using rule 27 (expression) State 56 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 28 | expression '[' expression • ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 ']' shift, and go to state 62 State 57 30 expression: expression '(' ')' • $default reduce using rule 30 (expression) State 58 29 expression: expression '(' expression_list • ')' 33 expression_list: expression_list • ',' expression 34 | expression_list • '\n' expression '\n' shift, and go to state 36 ')' shift, and go to state 63 ',' shift, and go to state 37 State 59 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' 34 expression_list: expression_list '\n' expression • '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 34 (expression_list) State 60 9 expression: expression • '?' expression ':' expression 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' 33 expression_list: expression_list ',' expression • '?' shift, and go to state 17 "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 33 (expression_list) State 61 9 expression: expression '?' expression ':' • expression NUMBER shift, and go to state 1 STRING shift, and go to state 2 BOOL shift, and go to state 3 WORD shift, and go to state 4 MACRO shift, and go to state 5 VARIABLE shift, and go to state 6 '-' shift, and go to state 7 "Not" shift, and go to state 8 '(' shift, and go to state 9 expression go to state 64 State 62 28 expression: expression '[' expression ']' • $default reduce using rule 28 (expression) State 63 29 expression: expression '(' expression_list ')' • $default reduce using rule 29 (expression) State 64 9 expression: expression • '?' expression ':' expression 9 | expression '?' expression ':' expression • 10 | expression • "And" expression 11 | expression • "Or" expression 12 | expression • '<' expression 13 | expression • '>' expression 14 | expression • '=' expression 15 | expression • "<=" expression 16 | expression • ">=" expression 17 | expression • "<>" expression 18 | expression • "==" expression 19 | expression • '&' expression 20 | expression • '+' expression 21 | expression • '-' expression 22 | expression • '*' expression 23 | expression • '/' expression 24 | expression • '^' expression 27 | expression • '.' WORD 28 | expression • '[' expression ']' 29 | expression • '(' expression_list ')' 30 | expression • '(' ')' "And" shift, and go to state 18 "Or" shift, and go to state 19 '<' shift, and go to state 20 '>' shift, and go to state 21 "<=" shift, and go to state 22 ">=" shift, and go to state 23 '=' shift, and go to state 24 "<>" shift, and go to state 25 "==" shift, and go to state 26 '&' shift, and go to state 27 '+' shift, and go to state 28 '-' shift, and go to state 29 '*' shift, and go to state 30 '/' shift, and go to state 31 '^' shift, and go to state 32 '.' shift, and go to state 33 '[' shift, and go to state 34 '(' shift, and go to state 35 $default reduce using rule 9 (expression) And finally a minimal reproduction of the issue I'm facing: TheDcoder@arch /m/d/P/C/E/build (master)> eci 1\n2 Starting parse Entering state 0 Stack now 0 Reading a token Next token is token NUMBER () Shifting token NUMBER () Entering state 1 Stack now 0 1 Reducing stack by rule 4 (line 130): $1 = token NUMBER () -> $$ = nterm expression () Entering state 11 Stack now 0 11 Reading a token Next token is token NL () Reducing stack by rule 32 (line 168): $1 = nterm expression () -> $$ = nterm expression_list () Entering state 12 Stack now 0 12 Next token is token NL () Reducing stack by rule 2 (line 126): $1 = nterm expression_list () { "op": "No Operation", "args": [ 1.0 ] } -> $$ = nterm top () Entering state 10 Stack now 0 10 Next token is token NL () 2: syntax error at Error: popping nterm top () Stack now 0 Cleanup: discarding lookahead token NL () Stack now 0 Now I will explain the issue: I am trying to parse several different expressions and construct an "expression list" from them, however my parser immediately reduces the first expression to the "top" rule, but what I want is for it to make an "expression_list" which combines the following expression which is separated by a NL. This fact can be observed in the debug output from the reproduction script parse attempt, after the parser enters state 12 it immediately uses rule 2 to reduce to "top", but what we want is for it to use rule 34 and reduce to another "expression_list". The reason why I think this happens is because the reduction to top simply consumes less tokens and satisfies the parser, and as far as I can tell there is no way to force Bison to be "greedy" when reducing an "expression_list". So I'm unsure how to proceed further, I think we have to change the parser but I do not know how. I tried some silly things (like making another "super_top" non-terminal etc.) but those don't compile and produce a ton of conflicts 😕