From: helly Date: Fri, 30 Dec 2005 20:05:04 +0000 (+0000) Subject: - Made scanner error out in case an ambiguous /* is found. X-Git-Tag: 0.13.6~539 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddfcdff486e3f5bc3603eb89691d6e66ae258b39;p=re2c - Made scanner error out in case an ambiguous /* is found. --- diff --git a/CHANGELOG b/CHANGELOG index e3524876..9c4927f8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ Version 0.10.0 (????-??-??) --------------------------- +- Made scanner error out in case an ambiguous /* is found. - Fixed indendation of generated code. - Added support for DOS line endings. - Added experimental unicode support. @@ -19,7 +20,7 @@ Version 0.9.11 (2005-12-18) Version 0.9.10 (2005-09-04) --------------------------- -- Add -i switch to avoid generating #line information. +- Added -i switch to avoid generating #line information. - Fixed bug #1251653 re2c generate some invalid #line on WIN32. Version 0.9.9 (2005-07-21) diff --git a/scanner.re b/scanner.re index 19ddd451..3b3bfb19 100644 --- a/scanner.re +++ b/scanner.re @@ -133,7 +133,8 @@ echo: } -int Scanner::scan(){ +int Scanner::scan() +{ char *cursor = cur; uint depth; @@ -252,7 +253,8 @@ comment: else goto comment; } "/*" { ++depth; - goto comment; } + fatal("ambiguous /* found"); + goto comment; } "\n" { if(cursor == eof) RETURN(0); tok = pos = cursor; cline++; goto comment;