parseaut: fix parsing of /*****/
* spot/parseaut/scanaut.ll: Here. * tests/core/strength.test: Add a test. * NEWS: Mention the bug.
This commit is contained in:
parent
17c57b5272
commit
ae82f1a85d
3 changed files with 8 additions and 6 deletions
|
|
@ -76,7 +76,7 @@ identifier [[:alpha:]_][[:alnum:]_.-]*
|
|||
{eol} yylloc->lines(yyleng); yylloc->step();
|
||||
{eol2} yylloc->lines(yyleng / 2); yylloc->step();
|
||||
[ \t\v\f]+ yylloc->step();
|
||||
"/""*"+ {
|
||||
"/*" {
|
||||
orig_cond = YY_START;
|
||||
BEGIN(in_COMMENT);
|
||||
comment_level = 1;
|
||||
|
|
@ -281,13 +281,13 @@ identifier [[:alpha:]_][[:alnum:]_.-]*
|
|||
|
||||
|
||||
<in_COMMENT>{
|
||||
"/""*"+ ++comment_level;
|
||||
"/*" ++comment_level;
|
||||
[^*/\n\r]* continue;
|
||||
"/"[^*\n\r]* continue;
|
||||
"*"+[^*/\n\r]* continue;
|
||||
{eol} yylloc->lines(yyleng); yylloc->end.column = 1;
|
||||
"*" continue;
|
||||
{eol} yylloc->lines(yyleng); yylloc->end.column = 1;
|
||||
{eol2} yylloc->lines(yyleng / 2); yylloc->end.column = 1;
|
||||
"*"+"/" {
|
||||
"*/" {
|
||||
if (--comment_level == 0)
|
||||
{
|
||||
yylloc->step();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue