Got rid of debug output in yacc parser. Can be re-enabled by changing

a #define, if we ever need it again.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@787 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
urchlay 2005-09-20 15:17:16 +00:00
parent 8f3204a496
commit b96efe9da8
3 changed files with 121 additions and 114 deletions

View File

@ -3,8 +3,7 @@
# can use "yacc" instead of "bison -y"
all: stella.y stella.l
flex stella.l
all: stella.y
bison -y -d stella.y

View File

@ -5,12 +5,16 @@ Expression* lastExp = 0;
#define YYERROR_VERBOSE 1
/* dump Expression stack during parsing? */
#define DEBUG_EXP 0
/* #define DEBUG_EXP 1 */
int yylex();
char *yytext;
void yyerror(char *e) {
//fprintf(stderr, "%s at token \"%s\"\n", e, yytext);
fprintf(stderr, "%s\n", e);
//if(DEBUG_EXP) fprintf(stderr, "%s at token \"%s\"\n", e, yytext);
if(DEBUG_EXP) fprintf(stderr, "%s\n", e);
errMsg = e;
// be extra paranoid about deletion
@ -58,41 +62,41 @@ void yyerror(char *e) {
%%
statement: expression { fprintf(stderr, "\ndone\n"); result.exp = $1; }
statement: expression { if(DEBUG_EXP) fprintf(stderr, "\ndone\n"); result.exp = $1; }
;
expression: expression '+' expression { fprintf(stderr, " +"); $$ = new PlusExpression($1, $3); lastExp = $$; }
| expression '-' expression { fprintf(stderr, " -"); $$ = new MinusExpression($1, $3); lastExp = $$; }
| expression '*' expression { fprintf(stderr, " *"); $$ = new MultExpression($1, $3); lastExp = $$; }
| expression '/' expression { fprintf(stderr, " /"); $$ = new DivExpression($1, $3); lastExp = $$; }
| expression '%' expression { fprintf(stderr, " %%"); $$ = new ModExpression($1, $3); lastExp = $$; }
| expression '&' expression { fprintf(stderr, " &"); $$ = new BinAndExpression($1, $3); lastExp = $$; }
| expression '|' expression { fprintf(stderr, " |"); $$ = new BinOrExpression($1, $3); lastExp = $$; }
| expression '^' expression { fprintf(stderr, " ^"); $$ = new BinXorExpression($1, $3); lastExp = $$; }
| expression '<' expression { fprintf(stderr, " <"); $$ = new LessExpression($1, $3); lastExp = $$; }
| expression '>' expression { fprintf(stderr, " >"); $$ = new GreaterExpression($1, $3); lastExp = $$; }
| expression GTE expression { fprintf(stderr, " >="); $$ = new GreaterEqualsExpression($1, $3); lastExp = $$; }
| expression LTE expression { fprintf(stderr, " <="); $$ = new LessEqualsExpression($1, $3); lastExp = $$; }
| expression NE expression { fprintf(stderr, " !="); $$ = new NotEqualsExpression($1, $3); lastExp = $$; }
| expression EQ expression { fprintf(stderr, " =="); $$ = new EqualsExpression($1, $3); lastExp = $$; }
| expression SHR expression { fprintf(stderr, " >>"); $$ = new ShiftRightExpression($1, $3); lastExp = $$; }
| expression SHL expression { fprintf(stderr, " <<"); $$ = new ShiftLeftExpression($1, $3); lastExp = $$; }
| expression LOG_OR expression { fprintf(stderr, " ||"); $$ = new LogOrExpression($1, $3); lastExp = $$; }
| expression LOG_AND expression { fprintf(stderr, " &&"); $$ = new LogAndExpression($1, $3); lastExp = $$; }
| '-' expression %prec UMINUS { fprintf(stderr, " U-"); $$ = new UnaryMinusExpression($2); lastExp = $$; }
| '~' expression %prec UMINUS { fprintf(stderr, " ~"); $$ = new BinNotExpression($2); lastExp = $$; }
| '!' expression %prec UMINUS { fprintf(stderr, " !"); $$ = new LogNotExpression($2); lastExp = $$; }
| '*' expression %prec DEREF { fprintf(stderr, " U*"); $$ = new ByteDerefExpression($2); lastExp = $$; }
| '@' expression %prec DEREF { fprintf(stderr, " U@"); $$ = new WordDerefExpression($2); lastExp = $$; }
| '<' expression { fprintf(stderr, " U<"); $$ = new LoByteExpression($2); lastExp = $$; }
| '>' expression { fprintf(stderr, " U>"); $$ = new HiByteExpression($2); lastExp = $$; }
| '(' expression ')' { fprintf(stderr, " ()"); $$ = $2; lastExp = $$; }
| expression '[' expression ']' { fprintf(stderr, " []"); $$ = new ByteDerefOffsetExpression($1, $3); lastExp = $$; }
| NUMBER { fprintf(stderr, " %d", $1); $$ = new ConstExpression($1); lastExp = $$; }
| EQUATE { fprintf(stderr, " %s", $1); $$ = new EquateExpression($1); lastExp = $$; }
| CPU_METHOD { fprintf(stderr, " (CpuMethod)"); $$ = new CpuMethodExpression($1); lastExp = $$; }
| TIA_METHOD { fprintf(stderr, " (TiaMethod)"); $$ = new TiaMethodExpression($1); lastExp = $$; }
| FUNCTION { fprintf(stderr, " (function)"); $$ = new FunctionExpression($1); lastExp = $$; }
| ERR { fprintf(stderr, " ERR"); yyerror("Invalid label or constant"); return 1; }
expression: expression '+' expression { if(DEBUG_EXP) fprintf(stderr, " +"); $$ = new PlusExpression($1, $3); lastExp = $$; }
| expression '-' expression { if(DEBUG_EXP) fprintf(stderr, " -"); $$ = new MinusExpression($1, $3); lastExp = $$; }
| expression '*' expression { if(DEBUG_EXP) fprintf(stderr, " *"); $$ = new MultExpression($1, $3); lastExp = $$; }
| expression '/' expression { if(DEBUG_EXP) fprintf(stderr, " /"); $$ = new DivExpression($1, $3); lastExp = $$; }
| expression '%' expression { if(DEBUG_EXP) fprintf(stderr, " %%"); $$ = new ModExpression($1, $3); lastExp = $$; }
| expression '&' expression { if(DEBUG_EXP) fprintf(stderr, " &"); $$ = new BinAndExpression($1, $3); lastExp = $$; }
| expression '|' expression { if(DEBUG_EXP) fprintf(stderr, " |"); $$ = new BinOrExpression($1, $3); lastExp = $$; }
| expression '^' expression { if(DEBUG_EXP) fprintf(stderr, " ^"); $$ = new BinXorExpression($1, $3); lastExp = $$; }
| expression '<' expression { if(DEBUG_EXP) fprintf(stderr, " <"); $$ = new LessExpression($1, $3); lastExp = $$; }
| expression '>' expression { if(DEBUG_EXP) fprintf(stderr, " >"); $$ = new GreaterExpression($1, $3); lastExp = $$; }
| expression GTE expression { if(DEBUG_EXP) fprintf(stderr, " >="); $$ = new GreaterEqualsExpression($1, $3); lastExp = $$; }
| expression LTE expression { if(DEBUG_EXP) fprintf(stderr, " <="); $$ = new LessEqualsExpression($1, $3); lastExp = $$; }
| expression NE expression { if(DEBUG_EXP) fprintf(stderr, " !="); $$ = new NotEqualsExpression($1, $3); lastExp = $$; }
| expression EQ expression { if(DEBUG_EXP) fprintf(stderr, " =="); $$ = new EqualsExpression($1, $3); lastExp = $$; }
| expression SHR expression { if(DEBUG_EXP) fprintf(stderr, " >>"); $$ = new ShiftRightExpression($1, $3); lastExp = $$; }
| expression SHL expression { if(DEBUG_EXP) fprintf(stderr, " <<"); $$ = new ShiftLeftExpression($1, $3); lastExp = $$; }
| expression LOG_OR expression { if(DEBUG_EXP) fprintf(stderr, " ||"); $$ = new LogOrExpression($1, $3); lastExp = $$; }
| expression LOG_AND expression { if(DEBUG_EXP) fprintf(stderr, " &&"); $$ = new LogAndExpression($1, $3); lastExp = $$; }
| '-' expression %prec UMINUS { if(DEBUG_EXP) fprintf(stderr, " U-"); $$ = new UnaryMinusExpression($2); lastExp = $$; }
| '~' expression %prec UMINUS { if(DEBUG_EXP) fprintf(stderr, " ~"); $$ = new BinNotExpression($2); lastExp = $$; }
| '!' expression %prec UMINUS { if(DEBUG_EXP) fprintf(stderr, " !"); $$ = new LogNotExpression($2); lastExp = $$; }
| '*' expression %prec DEREF { if(DEBUG_EXP) fprintf(stderr, " U*"); $$ = new ByteDerefExpression($2); lastExp = $$; }
| '@' expression %prec DEREF { if(DEBUG_EXP) fprintf(stderr, " U@"); $$ = new WordDerefExpression($2); lastExp = $$; }
| '<' expression { if(DEBUG_EXP) fprintf(stderr, " U<"); $$ = new LoByteExpression($2); lastExp = $$; }
| '>' expression { if(DEBUG_EXP) fprintf(stderr, " U>"); $$ = new HiByteExpression($2); lastExp = $$; }
| '(' expression ')' { if(DEBUG_EXP) fprintf(stderr, " ()"); $$ = $2; lastExp = $$; }
| expression '[' expression ']' { if(DEBUG_EXP) fprintf(stderr, " []"); $$ = new ByteDerefOffsetExpression($1, $3); lastExp = $$; }
| NUMBER { if(DEBUG_EXP) fprintf(stderr, " %d", $1); $$ = new ConstExpression($1); lastExp = $$; }
| EQUATE { if(DEBUG_EXP) fprintf(stderr, " %s", $1); $$ = new EquateExpression($1); lastExp = $$; }
| CPU_METHOD { if(DEBUG_EXP) fprintf(stderr, " (CpuMethod)"); $$ = new CpuMethodExpression($1); lastExp = $$; }
| TIA_METHOD { if(DEBUG_EXP) fprintf(stderr, " (TiaMethod)"); $$ = new TiaMethodExpression($1); lastExp = $$; }
| FUNCTION { if(DEBUG_EXP) fprintf(stderr, " (function)"); $$ = new FunctionExpression($1); lastExp = $$; }
| ERR { if(DEBUG_EXP) fprintf(stderr, " ERR"); yyerror("Invalid label or constant"); return 1; }
;
%%

View File

@ -29,12 +29,16 @@ Expression* lastExp = 0;
#define YYERROR_VERBOSE 1
/* dump Expression stack during parsing? */
#define DEBUG_EXP 0
/* #define DEBUG_EXP 1 */
int yylex();
char *yytext;
void yyerror(char *e) {
//fprintf(stderr, "%s at token \"%s\"\n", e, yytext);
fprintf(stderr, "%s\n", e);
//if(DEBUG_EXP) fprintf(stderr, "%s at token \"%s\"\n", e, yytext);
if(DEBUG_EXP) fprintf(stderr, "%s\n", e);
errMsg = e;
// be extra paranoid about deletion
@ -45,7 +49,7 @@ void yyerror(char *e) {
}
#line 25 "stella.y"
#line 29 "stella.y"
#ifndef YYSTYPE
typedef union {
int val;
@ -134,10 +138,10 @@ static const short yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
0, 61, 64, 65, 66, 67, 68, 69, 70, 71,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
92, 93, 94, 95, 96
0, 65, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100
};
#endif
@ -973,140 +977,140 @@ yyreduce:
switch (yyn) {
case 1:
#line 61 "stella.y"
{ fprintf(stderr, "\ndone\n"); result.exp = yyvsp[0].exp; }
#line 65 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, "\ndone\n"); result.exp = yyvsp[0].exp; }
break;
case 2:
#line 64 "stella.y"
{ fprintf(stderr, " +"); yyval.exp = new PlusExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 68 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " +"); yyval.exp = new PlusExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 3:
#line 65 "stella.y"
{ fprintf(stderr, " -"); yyval.exp = new MinusExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 69 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " -"); yyval.exp = new MinusExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 4:
#line 66 "stella.y"
{ fprintf(stderr, " *"); yyval.exp = new MultExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 70 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " *"); yyval.exp = new MultExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 5:
#line 67 "stella.y"
{ fprintf(stderr, " /"); yyval.exp = new DivExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 71 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " /"); yyval.exp = new DivExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 6:
#line 68 "stella.y"
{ fprintf(stderr, " %%"); yyval.exp = new ModExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 72 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " %%"); yyval.exp = new ModExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 7:
#line 69 "stella.y"
{ fprintf(stderr, " &"); yyval.exp = new BinAndExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 73 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " &"); yyval.exp = new BinAndExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 8:
#line 70 "stella.y"
{ fprintf(stderr, " |"); yyval.exp = new BinOrExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 74 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " |"); yyval.exp = new BinOrExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 9:
#line 71 "stella.y"
{ fprintf(stderr, " ^"); yyval.exp = new BinXorExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 75 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " ^"); yyval.exp = new BinXorExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 10:
#line 72 "stella.y"
{ fprintf(stderr, " <"); yyval.exp = new LessExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 76 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " <"); yyval.exp = new LessExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 11:
#line 73 "stella.y"
{ fprintf(stderr, " >"); yyval.exp = new GreaterExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 77 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " >"); yyval.exp = new GreaterExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 12:
#line 74 "stella.y"
{ fprintf(stderr, " >="); yyval.exp = new GreaterEqualsExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 78 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " >="); yyval.exp = new GreaterEqualsExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 13:
#line 75 "stella.y"
{ fprintf(stderr, " <="); yyval.exp = new LessEqualsExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 79 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " <="); yyval.exp = new LessEqualsExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 14:
#line 76 "stella.y"
{ fprintf(stderr, " !="); yyval.exp = new NotEqualsExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 80 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " !="); yyval.exp = new NotEqualsExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 15:
#line 77 "stella.y"
{ fprintf(stderr, " =="); yyval.exp = new EqualsExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 81 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " =="); yyval.exp = new EqualsExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 16:
#line 78 "stella.y"
{ fprintf(stderr, " >>"); yyval.exp = new ShiftRightExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 82 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " >>"); yyval.exp = new ShiftRightExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 17:
#line 79 "stella.y"
{ fprintf(stderr, " <<"); yyval.exp = new ShiftLeftExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 83 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " <<"); yyval.exp = new ShiftLeftExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 18:
#line 80 "stella.y"
{ fprintf(stderr, " ||"); yyval.exp = new LogOrExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 84 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " ||"); yyval.exp = new LogOrExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 19:
#line 81 "stella.y"
{ fprintf(stderr, " &&"); yyval.exp = new LogAndExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
#line 85 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " &&"); yyval.exp = new LogAndExpression(yyvsp[-2].exp, yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 20:
#line 82 "stella.y"
{ fprintf(stderr, " U-"); yyval.exp = new UnaryMinusExpression(yyvsp[0].exp); lastExp = yyval.exp; }
#line 86 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " U-"); yyval.exp = new UnaryMinusExpression(yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 21:
#line 83 "stella.y"
{ fprintf(stderr, " ~"); yyval.exp = new BinNotExpression(yyvsp[0].exp); lastExp = yyval.exp; }
#line 87 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " ~"); yyval.exp = new BinNotExpression(yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 22:
#line 84 "stella.y"
{ fprintf(stderr, " !"); yyval.exp = new LogNotExpression(yyvsp[0].exp); lastExp = yyval.exp; }
#line 88 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " !"); yyval.exp = new LogNotExpression(yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 23:
#line 85 "stella.y"
{ fprintf(stderr, " U*"); yyval.exp = new ByteDerefExpression(yyvsp[0].exp); lastExp = yyval.exp; }
#line 89 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " U*"); yyval.exp = new ByteDerefExpression(yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 24:
#line 86 "stella.y"
{ fprintf(stderr, " U@"); yyval.exp = new WordDerefExpression(yyvsp[0].exp); lastExp = yyval.exp; }
#line 90 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " U@"); yyval.exp = new WordDerefExpression(yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 25:
#line 87 "stella.y"
{ fprintf(stderr, " U<"); yyval.exp = new LoByteExpression(yyvsp[0].exp); lastExp = yyval.exp; }
#line 91 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " U<"); yyval.exp = new LoByteExpression(yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 26:
#line 88 "stella.y"
{ fprintf(stderr, " U>"); yyval.exp = new HiByteExpression(yyvsp[0].exp); lastExp = yyval.exp; }
#line 92 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " U>"); yyval.exp = new HiByteExpression(yyvsp[0].exp); lastExp = yyval.exp; }
break;
case 27:
#line 89 "stella.y"
{ fprintf(stderr, " ()"); yyval.exp = yyvsp[-1].exp; lastExp = yyval.exp; }
#line 93 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " ()"); yyval.exp = yyvsp[-1].exp; lastExp = yyval.exp; }
break;
case 28:
#line 90 "stella.y"
{ fprintf(stderr, " []"); yyval.exp = new ByteDerefOffsetExpression(yyvsp[-3].exp, yyvsp[-1].exp); lastExp = yyval.exp; }
#line 94 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " []"); yyval.exp = new ByteDerefOffsetExpression(yyvsp[-3].exp, yyvsp[-1].exp); lastExp = yyval.exp; }
break;
case 29:
#line 91 "stella.y"
{ fprintf(stderr, " %d", yyvsp[0].val); yyval.exp = new ConstExpression(yyvsp[0].val); lastExp = yyval.exp; }
#line 95 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " %d", yyvsp[0].val); yyval.exp = new ConstExpression(yyvsp[0].val); lastExp = yyval.exp; }
break;
case 30:
#line 92 "stella.y"
{ fprintf(stderr, " %s", yyvsp[0].equate); yyval.exp = new EquateExpression(yyvsp[0].equate); lastExp = yyval.exp; }
#line 96 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " %s", yyvsp[0].equate); yyval.exp = new EquateExpression(yyvsp[0].equate); lastExp = yyval.exp; }
break;
case 31:
#line 93 "stella.y"
{ fprintf(stderr, " (CpuMethod)"); yyval.exp = new CpuMethodExpression(yyvsp[0].cpuMethod); lastExp = yyval.exp; }
#line 97 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " (CpuMethod)"); yyval.exp = new CpuMethodExpression(yyvsp[0].cpuMethod); lastExp = yyval.exp; }
break;
case 32:
#line 94 "stella.y"
{ fprintf(stderr, " (TiaMethod)"); yyval.exp = new TiaMethodExpression(yyvsp[0].tiaMethod); lastExp = yyval.exp; }
#line 98 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " (TiaMethod)"); yyval.exp = new TiaMethodExpression(yyvsp[0].tiaMethod); lastExp = yyval.exp; }
break;
case 33:
#line 95 "stella.y"
{ fprintf(stderr, " (function)"); yyval.exp = new FunctionExpression(yyvsp[0].function); lastExp = yyval.exp; }
#line 99 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " (function)"); yyval.exp = new FunctionExpression(yyvsp[0].function); lastExp = yyval.exp; }
break;
case 34:
#line 96 "stella.y"
{ fprintf(stderr, " ERR"); yyerror("Invalid label or constant"); return 1; }
#line 100 "stella.y"
{ if(DEBUG_EXP) fprintf(stderr, " ERR"); yyerror("Invalid label or constant"); return 1; }
break;
}
@ -1341,5 +1345,5 @@ yyreturn:
#endif
return yyresult;
}
#line 98 "stella.y"
#line 102 "stella.y"