From: trevor_hansen Date: Fri, 9 Jul 2010 08:25:48 +0000 (+0000) Subject: Bugfix. If a new-line occured in a string literal, it wasn't matched by the lexer... X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=241359364754b561d965c3715c9d7f3dee60ebb3;p=francis%2Fstp.git Bugfix. If a new-line occured in a string literal, it wasn't matched by the lexer, so would be printed out to the console. git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@941 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/parser/smtlib2.lex b/src/parser/smtlib2.lex index c4f6af5..1c821b0 100644 --- a/src/parser/smtlib2.lex +++ b/src/parser/smtlib2.lex @@ -124,6 +124,7 @@ bv{DIGIT}+ { smt2lval.str = new std::string(smt2text+2); return BVCONST_DECIMAL_ smt2lval.str = new std::string(_string_lit); return STRING_TOK; } . { _string_lit.insert(_string_lit.end(),*smt2text); } +"\n" { _string_lit.insert(_string_lit.end(),*smt2text); } "sat" { return SAT_TOK; } "unsat" { return UNSAT_TOK; } @@ -232,4 +233,5 @@ bv{DIGIT}+ { smt2lval.str = new std::string(smt2text+2); return BVCONST_DECIMAL_ \|([^\|]|\n)*\| {return lookup(smt2text);} . { smt2error("Illegal input character."); } +"\n" { smt2error("Illegal input character."); } %%