mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Recognize $foo as a variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7712 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a4a53a5b93
commit
fb9ea58eb1
@ -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; }
|
||||
|
@ -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
|
||||
|
@ -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; }
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user