Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
minor fix
  • Loading branch information
Ilya Dogolazky committed Jul 28, 2011
1 parent 643d14d commit 3451c52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion debian/changelog
@@ -1,8 +1,9 @@
iodata (0.18) unstable; urgency=low

* tracking location in the tokenizer
* memory leaks on invalid input fixed

-- Ilya Dogolazky <ilya.dogolazky@nokia.com> Thu, 28 Jul 2011 15:05:57 +0300
-- Ilya Dogolazky <ilya.dogolazky@nokia.com> Thu, 28 Jul 2011 15:54:11 +0300

iodata (0.17) unstable; urgency=low

Expand Down
6 changes: 3 additions & 3 deletions src/datalang.l
Expand Up @@ -76,8 +76,8 @@ DECNUM ([1-9]{DEC}*)|0
<CXX_COMMENT>[^\n]+ ; /* eat characters */
<INITIAL,C_COMMENT>\n ; /* eat new line */

<STRING_LIT>\n ERROR("unterminated string literal") ; delete yylval->str ;
<STRING_LIT><<EOF>> ERROR("unterminated string literal at EOF") ; delete yylval->str ;
<STRING_LIT>\n delete yylval->str ; ERROR("unterminated string literal") ;
<STRING_LIT><<EOF>> delete yylval->str ; ERROR("unterminated string literal at EOF") ;
<STRING_LIT>[^\n\"\\]+ *yylval->str += STR(0,0) ;
<STRING_LIT>"\\n" *yylval->str += (char)'\n' ;
<STRING_LIT>"\\t" *yylval->str += (char)'\t' ;
Expand All @@ -88,7 +88,7 @@ DECNUM ([1-9]{DEC}*)|0
*yylval->str += x ;
}
<STRING_LIT>"\"" BEGIN(INITIAL) ; return TSTRING ;
<STRING_LIT>"\\" ERROR("invalid backslash in a string literal") ; delete yylval->str ;
<STRING_LIT>"\\" delete yylval->str ; ERROR("invalid backslash in a string literal") ;

. ERROR("invalid character (%x02x)", CHR) ;

Expand Down

0 comments on commit 3451c52

Please sign in to comment.