diff options
author | Eugene Sandulenko | 2016-07-10 16:43:53 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | dff575bea4451113a8268709d2b0c4c8004f61a6 (patch) | |
tree | 8379202e2a2755c327fab3af453ab24ff8e4917b /engines/director | |
parent | aa45e48355e670b2d8807515fa3158c0a130fcfb (diff) | |
download | scummvm-rg350-dff575bea4451113a8268709d2b0c4c8004f61a6.tar.gz scummvm-rg350-dff575bea4451113a8268709d2b0c4c8004f61a6.tar.bz2 scummvm-rg350-dff575bea4451113a8268709d2b0c4c8004f61a6.zip |
DIRECTOR: Lingo: Further work on if() statement
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 932 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.h | 144 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 21 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 331 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 3 |
5 files changed, 709 insertions, 722 deletions
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index adb97feaee..ff46cb4e4e 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -79,42 +79,41 @@ tDOWN = 268, tELSE = 269, tNLELSIF = 270, - tENDIF = 271, - tENDREPEAT = 272, - tEXIT = 273, - tFRAME = 274, - tGLOBAL = 275, - tGO = 276, - tIF = 277, - tINTO = 278, - tLOOP = 279, - tMACRO = 280, - tMCI = 281, - tMCIWAIT = 282, - tMOVIE = 283, - tNEXT = 284, - tOF = 285, - tPREVIOUS = 286, - tPUT = 287, - tREPEAT = 288, - tSET = 289, - tTHEN = 290, - tTO = 291, - tWITH = 292, - tWHILE = 293, - tNLELSE = 294, - tGE = 295, - tLE = 296, - tGT = 297, - tLT = 298, - tEQ = 299, - tNEQ = 300, - tAND = 301, - tOR = 302, - tNOT = 303, - tCONCAT = 304, - tCONTAINS = 305, - tSTARTS = 306 + tEND = 271, + tEXIT = 272, + tFRAME = 273, + tGLOBAL = 274, + tGO = 275, + tIF = 276, + tINTO = 277, + tLOOP = 278, + tMACRO = 279, + tMCI = 280, + tMCIWAIT = 281, + tMOVIE = 282, + tNEXT = 283, + tOF = 284, + tPREVIOUS = 285, + tPUT = 286, + tREPEAT = 287, + tSET = 288, + tTHEN = 289, + tTO = 290, + tWITH = 291, + tWHILE = 292, + tNLELSE = 293, + tGE = 294, + tLE = 295, + tGT = 296, + tLT = 297, + tEQ = 298, + tNEQ = 299, + tAND = 300, + tOR = 301, + tNOT = 302, + tCONCAT = 303, + tCONTAINS = 304, + tSTARTS = 305 }; #endif /* Tokens. */ @@ -131,42 +130,41 @@ #define tDOWN 268 #define tELSE 269 #define tNLELSIF 270 -#define tENDIF 271 -#define tENDREPEAT 272 -#define tEXIT 273 -#define tFRAME 274 -#define tGLOBAL 275 -#define tGO 276 -#define tIF 277 -#define tINTO 278 -#define tLOOP 279 -#define tMACRO 280 -#define tMCI 281 -#define tMCIWAIT 282 -#define tMOVIE 283 -#define tNEXT 284 -#define tOF 285 -#define tPREVIOUS 286 -#define tPUT 287 -#define tREPEAT 288 -#define tSET 289 -#define tTHEN 290 -#define tTO 291 -#define tWITH 292 -#define tWHILE 293 -#define tNLELSE 294 -#define tGE 295 -#define tLE 296 -#define tGT 297 -#define tLT 298 -#define tEQ 299 -#define tNEQ 300 -#define tAND 301 -#define tOR 302 -#define tNOT 303 -#define tCONCAT 304 -#define tCONTAINS 305 -#define tSTARTS 306 +#define tEND 271 +#define tEXIT 272 +#define tFRAME 273 +#define tGLOBAL 274 +#define tGO 275 +#define tIF 276 +#define tINTO 277 +#define tLOOP 278 +#define tMACRO 279 +#define tMCI 280 +#define tMCIWAIT 281 +#define tMOVIE 282 +#define tNEXT 283 +#define tOF 284 +#define tPREVIOUS 285 +#define tPUT 286 +#define tREPEAT 287 +#define tSET 288 +#define tTHEN 289 +#define tTO 290 +#define tWITH 291 +#define tWHILE 292 +#define tNLELSE 293 +#define tGE 294 +#define tLE 295 +#define tGT 296 +#define tLT 297 +#define tEQ 298 +#define tNEQ 299 +#define tAND 300 +#define tOR 301 +#define tNOT 302 +#define tCONCAT 303 +#define tCONTAINS 304 +#define tSTARTS 305 @@ -219,7 +217,7 @@ typedef union YYSTYPE int narg; /* number of arguments */ } /* Line 193 of yacc.c. */ -#line 223 "engines/director/lingo/lingo-gr.cpp" +#line 221 "engines/director/lingo/lingo-gr.cpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -232,7 +230,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 236 "engines/director/lingo/lingo-gr.cpp" +#line 234 "engines/director/lingo/lingo-gr.cpp" #ifdef short # undef short @@ -447,20 +445,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 65 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 534 +#define YYLAST 555 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 65 +#define YYNTOKENS 64 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 33 /* YYNRULES -- Number of rules. */ -#define YYNRULES 105 +#define YYNRULES 106 /* YYNRULES -- Number of states. */ -#define YYNSTATES 221 +#define YYNSTATES 225 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 306 +#define YYMAXUTOK 305 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -469,12 +467,12 @@ union yyalloc static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 58, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 57, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 57, 63, 2, - 59, 60, 55, 53, 64, 54, 2, 56, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 56, 62, 2, + 58, 59, 54, 52, 63, 53, 2, 55, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 62, 52, 61, 2, 2, 2, 2, 2, 2, 2, + 61, 51, 60, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -498,7 +496,7 @@ static const yytype_uint8 yytranslate[] = 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51 + 45, 46, 47, 48, 49, 50 }; #if YYDEBUG @@ -508,60 +506,60 @@ static const yytype_uint16 yyprhs[] = { 0, 0, 3, 7, 9, 12, 14, 15, 17, 19, 21, 23, 25, 30, 35, 40, 42, 44, 46, 48, - 56, 67, 79, 87, 99, 111, 118, 129, 140, 141, - 145, 148, 150, 153, 155, 162, 164, 170, 172, 176, - 180, 183, 187, 189, 191, 192, 193, 197, 199, 201, - 203, 205, 210, 215, 217, 219, 223, 227, 231, 235, - 239, 243, 247, 251, 255, 259, 263, 266, 270, 274, - 278, 282, 285, 288, 292, 295, 298, 301, 303, 305, - 308, 310, 314, 317, 320, 323, 326, 330, 333, 337, - 340, 343, 345, 349, 352, 356, 357, 367, 368, 370, - 374, 379, 380, 384, 385, 387 + 57, 69, 82, 91, 104, 117, 124, 135, 146, 147, + 151, 154, 156, 159, 161, 168, 170, 176, 178, 182, + 186, 189, 193, 195, 197, 198, 199, 200, 203, 206, + 208, 210, 212, 217, 222, 224, 226, 230, 234, 238, + 242, 246, 250, 254, 258, 262, 266, 270, 273, 277, + 281, 285, 289, 292, 295, 299, 302, 305, 308, 310, + 312, 315, 317, 321, 324, 327, 330, 333, 337, 340, + 344, 347, 350, 352, 356, 359, 363, 364, 373, 374, + 376, 380, 385, 386, 390, 391, 393 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 66, 0, -1, 66, 67, 68, -1, 68, -1, 1, - 58, -1, 58, -1, -1, 92, -1, 87, -1, 96, - -1, 69, -1, 71, -1, 32, 86, 23, 10, -1, - 34, 10, 52, 86, -1, 34, 10, 36, 86, -1, - 86, -1, 87, -1, 70, -1, 72, -1, 79, 59, - 78, 60, 85, 84, 17, -1, 80, 52, 86, 84, - 36, 86, 84, 85, 84, 17, -1, 80, 52, 86, - 84, 13, 36, 86, 84, 85, 84, 17, -1, 81, - 78, 35, 67, 85, 84, 16, -1, 81, 78, 35, - 67, 85, 84, 39, 85, 84, 67, 16, -1, 81, - 78, 35, 67, 85, 84, 83, 74, 84, 67, 16, - -1, 81, 78, 35, 83, 70, 84, -1, 81, 78, - 35, 83, 70, 84, 39, 83, 70, 84, -1, 81, - 78, 35, 83, 70, 84, 75, 84, 73, 84, -1, - -1, 39, 83, 70, -1, 74, 77, -1, 77, -1, - 75, 76, -1, 76, -1, 82, 78, 35, 83, 71, - 84, -1, 75, -1, 82, 78, 35, 85, 84, -1, - 86, -1, 86, 52, 86, -1, 59, 78, 60, -1, - 33, 38, -1, 33, 37, 10, -1, 22, -1, 15, - -1, -1, -1, 85, 67, 71, -1, 71, -1, 7, - -1, 8, -1, 11, -1, 9, 59, 97, 60, -1, - 10, 59, 97, 60, -1, 10, -1, 69, -1, 86, - 53, 86, -1, 86, 54, 86, -1, 86, 55, 86, - -1, 86, 56, 86, -1, 86, 61, 86, -1, 86, - 62, 86, -1, 86, 45, 86, -1, 86, 40, 86, - -1, 86, 41, 86, -1, 86, 46, 86, -1, 86, - 47, 86, -1, 48, 86, -1, 86, 63, 86, -1, - 86, 49, 86, -1, 86, 50, 86, -1, 86, 51, - 86, -1, 53, 86, -1, 54, 86, -1, 59, 86, - 60, -1, 26, 11, -1, 27, 10, -1, 32, 86, - -1, 89, -1, 18, -1, 20, 88, -1, 10, -1, - 88, 64, 10, -1, 21, 24, -1, 21, 29, -1, - 21, 31, -1, 21, 90, -1, 21, 90, 91, -1, - 21, 91, -1, 36, 19, 11, -1, 19, 11, -1, - 36, 11, -1, 11, -1, 30, 28, 11, -1, 28, - 11, -1, 36, 28, 11, -1, -1, 25, 10, 93, - 83, 94, 67, 95, 85, 67, -1, -1, 10, -1, - 94, 64, 10, -1, 94, 67, 64, 10, -1, -1, - 10, 83, 97, -1, -1, 86, -1, 97, 64, 86, - -1 + 65, 0, -1, 65, 66, 67, -1, 67, -1, 1, + 57, -1, 57, -1, -1, 91, -1, 86, -1, 95, + -1, 68, -1, 70, -1, 31, 85, 22, 10, -1, + 33, 10, 51, 85, -1, 33, 10, 35, 85, -1, + 85, -1, 86, -1, 69, -1, 71, -1, 78, 58, + 77, 59, 84, 83, 16, 32, -1, 79, 51, 85, + 83, 35, 85, 83, 84, 83, 16, 32, -1, 79, + 51, 85, 83, 13, 35, 85, 83, 84, 83, 16, + 32, -1, 80, 77, 34, 66, 84, 83, 16, 21, + -1, 80, 77, 34, 66, 84, 83, 38, 84, 83, + 66, 16, 21, -1, 80, 77, 34, 66, 84, 83, + 82, 73, 83, 66, 16, 21, -1, 80, 77, 34, + 82, 69, 83, -1, 80, 77, 34, 82, 69, 83, + 38, 82, 69, 83, -1, 80, 77, 34, 82, 69, + 83, 74, 83, 72, 83, -1, -1, 38, 82, 69, + -1, 73, 76, -1, 76, -1, 74, 75, -1, 75, + -1, 81, 77, 34, 82, 70, 83, -1, 74, -1, + 81, 77, 34, 84, 83, -1, 85, -1, 85, 51, + 85, -1, 58, 77, 59, -1, 32, 37, -1, 32, + 36, 10, -1, 21, -1, 15, -1, -1, -1, -1, + 84, 66, -1, 84, 70, -1, 7, -1, 8, -1, + 11, -1, 9, 58, 96, 59, -1, 10, 58, 96, + 59, -1, 10, -1, 68, -1, 85, 52, 85, -1, + 85, 53, 85, -1, 85, 54, 85, -1, 85, 55, + 85, -1, 85, 60, 85, -1, 85, 61, 85, -1, + 85, 44, 85, -1, 85, 39, 85, -1, 85, 40, + 85, -1, 85, 45, 85, -1, 85, 46, 85, -1, + 47, 85, -1, 85, 62, 85, -1, 85, 48, 85, + -1, 85, 49, 85, -1, 85, 50, 85, -1, 52, + 85, -1, 53, 85, -1, 58, 85, 59, -1, 25, + 11, -1, 26, 10, -1, 31, 85, -1, 88, -1, + 17, -1, 19, 87, -1, 10, -1, 87, 63, 10, + -1, 20, 23, -1, 20, 28, -1, 20, 30, -1, + 20, 89, -1, 20, 89, 90, -1, 20, 90, -1, + 35, 18, 11, -1, 18, 11, -1, 35, 11, -1, + 11, -1, 29, 27, 11, -1, 27, 11, -1, 35, + 27, 11, -1, -1, 24, 10, 92, 82, 93, 66, + 94, 84, -1, -1, 10, -1, 93, 63, 10, -1, + 93, 66, 63, 10, -1, -1, 10, 82, 96, -1, + -1, 85, -1, 96, 63, 85, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -571,13 +569,13 @@ static const yytype_uint16 yyrline[] = 109, 110, 113, 119, 125, 132, 133, 135, 136, 141, 152, 168, 182, 189, 198, 207, 217, 227, 238, 239, 242, 243, 246, 247, 250, 258, 259, 267, 268, 269, - 271, 273, 279, 285, 292, 294, 296, 297, 300, 305, - 308, 311, 317, 325, 328, 329, 330, 331, 332, 333, + 271, 273, 279, 285, 292, 294, 296, 297, 298, 301, + 306, 309, 312, 318, 326, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, - 344, 345, 346, 347, 350, 351, 352, 353, 354, 356, - 359, 360, 371, 372, 373, 374, 379, 385, 392, 393, - 394, 395, 398, 399, 400, 428, 428, 435, 436, 437, - 438, 440, 443, 451, 452, 453 + 344, 345, 346, 347, 348, 351, 352, 353, 354, 355, + 357, 360, 361, 372, 373, 374, 375, 380, 386, 393, + 394, 395, 396, 399, 400, 401, 429, 429, 436, 437, + 438, 439, 441, 444, 452, 453, 454 }; #endif @@ -588,9 +586,9 @@ static const char *const yytname[] = { "$end", "error", "$undefined", "CASTREF", "UNARY", "VOID", "VAR", "INT", "FLOAT", "BLTIN", "ID", "STRING", "HANDLER", "tDOWN", "tELSE", - "tNLELSIF", "tENDIF", "tENDREPEAT", "tEXIT", "tFRAME", "tGLOBAL", "tGO", - "tIF", "tINTO", "tLOOP", "tMACRO", "tMCI", "tMCIWAIT", "tMOVIE", "tNEXT", - "tOF", "tPREVIOUS", "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWITH", + "tNLELSIF", "tEND", "tEXIT", "tFRAME", "tGLOBAL", "tGO", "tIF", "tINTO", + "tLOOP", "tMACRO", "tMCI", "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", + "tPREVIOUS", "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWITH", "tWHILE", "tNLELSE", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR", "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "'='", "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('", "')'", "'>'", "'<'", "'&'", "','", @@ -613,41 +611,41 @@ static const yytype_uint16 yytoknum[] = 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 61, 43, 45, 42, 47, 37, 10, 40, - 41, 62, 60, 38, 44 + 305, 61, 43, 45, 42, 47, 37, 10, 40, 41, + 62, 60, 38, 44 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 65, 66, 66, 66, 67, 68, 68, 68, 68, - 68, 68, 69, 69, 69, 70, 70, 71, 71, 71, - 71, 71, 72, 72, 72, 72, 72, 72, 73, 73, - 74, 74, 75, 75, 76, 77, 77, 78, 78, 78, - 79, 80, 81, 82, 83, 84, 85, 85, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, - 88, 88, 89, 89, 89, 89, 89, 89, 90, 90, - 90, 90, 91, 91, 91, 93, 92, 94, 94, 94, - 94, 95, 96, 97, 97, 97 + 0, 64, 65, 65, 65, 66, 67, 67, 67, 67, + 67, 67, 68, 68, 68, 69, 69, 70, 70, 70, + 70, 70, 71, 71, 71, 71, 71, 71, 72, 72, + 73, 73, 74, 74, 75, 76, 76, 77, 77, 77, + 78, 79, 80, 81, 82, 83, 84, 84, 84, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, + 86, 87, 87, 88, 88, 88, 88, 88, 88, 89, + 89, 89, 89, 90, 90, 90, 92, 91, 93, 93, + 93, 93, 94, 95, 96, 96, 96 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 3, 1, 2, 1, 0, 1, 1, 1, - 1, 1, 4, 4, 4, 1, 1, 1, 1, 7, - 10, 11, 7, 11, 11, 6, 10, 10, 0, 3, + 1, 1, 4, 4, 4, 1, 1, 1, 1, 8, + 11, 12, 8, 12, 12, 6, 10, 10, 0, 3, 2, 1, 2, 1, 6, 1, 5, 1, 3, 3, - 2, 3, 1, 1, 0, 0, 3, 1, 1, 1, - 1, 4, 4, 1, 1, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, - 3, 2, 2, 3, 2, 2, 2, 1, 1, 2, - 1, 3, 2, 2, 2, 2, 3, 2, 3, 2, - 2, 1, 3, 2, 3, 0, 9, 0, 1, 3, - 4, 0, 3, 0, 1, 3 + 2, 3, 1, 1, 0, 0, 0, 2, 2, 1, + 1, 1, 4, 4, 1, 1, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, + 3, 3, 2, 2, 3, 2, 2, 2, 1, 1, + 2, 1, 3, 2, 2, 2, 2, 3, 2, 3, + 2, 2, 1, 3, 2, 3, 0, 8, 0, 1, + 3, 4, 0, 3, 0, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -655,125 +653,129 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 48, 49, 0, 44, 50, 78, 0, 0, + 0, 0, 49, 50, 0, 44, 51, 79, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 54, 17, 11, 18, 0, 0, 0, - 15, 8, 77, 7, 9, 4, 103, 103, 103, 80, - 79, 91, 0, 82, 0, 83, 0, 84, 0, 85, - 87, 95, 74, 75, 53, 0, 54, 76, 0, 40, - 0, 66, 71, 72, 0, 1, 5, 6, 0, 0, + 0, 0, 3, 55, 17, 11, 18, 0, 0, 0, + 15, 8, 78, 7, 9, 4, 104, 104, 104, 81, + 80, 92, 0, 83, 0, 84, 0, 85, 0, 86, + 88, 96, 75, 76, 54, 0, 55, 77, 0, 40, + 0, 67, 72, 73, 0, 1, 5, 6, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 104, 0, - 0, 102, 0, 89, 93, 0, 90, 0, 0, 0, - 86, 44, 0, 0, 41, 0, 0, 73, 2, 0, - 45, 0, 0, 44, 0, 62, 63, 61, 64, 65, - 68, 69, 70, 55, 56, 57, 58, 59, 60, 67, - 51, 0, 52, 81, 92, 88, 94, 97, 12, 14, - 13, 0, 0, 39, 0, 0, 38, 105, 98, 0, - 47, 45, 16, 0, 0, 45, 45, 0, 101, 0, - 0, 0, 45, 44, 25, 99, 0, 0, 46, 19, - 45, 0, 22, 0, 0, 43, 44, 45, 33, 0, - 100, 0, 0, 45, 0, 45, 35, 31, 0, 0, - 32, 28, 0, 96, 45, 0, 0, 30, 0, 0, - 45, 44, 45, 44, 0, 20, 0, 0, 0, 26, - 0, 27, 0, 21, 23, 24, 45, 29, 45, 36, - 34 + 0, 0, 0, 0, 0, 0, 0, 0, 105, 0, + 0, 103, 0, 90, 94, 0, 91, 0, 0, 0, + 87, 44, 0, 0, 41, 0, 0, 74, 2, 0, + 45, 0, 0, 44, 0, 63, 64, 62, 65, 66, + 69, 70, 71, 56, 57, 58, 59, 60, 61, 68, + 52, 0, 53, 82, 93, 89, 95, 98, 12, 14, + 13, 46, 0, 39, 46, 0, 38, 106, 99, 0, + 45, 0, 0, 45, 45, 16, 0, 102, 47, 48, + 0, 0, 45, 44, 25, 100, 0, 46, 0, 45, + 46, 0, 46, 0, 43, 44, 45, 33, 0, 101, + 97, 19, 46, 45, 22, 0, 45, 35, 31, 0, + 0, 32, 28, 0, 45, 0, 0, 30, 0, 0, + 45, 44, 45, 44, 0, 0, 0, 0, 44, 26, + 0, 27, 0, 0, 20, 0, 0, 45, 29, 45, + 21, 23, 24, 36, 34 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 21, 159, 22, 56, 24, 150, 26, 202, 185, - 186, 178, 187, 71, 27, 28, 29, 179, 212, 142, - 151, 30, 152, 40, 32, 49, 50, 33, 101, 149, + -1, 21, 158, 22, 56, 24, 159, 26, 202, 186, + 187, 177, 188, 71, 27, 28, 29, 178, 212, 142, + 150, 30, 155, 40, 32, 49, 50, 33, 101, 149, 167, 34, 89 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -167 +#define YYPACT_NINF -161 static const yytype_int16 yypact[] = { - 181, -50, -167, -167, -49, 428, -167, -167, 25, 134, - -167, 45, 47, 78, 320, -11, 81, 320, 320, 320, - 320, 4, -167, 28, -167, -167, -167, 33, 53, 327, - 409, -167, -167, -167, -167, -167, 320, 320, 320, -167, - 30, -167, 88, -167, 96, -167, 85, -167, 18, 67, - -167, -167, -167, -167, 56, 320, -167, -2, 110, -167, - -29, 471, 471, 471, 366, -167, -167, 234, 327, 320, - 327, 86, 390, 320, 320, 320, 320, 320, 320, 320, - 320, 320, 320, 320, 320, 320, 320, 320, 409, 42, - 52, 58, 114, -167, -167, 116, -167, 119, 121, 97, - -167, -167, -2, 123, -167, 320, 320, -167, -167, 79, - 409, 80, 342, 83, 320, 409, 409, 409, 409, 409, - 409, 409, 409, 452, 452, 471, 471, 409, 409, 409, - -167, 320, -167, -167, -167, -167, -167, 128, -167, 409, - 409, 263, 5, -167, 263, 292, 409, 409, -167, -24, - -167, 83, -167, 106, 320, 83, -167, 133, 84, 263, - 127, 320, 409, 3, -9, -167, 137, 263, -167, -167, - 409, 263, -167, 263, 136, -167, -167, 136, -167, 327, - -167, 83, 263, 83, 83, 136, 136, -167, 327, 292, - -167, 115, 120, 263, 83, 140, 83, -167, 83, 131, - -167, -167, -167, -167, 150, -167, 152, 153, 263, -167, - 292, -167, 263, -167, -167, -167, 83, -167, -167, -167, - -167 + 175, -49, -161, -161, -15, 469, -161, -161, 32, 118, + -161, 52, 40, 82, 342, 24, 83, 342, 342, 342, + 342, 9, -161, 11, -161, -161, -161, 37, 47, 349, + 450, -161, -161, -161, -161, -161, 342, 342, 342, -161, + 43, -161, 99, -161, 101, -161, 87, -161, 36, 29, + -161, -161, -161, -161, 57, 342, -161, 364, 107, -161, + -10, -16, -16, -16, 407, -161, -161, 227, 349, 342, + 349, 85, 431, 342, 342, 342, 342, 342, 342, 342, + 342, 342, 342, 342, 342, 342, 342, 342, 450, 41, + 42, 58, 110, -161, -161, 111, -161, 112, 115, 100, + -161, -161, 364, 121, -161, 342, 342, -161, -161, 69, + 450, 78, 383, 81, 342, 450, 450, 450, 450, 450, + 450, 450, 450, 493, 493, -16, -16, 450, 450, 450, + -161, 342, -161, -161, -161, -161, -161, 129, -161, 450, + 450, -161, 1, -161, -161, 314, 450, 450, -161, 33, + 256, 105, 342, 256, -161, -161, 132, 89, -161, -161, + 128, 342, 450, -1, -3, -161, 140, -161, 123, 450, + -161, 135, -161, 142, -161, -161, 142, -161, 349, -161, + 256, -161, -161, 256, -161, 256, 142, 142, -161, 349, + 314, -161, 120, 126, 256, 145, 81, -161, 81, 130, + -161, -161, -161, -161, 146, 133, 151, 153, -5, -161, + 314, -161, 285, 138, -161, 152, 157, 256, -161, -161, + -161, -161, -161, -161, -161 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -167, -167, -20, 104, 16, -123, 0, -167, -167, -167, - 11, -166, -8, -65, -167, -167, -167, -149, -3, -66, - -36, -5, 17, -167, -167, -167, 130, -167, -167, -167, - -167, -167, 19 + -161, -161, -19, 114, 6, -141, 0, -161, -161, -161, + 8, -128, -12, -65, -161, -161, -161, -160, -4, -51, + -117, 2, 7, -161, -161, -161, 139, -161, -161, -161, + -161, -161, -20 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -54 +#define YYTABLE_NINF -55 static const yytype_int16 yytable[] = { - 25, 67, 38, 109, 65, 111, 175, 105, 35, 57, - 36, 190, 61, 62, 63, 64, 23, 31, 153, 172, - 190, 103, 156, 106, 72, 188, 58, 59, -10, 96, - 176, 88, 88, 88, 66, 39, 188, 97, 73, 74, - 157, 154, 173, 75, 76, 77, 98, 78, 79, 80, - 102, 81, 82, 83, 84, 51, 90, 91, 52, 85, - 86, 87, 66, 72, 110, 112, 200, 25, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 23, 31, 160, -10, 217, 53, 163, - 164, 60, 68, 144, 92, 44, 171, 46, 137, 93, - 139, 140, 130, 99, 182, 69, 131, 94, 155, 146, - 145, 191, 132, 95, 192, 37, 131, 195, 196, 198, - 104, 113, 131, 199, 133, 98, 147, 134, 204, 158, - 135, 181, 136, 138, 209, 183, 211, 184, 148, 141, - 143, 66, 161, 165, 169, 41, 194, 180, 166, 162, - 219, 175, 220, 42, 201, 203, 170, 205, 43, 168, - 174, 193, 44, 45, 46, 47, 208, 213, 214, 215, - 48, 108, 216, 189, 72, 177, 206, 197, 207, 100, - 0, -6, 1, 72, 0, 0, 0, 0, 2, 3, - 4, 5, 6, 168, 0, 0, 0, 0, 210, 7, - 0, 8, 9, 10, 0, 0, 11, 12, 13, 0, - 0, 0, 218, 14, 15, 16, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, - 0, 0, 0, 0, 18, 19, 0, 0, 0, -6, - 20, 2, 3, 4, 5, 6, 0, 0, 0, 0, - 0, 0, 7, 0, 8, 9, 10, 0, 0, 11, + 25, 38, 67, 109, 154, 111, 23, 31, 35, 65, + -46, -10, 174, 189, 151, 171, 57, 90, 91, 61, + 62, 63, 64, 73, 74, 105, 189, 153, 75, 76, + 77, 72, 78, 79, 80, 175, 152, 172, 88, 88, + 88, 106, 39, 36, 85, 86, 87, 96, 191, 200, + 180, 52, -46, 183, 97, 185, 44, 102, 46, 191, + 58, 59, 51, 98, 99, 194, 66, 25, -10, 218, + 72, 110, 112, 23, 31, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 66, 217, 53, 60, 144, 68, 156, 137, 69, 160, + 130, 132, 163, 164, 131, 131, 92, 139, 140, 145, + 93, 170, 94, 193, 95, 37, 146, 104, 182, 113, + 133, 131, 134, 135, 199, 192, 136, 98, 141, 41, + 157, 138, 195, 147, 196, 198, 42, 143, 66, 148, + 161, 43, 165, 204, 168, 44, 45, 46, 47, 209, + 179, 211, 166, 48, 162, 181, 184, 174, 201, 173, + 203, 205, 213, 169, 208, 214, 223, 215, 224, 216, + 220, 190, 176, 221, 197, -6, 1, 206, 222, 207, + 72, 108, 2, 3, 4, 5, 6, 0, 100, 0, + 0, 72, 7, 0, 8, 9, 10, 210, 0, 11, 12, 13, 0, 0, 0, 0, 14, 15, 16, 0, - 2, 3, 4, 54, 6, 0, 0, 0, 0, 0, - 0, 7, 17, 8, 9, 10, 0, 18, 19, 12, - 13, 0, 0, 20, 0, 14, 15, 16, 0, 2, - 3, 4, 54, 6, 0, 0, 0, 0, 0, 0, - 7, 17, 8, 9, 0, 0, 18, 19, 12, 13, - 0, 0, 20, 0, 14, 0, 16, 2, 3, 4, - 54, 6, 0, 0, 2, 3, 4, 54, 6, 0, - 17, 0, 0, 0, 0, 18, 19, 0, 0, 0, - 0, 20, 55, 0, 16, 0, 0, 0, 0, 55, - 0, 16, 0, 0, 0, 0, 0, 0, 17, 0, - 0, 0, 0, 18, 19, 17, 0, 0, 0, 20, - 18, 19, 73, 74, 0, 0, 70, 75, 76, 77, + 0, 0, 219, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 17, 0, 0, 0, 0, 18, 19, 0, + 0, 0, -6, 20, 2, 3, 4, 5, 6, 0, + 0, 0, 0, 0, 7, 0, 8, 9, 10, 0, + 0, 11, 12, 13, 0, 0, 0, 0, 14, 15, + 16, 0, 0, 2, 3, 4, 54, 6, 0, 0, + 0, 0, 0, 7, 17, 8, 9, 10, 0, 18, + 19, 12, 13, 0, 0, 20, 0, 14, 15, 16, + 0, 0, 2, 3, 4, 54, 6, 0, 0, 0, + 0, 0, 7, 17, 8, 9, 10, 0, 18, 19, + 12, 13, 0, 66, 20, 0, 14, 15, 16, 0, + 0, 2, 3, 4, 54, 6, 0, 0, 0, 0, + 0, 7, 17, 8, 9, 0, 0, 18, 19, 12, + 13, 0, 0, 20, 0, 14, 0, 16, 0, 2, + 3, 4, 54, 6, 0, 0, 2, 3, 4, 54, + 6, 17, 0, 0, 0, 0, 18, 19, 0, 0, + 0, 0, 20, 55, 0, 16, 0, 0, 0, 0, + 55, 0, 16, 0, 0, 0, 103, 0, 0, 17, + 0, 0, 0, 0, 18, 19, 17, 0, 0, 0, + 20, 18, 19, 73, 74, 0, 0, 70, 75, 76, + 77, 0, 78, 79, 80, 0, 81, 82, 83, 84, + 0, 0, 73, 74, 85, 86, 87, 75, 76, 77, 0, 78, 79, 80, 114, 81, 82, 83, 84, 0, 0, 0, 107, 85, 86, 87, 73, 74, 0, 0, 0, 75, 76, 77, 0, 78, 79, 80, 0, 81, @@ -781,101 +783,101 @@ static const yytype_int16 yytable[] = 73, 74, 0, 0, 0, 75, 76, 77, 0, 78, 79, 80, 114, 81, 82, 83, 84, 0, 0, 73, 74, 85, 86, 87, 75, 76, 77, 0, 78, 79, - 80, 0, 81, 82, 83, 84, 0, 0, -53, -53, - 85, 86, 87, -53, -53, -53, 0, -53, -53, -53, - 0, 0, 0, -53, -53, 0, 0, 37, 0, -53, - -53, -53, 73, 74, 0, 0, 0, 75, 76, 77, + 80, 0, 81, 82, 83, 84, 0, 0, -54, -54, + 85, 86, 87, -54, -54, -54, 0, -54, -54, -54, + 0, 0, 0, -54, -54, 0, 0, 37, 0, -54, + -54, -54, 73, 74, 0, 0, 0, 75, 76, 77, 0, 78, 79, 80, 0, 0, 0, 83, 84, 0, - 0, 73, 74, 85, 86, 87, 75, 76, 77, 0, - 78, 79, 80, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 85, 86, 87 + 0, 0, 0, 85, 86, 87 }; static const yytype_int16 yycheck[] = { - 0, 21, 5, 68, 0, 70, 15, 36, 58, 14, - 59, 177, 17, 18, 19, 20, 0, 0, 13, 16, - 186, 23, 145, 52, 29, 174, 37, 38, 0, 11, - 39, 36, 37, 38, 58, 10, 185, 19, 40, 41, - 64, 36, 39, 45, 46, 47, 28, 49, 50, 51, - 55, 53, 54, 55, 56, 10, 37, 38, 11, 61, - 62, 63, 58, 68, 69, 70, 189, 67, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 67, 67, 151, 58, 210, 10, 155, - 156, 10, 59, 113, 64, 28, 162, 30, 101, 11, - 105, 106, 60, 36, 170, 52, 64, 11, 144, 114, - 113, 177, 60, 28, 179, 59, 64, 183, 184, 185, - 10, 35, 64, 188, 10, 28, 131, 11, 194, 149, - 11, 167, 11, 10, 200, 171, 202, 173, 10, 60, - 60, 58, 36, 10, 17, 11, 182, 10, 64, 154, - 216, 15, 218, 19, 39, 35, 161, 17, 24, 159, - 163, 181, 28, 29, 30, 31, 35, 17, 16, 16, - 36, 67, 208, 176, 179, 164, 196, 185, 198, 49, - -1, 0, 1, 188, -1, -1, -1, -1, 7, 8, - 9, 10, 11, 193, -1, -1, -1, -1, 201, 18, - -1, 20, 21, 22, -1, -1, 25, 26, 27, -1, - -1, -1, 212, 32, 33, 34, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, - -1, -1, -1, -1, 53, 54, -1, -1, -1, 58, - 59, 7, 8, 9, 10, 11, -1, -1, -1, -1, - -1, -1, 18, -1, 20, 21, 22, -1, -1, 25, - 26, 27, -1, -1, -1, -1, 32, 33, 34, -1, - 7, 8, 9, 10, 11, -1, -1, -1, -1, -1, - -1, 18, 48, 20, 21, 22, -1, 53, 54, 26, - 27, -1, -1, 59, -1, 32, 33, 34, -1, 7, - 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, - 18, 48, 20, 21, -1, -1, 53, 54, 26, 27, - -1, -1, 59, -1, 32, -1, 34, 7, 8, 9, - 10, 11, -1, -1, 7, 8, 9, 10, 11, -1, - 48, -1, -1, -1, -1, 53, 54, -1, -1, -1, - -1, 59, 32, -1, 34, -1, -1, -1, -1, 32, - -1, 34, -1, -1, -1, -1, -1, -1, 48, -1, - -1, -1, -1, 53, 54, 48, -1, -1, -1, 59, - 53, 54, 40, 41, -1, -1, 59, 45, 46, 47, - -1, 49, 50, 51, 52, 53, 54, 55, 56, -1, - -1, -1, 60, 61, 62, 63, 40, 41, -1, -1, - -1, 45, 46, 47, -1, 49, 50, 51, -1, 53, - 54, 55, 56, -1, -1, -1, 60, 61, 62, 63, - 40, 41, -1, -1, -1, 45, 46, 47, -1, 49, - 50, 51, 52, 53, 54, 55, 56, -1, -1, 40, - 41, 61, 62, 63, 45, 46, 47, -1, 49, 50, - 51, -1, 53, 54, 55, 56, -1, -1, 40, 41, - 61, 62, 63, 45, 46, 47, -1, 49, 50, 51, - -1, -1, -1, 55, 56, -1, -1, 59, -1, 61, - 62, 63, 40, 41, -1, -1, -1, 45, 46, 47, - -1, 49, 50, 51, -1, -1, -1, 55, 56, -1, - -1, 40, 41, 61, 62, 63, 45, 46, 47, -1, - 49, 50, 51, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 61, 62, 63 + 0, 5, 21, 68, 145, 70, 0, 0, 57, 0, + 15, 0, 15, 173, 13, 16, 14, 37, 38, 17, + 18, 19, 20, 39, 40, 35, 186, 144, 44, 45, + 46, 29, 48, 49, 50, 38, 35, 38, 36, 37, + 38, 51, 10, 58, 60, 61, 62, 11, 176, 190, + 167, 11, 57, 170, 18, 172, 27, 55, 29, 187, + 36, 37, 10, 27, 35, 182, 57, 67, 57, 210, + 68, 69, 70, 67, 67, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 57, 208, 10, 10, 113, 58, 63, 101, 51, 150, + 59, 59, 153, 154, 63, 63, 63, 105, 106, 113, + 11, 162, 11, 178, 27, 58, 114, 10, 169, 34, + 10, 63, 11, 11, 189, 176, 11, 27, 59, 11, + 149, 10, 183, 131, 185, 186, 18, 59, 57, 10, + 35, 23, 10, 194, 16, 27, 28, 29, 30, 200, + 10, 202, 63, 35, 152, 32, 21, 15, 38, 163, + 34, 16, 16, 161, 34, 32, 217, 16, 219, 16, + 32, 175, 164, 21, 186, 0, 1, 196, 21, 198, + 178, 67, 7, 8, 9, 10, 11, -1, 49, -1, + -1, 189, 17, -1, 19, 20, 21, 201, -1, 24, + 25, 26, -1, -1, -1, -1, 31, 32, 33, -1, + -1, -1, 212, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 47, -1, -1, -1, -1, 52, 53, -1, + -1, -1, 57, 58, 7, 8, 9, 10, 11, -1, + -1, -1, -1, -1, 17, -1, 19, 20, 21, -1, + -1, 24, 25, 26, -1, -1, -1, -1, 31, 32, + 33, -1, -1, 7, 8, 9, 10, 11, -1, -1, + -1, -1, -1, 17, 47, 19, 20, 21, -1, 52, + 53, 25, 26, -1, -1, 58, -1, 31, 32, 33, + -1, -1, 7, 8, 9, 10, 11, -1, -1, -1, + -1, -1, 17, 47, 19, 20, 21, -1, 52, 53, + 25, 26, -1, 57, 58, -1, 31, 32, 33, -1, + -1, 7, 8, 9, 10, 11, -1, -1, -1, -1, + -1, 17, 47, 19, 20, -1, -1, 52, 53, 25, + 26, -1, -1, 58, -1, 31, -1, 33, -1, 7, + 8, 9, 10, 11, -1, -1, 7, 8, 9, 10, + 11, 47, -1, -1, -1, -1, 52, 53, -1, -1, + -1, -1, 58, 31, -1, 33, -1, -1, -1, -1, + 31, -1, 33, -1, -1, -1, 22, -1, -1, 47, + -1, -1, -1, -1, 52, 53, 47, -1, -1, -1, + 58, 52, 53, 39, 40, -1, -1, 58, 44, 45, + 46, -1, 48, 49, 50, -1, 52, 53, 54, 55, + -1, -1, 39, 40, 60, 61, 62, 44, 45, 46, + -1, 48, 49, 50, 51, 52, 53, 54, 55, -1, + -1, -1, 59, 60, 61, 62, 39, 40, -1, -1, + -1, 44, 45, 46, -1, 48, 49, 50, -1, 52, + 53, 54, 55, -1, -1, -1, 59, 60, 61, 62, + 39, 40, -1, -1, -1, 44, 45, 46, -1, 48, + 49, 50, 51, 52, 53, 54, 55, -1, -1, 39, + 40, 60, 61, 62, 44, 45, 46, -1, 48, 49, + 50, -1, 52, 53, 54, 55, -1, -1, 39, 40, + 60, 61, 62, 44, 45, 46, -1, 48, 49, 50, + -1, -1, -1, 54, 55, -1, -1, 58, -1, 60, + 61, 62, 39, 40, -1, -1, -1, 44, 45, 46, + -1, 48, 49, 50, -1, -1, -1, 54, 55, -1, + -1, -1, -1, 60, 61, 62 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 1, 7, 8, 9, 10, 11, 18, 20, 21, - 22, 25, 26, 27, 32, 33, 34, 48, 53, 54, - 59, 66, 68, 69, 70, 71, 72, 79, 80, 81, - 86, 87, 89, 92, 96, 58, 59, 59, 83, 10, - 88, 11, 19, 24, 28, 29, 30, 31, 36, 90, - 91, 10, 11, 10, 10, 32, 69, 86, 37, 38, - 10, 86, 86, 86, 86, 0, 58, 67, 59, 52, - 59, 78, 86, 40, 41, 45, 46, 47, 49, 50, - 51, 53, 54, 55, 56, 61, 62, 63, 86, 97, - 97, 97, 64, 11, 11, 28, 11, 19, 28, 36, - 91, 93, 86, 23, 10, 36, 52, 60, 68, 78, - 86, 78, 86, 35, 52, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 60, 64, 60, 10, 11, 11, 11, 83, 10, 86, - 86, 60, 84, 60, 67, 83, 86, 86, 10, 94, - 71, 85, 87, 13, 36, 85, 70, 64, 67, 67, - 84, 36, 86, 84, 84, 10, 64, 95, 71, 17, - 86, 84, 16, 39, 83, 15, 39, 75, 76, 82, - 10, 85, 84, 85, 85, 74, 75, 77, 82, 83, - 76, 84, 78, 67, 85, 84, 84, 77, 84, 78, - 70, 39, 73, 35, 84, 17, 67, 67, 35, 84, - 83, 84, 83, 17, 16, 16, 85, 70, 71, 84, - 84 + 0, 1, 7, 8, 9, 10, 11, 17, 19, 20, + 21, 24, 25, 26, 31, 32, 33, 47, 52, 53, + 58, 65, 67, 68, 69, 70, 71, 78, 79, 80, + 85, 86, 88, 91, 95, 57, 58, 58, 82, 10, + 87, 11, 18, 23, 27, 28, 29, 30, 35, 89, + 90, 10, 11, 10, 10, 31, 68, 85, 36, 37, + 10, 85, 85, 85, 85, 0, 57, 66, 58, 51, + 58, 77, 85, 39, 40, 44, 45, 46, 48, 49, + 50, 52, 53, 54, 55, 60, 61, 62, 85, 96, + 96, 96, 63, 11, 11, 27, 11, 18, 27, 35, + 90, 92, 85, 22, 10, 35, 51, 59, 67, 77, + 85, 77, 85, 34, 51, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 59, 63, 59, 10, 11, 11, 11, 82, 10, 85, + 85, 59, 83, 59, 66, 82, 85, 85, 10, 93, + 84, 13, 35, 84, 69, 86, 63, 66, 66, 70, + 83, 35, 85, 83, 83, 10, 63, 94, 16, 85, + 83, 16, 38, 82, 15, 38, 74, 75, 81, 10, + 84, 32, 83, 84, 21, 84, 73, 74, 76, 81, + 82, 75, 83, 77, 84, 83, 83, 76, 83, 77, + 69, 38, 72, 34, 83, 16, 66, 66, 34, 83, + 82, 83, 82, 16, 32, 16, 16, 84, 69, 70, + 32, 21, 21, 83, 83 }; #define yyerrok (yyerrstatus = 0) @@ -1746,52 +1748,52 @@ yyreduce: #line 141 "engines/director/lingo/lingo-gr.y" { inst body = 0, end = 0; - WRITE_UINT32(&body, (yyvsp[(5) - (7)].code)); - WRITE_UINT32(&end, (yyvsp[(6) - (7)].code)); - (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 1] = body; /* body of loop */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 2] = end; ;} + WRITE_UINT32(&body, (yyvsp[(5) - (8)].code)); + WRITE_UINT32(&end, (yyvsp[(6) - (8)].code)); + (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 1] = body; /* body of loop */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 2] = end; ;} break; case 20: #line 152 "engines/director/lingo/lingo-gr.y" { inst init = 0, finish = 0, body = 0, end = 0, inc = 0; - WRITE_UINT32(&init, (yyvsp[(3) - (10)].code)); - WRITE_UINT32(&finish, (yyvsp[(6) - (10)].code)); - WRITE_UINT32(&body, (yyvsp[(8) - (10)].code)); - WRITE_UINT32(&end, (yyvsp[(9) - (10)].code)); + WRITE_UINT32(&init, (yyvsp[(3) - (11)].code)); + WRITE_UINT32(&finish, (yyvsp[(6) - (11)].code)); + WRITE_UINT32(&body, (yyvsp[(8) - (11)].code)); + WRITE_UINT32(&end, (yyvsp[(9) - (11)].code)); WRITE_UINT32(&inc, 1); - (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 1] = init; /* initial count value */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 2] = finish;/* final count value */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 3] = body; /* body of loop */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 4] = inc; /* increment */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 5] = end; ;} + (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = init; /* initial count value */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = finish;/* final count value */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = body; /* body of loop */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 4] = inc; /* increment */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; ;} break; case 21: #line 168 "engines/director/lingo/lingo-gr.y" { inst init = 0, finish = 0, body = 0, end = 0, inc = 0; - WRITE_UINT32(&init, (yyvsp[(3) - (11)].code)); - WRITE_UINT32(&finish, (yyvsp[(7) - (11)].code)); - WRITE_UINT32(&body, (yyvsp[(9) - (11)].code)); - WRITE_UINT32(&end, (yyvsp[(10) - (11)].code)); + WRITE_UINT32(&init, (yyvsp[(3) - (12)].code)); + WRITE_UINT32(&finish, (yyvsp[(7) - (12)].code)); + WRITE_UINT32(&body, (yyvsp[(9) - (12)].code)); + WRITE_UINT32(&end, (yyvsp[(10) - (12)].code)); WRITE_UINT32(&inc, -1); - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = init; /* initial count value */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = finish;/* final count value */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = body; /* body of loop */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 4] = inc; /* increment */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; ;} + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 1] = init; /* initial count value */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 2] = finish;/* final count value */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 3] = body; /* body of loop */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 4] = inc; /* increment */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 5] = end; ;} break; case 22: #line 182 "engines/director/lingo/lingo-gr.y" { inst then = 0, end = 0; - WRITE_UINT32(&then, (yyvsp[(5) - (7)].code)); - WRITE_UINT32(&end, (yyvsp[(6) - (7)].code)); - (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 1] = then; /* thenpart */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 3] = end; /* end, if cond fails */ + WRITE_UINT32(&then, (yyvsp[(5) - (8)].code)); + WRITE_UINT32(&end, (yyvsp[(6) - (8)].code)); + (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 1] = then; /* thenpart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 3] = end; /* end, if cond fails */ g_lingo->processIf(0, 0); ;} break; @@ -1799,12 +1801,12 @@ yyreduce: #line 189 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; - WRITE_UINT32(&then, (yyvsp[(5) - (11)].code)); - WRITE_UINT32(&else1, (yyvsp[(8) - (11)].code)); - WRITE_UINT32(&end, (yyvsp[(9) - (11)].code)); - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = then; /* thenpart */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = else1; /* elsepart */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = end; /* end, if cond fails */ + WRITE_UINT32(&then, (yyvsp[(5) - (12)].code)); + WRITE_UINT32(&else1, (yyvsp[(8) - (12)].code)); + WRITE_UINT32(&end, (yyvsp[(9) - (12)].code)); + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 1] = then; /* thenpart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 2] = else1; /* elsepart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 3] = end; /* end, if cond fails */ g_lingo->processIf(0, 0); ;} break; @@ -1812,13 +1814,13 @@ yyreduce: #line 198 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; - WRITE_UINT32(&then, (yyvsp[(5) - (11)].code)); - WRITE_UINT32(&else1, (yyvsp[(7) - (11)].code)); - WRITE_UINT32(&end, (yyvsp[(9) - (11)].code)); - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = then; /* thenpart */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = else1; /* elsepart */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = end; /* end, if cond fails */ - g_lingo->processIf(0, (yyvsp[(9) - (11)].code)); ;} + WRITE_UINT32(&then, (yyvsp[(5) - (12)].code)); + WRITE_UINT32(&else1, (yyvsp[(7) - (12)].code)); + WRITE_UINT32(&end, (yyvsp[(9) - (12)].code)); + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 1] = then; /* thenpart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 2] = else1; /* elsepart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 3] = end; /* end, if cond fails */ + g_lingo->processIf(0, (yyvsp[(9) - (12)].code)); ;} break; case 25: @@ -1946,8 +1948,8 @@ yyreduce: { g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;} break; - case 48: -#line 300 "engines/director/lingo/lingo-gr.y" + case 49: +#line 301 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_constpush); inst i = 0; @@ -1955,22 +1957,22 @@ yyreduce: g_lingo->code1(i); ;} break; - case 49: -#line 305 "engines/director/lingo/lingo-gr.y" + case 50: +#line 306 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_fconstpush); g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;} break; - case 50: -#line 308 "engines/director/lingo/lingo-gr.y" + case 51: +#line 309 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_stringpush); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;} break; - case 51: -#line 311 "engines/director/lingo/lingo-gr.y" + case 52: +#line 312 "engines/director/lingo/lingo-gr.y" { if ((yyvsp[(3) - (4)].narg) != g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs) error("Built-in function %s expects %d arguments but got %d", (yyvsp[(1) - (4)].s)->c_str(), g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs, (yyvsp[(3) - (4)].narg)); @@ -1979,8 +1981,8 @@ yyreduce: delete (yyvsp[(1) - (4)].s); ;} break; - case 52: -#line 317 "engines/director/lingo/lingo-gr.y" + case 53: +#line 318 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (4)].s)->c_str()); @@ -1991,156 +1993,156 @@ yyreduce: delete (yyvsp[(1) - (4)].s); ;} break; - case 53: -#line 325 "engines/director/lingo/lingo-gr.y" + case 54: +#line 326 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->codeId(*(yyvsp[(1) - (1)].s)); delete (yyvsp[(1) - (1)].s); ;} break; - case 55: -#line 329 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_add); ;} - break; - case 56: #line 330 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_sub); ;} + { g_lingo->code1(g_lingo->c_add); ;} break; case 57: #line 331 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_mul); ;} + { g_lingo->code1(g_lingo->c_sub); ;} break; case 58: #line 332 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_div); ;} + { g_lingo->code1(g_lingo->c_mul); ;} break; case 59: #line 333 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gt); ;} + { g_lingo->code1(g_lingo->c_div); ;} break; case 60: #line 334 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_lt); ;} + { g_lingo->code1(g_lingo->c_gt); ;} break; case 61: #line 335 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_neq); ;} + { g_lingo->code1(g_lingo->c_lt); ;} break; case 62: #line 336 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_ge); ;} + { g_lingo->code1(g_lingo->c_neq); ;} break; case 63: #line 337 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_le); ;} + { g_lingo->code1(g_lingo->c_ge); ;} break; case 64: #line 338 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_and); ;} + { g_lingo->code1(g_lingo->c_le); ;} break; case 65: #line 339 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_or); ;} + { g_lingo->code1(g_lingo->c_and); ;} break; case 66: #line 340 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_not); ;} + { g_lingo->code1(g_lingo->c_or); ;} break; case 67: #line 341 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_ampersand); ;} + { g_lingo->code1(g_lingo->c_not); ;} break; case 68: #line 342 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_concat); ;} + { g_lingo->code1(g_lingo->c_ampersand); ;} break; case 69: #line 343 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_contains); ;} + { g_lingo->code1(g_lingo->c_concat); ;} break; case 70: #line 344 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_starts); ;} + { g_lingo->code1(g_lingo->c_contains); ;} break; case 71: #line 345 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (2)].code); ;} + { g_lingo->code1(g_lingo->c_starts); ;} break; case 72: #line 346 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;} + { (yyval.code) = (yyvsp[(2) - (2)].code); ;} break; case 73: #line 347 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (3)].code); ;} + { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;} break; case 74: -#line 350 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} +#line 348 "engines/director/lingo/lingo-gr.y" + { (yyval.code) = (yyvsp[(2) - (3)].code); ;} break; case 75: #line 351 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} + { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} break; case 76: #line 352 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} + break; + + case 77: +#line 353 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_printtop); ;} break; - case 78: -#line 354 "engines/director/lingo/lingo-gr.y" + case 79: +#line 355 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); ;} break; - case 80: -#line 359 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;} - break; - case 81: #line 360 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;} + { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;} break; case 82: -#line 371 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotoloop); ;} +#line 361 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;} break; case 83: #line 372 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotonext); ;} + { g_lingo->code1(g_lingo->c_gotoloop); ;} break; case 84: #line 373 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotoprevious); ;} + { g_lingo->code1(g_lingo->c_gotonext); ;} break; case 85: #line 374 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_gotoprevious); ;} + break; + + case 86: +#line 375 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); @@ -2148,8 +2150,8 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 86: -#line 379 "engines/director/lingo/lingo-gr.y" + case 87: +#line 380 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str()); @@ -2158,8 +2160,8 @@ yyreduce: delete (yyvsp[(3) - (3)].s); ;} break; - case 87: -#line 385 "engines/director/lingo/lingo-gr.y" + case 88: +#line 386 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString(""); @@ -2167,14 +2169,9 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 88: -#line 392 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(3) - (3)].s); ;} - break; - case 89: #line 393 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(2) - (2)].s); ;} + { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; case 90: @@ -2184,65 +2181,70 @@ yyreduce: case 91: #line 395 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(1) - (1)].s); ;} + { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; case 92: -#line 398 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(3) - (3)].s); ;} +#line 396 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(1) - (1)].s); ;} break; case 93: #line 399 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(2) - (2)].s); ;} + { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; case 94: #line 400 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(3) - (3)].s); ;} + { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; case 95: -#line 428 "engines/director/lingo/lingo-gr.y" - { g_lingo->_indef = true; ;} +#line 401 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; case 96: #line 429 "engines/director/lingo/lingo-gr.y" + { g_lingo->_indef = true; ;} + break; + + case 97: +#line 430 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); - g_lingo->define(*(yyvsp[(2) - (9)].s), (yyvsp[(4) - (9)].code), (yyvsp[(5) - (9)].narg)); + g_lingo->define(*(yyvsp[(2) - (8)].s), (yyvsp[(4) - (8)].code), (yyvsp[(5) - (8)].narg)); g_lingo->_indef = false; ;} break; - case 97: -#line 435 "engines/director/lingo/lingo-gr.y" - { (yyval.narg) = 0; ;} - break; - case 98: #line 436 "engines/director/lingo/lingo-gr.y" - { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} + { (yyval.narg) = 0; ;} break; case 99: #line 437 "engines/director/lingo/lingo-gr.y" - { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} + { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} break; case 100: #line 438 "engines/director/lingo/lingo-gr.y" - { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} + { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; case 101: -#line 440 "engines/director/lingo/lingo-gr.y" - { g_lingo->codeArgStore(); ;} +#line 439 "engines/director/lingo/lingo-gr.y" + { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} break; case 102: -#line 443 "engines/director/lingo/lingo-gr.y" +#line 441 "engines/director/lingo/lingo-gr.y" + { g_lingo->codeArgStore(); ;} + break; + + case 103: +#line 444 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str()); @@ -2251,24 +2253,24 @@ yyreduce: g_lingo->code1(numpar); ;} break; - case 103: -#line 451 "engines/director/lingo/lingo-gr.y" - { (yyval.narg) = 0; ;} - break; - case 104: #line 452 "engines/director/lingo/lingo-gr.y" - { (yyval.narg) = 1; ;} + { (yyval.narg) = 0; ;} break; case 105: #line 453 "engines/director/lingo/lingo-gr.y" + { (yyval.narg) = 1; ;} + break; + + case 106: +#line 454 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; /* Line 1267 of yacc.c. */ -#line 2272 "engines/director/lingo/lingo-gr.cpp" +#line 2274 "engines/director/lingo/lingo-gr.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2482,6 +2484,6 @@ yyreturn: } -#line 456 "engines/director/lingo/lingo-gr.y" +#line 457 "engines/director/lingo/lingo-gr.y" diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h index bf99268aed..18a462a8f4 100644 --- a/engines/director/lingo/lingo-gr.h +++ b/engines/director/lingo/lingo-gr.h @@ -52,42 +52,41 @@ tDOWN = 268, tELSE = 269, tNLELSIF = 270, - tENDIF = 271, - tENDREPEAT = 272, - tEXIT = 273, - tFRAME = 274, - tGLOBAL = 275, - tGO = 276, - tIF = 277, - tINTO = 278, - tLOOP = 279, - tMACRO = 280, - tMCI = 281, - tMCIWAIT = 282, - tMOVIE = 283, - tNEXT = 284, - tOF = 285, - tPREVIOUS = 286, - tPUT = 287, - tREPEAT = 288, - tSET = 289, - tTHEN = 290, - tTO = 291, - tWITH = 292, - tWHILE = 293, - tNLELSE = 294, - tGE = 295, - tLE = 296, - tGT = 297, - tLT = 298, - tEQ = 299, - tNEQ = 300, - tAND = 301, - tOR = 302, - tNOT = 303, - tCONCAT = 304, - tCONTAINS = 305, - tSTARTS = 306 + tEND = 271, + tEXIT = 272, + tFRAME = 273, + tGLOBAL = 274, + tGO = 275, + tIF = 276, + tINTO = 277, + tLOOP = 278, + tMACRO = 279, + tMCI = 280, + tMCIWAIT = 281, + tMOVIE = 282, + tNEXT = 283, + tOF = 284, + tPREVIOUS = 285, + tPUT = 286, + tREPEAT = 287, + tSET = 288, + tTHEN = 289, + tTO = 290, + tWITH = 291, + tWHILE = 292, + tNLELSE = 293, + tGE = 294, + tLE = 295, + tGT = 296, + tLT = 297, + tEQ = 298, + tNEQ = 299, + tAND = 300, + tOR = 301, + tNOT = 302, + tCONCAT = 303, + tCONTAINS = 304, + tSTARTS = 305 }; #endif /* Tokens. */ @@ -104,42 +103,41 @@ #define tDOWN 268 #define tELSE 269 #define tNLELSIF 270 -#define tENDIF 271 -#define tENDREPEAT 272 -#define tEXIT 273 -#define tFRAME 274 -#define tGLOBAL 275 -#define tGO 276 -#define tIF 277 -#define tINTO 278 -#define tLOOP 279 -#define tMACRO 280 -#define tMCI 281 -#define tMCIWAIT 282 -#define tMOVIE 283 -#define tNEXT 284 -#define tOF 285 -#define tPREVIOUS 286 -#define tPUT 287 -#define tREPEAT 288 -#define tSET 289 -#define tTHEN 290 -#define tTO 291 -#define tWITH 292 -#define tWHILE 293 -#define tNLELSE 294 -#define tGE 295 -#define tLE 296 -#define tGT 297 -#define tLT 298 -#define tEQ 299 -#define tNEQ 300 -#define tAND 301 -#define tOR 302 -#define tNOT 303 -#define tCONCAT 304 -#define tCONTAINS 305 -#define tSTARTS 306 +#define tEND 271 +#define tEXIT 272 +#define tFRAME 273 +#define tGLOBAL 274 +#define tGO 275 +#define tIF 276 +#define tINTO 277 +#define tLOOP 278 +#define tMACRO 279 +#define tMCI 280 +#define tMCIWAIT 281 +#define tMOVIE 282 +#define tNEXT 283 +#define tOF 284 +#define tPREVIOUS 285 +#define tPUT 286 +#define tREPEAT 287 +#define tSET 288 +#define tTHEN 289 +#define tTO 290 +#define tWITH 291 +#define tWHILE 292 +#define tNLELSE 293 +#define tGE 294 +#define tLE 295 +#define tGT 296 +#define tLT 297 +#define tEQ 298 +#define tNEQ 299 +#define tAND 300 +#define tOR 301 +#define tNOT 302 +#define tCONCAT 303 +#define tCONTAINS 304 +#define tSTARTS 305 @@ -155,7 +153,7 @@ typedef union YYSTYPE int narg; /* number of arguments */ } /* Line 1529 of yacc.c. */ -#line 159 "engines/director/lingo/lingo-gr.hpp" +#line 157 "engines/director/lingo/lingo-gr.hpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 4e1778fb7b..f88e36db51 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -75,7 +75,7 @@ void yyerror(char *s) { g_lingo->_hadError = true; warning("%s at line %d col %d %token<i> INT %token<f> FLOAT %token<s> BLTIN ID STRING HANDLER -%token tDOWN tELSE tNLELSIF tENDIF tENDREPEAT tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO +%token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO %token tMCI tMCIWAIT tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO %token tWITH tWHILE tNLELSE %token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT @@ -138,7 +138,7 @@ stmt: stmtoneliner // statements // end repeat // - | repeatwhile '(' cond ')' stmtlist end tENDREPEAT { + | repeatwhile '(' cond ')' stmtlist end tEND tREPEAT { inst body = 0, end = 0; WRITE_UINT32(&body, $5); WRITE_UINT32(&end, $6); @@ -149,7 +149,7 @@ stmt: stmtoneliner // statements // end repeat // - | repeatwith '=' expr end tTO expr end stmtlist end tENDREPEAT { + | repeatwith '=' expr end tTO expr end stmtlist end tEND tREPEAT { inst init = 0, finish = 0, body = 0, end = 0, inc = 0; WRITE_UINT32(&init, $3); WRITE_UINT32(&finish, $6); @@ -165,7 +165,7 @@ stmt: stmtoneliner // statements // end repeat // - | repeatwith '=' expr end tDOWN tTO expr end stmtlist end tENDREPEAT { + | repeatwith '=' expr end tDOWN tTO expr end stmtlist end tEND tREPEAT { inst init = 0, finish = 0, body = 0, end = 0, inc = 0; WRITE_UINT32(&init, $3); WRITE_UINT32(&finish, $7); @@ -179,14 +179,14 @@ stmt: stmtoneliner (*g_lingo->_currentScript)[$1 + 5] = end; } /* end, if cond fails */ ; -ifstmt: if cond tTHEN nl stmtlist end tENDIF { +ifstmt: if cond tTHEN nl stmtlist end tEND tIF { inst then = 0, end = 0; WRITE_UINT32(&then, $5); WRITE_UINT32(&end, $6); (*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */ (*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */ g_lingo->processIf(0, 0); } - | if cond tTHEN nl stmtlist end tNLELSE stmtlist end nl tENDIF { + | if cond tTHEN nl stmtlist end tNLELSE stmtlist end nl tEND tIF { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, $5); WRITE_UINT32(&else1, $8); @@ -195,7 +195,7 @@ ifstmt: if cond tTHEN nl stmtlist end tENDIF { (*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */ (*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */ g_lingo->processIf(0, 0); } - | if cond tTHEN nl stmtlist end begin elseifstmt end nl tENDIF { + | if cond tTHEN nl stmtlist end begin elseifstmt end nl tEND tIF { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, $5); WRITE_UINT32(&else1, $7); @@ -293,8 +293,9 @@ begin: /* nothing */ { $$ = g_lingo->_currentScript->size(); } ; end: /* nothing */ { g_lingo->code1(STOP); $$ = g_lingo->_currentScript->size(); } ; -stmtlist: stmtlist nl stmt - | stmt +stmtlist: /* nothing */ + | stmtlist nl + | stmtlist stmt ; expr: INT { @@ -426,7 +427,7 @@ gotomovie: tOF tMOVIE STRING { $$ = $3; } // See also: // on keyword defn: tMACRO ID { g_lingo->_indef = true; } - begin argdef nl argstore stmtlist nl { + begin argdef nl argstore stmtlist { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); g_lingo->define(*$2, $4, $5); diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index 737548ff33..b419574cfc 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -364,8 +364,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 47 -#define YY_END_OF_BUFFER 48 +#define YY_NUM_RULES 46 +#define YY_END_OF_BUFFER 47 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -373,25 +373,25 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[161] = +static yyconst flex_int16_t yy_accept[152] = { 0, - 0, 0, 48, 46, 3, 44, 44, 46, 46, 43, - 43, 43, 42, 43, 43, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 2, 2, 3, 44, 0, 0, 44, 0, - 45, 39, 1, 41, 42, 38, 36, 37, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 16, 7, 40, - 40, 40, 40, 40, 40, 40, 25, 26, 40, 40, - 40, 40, 40, 40, 33, 40, 40, 2, 2, 0, - 1, 41, 4, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 20, 40, 40, 24, 40, 28, 40, - - 30, 40, 40, 40, 40, 0, 40, 6, 10, 0, - 13, 40, 40, 17, 18, 40, 40, 40, 23, 40, - 40, 40, 32, 40, 34, 0, 40, 0, 0, 14, - 40, 19, 40, 22, 40, 40, 40, 35, 9, 40, - 11, 0, 15, 40, 40, 29, 31, 0, 40, 0, - 21, 40, 0, 5, 0, 27, 8, 0, 12, 0 + 0, 0, 47, 45, 3, 43, 43, 45, 45, 42, + 42, 42, 41, 42, 42, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 2, 2, 3, 43, 0, 0, 43, 0, + 44, 38, 1, 40, 41, 37, 35, 36, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 15, 7, 39, + 39, 39, 39, 39, 39, 39, 24, 25, 39, 39, + 39, 39, 39, 39, 32, 39, 39, 2, 2, 0, + 1, 40, 4, 39, 39, 39, 11, 39, 39, 39, + 39, 39, 39, 19, 39, 39, 23, 39, 27, 39, + + 29, 39, 39, 39, 39, 0, 39, 6, 10, 12, + 39, 39, 16, 17, 39, 39, 39, 22, 39, 39, + 39, 31, 39, 33, 0, 39, 13, 39, 18, 39, + 21, 39, 39, 39, 34, 9, 39, 14, 39, 39, + 28, 30, 0, 39, 20, 39, 0, 5, 26, 8, + 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -436,51 +436,49 @@ static yyconst flex_int32_t yy_meta[58] = 4, 4, 4, 4, 4, 4, 4 } ; -static yyconst flex_int16_t yy_base[164] = +static yyconst flex_int16_t yy_base[155] = { 0, - 0, 56, 249, 374, 60, 64, 68, 72, 187, 374, - 178, 170, 49, 65, 138, 53, 0, 53, 54, 58, + 0, 56, 186, 352, 60, 64, 68, 72, 173, 352, + 143, 141, 49, 65, 132, 53, 0, 53, 54, 58, 54, 61, 70, 59, 83, 95, 79, 62, 98, 105, - 103, 104, 138, 151, 157, 125, 161, 165, 169, 144, - 374, 374, 0, 134, 123, 374, 374, 374, 0, 117, + 103, 104, 138, 151, 157, 125, 161, 165, 169, 132, + 352, 352, 0, 108, 123, 352, 352, 352, 0, 117, 141, 134, 144, 158, 154, 163, 152, 0, 0, 149, 154, 166, 162, 153, 152, 159, 0, 0, 173, 162, 166, 165, 189, 191, 0, 188, 181, 217, 225, 192, - 0, 127, 0, 191, 197, 206, 86, 199, 209, 220, + 0, 85, 0, 191, 197, 206, 0, 199, 209, 220, 211, 211, 211, 207, 214, 211, 0, 212, 0, 229, - 0, 220, 224, 228, 232, 226, 240, 0, 0, 263, - 0, 247, 254, 0, 0, 245, 260, 260, 0, 257, - 266, 251, 0, 265, 0, 266, 264, 269, 271, 0, - 267, 0, 272, 0, 270, 267, 269, 0, 91, 278, - 374, 281, 0, 283, 283, 0, 0, 320, 287, 304, - 0, 296, 304, 0, 313, 0, 374, 298, 374, 374, - 365, 115, 369 + 0, 220, 224, 228, 232, 226, 240, 0, 0, 0, + 246, 251, 0, 0, 240, 254, 254, 0, 252, 264, + 249, 0, 263, 0, 264, 261, 0, 261, 0, 267, + 0, 264, 261, 263, 0, 86, 269, 0, 266, 266, + 0, 0, 298, 277, 0, 278, 290, 0, 0, 352, + 352, 343, 89, 347 } ; -static yyconst flex_int16_t yy_def[164] = +static yyconst flex_int16_t yy_def[155] = { 0, - 160, 1, 160, 160, 160, 160, 160, 160, 161, 160, - 160, 160, 160, 160, 160, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 160, 160, 160, 160, 160, 160, 160, 161, - 160, 160, 163, 160, 160, 160, 160, 160, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 160, 160, 160, - 163, 160, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - - 162, 162, 162, 162, 162, 160, 162, 162, 162, 160, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 160, 162, 160, 160, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 160, 162, - 160, 160, 162, 162, 162, 162, 162, 160, 162, 160, - 162, 162, 160, 162, 160, 162, 160, 160, 160, 0, - 160, 160, 160 + 151, 1, 151, 151, 151, 151, 151, 151, 152, 151, + 151, 151, 151, 151, 151, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 151, 151, 151, 151, 151, 151, 151, 152, + 151, 151, 154, 151, 151, 151, 151, 151, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 151, 151, 151, + 154, 151, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + + 153, 153, 153, 153, 153, 151, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 151, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 151, 153, 153, 153, 153, + 153, 153, 151, 153, 153, 153, 151, 153, 153, 151, + 0, 151, 151, 151 } ; -static yyconst flex_int16_t yy_nxt[432] = +static yyconst flex_int16_t yy_nxt[410] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 13, 14, 10, 15, 16, 17, 18, 19, 20, 21, @@ -490,49 +488,46 @@ static yyconst flex_int16_t yy_nxt[432] = 29, 30, 31, 17, 17, 32, 17, 33, 44, 45, 34, 35, 36, 36, 37, 38, 39, 39, 38, 38, 39, 39, 38, 37, 36, 36, 37, 46, 47, 50, - 51, 52, 53, 56, 54, 57, 61, 110, 58, 59, - 110, 69, 148, 55, 70, 148, 60, 62, 67, 63, + 51, 52, 53, 56, 54, 57, 61, 143, 58, 59, + 143, 69, 49, 55, 70, 82, 60, 62, 67, 63, 50, 51, 52, 53, 56, 54, 57, 61, 68, 58, - 64, 59, 69, 65, 55, 70, 71, 60, 49, 62, + 64, 59, 69, 65, 55, 70, 71, 60, 82, 62, 67, 63, 66, 72, 74, 76, 77, 36, 36, 68, - 75, 64, 44, 45, 83, 65, 73, 82, 71, 78, - 36, 36, 79, 66, 82, 72, 74, 76, 77, 41, - 48, 75, 79, 36, 36, 79, 83, 73, 35, 36, + 75, 64, 44, 45, 83, 65, 73, 41, 71, 78, + 36, 36, 79, 66, 48, 72, 74, 76, 77, 43, + 42, 75, 79, 36, 36, 79, 83, 73, 35, 36, 36, 37, 37, 36, 36, 37, 38, 84, 85, 38, - 38, 39, 39, 38, 86, 87, 88, 89, 43, 90, - 91, 92, 93, 80, 94, 42, 95, 96, 84, 85, - 97, 98, 41, 99, 100, 86, 101, 87, 88, 89, + 38, 39, 39, 38, 86, 87, 88, 89, 41, 90, + 91, 92, 93, 80, 94, 151, 95, 96, 84, 85, + 97, 98, 151, 99, 100, 86, 101, 87, 88, 89, 90, 91, 92, 102, 93, 80, 94, 95, 96, 103, 104, 97, 105, 98, 99, 100, 106, 101, 78, 36, 36, 79, 107, 108, 109, 102, 79, 36, 36, 79, - 111, 103, 104, 105, 112, 113, 118, 106, 114, 115, - 116, 117, 119, 107, 108, 120, 109, 121, 160, 122, - 123, 111, 124, 125, 127, 112, 126, 113, 118, 114, - 115, 116, 117, 119, 110, 130, 120, 110, 131, 121, - 122, 123, 132, 124, 133, 125, 127, 126, 134, 135, - 136, 160, 137, 138, 139, 128, 140, 130, 141, 142, - 131, 143, 129, 132, 144, 160, 133, 145, 146, 147, - - 134, 135, 136, 137, 149, 138, 139, 128, 140, 150, - 141, 142, 143, 129, 151, 152, 144, 154, 145, 146, - 147, 148, 155, 157, 148, 149, 156, 158, 160, 159, - 150, 160, 160, 160, 160, 151, 152, 160, 154, 160, - 160, 160, 153, 160, 155, 157, 160, 156, 160, 158, - 159, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 153, 40, 160, 40, 40, 81, - 160, 160, 81, 3, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160 + 110, 103, 104, 105, 111, 112, 117, 106, 113, 114, + 115, 116, 118, 107, 108, 119, 109, 120, 151, 121, + 122, 110, 123, 124, 126, 111, 125, 112, 117, 113, + 114, 115, 116, 118, 127, 128, 119, 129, 130, 120, + 121, 122, 131, 123, 132, 124, 126, 125, 133, 151, + 134, 135, 136, 137, 151, 138, 127, 128, 129, 139, + 130, 140, 141, 142, 131, 144, 132, 145, 146, 143, + + 133, 134, 143, 135, 136, 137, 138, 148, 149, 150, + 151, 139, 140, 141, 142, 151, 144, 151, 145, 146, + 147, 151, 151, 151, 151, 151, 151, 151, 148, 149, + 151, 150, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 147, 40, 151, 40, 40, 81, 151, 151, + 81, 3, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + + 151, 151, 151, 151, 151, 151, 151, 151, 151 } ; -static yyconst flex_int16_t yy_chk[432] = +static yyconst flex_int16_t yy_chk[410] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -542,46 +537,43 @@ static yyconst flex_int16_t yy_chk[432] = 1, 1, 1, 1, 1, 1, 1, 2, 13, 13, 2, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 14, 14, 16, - 18, 19, 20, 21, 20, 22, 24, 87, 22, 23, - 87, 28, 139, 20, 28, 139, 23, 25, 27, 25, + 18, 19, 20, 21, 20, 22, 24, 136, 22, 23, + 136, 28, 153, 20, 28, 82, 23, 25, 27, 25, 16, 18, 19, 20, 21, 20, 22, 24, 27, 22, - 25, 23, 28, 26, 20, 28, 29, 23, 162, 25, + 25, 23, 28, 26, 20, 28, 29, 23, 44, 25, 27, 25, 26, 30, 31, 32, 32, 36, 36, 27, - 31, 25, 45, 45, 50, 26, 30, 82, 29, 33, - 33, 33, 33, 26, 44, 30, 31, 32, 32, 40, - 15, 31, 34, 34, 34, 34, 50, 30, 35, 35, + 31, 25, 45, 45, 50, 26, 30, 40, 29, 33, + 33, 33, 33, 26, 15, 30, 31, 32, 32, 12, + 11, 31, 34, 34, 34, 34, 50, 30, 35, 35, 35, 35, 37, 37, 37, 37, 38, 51, 52, 38, - 39, 39, 39, 39, 53, 54, 55, 56, 12, 57, - 60, 61, 62, 38, 63, 11, 64, 65, 51, 52, - 66, 69, 9, 70, 71, 53, 72, 54, 55, 56, + 39, 39, 39, 39, 53, 54, 55, 56, 9, 57, + 60, 61, 62, 38, 63, 3, 64, 65, 51, 52, + 66, 69, 0, 70, 71, 53, 72, 54, 55, 56, 57, 60, 61, 73, 62, 38, 63, 64, 65, 74, 76, 66, 77, 69, 70, 71, 80, 72, 78, 78, 78, 78, 84, 85, 86, 73, 79, 79, 79, 79, 88, 74, 76, 77, 89, 90, 95, 80, 91, 92, - 93, 94, 96, 84, 85, 98, 86, 100, 3, 102, + 93, 94, 96, 84, 85, 98, 86, 100, 0, 102, 103, 88, 104, 105, 107, 89, 106, 90, 95, 91, - 92, 93, 94, 96, 110, 112, 98, 110, 113, 100, - 102, 103, 116, 104, 117, 105, 107, 106, 118, 120, - 121, 0, 122, 124, 126, 110, 127, 112, 128, 129, - 113, 131, 110, 116, 133, 0, 117, 135, 136, 137, - - 118, 120, 121, 122, 140, 124, 126, 110, 127, 142, - 128, 129, 131, 110, 144, 145, 133, 149, 135, 136, - 137, 148, 150, 153, 148, 140, 152, 155, 0, 158, - 142, 0, 0, 0, 0, 144, 145, 0, 149, 0, - 0, 0, 148, 0, 150, 153, 0, 152, 0, 155, - 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 148, 161, 0, 161, 161, 163, - 0, 0, 163, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, - 160 + 92, 93, 94, 96, 111, 112, 98, 115, 116, 100, + 102, 103, 117, 104, 119, 105, 107, 106, 120, 0, + 121, 123, 125, 126, 0, 128, 111, 112, 115, 130, + 116, 132, 133, 134, 117, 137, 119, 139, 140, 143, + + 120, 121, 143, 123, 125, 126, 128, 144, 146, 147, + 0, 130, 132, 133, 134, 0, 137, 0, 139, 140, + 143, 0, 0, 0, 0, 0, 0, 0, 144, 146, + 0, 147, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 143, 152, 0, 152, 152, 154, 0, 0, + 154, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, + + 151, 151, 151, 151, 151, 151, 151, 151, 151 } ; static yy_state_type yy_last_accepting_state; @@ -644,7 +636,7 @@ static void countnl() { Director::g_lingo->_colnumber = strlen(p); } -#line 648 "engines/director/lingo/lingo-lex.cpp" +#line 640 "engines/director/lingo/lingo-lex.cpp" #define INITIAL 0 @@ -832,7 +824,7 @@ YY_DECL #line 58 "engines/director/lingo/lingo-lex.l" -#line 836 "engines/director/lingo/lingo-lex.cpp" +#line 828 "engines/director/lingo/lingo-lex.cpp" if ( !(yy_init) ) { @@ -886,13 +878,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 161 ) + if ( yy_current_state >= 152 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 374 ); + while ( yy_base[yy_current_state] != 352 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -971,151 +963,146 @@ YY_RULE_SETUP case 11: YY_RULE_SETUP #line 71 "engines/director/lingo/lingo-lex.l" -{ count(); return tENDIF; } +{ count(); return tEND; } YY_BREAK case 12: YY_RULE_SETUP #line 72 "engines/director/lingo/lingo-lex.l" -{ count(); return tENDREPEAT; } +{ count(); return tEXIT; } YY_BREAK case 13: YY_RULE_SETUP #line 73 "engines/director/lingo/lingo-lex.l" -{ count(); return tEXIT; } +{ count(); return tFRAME; } YY_BREAK case 14: YY_RULE_SETUP #line 74 "engines/director/lingo/lingo-lex.l" -{ count(); return tFRAME; } +{ count(); return tGLOBAL; } YY_BREAK case 15: YY_RULE_SETUP #line 75 "engines/director/lingo/lingo-lex.l" -{ count(); return tGLOBAL; } +{ count(); return tGO; } YY_BREAK case 16: YY_RULE_SETUP #line 76 "engines/director/lingo/lingo-lex.l" -{ count(); return tGO; } +{ count(); return tINTO; } YY_BREAK case 17: YY_RULE_SETUP #line 77 "engines/director/lingo/lingo-lex.l" -{ count(); return tINTO; } +{ count(); return tLOOP; } YY_BREAK case 18: YY_RULE_SETUP #line 78 "engines/director/lingo/lingo-lex.l" -{ count(); return tLOOP; } +{ count(); return tMACRO; } YY_BREAK case 19: YY_RULE_SETUP #line 79 "engines/director/lingo/lingo-lex.l" -{ count(); return tMACRO; } +{ count(); return tMCI; } YY_BREAK case 20: YY_RULE_SETUP #line 80 "engines/director/lingo/lingo-lex.l" -{ count(); return tMCI; } +{ count(); return tMCIWAIT; } YY_BREAK case 21: YY_RULE_SETUP #line 81 "engines/director/lingo/lingo-lex.l" -{ count(); return tMCIWAIT; } +{ count(); return tMOVIE; } YY_BREAK case 22: YY_RULE_SETUP #line 82 "engines/director/lingo/lingo-lex.l" -{ count(); return tMOVIE; } +{ count(); return tNEXT; } YY_BREAK case 23: YY_RULE_SETUP #line 83 "engines/director/lingo/lingo-lex.l" -{ count(); return tNEXT; } +{ count(); return tNOT; } YY_BREAK case 24: YY_RULE_SETUP #line 84 "engines/director/lingo/lingo-lex.l" -{ count(); return tNOT; } +{ count(); return tOF; } YY_BREAK case 25: YY_RULE_SETUP #line 85 "engines/director/lingo/lingo-lex.l" -{ count(); return tOF; } +{ count(); return tOR; } YY_BREAK case 26: YY_RULE_SETUP #line 86 "engines/director/lingo/lingo-lex.l" -{ count(); return tOR; } +{ count(); return tPREVIOUS; } YY_BREAK case 27: YY_RULE_SETUP #line 87 "engines/director/lingo/lingo-lex.l" -{ count(); return tPREVIOUS; } +{ count(); return tPUT; } YY_BREAK case 28: YY_RULE_SETUP #line 88 "engines/director/lingo/lingo-lex.l" -{ count(); return tPUT; } +{ count(); return tREPEAT; } YY_BREAK case 29: YY_RULE_SETUP #line 89 "engines/director/lingo/lingo-lex.l" -{ count(); return tREPEAT; } +{ count(); return tSET; } YY_BREAK case 30: YY_RULE_SETUP #line 90 "engines/director/lingo/lingo-lex.l" -{ count(); return tSET; } +{ count(); return tSTARTS; } YY_BREAK case 31: YY_RULE_SETUP #line 91 "engines/director/lingo/lingo-lex.l" -{ count(); return tSTARTS; } +{ count(); return tTHEN; } YY_BREAK case 32: YY_RULE_SETUP #line 92 "engines/director/lingo/lingo-lex.l" -{ count(); return tTHEN; } +{ count(); return tTO; } YY_BREAK case 33: YY_RULE_SETUP #line 93 "engines/director/lingo/lingo-lex.l" -{ count(); return tTO; } +{ count(); return tWITH; } YY_BREAK case 34: YY_RULE_SETUP #line 94 "engines/director/lingo/lingo-lex.l" -{ count(); return tWITH; } +{ count(); return tWHILE; } YY_BREAK case 35: YY_RULE_SETUP -#line 95 "engines/director/lingo/lingo-lex.l" -{ count(); return tWHILE; } +#line 96 "engines/director/lingo/lingo-lex.l" +{ count(); return tNEQ; } YY_BREAK case 36: YY_RULE_SETUP #line 97 "engines/director/lingo/lingo-lex.l" -{ count(); return tNEQ; } +{ count(); return tGE; } YY_BREAK case 37: YY_RULE_SETUP #line 98 "engines/director/lingo/lingo-lex.l" -{ count(); return tGE; } +{ count(); return tLE; } YY_BREAK case 38: YY_RULE_SETUP #line 99 "engines/director/lingo/lingo-lex.l" -{ count(); return tLE; } - YY_BREAK -case 39: -YY_RULE_SETUP -#line 100 "engines/director/lingo/lingo-lex.l" { count(); return tCONCAT; } YY_BREAK -case 40: +case 39: YY_RULE_SETUP -#line 102 "engines/director/lingo/lingo-lex.l" +#line 101 "engines/director/lingo/lingo-lex.l" { count(); yylval.s = new Common::String(yytext); @@ -1126,43 +1113,43 @@ YY_RULE_SETUP return ID; } YY_BREAK +case 40: +YY_RULE_SETUP +#line 110 "engines/director/lingo/lingo-lex.l" +{ count(); yylval.f = atof(yytext); return FLOAT; } + YY_BREAK case 41: YY_RULE_SETUP #line 111 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.f = atof(yytext); return FLOAT; } +{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; } YY_BREAK case 42: YY_RULE_SETUP #line 112 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; } +{ count(); return *yytext; } YY_BREAK case 43: +/* rule 43 can match eol */ YY_RULE_SETUP #line 113 "engines/director/lingo/lingo-lex.l" -{ count(); return *yytext; } +{ return '\n'; } YY_BREAK case 44: -/* rule 44 can match eol */ YY_RULE_SETUP #line 114 "engines/director/lingo/lingo-lex.l" -{ return '\n'; } +{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } YY_BREAK case 45: YY_RULE_SETUP #line 115 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } - YY_BREAK -case 46: -YY_RULE_SETUP -#line 116 "engines/director/lingo/lingo-lex.l" YY_BREAK -case 47: +case 46: YY_RULE_SETUP -#line 118 "engines/director/lingo/lingo-lex.l" +#line 117 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1166 "engines/director/lingo/lingo-lex.cpp" +#line 1153 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1455,7 +1442,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 161 ) + if ( yy_current_state >= 152 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1483,11 +1470,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 161 ) + if ( yy_current_state >= 152 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 160); + yy_is_jam = (yy_current_state == 151); return yy_is_jam ? 0 : yy_current_state; } @@ -2162,7 +2149,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 118 "engines/director/lingo/lingo-lex.l" +#line 117 "engines/director/lingo/lingo-lex.l" diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index 4b0f8fe431..6a78a3f160 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -68,8 +68,7 @@ whitespace [\t ] (?i:[\n\r]+[\t ]+else[\t ]+if) { countnl(); return tNLELSIF; } (?i:[\n\r]+[\t ]+else) { countnl(); return tNLELSE; } (?i:else) { count(); return tELSE; } -(?i:end[\t ]+if) { count(); return tENDIF; } -(?i:end[\t ]+repeat) { count(); return tENDREPEAT; } +(?i:end) { count(); return tEND; } (?i:exit) { count(); return tEXIT; } (?i:frame) { count(); return tFRAME; } (?i:global) { count(); return tGLOBAL; } |