mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5838b21cde
commit
9978332473
@ -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…
x
Reference in New Issue
Block a user