diff options
Diffstat (limited to 'support/tools/TableGen')
-rw-r--r-- | support/tools/TableGen/FileLexer.l | 2 | ||||
-rw-r--r-- | support/tools/TableGen/FileParser.y | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/support/tools/TableGen/FileLexer.l b/support/tools/TableGen/FileLexer.l index 4f54a52..98370a7 100644 --- a/support/tools/TableGen/FileLexer.l +++ b/support/tools/TableGen/FileLexer.l @@ -166,6 +166,8 @@ in { return IN; } {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; } diff --git a/support/tools/TableGen/FileParser.y b/support/tools/TableGen/FileParser.y index 0ab3e5b..5b983eb 100644 --- a/support/tools/TableGen/FileParser.y +++ b/support/tools/TableGen/FileParser.y @@ -171,7 +171,7 @@ static void addSubClass(Record *SC, const std::vector<Init*> &TemplateArgs) { %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 |