[llvm-commits] CVS: llvm/utils/TableGen/FileLexer.l FileParser.y

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 10 18:59:00 PDT 2003


Changes in directory llvm/utils/TableGen:

FileLexer.l updated: 1.11 -> 1.12
FileParser.y updated: 1.20 -> 1.21

---
Log message:

Recognize $foo as a variable


---
Diffs of the changes:

Index: llvm/utils/TableGen/FileLexer.l
diff -u llvm/utils/TableGen/FileLexer.l:1.11 llvm/utils/TableGen/FileLexer.l:1.12
--- llvm/utils/TableGen/FileLexer.l:1.11	Mon Aug  4 15:08:28 2003
+++ llvm/utils/TableGen/FileLexer.l	Sun Aug 10 17:04:25 2003
@@ -166,6 +166,8 @@
 
 {Identifier}   { Filelval.StrVal = new std::string(yytext, yytext+yyleng);
                  return ID; }
+${Identifier}  { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng);
+                 return VARNAME; } 
 
 {StringVal}    { Filelval.StrVal = new std::string(yytext+1, yytext+yyleng-1);
                  return STRVAL; }


Index: llvm/utils/TableGen/FileParser.y
diff -u llvm/utils/TableGen/FileParser.y:1.20 llvm/utils/TableGen/FileParser.y:1.21
--- llvm/utils/TableGen/FileParser.y:1.20	Mon Aug  4 15:44:43 2003
+++ llvm/utils/TableGen/FileParser.y	Sun Aug 10 17:04:25 2003
@@ -171,7 +171,7 @@
 
 %token INT BIT STRING BITS LIST CODE DAG CLASS DEF FIELD LET IN
 %token <IntVal>      INTVAL
-%token <StrVal>      ID STRVAL CODEFRAGMENT
+%token <StrVal>      ID VARNAME STRVAL CODEFRAGMENT
 
 %type <Ty>           Type
 %type <Rec>          ClassInst DefInst Object ObjectBody ClassID





More information about the llvm-commits mailing list