X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Finput_parser.yy;h=43d7cc826942124104e1faa55046349a2476bf5f;hp=c5c78d2dd9cf4656e44d9825f851c1018c01fd7b;hb=caa32f46e8ac861b0ac04883cfe40137b6b2763d;hpb=3229ec7c42ffc173f94f1c3bffbc30308c93e571 diff --git a/ginac/input_parser.yy b/ginac/input_parser.yy index c5c78d2d..43d7cc82 100644 --- a/ginac/input_parser.yy +++ b/ginac/input_parser.yy @@ -57,7 +57,7 @@ ex attach_index(const ex & base, ex i, bool covariant); /* Tokens (T_LITERAL means a literal value returned by the parser, but not of class numeric or symbol (e.g. a constant or the FAIL object)) */ -%token T_NUMBER T_SYMBOL T_LITERAL T_DIGITS T_EQUAL T_NOTEQ T_LESSEQ T_GREATEREQ +%token T_EOF T_NUMBER T_SYMBOL T_LITERAL T_DIGITS T_EQUAL T_NOTEQ T_LESSEQ T_GREATEREQ /* Operator precedence and associativity */ %right '=' @@ -78,7 +78,7 @@ ex attach_index(const ex & base, ex i, bool covariant); */ %% -input : exp { +input : exp T_EOF { try { parsed_ex = $1; YYACCEPT; @@ -87,7 +87,6 @@ input : exp { YYERROR; } } - | error {yyclearin; yyerrok;} ; exp : T_NUMBER {$$ = $1;}