Disabled spawn for mingw
[fw/sdcc] / src / SDCC.lex
index 821cff05c1b0b8d7b10067561f4a0c3ed3d79fa6..cd19d787befd8efc7dc4bc4b1fefeb466818bdce 100644 (file)
@@ -110,6 +110,7 @@ struct options  save_options  ;
 "far"          { count(); TKEYWORD(XDATA);  }
 "eeprom"       { count(); TKEYWORD(EEPROM);  }
 "float"        { count(); return(FLOAT); }
+"flash"        { count(); TKEYWORD(CODE);}
 "for"          { count(); return(FOR); }
 "goto"        { count(); return(GOTO); }
 "idata"        { count(); TKEYWORD(IDATA);}
@@ -127,6 +128,7 @@ struct options  save_options  ;
 "short"        { count(); return(SHORT); }
 "signed"       { count(); return(SIGNED); }
 "sizeof"       { count(); return(SIZEOF); }
+"sram"         { count(); TKEYWORD(XDATA);}
 "static"       { count(); return(STATIC); }
 "struct"       { count(); return(STRUCT); }
 "switch"       { count(); return(SWITCH); }
@@ -141,8 +143,10 @@ struct options  save_options  ;
 "_data"               { count(); TKEYWORD(_NEAR); }
 "_code"               { count(); TKEYWORD(_CODE); }
 "_eeprom"      { count(); TKEYWORD(_EEPROM); }
+"_flash"       { count(); TKEYWORD(_CODE); }
 "_generic"     { count(); TKEYWORD(_GENERIC); }
 "_near"               { count(); TKEYWORD(_NEAR); }
+"_sram"        { count(); TKEYWORD(_XDATA);}
 "_xdata"       { count(); TKEYWORD(_XDATA);}
 "_pdata"       { count(); TKEYWORD(_PDATA); }
 "_idata"       { count(); TKEYWORD(_IDATA); }
@@ -431,6 +435,10 @@ int process_pragma(char *s)
           (*s != '\n')) 
        s++ ;    
 
+    /* First give the port a chance */
+    if (port->process_pragma && !port->process_pragma(cp))
+       return 0;
+
     /* now compare and do what needs to be done */
     if (strncmp(cp,PRAGMA_SAVE,strlen(PRAGMA_SAVE)) == 0) {
        doPragma(P_SAVE,cp+strlen(PRAGMA_SAVE));