]> www.ginac.de Git - ginac.git/commit - ginac/parser/parser.cpp
parser: add necessary checks to operator() to stop accepting nonsense.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Sat, 13 Sep 2008 23:26:33 +0000 (03:26 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Fri, 19 Sep 2008 09:15:50 +0000 (13:15 +0400)
commit1261c54df6548cf558405a118b2134805f63376d
treea50e53b54b8851ad3ea478acad500321265287ba
parentd4593e1981a168677f98e4d3b098696bd31088e2
parser: add necessary checks to operator() to stop accepting nonsense.

Since the parser is recursive parse_* methods (in particular,
parse_binop_rhs()) does NOT check if the last unparsed token is valid.
Thus parse_expression() stops if it encounters an unknown token. That's
why parser::operator() needs to make sure nothing is left in the input
stream.
check/parser_bugs.cpp
ginac/parser/parser.cpp