Remove 'state' keyword from compiler (bug 4572, r=dvander).
This commit is contained in:
parent
bdbc3c3b58
commit
b749bbf42b
@ -293,7 +293,7 @@ typedef struct s_stringpair {
|
|||||||
*/
|
*/
|
||||||
#define tFIRST 256 /* value of first multi-character operator */
|
#define tFIRST 256 /* value of first multi-character operator */
|
||||||
#define tMIDDLE 280 /* value of last multi-character operator */
|
#define tMIDDLE 280 /* value of last multi-character operator */
|
||||||
#define tLAST 333 /* value of last multi-character match-able token */
|
#define tLAST 332 /* value of last multi-character match-able token */
|
||||||
/* multi-character operators */
|
/* multi-character operators */
|
||||||
#define taMULT 256 /* *= */
|
#define taMULT 256 /* *= */
|
||||||
#define taDIV 257 /* /= */
|
#define taDIV 257 /* /= */
|
||||||
@ -350,40 +350,39 @@ typedef struct s_stringpair {
|
|||||||
#define tRETURN 307
|
#define tRETURN 307
|
||||||
#define tSIZEOF 308
|
#define tSIZEOF 308
|
||||||
#define tSLEEP 309
|
#define tSLEEP 309
|
||||||
#define tSTATE 310
|
#define tSTATIC 310
|
||||||
#define tSTATIC 311
|
#define tSTOCK 311
|
||||||
#define tSTOCK 312
|
#define tSTRUCT 312
|
||||||
#define tSTRUCT 313
|
#define tSWITCH 313
|
||||||
#define tSWITCH 314
|
#define tTAGOF 314
|
||||||
#define tTAGOF 315
|
#define tTHEN 315
|
||||||
#define tTHEN 316
|
#define tWHILE 316
|
||||||
#define tWHILE 317
|
|
||||||
/* compiler directives */
|
/* compiler directives */
|
||||||
#define tpASSERT 318 /* #assert */
|
#define tpASSERT 317 /* #assert */
|
||||||
#define tpDEFINE 319
|
#define tpDEFINE 318
|
||||||
#define tpELSE 320 /* #else */
|
#define tpELSE 319 /* #else */
|
||||||
#define tpELSEIF 321 /* #elseif */
|
#define tpELSEIF 320 /* #elseif */
|
||||||
#define tpEMIT 322
|
#define tpEMIT 321
|
||||||
#define tpENDIF 323
|
#define tpENDIF 322
|
||||||
#define tpENDINPUT 324
|
#define tpENDINPUT 323
|
||||||
#define tpENDSCRPT 325
|
#define tpENDSCRPT 324
|
||||||
#define tpERROR 326
|
#define tpERROR 325
|
||||||
#define tpFILE 327
|
#define tpFILE 326
|
||||||
#define tpIF 328 /* #if */
|
#define tpIF 327 /* #if */
|
||||||
#define tINCLUDE 329
|
#define tINCLUDE 328
|
||||||
#define tpLINE 330
|
#define tpLINE 329
|
||||||
#define tpPRAGMA 331
|
#define tpPRAGMA 330
|
||||||
#define tpTRYINCLUDE 332
|
#define tpTRYINCLUDE 331
|
||||||
#define tpUNDEF 333
|
#define tpUNDEF 332
|
||||||
/* semicolon is a special case, because it can be optional */
|
/* semicolon is a special case, because it can be optional */
|
||||||
#define tTERM 334 /* semicolon or newline */
|
#define tTERM 333 /* semicolon or newline */
|
||||||
#define tENDEXPR 335 /* forced end of expression */
|
#define tENDEXPR 334 /* forced end of expression */
|
||||||
/* other recognized tokens */
|
/* other recognized tokens */
|
||||||
#define tNUMBER 336 /* integer number */
|
#define tNUMBER 335 /* integer number */
|
||||||
#define tRATIONAL 337 /* rational number */
|
#define tRATIONAL 336 /* rational number */
|
||||||
#define tSYMBOL 338
|
#define tSYMBOL 337
|
||||||
#define tLABEL 339
|
#define tLABEL 338
|
||||||
#define tSTRING 340
|
#define tSTRING 339
|
||||||
#define tEXPR 341 /* for assigment to "lastst" only (see SC1.C) */
|
#define tEXPR 341 /* for assigment to "lastst" only (see SC1.C) */
|
||||||
#define tENDLESS 342 /* endless loop, for assigment to "lastst" only */
|
#define tENDLESS 342 /* endless loop, for assigment to "lastst" only */
|
||||||
#define tEMPTYBLOCK 343 /* empty blocks for AM bug 4825 */
|
#define tEMPTYBLOCK 343 /* empty blocks for AM bug 4825 */
|
||||||
|
@ -5730,10 +5730,6 @@ static void statement(int *lastindent,int allow_decl)
|
|||||||
dosleep();
|
dosleep();
|
||||||
lastst=tSLEEP;
|
lastst=tSLEEP;
|
||||||
break;
|
break;
|
||||||
case tSTATE:
|
|
||||||
dostate();
|
|
||||||
lastst=tSTATE;
|
|
||||||
break;
|
|
||||||
case tCONST:
|
case tCONST:
|
||||||
decl_const(sLOCAL);
|
decl_const(sLOCAL);
|
||||||
break;
|
break;
|
||||||
|
@ -1852,7 +1852,7 @@ char *sc_tokens[] = {
|
|||||||
"assert", "*begin", "break", "case", "cellsof", "chars", "const", "continue", "default",
|
"assert", "*begin", "break", "case", "cellsof", "chars", "const", "continue", "default",
|
||||||
"defined", "do", "else", "*end", "enum", "exit", "for", "forward", "funcenum", "functag", "goto",
|
"defined", "do", "else", "*end", "enum", "exit", "for", "forward", "funcenum", "functag", "goto",
|
||||||
"if", "native", "new", "decl", "operator", "public", "return", "sizeof",
|
"if", "native", "new", "decl", "operator", "public", "return", "sizeof",
|
||||||
"sleep", "state", "static", "stock", "struct", "switch", "tagof", "*then", "while",
|
"sleep", "static", "stock", "struct", "switch", "tagof", "*then", "while",
|
||||||
"#assert", "#define", "#else", "#elseif", "#emit", "#endif", "#endinput",
|
"#assert", "#define", "#else", "#elseif", "#emit", "#endif", "#endinput",
|
||||||
"#endscript", "#error", "#file", "#if", "#include", "#line", "#pragma",
|
"#endscript", "#error", "#file", "#if", "#include", "#line", "#pragma",
|
||||||
"#tryinclude", "#undef",
|
"#tryinclude", "#undef",
|
||||||
|
@ -1703,22 +1703,6 @@ static int hier2(value *lval)
|
|||||||
while (paranthese--)
|
while (paranthese--)
|
||||||
needtoken(')');
|
needtoken(')');
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case tSTATE: {
|
|
||||||
constvalue *automaton;
|
|
||||||
constvalue *state;
|
|
||||||
if (sc_getstateid(&automaton,&state)) {
|
|
||||||
assert(automaton!=NULL);
|
|
||||||
assert((automaton->index==0 && automaton->name[0]=='\0') || automaton->index>0);
|
|
||||||
loadreg(automaton->value,sALT);
|
|
||||||
assert(state!=NULL);
|
|
||||||
ldconst(state->value,sPRI);
|
|
||||||
ob_eq();
|
|
||||||
clear_value(lval);
|
|
||||||
lval->ident=iEXPRESSION;
|
|
||||||
lval->tag=pc_addtag("bool");
|
|
||||||
} /* if */
|
|
||||||
return FALSE;
|
|
||||||
} /* case */
|
|
||||||
default:
|
default:
|
||||||
lexpush();
|
lexpush();
|
||||||
lvalue=hier1(lval);
|
lvalue=hier1(lval);
|
||||||
|
Loading…
Reference in New Issue
Block a user