Fixed lexical eror when a preprocessor directive is followed by a single line comment that starts with "//*".

This commit fixes a lexical eror when a preprocessor directive is
followed by a single line comment that starts with "//*".

The following code could not be tokenized:

#define LSTFVLES_CPP  //*

It triggers the following error:

net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file
'foo.cpp' at line 2, column 0.  Encountered: <EOF> after : ""
This commit is contained in:
Jan van Nunen
2015-01-12 17:24:26 +01:00
parent 5c2df4c877
commit ceef6cd236
2 changed files with 6 additions and 0 deletions

View File

@ -174,6 +174,7 @@ SKIP :
{
"\n" : DEFAULT
| "/*" : IN_PREPROCESSOR_OUTPUT_COMMENT
| "//" : IN_LINE_COMMENT
}
<PREPROCESSOR_OUTPUT> MORE: