X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Finput_parser.yy;h=fffbd1792531a874fba86af122ae65be50db4680;hb=e98841136efa88c951edafc0cd43ba1343f20b5b;hp=ecdc317e6ee08dd706c8228887c15ee94cbc4203;hpb=a2c8e2cd98f28b301478e62f922c38745c4b5cde;p=ginac.git diff --git a/ginac/input_parser.yy b/ginac/input_parser.yy index ecdc317e..fffbd179 100644 --- a/ginac/input_parser.yy +++ b/ginac/input_parser.yy @@ -4,7 +4,7 @@ * This file must be processed with yacc/bison. */ /* - * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,7 +58,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 '=' @@ -79,7 +79,7 @@ ex attach_index(const ex & base, ex i, bool covariant); */ %% -input : exp { +input : exp T_EOF { try { parsed_ex = $1; YYACCEPT; @@ -88,7 +88,6 @@ input : exp { YYERROR; } } - | error {yyclearin; yyerrok;} ; exp : T_NUMBER {$$ = $1;}