Recognize $foo as a variable

llvm-svn: 7712
This commit is contained in:
Chris Lattner 2003-08-10 22:04:25 +00:00
parent ba2cf32f00
commit 4eaf72fc3b
2 changed files with 3 additions and 1 deletions

View File

@ -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; }

View File

@ -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