forked from OSchip/llvm-project
Tighten up the specification to allow TableGen/nested-comment.td to pass
(fixing a bug where / in a /* */ comment would cause it to not close). llvm-svn: 23248
This commit is contained in:
parent
23e2499ee4
commit
ab9eba1014
|
@ -214,10 +214,10 @@ ${Identifier} { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng);
|
|||
|
||||
|
||||
"/*" { BEGIN(comment); CommentDepth++; }
|
||||
<comment>[^*/]* /* eat anything that's not a '*' or '/' */
|
||||
<comment>"*"+[^*/]* /* eat up '*'s not followed by '/'s */
|
||||
<comment>[^*/]* {} /* eat anything that's not a '*' or '/' */
|
||||
<comment>"*"+[^*/]* {} /* eat up '*'s not followed by '/'s */
|
||||
<comment>"/*" { ++CommentDepth; }
|
||||
<comment>"/"+[^*]* /* eat up /'s not followed by *'s */
|
||||
<comment>"/"+[^*/]* {} /* eat up /'s not followed by *'s */
|
||||
<comment>"*"+"/" { if (!--CommentDepth) { BEGIN(INITIAL); } }
|
||||
<comment><<EOF>> { err() << "Unterminated comment!\n"; exit(1); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue