diff options
author | Chris Lattner <sabre@nondot.org> | 2005-09-06 21:23:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-09-06 21:23:09 +0000 |
commit | 997833247376a710e09b946e8a96c50859622c75 (patch) | |
tree | ef6e1f051fbfafc6abbfa55078af713d46b446e6 /utils/TableGen/FileLexer.l | |
parent | 5838b21cde3cbcfc198becf77af6239e10d5bf53 (diff) | |
download | external_llvm-997833247376a710e09b946e8a96c50859622c75.zip external_llvm-997833247376a710e09b946e8a96c50859622c75.tar.gz external_llvm-997833247376a710e09b946e8a96c50859622c75.tar.bz2 |
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
Diffstat (limited to 'utils/TableGen/FileLexer.l')
-rw-r--r-- | utils/TableGen/FileLexer.l | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/TableGen/FileLexer.l b/utils/TableGen/FileLexer.l index a433587..caed04e 100644 --- a/utils/TableGen/FileLexer.l +++ b/utils/TableGen/FileLexer.l @@ -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); } |