X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCC.lex;h=b67cda3da8f7c1fd7747e2eb381e20574cea6955;hb=332b292efce162f00db0c6dfe2a444d38c601b04;hp=447560518ff3d0164067cbf819495b8e3751ae87;hpb=3aa05aad7470158da19fe86b13c163d7a325152c;p=fw%2Fsdcc diff --git a/src/SDCC.lex b/src/SDCC.lex index 44756051..b67cda3d 100644 --- a/src/SDCC.lex +++ b/src/SDCC.lex @@ -76,7 +76,8 @@ struct options save_options ; P_NOGCSE , P_CALLEE_SAVES, P_EXCLUDE , - P_LOOPREV + P_LOOPREV , + P_OVERLAY }; %} @@ -171,6 +172,9 @@ struct options save_options ; "while" { count(); return(WHILE); } "xdata" { count(); TKEYWORD(XDATA); } "..." { count(); return(VAR_ARGS);} +"__typeof" { count(); return TYPEOF;} +"_JavaNative" { count(); TKEYWORD(JAVANATIVE);} +"_overlay" { count(); TKEYWORD(OVERLAY);} {L}({L}|{D})* { count(); return(check_type()); } 0[xX]{H}+{IS}? { count(); yylval.val = constVal(yytext); return(CONSTANT); } 0{D}+{IS}? { count(); yylval.val = constVal(yytext); return(CONSTANT); } @@ -456,6 +460,8 @@ void doPragma (int op, char *cp) case P_LOOPREV: optimize.noLoopReverse = 1; break; + case P_OVERLAY: + break; /* notyet */ } } @@ -567,10 +573,13 @@ int yyerror(char *s) { fflush(stdout); - if (yylineno && filename) - fprintf(stdout,"\n%s:%d: %s: token -> '%s' ; column %d\n", - filename,yylineno, - s,yytext,column); - fatalError++; + if (yylineno && filename) { + fprintf(stdout,"\n%s:%d: %s: token -> '%s' ; column %d\n", + filename,yylineno, + s,yytext,column); + fatalError++; + } else { + // this comes from an empy file, no problem + } return 0; }