- Fixed: G_InitLevelLocals() needs to OR in the crouching bits, otherwise it

discards the jumping bits.
- ProcessActor() now sets C mode before retrieving the actor's name.
- Fixed: The new SC_GetString() scanner accepted slashes at the end of tokens
  when not in C mode, even if they were the start of a comment. Now if you
  want a slash at the end, you must quote it.


SVN r211 (trunk)
This commit is contained in:
Randy Heit 2006-06-21 23:22:17 +00:00
parent 729e3b346d
commit 9eb0aa1a02
8 changed files with 292 additions and 253 deletions

View file

@ -1,3 +1,11 @@
June 21, 2006
- Fixed: G_InitLevelLocals() needs to OR in the crouching bits, otherwise it
discards the jumping bits.
- ProcessActor() now sets C mode before retrieving the actor's name.
- Fixed: The new SC_GetString() scanner accepted slashes at the end of tokens
when not in C mode, even if they were the start of a comment. Now if you
want a slash at the end, you must quote it.
June 21, 2006 (Changes by Graf Zahl) June 21, 2006 (Changes by Graf Zahl)
- Fixed: Decal actors with an invalid decal texture caused a crash. - Fixed: Decal actors with an invalid decal texture caused a crash.
- Fixed: Player could crouch while dead. - Fixed: Player could crouch while dead.

View file

@ -308,7 +308,7 @@ static void ParseDecorate (void (*process)(FState *, int))
FName typeName; FName typeName;
int recursion=0; int recursion=0;
// Get actor class name. The A prefix is added automatically. // Get actor class name.
while (true) while (true)
{ {
if (!SC_GetString ()) if (!SC_GetString ())

View file

@ -2212,9 +2212,9 @@ void G_InitLevelLocals ()
if (level.flags & LEVEL_JUMP_NO) if (level.flags & LEVEL_JUMP_NO)
set = DF_NO_JUMP; set = DF_NO_JUMP;
if (level.flags & LEVEL_CROUCH_YES) if (level.flags & LEVEL_CROUCH_YES)
clear = DF_NO_CROUCH; clear |= DF_NO_CROUCH;
if (level.flags & LEVEL_CROUCH_NO) if (level.flags & LEVEL_CROUCH_NO)
set = DF_NO_CROUCH; set |= DF_NO_CROUCH;
if (level.flags & LEVEL_FREELOOK_YES) if (level.flags & LEVEL_FREELOOK_YES)
clear |= DF_NO_FREELOOK; clear |= DF_NO_FREELOOK;
if (level.flags & LEVEL_FREELOOK_NO) if (level.flags & LEVEL_FREELOOK_NO)

View file

@ -75,7 +75,8 @@ static bool FreeScript = false;
static char *SavedScriptPtr; static char *SavedScriptPtr;
static int SavedScriptLine; static int SavedScriptLine;
static bool CMode; static bool CMode;
static bool Escape=true; static bool Escape = true;
static bool AtTermed;
// CODE -------------------------------------------------------------------- // CODE --------------------------------------------------------------------
@ -251,6 +252,15 @@ void SC_SetCMode (bool cmode)
CMode = cmode; CMode = cmode;
} }
//==========================================================================
//
// SC_SetEscape
//
// Turns the escape sequence \" in strings on or off. If it's off, that
// means you can't include quotation marks inside strings.
//
//==========================================================================
void SC_SetEscape (bool esc) void SC_SetEscape (bool esc)
{ {
Escape = esc; Escape = esc;

View file

@ -6,8 +6,17 @@
#define YYMARKER marker #define YYMARKER marker
// This buffer must be as large as the largest YYFILL call // This buffer must be as large as the largest YYFILL call
YYCTYPE eofbuf[2]; YYCTYPE eofbuf[3];
#define YYFILL(n) { if(n == 2) { eofbuf[0] = *cursor; } eofbuf[n-1] = '\n'; cursor = eofbuf; limit = eofbuf + n - 1; sc_End = true; } #define YYFILL(n) \
{ if(!sc_End) { \
if(n == 2) { eofbuf[0] = *cursor; } \
else if(n == 3) { eofbuf[0] = *cursor; eofbuf[1] = *(cursor + 1); } \
eofbuf[n-1] = '\n'; \
cursor = eofbuf; \
limit = eofbuf + n - 1; \
sc_End = true; } \
} \
assert(n <= 3) // Semicolon intentionally omitted
//#define YYDEBUG(s,c) { Printf ("%d: %02x\n", s, c); } //#define YYDEBUG(s,c) { Printf ("%d: %02x\n", s, c); }
#define YYDEBUG(s,c) #define YYDEBUG(s,c)
@ -18,14 +27,15 @@
std1: std1:
tok = YYCURSOR; tok = YYCURSOR;
std2: std2:
#line 33 "src/sc_man_scanner.re" #line 43 "src/sc_man_scanner.re"
if (!CMode) if (!CMode)
{ {
#line 27 "src/sc_man_scanner.h" #line 36 "src/sc_man_scanner.h"
{ {
YYCTYPE yych; YYCTYPE yych;
unsigned int yyaccept = 0;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR; yych = *YYCURSOR;
@ -40,7 +50,7 @@ std2:
} }
} else { } else {
if(yych <= '<') { if(yych <= '<') {
if(yych == ';') goto yy4; if(yych == ';') goto yy5;
goto yy14; goto yy14;
} else { } else {
if(yych <= '=') goto yy12; if(yych <= '=') goto yy12;
@ -50,156 +60,169 @@ std2:
} }
} }
yy2: yy2:
#line 47 "src/sc_man_scanner.re" #line 57 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 56 "src/sc_man_scanner.h" #line 66 "src/sc_man_scanner.h"
yy3: yy3:
yych = *++YYCURSOR; yyaccept = 0;
if(yych == '*') goto yy28; yych = *(YYMARKER = ++YYCURSOR);
if(yych == '/') goto yy24; if(yych <= '/') {
goto yy19; if(yych <= '"') {
if(yych == '!') goto yy19;
} else {
if(yych == '*') goto yy27;
if(yych <= '.') goto yy19;
goto yy23;
}
} else {
if(yych <= '<') {
if(yych != ';') goto yy19;
} else {
if(yych <= '=') goto yy4;
if(yych <= 'z') goto yy19;
if(yych >= '~') goto yy19;
}
}
yy4: yy4:
yych = *++YYCURSOR; #line 59 "src/sc_man_scanner.re"
goto yy25;
#line 49 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 67 "src/sc_man_scanner.h" #line 90 "src/sc_man_scanner.h"
yy5:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
goto yy24;
yy6: yy6:
++YYCURSOR; ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
goto yy23; goto yy22;
yy7: yy7:
#line 40 "src/sc_man_scanner.re" #line 50 "src/sc_man_scanner.re"
{ goto std1; } { goto std1; }
#line 75 "src/sc_man_scanner.h" #line 102 "src/sc_man_scanner.h"
yy8: yy8:
++YYCURSOR; ++YYCURSOR;
#line 41 "src/sc_man_scanner.re" #line 51 "src/sc_man_scanner.re"
{ goto newline; } { goto newline; }
#line 80 "src/sc_man_scanner.h" #line 107 "src/sc_man_scanner.h"
yy10: yy10:
++YYCURSOR; ++YYCURSOR;
#line 42 "src/sc_man_scanner.re" #line 52 "src/sc_man_scanner.re"
{ goto string; } { goto string; }
#line 85 "src/sc_man_scanner.h" #line 112 "src/sc_man_scanner.h"
yy12: yy12:
++YYCURSOR; ++YYCURSOR;
#line 44 "src/sc_man_scanner.re" #line 54 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 90 "src/sc_man_scanner.h" #line 117 "src/sc_man_scanner.h"
yy14: yy14:
yych = *++YYCURSOR; yyaccept = 1;
goto yy17; yych = *(YYMARKER = ++YYCURSOR);
goto yy18;
yy15: yy15:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych <= '/') { if(yych <= '/') {
if(yych <= '"') { if(yych <= '"') {
if(yych == '!') goto yy18; if(yych == '!') goto yy19;
goto yy2;
} else { } else {
if(yych == '*') goto yy2; if(yych == '*') goto yy16;
if(yych <= '.') goto yy18; if(yych <= '.') goto yy19;
goto yy2;
} }
} else { } else {
if(yych <= '<') { if(yych <= '<') {
if(yych == ';') goto yy2; if(yych != ';') goto yy19;
goto yy18;
} else { } else {
if(yych <= '=') goto yy2; if(yych <= '=') goto yy16;
if(yych <= 'z') goto yy18; if(yych <= 'z') goto yy19;
if(yych <= '}') goto yy2; if(yych >= '~') goto yy19;
goto yy18;
} }
} }
yy16: yy16:
++YYCURSOR; YYCURSOR = YYMARKER;
if(yyaccept <= 0) {
goto yy4;
} else {
goto yy2;
}
yy17:
yyaccept = 1;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
yy17: yy18:
if(yych <= ':') { if(yych <= ':') {
if(yych <= '"') { if(yych <= '"') {
if(yych == '!') goto yy16; if(yych == '!') goto yy17;
goto yy2; goto yy2;
} else { } else {
if(yych == '/') goto yy15; if(yych == '/') goto yy15;
goto yy16; goto yy17;
} }
} else { } else {
if(yych <= '=') { if(yych <= '=') {
if(yych == '<') goto yy16; if(yych == '<') goto yy17;
goto yy2; goto yy2;
} else { } else {
if(yych <= 'z') goto yy16; if(yych <= 'z') goto yy17;
if(yych <= '}') goto yy2; if(yych <= '}') goto yy2;
goto yy16; goto yy17;
} }
} }
yy18: yy19:
++YYCURSOR; yyaccept = 1;
YYMARKER = ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
yy19: if(yych <= ':') {
if(yych <= '/') {
if(yych <= '"') { if(yych <= '"') {
if(yych == '!') goto yy18; if(yych == '!') goto yy19;
goto yy2; goto yy2;
} else { } else {
if(yych == '*') goto yy20; if(yych == '/') goto yy15;
if(yych <= '.') goto yy18; goto yy19;
goto yy15;
} }
} else { } else {
if(yych <= '<') { if(yych <= '=') {
if(yych == ';') goto yy2; if(yych == '<') goto yy19;
goto yy18; goto yy2;
} else { } else {
if(yych <= '=') goto yy2; if(yych <= 'z') goto yy19;
if(yych <= 'z') goto yy18;
if(yych <= '}') goto yy2; if(yych <= '}') goto yy2;
goto yy18; goto yy19;
} }
} }
yy20: yy21:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych == '*') goto yy20;
if(yych == '/') goto yy15;
goto yy2;
yy22: yy22:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
yy23:
if(yych == 0x0A) goto yy7; if(yych == 0x0A) goto yy7;
if(yych <= ' ') goto yy22; if(yych <= ' ') goto yy21;
goto yy7; goto yy7;
yy24: yy23:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
yy25: yy24:
if(yych != 0x0A) goto yy24; if(yych != 0x0A) goto yy23;
++YYCURSOR; ++YYCURSOR;
#line 38 "src/sc_man_scanner.re" #line 48 "src/sc_man_scanner.re"
{ goto newline; } { goto newline; }
#line 190 "src/sc_man_scanner.h" #line 213 "src/sc_man_scanner.h"
yy28: yy27:
++YYCURSOR; ++YYCURSOR;
#line 37 "src/sc_man_scanner.re" #line 47 "src/sc_man_scanner.re"
{ goto comment; } { goto comment; }
#line 195 "src/sc_man_scanner.h" #line 218 "src/sc_man_scanner.h"
} }
#line 50 "src/sc_man_scanner.re" #line 60 "src/sc_man_scanner.re"
} }
else else
{ {
#line 203 "src/sc_man_scanner.h" #line 226 "src/sc_man_scanner.h"
{ {
YYCTYPE yych; YYCTYPE yych;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
@ -207,255 +230,241 @@ yy28:
if(yych <= '9') { if(yych <= '9') {
if(yych <= '%') { if(yych <= '%') {
if(yych <= ' ') { if(yych <= ' ') {
if(yych == 0x0A) goto yy36; if(yych == 0x0A) goto yy35;
goto yy34; goto yy33;
} else { } else {
if(yych == '"') goto yy38; if(yych == '"') goto yy37;
goto yy50; goto yy49;
} }
} else { } else {
if(yych <= ',') { if(yych <= ',') {
if(yych <= '&') goto yy45; if(yych <= '&') goto yy44;
if(yych <= '\'') goto yy51; if(yych <= '\'') goto yy50;
goto yy50; goto yy49;
} else { } else {
if(yych <= '-') goto yy40; if(yych <= '-') goto yy39;
if(yych <= '.') goto yy44; if(yych <= '.') goto yy43;
if(yych >= '0') goto yy42; if(yych >= '0') goto yy41;
} }
} }
} else { } else {
if(yych <= '^') { if(yych <= '^') {
if(yych <= '=') { if(yych <= '=') {
if(yych <= ';') goto yy50; if(yych <= ';') goto yy49;
if(yych <= '<') goto yy48; if(yych <= '<') goto yy47;
goto yy46; goto yy45;
} else { } else {
if(yych <= '>') goto yy49; if(yych <= '>') goto yy48;
if(yych <= '@') goto yy50; if(yych <= '@') goto yy49;
if(yych <= 'Z') goto yy51; if(yych <= 'Z') goto yy50;
goto yy50; goto yy49;
} }
} else { } else {
if(yych <= 'z') { if(yych <= 'z') {
if(yych == '`') goto yy50; if(yych == '`') goto yy49;
goto yy51; goto yy50;
} else { } else {
if(yych == '|') goto yy47; if(yych == '|') goto yy46;
if(yych <= '~') goto yy50; if(yych <= '~') goto yy49;
goto yy51; goto yy50;
} }
} }
} }
yych = *++YYCURSOR; yych = *(YYMARKER = ++YYCURSOR);
if(yych == '*') goto yy75; if(yych == '*') goto yy74;
if(yych == '/') goto yy73; if(yych == '/') goto yy72;
yy33: yy32:
#line 69 "src/sc_man_scanner.re" #line 79 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 257 "src/sc_man_scanner.h" #line 280 "src/sc_man_scanner.h"
yy34: yy33:
++YYCURSOR; ++YYCURSOR;
yych = *YYCURSOR; yych = *YYCURSOR;
goto yy72; goto yy71;
yy35: yy34:
#line 58 "src/sc_man_scanner.re" #line 68 "src/sc_man_scanner.re"
{ goto std1; } { goto std1; }
#line 265 "src/sc_man_scanner.h" #line 288 "src/sc_man_scanner.h"
yy36: yy35:
++YYCURSOR; ++YYCURSOR;
#line 59 "src/sc_man_scanner.re" #line 69 "src/sc_man_scanner.re"
{ goto newline; } { goto newline; }
#line 270 "src/sc_man_scanner.h" #line 293 "src/sc_man_scanner.h"
yy38: yy37:
++YYCURSOR; ++YYCURSOR;
#line 60 "src/sc_man_scanner.re" #line 70 "src/sc_man_scanner.re"
{ goto string; } { goto string; }
#line 275 "src/sc_man_scanner.h" #line 298 "src/sc_man_scanner.h"
yy40: yy39:
++YYCURSOR; ++YYCURSOR;
#line 62 "src/sc_man_scanner.re" #line 72 "src/sc_man_scanner.re"
{ goto negative_check; } { goto negative_check; }
#line 280 "src/sc_man_scanner.h" #line 303 "src/sc_man_scanner.h"
yy42: yy41:
++YYCURSOR; ++YYCURSOR;
if((yych = *YYCURSOR) <= '@') { if((yych = *YYCURSOR) == '.') goto yy68;
if(yych <= '-') { if(yych <= '/') goto yy52;
if(yych == '\'') goto yy53; if(yych <= '9') goto yy66;
} else { goto yy52;
if(yych <= '.') goto yy69; yy42:
if(yych <= '/') goto yy43; #line 80 "src/sc_man_scanner.re"
if(yych <= '9') goto yy67;
}
} else {
if(yych <= '_') {
if(yych <= 'Z') goto yy53;
if(yych >= '_') goto yy53;
} else {
if(yych <= '`') goto yy43;
if(yych <= 'z') goto yy53;
if(yych >= 0x7F) goto yy53;
}
}
yy43:
#line 63 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 304 "src/sc_man_scanner.h" #line 313 "src/sc_man_scanner.h"
yy43:
yych = *++YYCURSOR;
if(yych <= '/') goto yy32;
if(yych <= '9') goto yy63;
goto yy32;
yy44: yy44:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych <= '/') goto yy33; if(yych == '&') goto yy61;
if(yych <= '9') goto yy65; goto yy32;
goto yy33;
yy45: yy45:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '&') goto yy63; if(yych == '=') goto yy59;
goto yy33; goto yy32;
yy46: yy46:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '=') goto yy61; if(yych == '|') goto yy57;
goto yy33; goto yy32;
yy47: yy47:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '|') goto yy59; if(yych == '<') goto yy55;
goto yy33; goto yy32;
yy48: yy48:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '<') goto yy57; if(yych == '>') goto yy53;
goto yy33; goto yy32;
yy49: yy49:
yych = *++YYCURSOR; yych = *++YYCURSOR;
if(yych == '>') goto yy55; goto yy32;
goto yy33;
yy50: yy50:
yych = *++YYCURSOR; yych = *++YYCURSOR;
goto yy33; goto yy52;
yy51: yy51:
++YYCURSOR;
yych = *YYCURSOR;
goto yy54;
yy52:
#line 70 "src/sc_man_scanner.re"
{ goto normal_token; }
#line 340 "src/sc_man_scanner.h"
yy53:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
yy54: yy52:
if(yych <= 'Z') { if(yych <= 'Z') {
if(yych <= '/') { if(yych <= '/') {
if(yych == '\'') goto yy53; if(yych == '\'') goto yy51;
goto yy52; goto yy42;
} else { } else {
if(yych <= '9') goto yy53; if(yych <= '9') goto yy51;
if(yych <= '@') goto yy52; if(yych <= '@') goto yy42;
goto yy53; goto yy51;
} }
} else { } else {
if(yych <= '`') { if(yych <= '`') {
if(yych == '_') goto yy53; if(yych == '_') goto yy51;
goto yy52; goto yy42;
} else { } else {
if(yych <= 'z') goto yy53; if(yych <= 'z') goto yy51;
if(yych <= '~') goto yy52; if(yych <= '~') goto yy42;
goto yy53; goto yy51;
} }
} }
yy53:
++YYCURSOR;
#line 78 "src/sc_man_scanner.re"
{ goto normal_token; }
#line 373 "src/sc_man_scanner.h"
yy55: yy55:
++YYCURSOR; ++YYCURSOR;
#line 68 "src/sc_man_scanner.re" #line 77 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 369 "src/sc_man_scanner.h" #line 378 "src/sc_man_scanner.h"
yy57: yy57:
++YYCURSOR; ++YYCURSOR;
#line 67 "src/sc_man_scanner.re" #line 76 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 374 "src/sc_man_scanner.h" #line 383 "src/sc_man_scanner.h"
yy59: yy59:
++YYCURSOR; ++YYCURSOR;
#line 66 "src/sc_man_scanner.re" #line 75 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 379 "src/sc_man_scanner.h" #line 388 "src/sc_man_scanner.h"
yy61: yy61:
++YYCURSOR; ++YYCURSOR;
#line 65 "src/sc_man_scanner.re" #line 74 "src/sc_man_scanner.re"
{ goto normal_token; } { goto normal_token; }
#line 384 "src/sc_man_scanner.h" #line 393 "src/sc_man_scanner.h"
yy63: yy63:
++YYCURSOR; ++YYCURSOR;
#line 64 "src/sc_man_scanner.re"
{ goto normal_token; }
#line 389 "src/sc_man_scanner.h"
yy65:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych <= '/') goto yy43; if(yych <= '/') goto yy65;
if(yych <= '9') goto yy65; if(yych <= '9') goto yy63;
goto yy43; yy65:
yy67: #line 73 "src/sc_man_scanner.re"
{ goto normal_token; }
#line 403 "src/sc_man_scanner.h"
yy66:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych <= '@') { if(yych <= '@') {
if(yych <= '-') { if(yych <= '-') {
if(yych == '\'') goto yy53; if(yych == '\'') goto yy51;
goto yy43; goto yy42;
} else { } else {
if(yych <= '.') goto yy69; if(yych <= '.') goto yy68;
if(yych <= '/') goto yy43; if(yych <= '/') goto yy42;
if(yych <= '9') goto yy67; if(yych <= '9') goto yy66;
goto yy43; goto yy42;
} }
} else { } else {
if(yych <= '_') { if(yych <= '_') {
if(yych <= 'Z') goto yy53; if(yych <= 'Z') goto yy51;
if(yych <= '^') goto yy43; if(yych <= '^') goto yy42;
goto yy53; goto yy51;
} else { } else {
if(yych <= '`') goto yy43; if(yych <= '`') goto yy42;
if(yych <= 'z') goto yy53; if(yych <= 'z') goto yy51;
if(yych <= '~') goto yy43; if(yych <= '~') goto yy42;
goto yy53; goto yy51;
} }
} }
yy69: yy68:
++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR;
if(yych <= '/') goto yy65;
if(yych <= '9') goto yy68;
goto yy65;
yy70:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych <= '/') goto yy43;
if(yych <= '9') goto yy69;
goto yy43;
yy71: yy71:
++YYCURSOR; if(yych == 0x0A) goto yy34;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(yych <= ' ') goto yy70;
yych = *YYCURSOR; goto yy34;
yy72: yy72:
if(yych == 0x0A) goto yy35;
if(yych <= ' ') goto yy71;
goto yy35;
yy73:
++YYCURSOR; ++YYCURSOR;
if(YYLIMIT == YYCURSOR) YYFILL(1); if(YYLIMIT == YYCURSOR) YYFILL(1);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych == 0x0A) goto yy77; if(yych == 0x0A) goto yy76;
goto yy73; goto yy72;
yy75: yy74:
++YYCURSOR; ++YYCURSOR;
#line 55 "src/sc_man_scanner.re" #line 65 "src/sc_man_scanner.re"
{ goto comment; } { goto comment; }
#line 448 "src/sc_man_scanner.h" #line 455 "src/sc_man_scanner.h"
yy77: yy76:
++YYCURSOR; ++YYCURSOR;
#line 56 "src/sc_man_scanner.re" #line 66 "src/sc_man_scanner.re"
{ goto newline; } { goto newline; }
#line 453 "src/sc_man_scanner.h" #line 460 "src/sc_man_scanner.h"
} }
#line 73 "src/sc_man_scanner.re" #line 83 "src/sc_man_scanner.re"
} }
negative_check: negative_check:
// re2c doesn't have enough state to handle '-' as the start of a negative number
// and as its own token, so help it out a little.
if (YYCURSOR >= YYLIMIT) if (YYCURSOR >= YYLIMIT)
{ {
goto normal_token; goto normal_token;
@ -476,22 +485,22 @@ negative_check:
comment: comment:
#line 480 "src/sc_man_scanner.h" #line 489 "src/sc_man_scanner.h"
{ {
YYCTYPE yych; YYCTYPE yych;
if((YYLIMIT - YYCURSOR) < 2) YYFILL(2); if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
yych = *YYCURSOR; yych = *YYCURSOR;
if(yych == 0x0A) goto yy83; if(yych == 0x0A) goto yy82;
if(yych != '*') goto yy85; if(yych != '*') goto yy84;
++YYCURSOR; ++YYCURSOR;
if((yych = *YYCURSOR) == '/') goto yy86; if((yych = *YYCURSOR) == '/') goto yy85;
yy82: yy81:
#line 109 "src/sc_man_scanner.re" #line 121 "src/sc_man_scanner.re"
{ goto comment; } { goto comment; }
#line 492 "src/sc_man_scanner.h" #line 501 "src/sc_man_scanner.h"
yy83: yy82:
++YYCURSOR; ++YYCURSOR;
#line 99 "src/sc_man_scanner.re" #line 111 "src/sc_man_scanner.re"
{ {
if (YYCURSOR >= YYLIMIT) if (YYCURSOR >= YYLIMIT)
{ {
@ -502,17 +511,17 @@ yy83:
sc_Crossed = true; sc_Crossed = true;
goto comment; goto comment;
} }
#line 506 "src/sc_man_scanner.h" #line 515 "src/sc_man_scanner.h"
yy85: yy84:
yych = *++YYCURSOR; yych = *++YYCURSOR;
goto yy82; goto yy81;
yy86: yy85:
++YYCURSOR; ++YYCURSOR;
#line 97 "src/sc_man_scanner.re" #line 109 "src/sc_man_scanner.re"
{ goto std1; } { goto std1; }
#line 514 "src/sc_man_scanner.h" #line 523 "src/sc_man_scanner.h"
} }
#line 110 "src/sc_man_scanner.re" #line 122 "src/sc_man_scanner.re"
newline: newline:

View file

@ -4,8 +4,17 @@
#define YYMARKER marker #define YYMARKER marker
// This buffer must be as large as the largest YYFILL call // This buffer must be as large as the largest YYFILL call
YYCTYPE eofbuf[2]; YYCTYPE eofbuf[3];
#define YYFILL(n) { if(n == 2) { eofbuf[0] = *cursor; } eofbuf[n-1] = '\n'; cursor = eofbuf; limit = eofbuf + n - 1; sc_End = true; } #define YYFILL(n) \
{ if(!sc_End) { \
if(n == 2) { eofbuf[0] = *cursor; } \
else if(n == 3) { eofbuf[0] = *cursor; eofbuf[1] = *(cursor + 1); } \
eofbuf[n-1] = '\n'; \
cursor = eofbuf; \
limit = eofbuf + n - 1; \
sc_End = true; } \
} \
assert(n <= 3) // Semicolon intentionally omitted
//#define YYDEBUG(s,c) { Printf ("%d: %02x\n", s, c); } //#define YYDEBUG(s,c) { Printf ("%d: %02x\n", s, c); }
#define YYDEBUG(s,c) #define YYDEBUG(s,c)
@ -21,6 +30,7 @@ std2:
WSP = ([\000- ]\[\n]); WSP = ([\000- ]\[\n]);
NWS = (any\[\000- ]); NWS = (any\[\000- ]);
D = [0-9]; D = [0-9];
X = [0-9A-Fa-f];
TOK1 = [{}|=]; TOK1 = [{}|=];
TOKC = [{}|=/`~!@#$%^&*()\[\]\\?\-=+;:<>,.]; TOKC = [{}|=/`~!@#$%^&*()\[\]\\?\-=+;:<>,.];
@ -44,7 +54,7 @@ std2:
TOK1 { goto normal_token; } TOK1 { goto normal_token; }
/* Regular tokens may contain /, but they must not contain comment starts */ /* Regular tokens may contain /, but they must not contain comment starts */
TOK2* ([/] (TOK2\[*])+ [*]*)* [/]? { goto normal_token; } TOK2* ([/] (TOK2\[*]) TOK2*)* { goto normal_token; }
any { goto normal_token; } /* unknown character */ any { goto normal_token; } /* unknown character */
*/ */
@ -60,7 +70,7 @@ std2:
"\"" { goto string; } "\"" { goto string; }
[-] { goto negative_check; } [-] { goto negative_check; }
((D+) | (D* [.] D+) | (D+ [.] D*)) { goto normal_token; } /* number */ ((D* [.] D+) | (D+ [.] D*)) { goto normal_token; } /* decimal number */
"&&" { goto normal_token; } "&&" { goto normal_token; }
"==" { goto normal_token; } "==" { goto normal_token; }
"||" { goto normal_token; } "||" { goto normal_token; }
@ -74,6 +84,8 @@ std2:
} }
negative_check: negative_check:
// re2c doesn't have enough state to handle '-' as the start of a negative number
// and as its own token, so help it out a little.
if (YYCURSOR >= YYLIMIT) if (YYCURSOR >= YYLIMIT)
{ {
goto normal_token; goto normal_token;

View file

@ -1823,7 +1823,7 @@ static FState *ResolveGotoLabel (AActor *actor, const PClass *type, char *name)
name = pt + 1; name = pt + 1;
// The classname may either be "Super" to identify this class's immediate // The classname may either be "Super" to identify this class's immediate
// superclass, or it may the name of any class that this one derives from. // superclass, or it may be the name of any class that this one derives from.
if (stricmp (classname, "Super") == 0) if (stricmp (classname, "Super") == 0)
{ {
type = type->ParentClass; type = type->ParentClass;
@ -2145,14 +2145,14 @@ void ProcessActor(void (*process)(FState *, int))
{ {
FActorInfo * parent; FActorInfo * parent;
SC_SetCMode (true);
info=CreateNewActor(&parent, &bag); info=CreateNewActor(&parent, &bag);
defaults=(AActor*)info->Class->Defaults; defaults=(AActor*)info->Class->Defaults;
bag.StateSet = false; bag.StateSet = false;
bag.DropItemSet = false; bag.DropItemSet = false;
bag.CurrentState = 0; bag.CurrentState = 0;
SC_SetCMode (true);
ParseActorProperties (bag); ParseActorProperties (bag);
FinishStates (info, defaults, bag); FinishStates (info, defaults, bag);
process(info->OwnedStates, info->NumOwnedStates); process(info->OwnedStates, info->NumOwnedStates);

View file

@ -464,7 +464,7 @@
</References> </References>
<Files> <Files>
<Filter <Filter
Name="Source Files" Name="A Source Files"
Filter="c;cpp" Filter="c;cpp"
> >
<File <File
@ -4331,7 +4331,7 @@
</Filter> </Filter>
</Filter> </Filter>
<Filter <Filter
Name="Header Files" Name="A Header Files"
Filter="h" Filter="h"
> >
<File <File