mirror of
https://github.com/DrBeef/Raze.git
synced 2024-12-01 16:42:50 +00:00
91ede1126f
All prior changes can be found on the (will be published in the future) RazeXR repo
6099 lines
260 KiB
C
6099 lines
260 KiB
C
/*
|
|
** 2000-05-29
|
|
**
|
|
** The author disclaims copyright to this source code. In place of
|
|
** a legal notice, here is a blessing:
|
|
**
|
|
** May you do good and not evil.
|
|
** May you find forgiveness for yourself and forgive others.
|
|
** May you share freely, never taking more than you give.
|
|
**
|
|
*************************************************************************
|
|
** Driver template for the LEMON parser generator.
|
|
**
|
|
** The "lemon" program processes an LALR(1) input grammar file, then uses
|
|
** this template to construct a parser. The "lemon" program inserts text
|
|
** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the
|
|
** interstitial "-" characters) contained in this template is changed into
|
|
** the value of the %name directive from the grammar. Otherwise, the content
|
|
** of this template is copied straight through into the generate parser
|
|
** source file.
|
|
**
|
|
** The following is the concatenation of all %include directives from the
|
|
** input grammar file:
|
|
*/
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
|
|
#ifdef _MSC_VER
|
|
#define CDECL __cdecl
|
|
#else
|
|
#define CDECL
|
|
#endif
|
|
|
|
/************ Begin %include sections from the grammar ************************/
|
|
#line 40 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
|
|
// Allocates a new AST node off the parse state's arena.
|
|
#define NEW_AST_NODE(type,name,tok) \
|
|
ZCC_##type *name = static_cast<ZCC_##type *>(stat->InitNode(sizeof(ZCC_##type), AST_##type)); \
|
|
SetNodeLine(name, tok)
|
|
|
|
static void SetNodeLine(ZCC_TreeNode *name, ZCCToken &tok)
|
|
{
|
|
name->SourceLoc = tok.SourceLoc;
|
|
}
|
|
|
|
static void SetNodeLine(ZCC_TreeNode *name, ZCC_TreeNode *node)
|
|
{
|
|
if (name == nullptr || node == nullptr)
|
|
{
|
|
I_Error("Fatal parse error");
|
|
}
|
|
name->SourceLoc = node->SourceLoc;
|
|
}
|
|
|
|
static void SetNodeLine(ZCC_TreeNode *name, int line)
|
|
{
|
|
name->SourceLoc = line;
|
|
}
|
|
|
|
// If a is non-null, appends b to a. Otherwise, sets a to b.
|
|
#define SAFE_APPEND(a,b) \
|
|
if (a == NULL) a = b; else AppendTreeNodeSibling(a, b);
|
|
|
|
#define UNARY_EXPR(X,T) NEW_AST_NODE(ExprUnary, expr1, X); expr1->Operation = T; expr1->Operand = X; expr1->Type = NULL
|
|
#define BINARY_EXPR(X,Y,T) NEW_AST_NODE(ExprBinary, expr2, X); expr2->Operation = T; expr2->Type = NULL; expr2->Left = X; expr2->Right = Y
|
|
|
|
#define NEW_INTCONST_NODE(name,type,val,tok) \
|
|
NEW_AST_NODE(ExprConstant, name, tok); \
|
|
name->Operation = PEX_ConstValue; \
|
|
name->Type = type; \
|
|
name->IntVal = val
|
|
|
|
struct ClassFlagsBlock {
|
|
VM_UWORD Flags;
|
|
ZCC_Identifier *Replaces;
|
|
VersionInfo Version;
|
|
};
|
|
|
|
struct StateOpts {
|
|
ZCC_Expression *Offset;
|
|
ZCC_ExprConstant *Lights;
|
|
bool Bright;
|
|
bool Fast;
|
|
bool Slow;
|
|
bool NoDelay;
|
|
bool CanRaise;
|
|
|
|
void Zero() {
|
|
Offset = nullptr;
|
|
Lights = nullptr;
|
|
Bright = false;
|
|
Fast = false;
|
|
Slow = false;
|
|
NoDelay = false;
|
|
CanRaise = false;
|
|
}
|
|
};
|
|
|
|
struct VarOrFun
|
|
{
|
|
ZCC_VarName *VarNames;
|
|
ZCC_FuncParamDecl *FuncParams;
|
|
ZCC_CompoundStmt *FuncBody;
|
|
ENamedName FuncName;
|
|
int FuncFlags;
|
|
int SourceLoc;
|
|
};
|
|
#line 111 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
/**************** End of %include directives **********************************/
|
|
/* These constants specify the various numeric values for terminal symbols
|
|
** in a format understandable to "makeheaders". This section is blank unless
|
|
** "lemon" is run with the "-m" command-line option.
|
|
***************** Begin makeheaders token definitions *************************/
|
|
/**************** End makeheaders token definitions ***************************/
|
|
|
|
/* The next section is a series of control #defines.
|
|
** various aspects of the generated parser.
|
|
** YYCODETYPE is the data type used to store the integer codes
|
|
** that represent terminal and non-terminal symbols.
|
|
** "unsigned char" is used if there are fewer than
|
|
** 256 symbols. Larger types otherwise.
|
|
** YYNOCODE is a number of type YYCODETYPE that is not used for
|
|
** any terminal or nonterminal symbol.
|
|
** YYFALLBACK If defined, this indicates that one or more tokens
|
|
** (also known as: "terminal symbols") have fall-back
|
|
** values which should be used if the original symbol
|
|
** would not parse. This permits keywords to sometimes
|
|
** be used as identifiers, for example.
|
|
** YYACTIONTYPE is the data type used for "action codes" - numbers
|
|
** that indicate what to do in response to the next
|
|
** token.
|
|
** ZCCParseTOKENTYPE is the data type used for minor type for terminal
|
|
** symbols. Background: A "minor type" is a semantic
|
|
** value associated with a terminal or non-terminal
|
|
** symbols. For example, for an "ID" terminal symbol,
|
|
** the minor type might be the name of the identifier.
|
|
** Each non-terminal can have a different minor type.
|
|
** Terminal symbols all have the same minor type, though.
|
|
** This macros defines the minor type for terminal
|
|
** symbols.
|
|
** YYMINORTYPE is the data type used for all minor types.
|
|
** This is typically a union of many types, one of
|
|
** which is ZCCParseTOKENTYPE. The entry in the union
|
|
** for terminal symbols is called "yy0".
|
|
** YYSTACKDEPTH is the maximum depth of the parser's stack. If
|
|
** zero the stack is dynamically sized using realloc()
|
|
** ZCCParseARG_SDECL A static variable declaration for the %extra_argument
|
|
** ZCCParseARG_PDECL A parameter declaration for the %extra_argument
|
|
** ZCCParseARG_STORE Code to store %extra_argument into yypParser
|
|
** ZCCParseARG_FETCH Code to extract %extra_argument from yypParser
|
|
** YYERRORSYMBOL is the code number of the error symbol. If not
|
|
** defined, then do no error processing.
|
|
** YYNSTATE the combined number of states.
|
|
** YYNRULE the number of rules in the grammar
|
|
** YY_MAX_SHIFT Maximum value for shift actions
|
|
** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
|
|
** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
|
|
** YY_MIN_REDUCE Maximum value for reduce actions
|
|
** YY_ERROR_ACTION The yy_action[] code for syntax error
|
|
** YY_ACCEPT_ACTION The yy_action[] code for accept
|
|
** YY_NO_ACTION The yy_action[] code for no-op
|
|
*/
|
|
#ifndef INTERFACE
|
|
# define INTERFACE 1
|
|
#endif
|
|
/************* Begin control #defines *****************************************/
|
|
#define YYCODETYPE unsigned short int
|
|
#define YYNOCODE 269
|
|
#define YYACTIONTYPE unsigned short int
|
|
#define ZCCParseTOKENTYPE ZCCToken
|
|
typedef union {
|
|
int yyinit;
|
|
ZCCParseTOKENTYPE yy0;
|
|
ZCC_Class * yy20;
|
|
ZCC_Declarator * yy23;
|
|
ZCC_FlagStmt * yy52;
|
|
ZCC_CompoundStmt * yy55;
|
|
ZCC_LocalVarStmt * yy66;
|
|
ZCC_States * yy70;
|
|
ClassFlagsBlock yy87;
|
|
ZCC_Type * yy104;
|
|
ZCC_StaticArrayStatement * yy106;
|
|
ZCC_FuncParm * yy138;
|
|
ZCC_FlagDef * yy155;
|
|
ZCC_Statement * yy156;
|
|
ZCC_Identifier * yy165;
|
|
ZCC_Enum * yy179;
|
|
ZCC_VarName * yy180;
|
|
ZCC_AssignDeclStmt * yy251;
|
|
ZCC_StatePart * yy266;
|
|
ZCC_AssignStmt * yy271;
|
|
ZCC_VarInit * yy275;
|
|
ZCC_MixinDef * yy282;
|
|
ZCC_DeclFlags * yy295;
|
|
ZCC_TreeNode * yy296;
|
|
ZCC_Struct * yy299;
|
|
ZCC_ExpressionStmt * yy302;
|
|
ZCC_BasicType * yy310;
|
|
ZCC_PropertyStmt * yy315;
|
|
ZCC_Expression * yy318;
|
|
StateOpts yy332;
|
|
ZCC_MixinStmt * yy399;
|
|
ZCC_Default * yy431;
|
|
VarOrFun yy432;
|
|
ZCC_CaseStmt * yy442;
|
|
ZCC_Property * yy443;
|
|
ZCC_ExprFuncCall * yy445;
|
|
ZCC_ExprConstant * yy471;
|
|
ZCC_IfStmt * yy481;
|
|
ZCC_FuncParamDecl * yy491;
|
|
ZCC_ConstantDef * yy499;
|
|
int yy537;
|
|
} YYMINORTYPE;
|
|
#ifndef YYSTACKDEPTH
|
|
#define YYSTACKDEPTH 0
|
|
#endif
|
|
#define ZCCParseARG_SDECL ZCCParseState *stat ;
|
|
#define ZCCParseARG_PDECL , ZCCParseState *stat
|
|
#define ZCCParseARG_FETCH ZCCParseState *stat = yypParser->stat
|
|
#define ZCCParseARG_STORE yypParser->stat = stat
|
|
#define YYERRORSYMBOL 159
|
|
#define YYERRSYMDT yy537
|
|
#define YYFALLBACK 1
|
|
#define YYNSTATE 403
|
|
#define YYNRULE 374
|
|
#define YY_MAX_SHIFT 402
|
|
#define YY_MIN_SHIFTREDUCE 671
|
|
#define YY_MAX_SHIFTREDUCE 1044
|
|
#define YY_MIN_REDUCE 1045
|
|
#define YY_MAX_REDUCE 1418
|
|
#define YY_ERROR_ACTION 1419
|
|
#define YY_ACCEPT_ACTION 1420
|
|
#define YY_NO_ACTION 1421
|
|
/************* End control #defines *******************************************/
|
|
|
|
/* Define the yytestcase() macro to be a no-op if is not already defined
|
|
** otherwise.
|
|
**
|
|
** Applications can choose to define yytestcase() in the %include section
|
|
** to a macro that can assist in verifying code coverage. For production
|
|
** code the yytestcase() macro should be turned off. But it is useful
|
|
** for testing.
|
|
*/
|
|
#ifndef yytestcase
|
|
# define yytestcase(X)
|
|
#endif
|
|
|
|
|
|
/* Next are the tables used to determine what action to take based on the
|
|
** current state and lookahead token. These tables are used to implement
|
|
** functions that take a state number and lookahead value and return an
|
|
** action integer.
|
|
**
|
|
** Suppose the action integer is N. Then the action is determined as
|
|
** follows
|
|
**
|
|
** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead
|
|
** token onto the stack and goto state N.
|
|
**
|
|
** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then
|
|
** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE.
|
|
**
|
|
** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE
|
|
** and YY_MAX_REDUCE
|
|
**
|
|
** N == YY_ERROR_ACTION A syntax error has occurred.
|
|
**
|
|
** N == YY_ACCEPT_ACTION The parser accepts its input.
|
|
**
|
|
** N == YY_NO_ACTION No such action. Denotes unused
|
|
** slots in the yy_action[] table.
|
|
**
|
|
** The action table is constructed as a single large table named yy_action[].
|
|
** Given state S and lookahead X, the action is computed as either:
|
|
**
|
|
** (A) N = yy_action[ yy_shift_ofst[S] + X ]
|
|
** (B) N = yy_default[S]
|
|
**
|
|
** The (A) formula is preferred. The B formula is used instead if:
|
|
** (1) The yy_shift_ofst[S]+X value is out of range, or
|
|
** (2) yy_lookahead[yy_shift_ofst[S]+X] is not equal to X, or
|
|
** (3) yy_shift_ofst[S] equal YY_SHIFT_USE_DFLT.
|
|
** (Implementation note: YY_SHIFT_USE_DFLT is chosen so that
|
|
** YY_SHIFT_USE_DFLT+X will be out of range for all possible lookaheads X.
|
|
** Hence only tests (1) and (2) need to be evaluated.)
|
|
**
|
|
** The formulas above are for computing the action when the lookahead is
|
|
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
|
|
** a reduce action) then the yy_reduce_ofst[] array is used in place of
|
|
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
|
|
** YY_SHIFT_USE_DFLT.
|
|
**
|
|
** The following are the tables generated in this section:
|
|
**
|
|
** yy_action[] A single table containing all actions.
|
|
** yy_lookahead[] A table containing the lookahead for each entry in
|
|
** yy_action. Used to detect hash collisions.
|
|
** yy_shift_ofst[] For each state, the offset into yy_action for
|
|
** shifting terminals.
|
|
** yy_reduce_ofst[] For each state, the offset into yy_action for
|
|
** shifting non-terminals after a reduce.
|
|
** yy_default[] Default action for each state.
|
|
**
|
|
*********** Begin parsing tables **********************************************/
|
|
#define YY_ACTTAB_COUNT (2942)
|
|
static const YYACTIONTYPE yy_action[] = {
|
|
/* 0 */ 117, 116, 673, 675, 676, 677, 678, 679, 680, 114,
|
|
/* 10 */ 115, 165, 34, 37, 141, 825, 964, 776, 176, 878,
|
|
/* 20 */ 164, 347, 763, 764, 765, 175, 825, 285, 955, 98,
|
|
/* 30 */ 319, 823, 2, 979, 165, 2, 65, 957, 742, 837,
|
|
/* 40 */ 825, 838, 130, 164, 826, 840, 139, 139, 1253, 890,
|
|
/* 50 */ 837, 825, 838, 130, 823, 284, 354, 808, 809, 810,
|
|
/* 60 */ 811, 812, 813, 814, 815, 816, 817, 818, 819, 820,
|
|
/* 70 */ 821, 822, 350, 368, 361, 310, 362, 358, 355, 125,
|
|
/* 80 */ 808, 809, 810, 811, 812, 813, 814, 815, 816, 817,
|
|
/* 90 */ 818, 819, 820, 821, 822, 824, 368, 361, 880, 362,
|
|
/* 100 */ 358, 355, 737, 113, 112, 111, 110, 958, 959, 960,
|
|
/* 110 */ 961, 962, 963, 45, 332, 331, 33, 10, 327, 324,
|
|
/* 120 */ 989, 990, 321, 369, 320, 53, 95, 94, 93, 103,
|
|
/* 130 */ 107, 101, 100, 99, 97, 96, 98, 117, 116, 674,
|
|
/* 140 */ 167, 370, 167, 65, 1420, 17, 114, 115, 165, 34,
|
|
/* 150 */ 37, 844, 703, 964, 47, 251, 251, 164, 347, 205,
|
|
/* 160 */ 381, 706, 705, 709, 243, 955, 696, 319, 823, 2,
|
|
/* 170 */ 980, 881, 702, 25, 957, 697, 698, 704, 710, 711,
|
|
/* 180 */ 707, 708, 712, 845, 845, 794, 890, 808, 809, 810,
|
|
/* 190 */ 811, 812, 813, 59, 808, 809, 810, 811, 812, 813,
|
|
/* 200 */ 814, 815, 816, 817, 818, 819, 820, 821, 822, 350,
|
|
/* 210 */ 368, 361, 836, 362, 358, 355, 82, 95, 94, 93,
|
|
/* 220 */ 103, 107, 101, 100, 99, 97, 96, 98, 16, 242,
|
|
/* 230 */ 205, 891, 951, 951, 65, 243, 325, 203, 381, 825,
|
|
/* 240 */ 113, 112, 111, 110, 958, 959, 960, 961, 962, 963,
|
|
/* 250 */ 45, 332, 331, 33, 10, 327, 324, 989, 990, 321,
|
|
/* 260 */ 318, 320, 53, 837, 825, 838, 130, 352, 120, 352,
|
|
/* 270 */ 351, 124, 845, 41, 117, 116, 313, 313, 44, 852,
|
|
/* 280 */ 378, 727, 729, 114, 115, 165, 34, 37, 727, 729,
|
|
/* 290 */ 964, 282, 730, 731, 164, 347, 123, 182, 381, 730,
|
|
/* 300 */ 731, 736, 955, 396, 319, 823, 2, 242, 203, 891,
|
|
/* 310 */ 136, 957, 732, 295, 43, 43, 32, 161, 161, 732,
|
|
/* 320 */ 385, 43, 43, 890, 689, 690, 691, 692, 143, 276,
|
|
/* 330 */ 46, 808, 809, 810, 811, 812, 813, 814, 815, 816,
|
|
/* 340 */ 817, 818, 819, 820, 821, 822, 350, 368, 361, 755,
|
|
/* 350 */ 362, 358, 355, 799, 802, 803, 200, 381, 16, 249,
|
|
/* 360 */ 767, 768, 769, 770, 138, 16, 773, 242, 182, 891,
|
|
/* 370 */ 900, 901, 379, 22, 62, 41, 771, 113, 112, 111,
|
|
/* 380 */ 110, 958, 959, 960, 961, 962, 963, 45, 332, 331,
|
|
/* 390 */ 33, 10, 327, 324, 989, 990, 321, 165, 320, 53,
|
|
/* 400 */ 179, 149, 119, 41, 246, 766, 164, 826, 870, 858,
|
|
/* 410 */ 872, 873, 1, 304, 882, 44, 174, 823, 205, 381,
|
|
/* 420 */ 317, 317, 315, 349, 395, 874, 242, 200, 891, 772,
|
|
/* 430 */ 778, 779, 780, 781, 782, 293, 292, 162, 162, 200,
|
|
/* 440 */ 381, 397, 395, 808, 809, 810, 811, 812, 813, 814,
|
|
/* 450 */ 815, 816, 817, 818, 819, 820, 821, 822, 824, 368,
|
|
/* 460 */ 367, 247, 362, 358, 355, 841, 1045, 50, 245, 762,
|
|
/* 470 */ 843, 156, 308, 859, 860, 861, 862, 863, 864, 865,
|
|
/* 480 */ 867, 868, 869, 871, 875, 117, 116, 252, 242, 205,
|
|
/* 490 */ 891, 247, 247, 32, 114, 115, 165, 34, 989, 990,
|
|
/* 500 */ 1100, 328, 683, 279, 337, 164, 347, 384, 372, 242,
|
|
/* 510 */ 200, 891, 342, 955, 1012, 118, 823, 171, 244, 278,
|
|
/* 520 */ 316, 297, 957, 101, 100, 99, 97, 96, 98, 109,
|
|
/* 530 */ 798, 802, 803, 272, 890, 65, 695, 386, 273, 384,
|
|
/* 540 */ 372, 142, 808, 809, 810, 811, 812, 813, 814, 815,
|
|
/* 550 */ 816, 817, 818, 819, 820, 821, 822, 824, 368, 361,
|
|
/* 560 */ 801, 362, 358, 355, 277, 41, 173, 103, 107, 101,
|
|
/* 570 */ 100, 99, 97, 96, 98, 806, 59, 797, 201, 381,
|
|
/* 580 */ 45, 65, 353, 203, 381, 846, 157, 280, 113, 112,
|
|
/* 590 */ 111, 110, 958, 959, 960, 961, 962, 963, 77, 74,
|
|
/* 600 */ 73, 72, 76, 75, 71, 70, 68, 67, 66, 69,
|
|
/* 610 */ 64, 281, 78, 79, 85, 84, 83, 91, 90, 89,
|
|
/* 620 */ 88, 87, 86, 92, 80, 81, 82, 95, 94, 93,
|
|
/* 630 */ 103, 107, 101, 100, 99, 97, 96, 98, 135, 291,
|
|
/* 640 */ 309, 59, 59, 971, 65, 197, 381, 104, 242, 201,
|
|
/* 650 */ 891, 784, 757, 242, 203, 891, 995, 1008, 1009, 893,
|
|
/* 660 */ 981, 77, 74, 73, 72, 76, 75, 71, 70, 68,
|
|
/* 670 */ 67, 66, 69, 64, 137, 78, 79, 85, 84, 83,
|
|
/* 680 */ 91, 90, 89, 88, 87, 86, 92, 80, 81, 82,
|
|
/* 690 */ 95, 94, 93, 103, 107, 101, 100, 99, 97, 96,
|
|
/* 700 */ 98, 20, 35, 971, 724, 721, 722, 65, 301, 381,
|
|
/* 710 */ 105, 195, 381, 19, 9, 242, 197, 891, 978, 59,
|
|
/* 720 */ 723, 59, 894, 792, 77, 74, 73, 72, 76, 75,
|
|
/* 730 */ 71, 70, 68, 67, 66, 69, 64, 333, 78, 79,
|
|
/* 740 */ 85, 84, 83, 91, 90, 89, 88, 87, 86, 92,
|
|
/* 750 */ 80, 81, 82, 95, 94, 93, 103, 107, 101, 100,
|
|
/* 760 */ 99, 97, 96, 98, 25, 25, 288, 785, 59, 248,
|
|
/* 770 */ 65, 155, 177, 106, 1014, 366, 897, 896, 242, 909,
|
|
/* 780 */ 891, 242, 195, 891, 338, 895, 719, 77, 74, 73,
|
|
/* 790 */ 72, 76, 75, 71, 70, 68, 67, 66, 69, 64,
|
|
/* 800 */ 306, 78, 79, 85, 84, 83, 91, 90, 89, 88,
|
|
/* 810 */ 87, 86, 92, 80, 81, 82, 95, 94, 93, 103,
|
|
/* 820 */ 107, 101, 100, 99, 97, 96, 98, 365, 305, 758,
|
|
/* 830 */ 250, 853, 128, 65, 1011, 77, 74, 73, 72, 76,
|
|
/* 840 */ 75, 71, 70, 68, 67, 66, 69, 64, 783, 78,
|
|
/* 850 */ 79, 85, 84, 83, 91, 90, 89, 88, 87, 86,
|
|
/* 860 */ 92, 80, 81, 82, 95, 94, 93, 103, 107, 101,
|
|
/* 870 */ 100, 99, 97, 96, 98, 877, 850, 323, 122, 261,
|
|
/* 880 */ 163, 65, 834, 363, 48, 738, 77, 74, 73, 72,
|
|
/* 890 */ 76, 75, 71, 70, 68, 67, 66, 69, 64, 1000,
|
|
/* 900 */ 78, 79, 85, 84, 83, 91, 90, 89, 88, 87,
|
|
/* 910 */ 86, 92, 80, 81, 82, 95, 94, 93, 103, 107,
|
|
/* 920 */ 101, 100, 99, 97, 96, 98, 166, 1021, 734, 134,
|
|
/* 930 */ 371, 718, 65, 955, 77, 74, 73, 72, 76, 75,
|
|
/* 940 */ 71, 70, 68, 67, 66, 69, 64, 402, 78, 79,
|
|
/* 950 */ 85, 84, 83, 91, 90, 89, 88, 87, 86, 92,
|
|
/* 960 */ 80, 81, 82, 95, 94, 93, 103, 107, 101, 100,
|
|
/* 970 */ 99, 97, 96, 98, 15, 240, 13, 286, 287, 294,
|
|
/* 980 */ 65, 241, 77, 74, 73, 72, 76, 75, 71, 70,
|
|
/* 990 */ 68, 67, 66, 69, 64, 5, 78, 79, 85, 84,
|
|
/* 1000 */ 83, 91, 90, 89, 88, 87, 86, 92, 80, 81,
|
|
/* 1010 */ 82, 95, 94, 93, 103, 107, 101, 100, 99, 97,
|
|
/* 1020 */ 96, 98, 14, 172, 270, 271, 243, 694, 65, 274,
|
|
/* 1030 */ 77, 74, 73, 72, 76, 75, 71, 70, 68, 67,
|
|
/* 1040 */ 66, 69, 64, 6, 78, 79, 85, 84, 83, 91,
|
|
/* 1050 */ 90, 89, 88, 87, 86, 92, 80, 81, 82, 95,
|
|
/* 1060 */ 94, 93, 103, 107, 101, 100, 99, 97, 96, 98,
|
|
/* 1070 */ 275, 144, 684, 801, 42, 147, 65, 148, 77, 74,
|
|
/* 1080 */ 73, 72, 76, 75, 71, 70, 68, 67, 66, 69,
|
|
/* 1090 */ 64, 8, 78, 79, 85, 84, 83, 91, 90, 89,
|
|
/* 1100 */ 88, 87, 86, 92, 80, 81, 82, 95, 94, 93,
|
|
/* 1110 */ 103, 107, 101, 100, 99, 97, 96, 98, 1022, 790,
|
|
/* 1120 */ 789, 788, 787, 786, 65, 151, 77, 74, 73, 72,
|
|
/* 1130 */ 76, 75, 71, 70, 68, 67, 66, 69, 64, 986,
|
|
/* 1140 */ 78, 79, 85, 84, 83, 91, 90, 89, 88, 87,
|
|
/* 1150 */ 86, 92, 80, 81, 82, 95, 94, 93, 103, 107,
|
|
/* 1160 */ 101, 100, 99, 97, 96, 98, 49, 132, 296, 153,
|
|
/* 1170 */ 18, 297, 65, 725, 77, 74, 73, 72, 76, 75,
|
|
/* 1180 */ 71, 70, 68, 67, 66, 69, 64, 11, 78, 79,
|
|
/* 1190 */ 85, 84, 83, 91, 90, 89, 88, 87, 86, 92,
|
|
/* 1200 */ 80, 81, 82, 95, 94, 93, 103, 107, 101, 100,
|
|
/* 1210 */ 99, 97, 96, 98, 299, 300, 200, 381, 857, 302,
|
|
/* 1220 */ 65, 303, 77, 74, 73, 72, 76, 75, 71, 70,
|
|
/* 1230 */ 68, 67, 66, 69, 64, 63, 78, 79, 85, 84,
|
|
/* 1240 */ 83, 91, 90, 89, 88, 87, 86, 92, 80, 81,
|
|
/* 1250 */ 82, 95, 94, 93, 103, 107, 101, 100, 99, 97,
|
|
/* 1260 */ 96, 98, 205, 381, 256, 856, 855, 154, 65, 307,
|
|
/* 1270 */ 92, 80, 81, 82, 95, 94, 93, 103, 107, 101,
|
|
/* 1280 */ 100, 99, 97, 96, 98, 759, 242, 200, 891, 847,
|
|
/* 1290 */ 898, 65, 77, 74, 73, 72, 76, 75, 71, 70,
|
|
/* 1300 */ 68, 67, 66, 69, 64, 263, 78, 79, 85, 84,
|
|
/* 1310 */ 83, 91, 90, 89, 88, 87, 86, 92, 80, 81,
|
|
/* 1320 */ 82, 95, 94, 93, 103, 107, 101, 100, 99, 97,
|
|
/* 1330 */ 96, 98, 242, 205, 891, 263, 263, 51, 65, 311,
|
|
/* 1340 */ 77, 74, 73, 72, 76, 75, 71, 70, 68, 67,
|
|
/* 1350 */ 66, 69, 64, 892, 78, 79, 85, 84, 83, 91,
|
|
/* 1360 */ 90, 89, 88, 87, 86, 92, 80, 81, 82, 95,
|
|
/* 1370 */ 94, 93, 103, 107, 101, 100, 99, 97, 96, 98,
|
|
/* 1380 */ 126, 35, 1010, 36, 158, 52, 65, 1001, 733, 54,
|
|
/* 1390 */ 77, 74, 73, 72, 76, 75, 71, 70, 68, 67,
|
|
/* 1400 */ 66, 69, 64, 55, 78, 79, 85, 84, 83, 91,
|
|
/* 1410 */ 90, 89, 88, 87, 86, 92, 80, 81, 82, 95,
|
|
/* 1420 */ 94, 93, 103, 107, 101, 100, 99, 97, 96, 98,
|
|
/* 1430 */ 7, 165, 56, 159, 24, 38, 65, 12, 57, 976,
|
|
/* 1440 */ 164, 826, 58, 825, 975, 974, 39, 334, 973, 336,
|
|
/* 1450 */ 339, 823, 80, 81, 82, 95, 94, 93, 103, 107,
|
|
/* 1460 */ 101, 100, 99, 97, 96, 98, 40, 837, 825, 838,
|
|
/* 1470 */ 130, 335, 65, 356, 340, 341, 970, 808, 809, 810,
|
|
/* 1480 */ 811, 812, 813, 814, 815, 816, 817, 818, 819, 820,
|
|
/* 1490 */ 821, 822, 824, 368, 361, 1200, 362, 358, 355, 91,
|
|
/* 1500 */ 90, 89, 88, 87, 86, 92, 80, 81, 82, 95,
|
|
/* 1510 */ 94, 93, 103, 107, 101, 100, 99, 97, 96, 98,
|
|
/* 1520 */ 886, 887, 888, 1392, 969, 968, 65, 967, 60, 129,
|
|
/* 1530 */ 384, 372, 348, 160, 64, 26, 78, 79, 85, 84,
|
|
/* 1540 */ 83, 91, 90, 89, 88, 87, 86, 92, 80, 81,
|
|
/* 1550 */ 82, 95, 94, 93, 103, 107, 101, 100, 99, 97,
|
|
/* 1560 */ 96, 98, 150, 833, 825, 842, 27, 28, 65, 832,
|
|
/* 1570 */ 205, 381, 746, 29, 30, 831, 262, 31, 61, 201,
|
|
/* 1580 */ 381, 748, 747, 751, 364, 829, 828, 827, 837, 825,
|
|
/* 1590 */ 838, 130, 168, 972, 357, 169, 117, 116, 752, 753,
|
|
/* 1600 */ 749, 750, 754, 45, 825, 114, 115, 243, 34, 121,
|
|
/* 1610 */ 825, 21, 807, 264, 373, 374, 745, 889, 376, 289,
|
|
/* 1620 */ 1032, 3, 375, 899, 955, 65, 102, 108, 837, 825,
|
|
/* 1630 */ 838, 127, 956, 957, 837, 825, 838, 312, 383, 170,
|
|
/* 1640 */ 242, 205, 891, 264, 264, 890, 381, 178, 16, 242,
|
|
/* 1650 */ 201, 891, 260, 825, 966, 982, 965, 346, 982, 982,
|
|
/* 1660 */ 982, 982, 345, 344, 343, 329, 715, 389, 322, 201,
|
|
/* 1670 */ 381, 387, 390, 388, 298, 391, 714, 837, 825, 838,
|
|
/* 1680 */ 259, 1133, 393, 972, 394, 283, 1132, 131, 700, 401,
|
|
/* 1690 */ 399, 392, 398, 386, 825, 384, 372, 152, 713, 113,
|
|
/* 1700 */ 112, 111, 110, 958, 959, 960, 961, 962, 963, 400,
|
|
/* 1710 */ 1047, 4, 1047, 201, 381, 242, 908, 891, 837, 825,
|
|
/* 1720 */ 838, 127, 1047, 81, 82, 95, 94, 93, 103, 107,
|
|
/* 1730 */ 101, 100, 99, 97, 96, 98, 1047, 201, 381, 242,
|
|
/* 1740 */ 201, 891, 65, 1047, 966, 982, 965, 346, 982, 982,
|
|
/* 1750 */ 982, 982, 345, 344, 343, 329, 298, 381, 322, 1047,
|
|
/* 1760 */ 1047, 1047, 825, 1047, 330, 1047, 1047, 283, 45, 1047,
|
|
/* 1770 */ 743, 1047, 399, 392, 381, 386, 1047, 384, 372, 152,
|
|
/* 1780 */ 1047, 201, 381, 242, 201, 891, 837, 825, 838, 127,
|
|
/* 1790 */ 1047, 994, 1047, 825, 1047, 972, 1047, 1047, 1047, 1047,
|
|
/* 1800 */ 1047, 255, 1047, 1047, 1047, 1047, 825, 242, 201, 891,
|
|
/* 1810 */ 825, 1047, 1047, 1047, 1047, 994, 1047, 837, 825, 838,
|
|
/* 1820 */ 130, 290, 991, 359, 326, 314, 242, 907, 891, 1047,
|
|
/* 1830 */ 837, 825, 838, 127, 837, 825, 838, 130, 1047, 1047,
|
|
/* 1840 */ 360, 1047, 1047, 242, 906, 891, 1047, 1047, 1047, 1047,
|
|
/* 1850 */ 45, 242, 201, 891, 1047, 1047, 966, 983, 965, 346,
|
|
/* 1860 */ 983, 983, 983, 983, 345, 344, 343, 329, 1047, 1047,
|
|
/* 1870 */ 322, 1047, 1047, 79, 85, 84, 83, 91, 90, 89,
|
|
/* 1880 */ 88, 87, 86, 92, 80, 81, 82, 95, 94, 93,
|
|
/* 1890 */ 103, 107, 101, 100, 99, 97, 96, 98, 1047, 330,
|
|
/* 1900 */ 200, 381, 1047, 1047, 65, 200, 381, 1047, 200, 381,
|
|
/* 1910 */ 145, 146, 117, 116, 1047, 1047, 201, 381, 145, 146,
|
|
/* 1920 */ 1047, 114, 115, 1047, 34, 1047, 800, 1047, 977, 1047,
|
|
/* 1930 */ 972, 695, 1047, 889, 800, 1047, 1047, 1047, 1047, 695,
|
|
/* 1940 */ 955, 825, 330, 795, 1047, 1047, 1047, 1047, 253, 957,
|
|
/* 1950 */ 1047, 796, 729, 254, 1047, 1047, 257, 1047, 1047, 201,
|
|
/* 1960 */ 381, 890, 730, 731, 1047, 837, 825, 838, 127, 1047,
|
|
/* 1970 */ 242, 200, 891, 972, 1047, 242, 200, 891, 242, 200,
|
|
/* 1980 */ 891, 1047, 732, 1047, 825, 728, 242, 201, 891, 1047,
|
|
/* 1990 */ 1047, 966, 983, 965, 346, 983, 983, 983, 983, 345,
|
|
/* 2000 */ 344, 343, 329, 1047, 1047, 322, 1047, 1047, 837, 825,
|
|
/* 2010 */ 838, 127, 1047, 1047, 1047, 113, 112, 111, 110, 958,
|
|
/* 2020 */ 959, 960, 961, 962, 963, 1047, 1047, 1047, 16, 242,
|
|
/* 2030 */ 201, 891, 1047, 330, 966, 999, 965, 346, 999, 999,
|
|
/* 2040 */ 999, 999, 345, 344, 343, 329, 1047, 1047, 322, 1047,
|
|
/* 2050 */ 201, 381, 1047, 1047, 1047, 1047, 1047, 1047, 699, 1047,
|
|
/* 2060 */ 1047, 1047, 298, 1047, 972, 1047, 1047, 1047, 1047, 1047,
|
|
/* 2070 */ 1047, 1047, 1047, 283, 1047, 825, 330, 401, 399, 392,
|
|
/* 2080 */ 1047, 386, 381, 384, 372, 152, 1047, 1047, 1047, 200,
|
|
/* 2090 */ 381, 1047, 1047, 201, 381, 1047, 1047, 1047, 1047, 837,
|
|
/* 2100 */ 825, 838, 127, 1047, 1047, 1047, 1047, 972, 1047, 1047,
|
|
/* 2110 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 381, 825, 1047,
|
|
/* 2120 */ 242, 201, 891, 1047, 1047, 966, 998, 965, 346, 998,
|
|
/* 2130 */ 998, 998, 998, 345, 344, 343, 329, 258, 1047, 322,
|
|
/* 2140 */ 1047, 1047, 837, 825, 838, 127, 1047, 183, 381, 1047,
|
|
/* 2150 */ 1047, 242, 905, 891, 184, 381, 45, 133, 381, 242,
|
|
/* 2160 */ 200, 891, 1047, 242, 201, 891, 381, 1047, 966, 997,
|
|
/* 2170 */ 965, 346, 997, 997, 997, 997, 345, 344, 343, 329,
|
|
/* 2180 */ 1047, 1047, 322, 1047, 1047, 1047, 242, 904, 891, 330,
|
|
/* 2190 */ 1047, 1047, 1047, 196, 381, 1047, 198, 381, 1047, 185,
|
|
/* 2200 */ 381, 1047, 117, 116, 1047, 1047, 201, 381, 1047, 1047,
|
|
/* 2210 */ 1047, 114, 115, 1047, 34, 1047, 1047, 242, 183, 891,
|
|
/* 2220 */ 972, 1047, 377, 889, 242, 184, 891, 242, 133, 891,
|
|
/* 2230 */ 955, 825, 1047, 1047, 1047, 242, 903, 891, 1047, 957,
|
|
/* 2240 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
|
|
/* 2250 */ 1047, 890, 186, 381, 1047, 837, 825, 838, 127, 1047,
|
|
/* 2260 */ 1047, 1047, 330, 242, 196, 891, 242, 198, 891, 242,
|
|
/* 2270 */ 185, 891, 1047, 1047, 1047, 1047, 242, 201, 891, 201,
|
|
/* 2280 */ 381, 966, 988, 965, 346, 988, 988, 988, 988, 345,
|
|
/* 2290 */ 344, 343, 329, 972, 1047, 322, 1047, 1047, 1047, 1047,
|
|
/* 2300 */ 1047, 1047, 1047, 330, 825, 113, 112, 111, 110, 958,
|
|
/* 2310 */ 959, 960, 961, 962, 963, 1047, 187, 381, 1047, 1047,
|
|
/* 2320 */ 201, 381, 242, 186, 891, 1047, 1047, 1047, 837, 825,
|
|
/* 2330 */ 838, 127, 1047, 1047, 972, 1047, 1047, 1047, 1047, 1047,
|
|
/* 2340 */ 188, 381, 1047, 1047, 1047, 825, 189, 381, 1047, 242,
|
|
/* 2350 */ 201, 891, 190, 381, 966, 987, 965, 346, 987, 987,
|
|
/* 2360 */ 987, 987, 345, 344, 343, 329, 199, 381, 322, 837,
|
|
/* 2370 */ 825, 838, 127, 202, 381, 1047, 1047, 204, 381, 1047,
|
|
/* 2380 */ 191, 381, 1047, 219, 381, 1047, 242, 187, 891, 381,
|
|
/* 2390 */ 242, 201, 891, 1047, 1047, 966, 140, 965, 346, 140,
|
|
/* 2400 */ 140, 140, 140, 345, 344, 343, 329, 192, 381, 322,
|
|
/* 2410 */ 242, 188, 891, 1047, 1047, 330, 242, 189, 891, 1047,
|
|
/* 2420 */ 1047, 1047, 242, 190, 891, 1047, 1047, 1047, 948, 381,
|
|
/* 2430 */ 1047, 1047, 201, 381, 1047, 1047, 242, 199, 891, 1047,
|
|
/* 2440 */ 1047, 1047, 1047, 242, 202, 891, 972, 242, 204, 891,
|
|
/* 2450 */ 242, 191, 891, 242, 219, 891, 1047, 825, 242, 902,
|
|
/* 2460 */ 891, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
|
|
/* 2470 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 242, 192, 891,
|
|
/* 2480 */ 1047, 837, 825, 838, 127, 1047, 1047, 1047, 1047, 1047,
|
|
/* 2490 */ 1047, 206, 381, 1047, 207, 381, 1047, 1047, 242, 948,
|
|
/* 2500 */ 891, 1047, 242, 201, 891, 208, 381, 966, 985, 965,
|
|
/* 2510 */ 346, 985, 985, 985, 985, 345, 344, 343, 329, 1047,
|
|
/* 2520 */ 1047, 322, 85, 84, 83, 91, 90, 89, 88, 87,
|
|
/* 2530 */ 86, 92, 80, 81, 82, 95, 94, 93, 103, 107,
|
|
/* 2540 */ 101, 100, 99, 97, 96, 98, 117, 116, 209, 381,
|
|
/* 2550 */ 1047, 1047, 65, 1047, 1047, 114, 115, 1047, 34, 117,
|
|
/* 2560 */ 116, 242, 206, 891, 242, 207, 891, 889, 114, 115,
|
|
/* 2570 */ 1047, 34, 117, 116, 955, 242, 208, 891, 23, 1047,
|
|
/* 2580 */ 382, 114, 115, 957, 34, 1047, 1047, 955, 1047, 210,
|
|
/* 2590 */ 381, 1047, 1047, 889, 1047, 890, 957, 1047, 1047, 1047,
|
|
/* 2600 */ 955, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 890, 957,
|
|
/* 2610 */ 1047, 1047, 1047, 1047, 1047, 211, 381, 1047, 242, 209,
|
|
/* 2620 */ 891, 890, 212, 381, 1047, 213, 381, 1047, 214, 381,
|
|
/* 2630 */ 1047, 215, 381, 1047, 216, 381, 1047, 1047, 1047, 1047,
|
|
/* 2640 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 113,
|
|
/* 2650 */ 112, 111, 110, 958, 959, 960, 961, 962, 963, 242,
|
|
/* 2660 */ 210, 891, 113, 112, 111, 110, 958, 959, 960, 961,
|
|
/* 2670 */ 962, 963, 217, 381, 1047, 113, 112, 111, 110, 958,
|
|
/* 2680 */ 959, 960, 961, 962, 963, 242, 211, 891, 220, 381,
|
|
/* 2690 */ 1047, 1047, 242, 212, 891, 242, 213, 891, 242, 214,
|
|
/* 2700 */ 891, 242, 215, 891, 242, 216, 891, 221, 381, 1047,
|
|
/* 2710 */ 232, 381, 1047, 233, 381, 1047, 234, 381, 1047, 222,
|
|
/* 2720 */ 381, 1047, 223, 381, 1047, 224, 381, 1047, 1047, 225,
|
|
/* 2730 */ 381, 1047, 226, 381, 1047, 227, 381, 1047, 228, 381,
|
|
/* 2740 */ 1047, 1047, 242, 217, 891, 229, 381, 1047, 230, 381,
|
|
/* 2750 */ 1047, 231, 381, 1047, 235, 381, 1047, 1047, 242, 220,
|
|
/* 2760 */ 891, 236, 381, 1047, 237, 381, 1047, 265, 381, 1047,
|
|
/* 2770 */ 266, 381, 1047, 380, 381, 1047, 1047, 242, 221, 891,
|
|
/* 2780 */ 242, 232, 891, 242, 233, 891, 242, 234, 891, 242,
|
|
/* 2790 */ 222, 891, 242, 223, 891, 242, 224, 891, 1047, 242,
|
|
/* 2800 */ 225, 891, 242, 226, 891, 242, 227, 891, 242, 228,
|
|
/* 2810 */ 891, 267, 381, 1047, 1047, 242, 229, 891, 242, 230,
|
|
/* 2820 */ 891, 242, 231, 891, 242, 235, 891, 268, 381, 1047,
|
|
/* 2830 */ 1047, 242, 236, 891, 242, 237, 891, 242, 265, 891,
|
|
/* 2840 */ 242, 266, 891, 242, 380, 891, 269, 381, 1047, 218,
|
|
/* 2850 */ 381, 1047, 239, 381, 1047, 193, 381, 1047, 180, 381,
|
|
/* 2860 */ 1047, 181, 381, 1047, 238, 381, 1047, 1047, 1047, 194,
|
|
/* 2870 */ 381, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
|
|
/* 2880 */ 1047, 242, 267, 891, 1047, 1047, 1047, 1047, 1047, 1047,
|
|
/* 2890 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 242, 268, 891,
|
|
/* 2900 */ 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047, 1047,
|
|
/* 2910 */ 1047, 1047, 1047, 1047, 1047, 1047, 242, 269, 891, 242,
|
|
/* 2920 */ 218, 891, 242, 239, 891, 242, 193, 891, 242, 180,
|
|
/* 2930 */ 891, 242, 181, 891, 242, 238, 891, 1047, 1047, 242,
|
|
/* 2940 */ 194, 891,
|
|
};
|
|
static const YYCODETYPE yy_lookahead[] = {
|
|
/* 0 */ 33, 34, 166, 167, 168, 169, 170, 171, 172, 42,
|
|
/* 10 */ 43, 44, 45, 46, 178, 201, 49, 211, 212, 49,
|
|
/* 20 */ 53, 54, 206, 207, 208, 209, 201, 54, 61, 40,
|
|
/* 30 */ 63, 64, 65, 66, 44, 65, 47, 70, 202, 225,
|
|
/* 40 */ 226, 227, 228, 53, 54, 231, 233, 234, 62, 82,
|
|
/* 50 */ 225, 226, 227, 228, 64, 82, 231, 90, 91, 92,
|
|
/* 60 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
|
|
/* 70 */ 103, 104, 105, 106, 107, 159, 109, 110, 111, 54,
|
|
/* 80 */ 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
|
|
/* 90 */ 100, 101, 102, 103, 104, 105, 106, 107, 112, 109,
|
|
/* 100 */ 110, 111, 159, 136, 137, 138, 139, 140, 141, 142,
|
|
/* 110 */ 143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
|
|
/* 120 */ 153, 154, 155, 54, 157, 158, 30, 31, 32, 33,
|
|
/* 130 */ 34, 35, 36, 37, 38, 39, 40, 33, 34, 159,
|
|
/* 140 */ 197, 198, 199, 47, 164, 165, 42, 43, 44, 45,
|
|
/* 150 */ 46, 235, 160, 49, 34, 239, 240, 53, 54, 176,
|
|
/* 160 */ 177, 169, 170, 171, 44, 61, 54, 63, 64, 65,
|
|
/* 170 */ 66, 132, 180, 50, 70, 63, 64, 185, 186, 187,
|
|
/* 180 */ 188, 189, 190, 162, 163, 62, 82, 90, 91, 92,
|
|
/* 190 */ 93, 94, 95, 50, 90, 91, 92, 93, 94, 95,
|
|
/* 200 */ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
|
|
/* 210 */ 106, 107, 21, 109, 110, 111, 29, 30, 31, 32,
|
|
/* 220 */ 33, 34, 35, 36, 37, 38, 39, 40, 236, 246,
|
|
/* 230 */ 247, 248, 249, 250, 47, 44, 175, 176, 177, 201,
|
|
/* 240 */ 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
|
|
/* 250 */ 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
|
|
/* 260 */ 117, 157, 158, 225, 226, 227, 228, 229, 230, 231,
|
|
/* 270 */ 237, 54, 251, 46, 33, 34, 243, 244, 245, 241,
|
|
/* 280 */ 159, 159, 160, 42, 43, 44, 45, 46, 159, 160,
|
|
/* 290 */ 49, 159, 170, 171, 53, 54, 214, 176, 177, 170,
|
|
/* 300 */ 171, 201, 61, 54, 63, 64, 65, 246, 247, 248,
|
|
/* 310 */ 184, 70, 190, 191, 192, 193, 184, 233, 234, 190,
|
|
/* 320 */ 191, 192, 193, 82, 55, 56, 57, 58, 59, 60,
|
|
/* 330 */ 1, 90, 91, 92, 93, 94, 95, 96, 97, 98,
|
|
/* 340 */ 99, 100, 101, 102, 103, 104, 105, 106, 107, 66,
|
|
/* 350 */ 109, 110, 111, 221, 222, 223, 176, 177, 236, 76,
|
|
/* 360 */ 77, 78, 79, 80, 81, 236, 210, 246, 247, 248,
|
|
/* 370 */ 42, 43, 44, 45, 46, 46, 210, 136, 137, 138,
|
|
/* 380 */ 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,
|
|
/* 390 */ 149, 150, 151, 152, 153, 154, 155, 44, 157, 158,
|
|
/* 400 */ 49, 54, 45, 46, 224, 14, 53, 54, 55, 56,
|
|
/* 410 */ 57, 58, 65, 60, 244, 245, 65, 64, 176, 177,
|
|
/* 420 */ 266, 267, 159, 194, 195, 72, 246, 247, 248, 210,
|
|
/* 430 */ 83, 84, 85, 86, 87, 88, 89, 233, 234, 176,
|
|
/* 440 */ 177, 194, 195, 90, 91, 92, 93, 94, 95, 96,
|
|
/* 450 */ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
|
|
/* 460 */ 107, 219, 109, 110, 111, 112, 0, 76, 159, 159,
|
|
/* 470 */ 234, 118, 119, 120, 121, 122, 123, 124, 125, 126,
|
|
/* 480 */ 127, 128, 129, 130, 131, 33, 34, 224, 246, 247,
|
|
/* 490 */ 248, 249, 250, 184, 42, 43, 44, 45, 153, 154,
|
|
/* 500 */ 66, 262, 181, 53, 46, 53, 54, 73, 74, 246,
|
|
/* 510 */ 247, 248, 54, 61, 48, 205, 64, 51, 52, 53,
|
|
/* 520 */ 1, 71, 70, 35, 36, 37, 38, 39, 40, 220,
|
|
/* 530 */ 221, 222, 223, 67, 82, 47, 54, 71, 184, 73,
|
|
/* 540 */ 74, 14, 90, 91, 92, 93, 94, 95, 96, 97,
|
|
/* 550 */ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
|
|
/* 560 */ 49, 109, 110, 111, 184, 46, 182, 33, 34, 35,
|
|
/* 570 */ 36, 37, 38, 39, 40, 49, 50, 66, 176, 177,
|
|
/* 580 */ 146, 47, 175, 176, 177, 49, 50, 184, 136, 137,
|
|
/* 590 */ 138, 139, 140, 141, 142, 143, 144, 145, 1, 2,
|
|
/* 600 */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
|
/* 610 */ 13, 184, 15, 16, 17, 18, 19, 20, 21, 22,
|
|
/* 620 */ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
|
/* 630 */ 33, 34, 35, 36, 37, 38, 39, 40, 184, 50,
|
|
/* 640 */ 50, 50, 50, 49, 47, 176, 177, 50, 246, 247,
|
|
/* 650 */ 248, 62, 62, 246, 247, 248, 254, 66, 66, 62,
|
|
/* 660 */ 66, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
|
/* 670 */ 10, 11, 12, 13, 184, 15, 16, 17, 18, 19,
|
|
/* 680 */ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
|
/* 690 */ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
|
/* 700 */ 40, 45, 50, 49, 56, 57, 58, 47, 60, 177,
|
|
/* 710 */ 50, 176, 177, 65, 62, 246, 247, 248, 49, 50,
|
|
/* 720 */ 72, 50, 62, 213, 1, 2, 3, 4, 5, 6,
|
|
/* 730 */ 7, 8, 9, 10, 11, 12, 13, 66, 15, 16,
|
|
/* 740 */ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
|
|
/* 750 */ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
|
/* 760 */ 37, 38, 39, 40, 50, 50, 216, 61, 50, 217,
|
|
/* 770 */ 47, 45, 215, 50, 49, 54, 62, 62, 246, 247,
|
|
/* 780 */ 248, 246, 247, 248, 66, 62, 173, 1, 2, 3,
|
|
/* 790 */ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
|
/* 800 */ 50, 15, 16, 17, 18, 19, 20, 21, 22, 23,
|
|
/* 810 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
|
|
/* 820 */ 34, 35, 36, 37, 38, 39, 40, 106, 242, 54,
|
|
/* 830 */ 195, 215, 54, 47, 267, 1, 2, 3, 4, 5,
|
|
/* 840 */ 6, 7, 8, 9, 10, 11, 12, 13, 62, 15,
|
|
/* 850 */ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
|
|
/* 860 */ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
|
|
/* 870 */ 36, 37, 38, 39, 40, 73, 240, 240, 238, 184,
|
|
/* 880 */ 20, 47, 232, 184, 50, 199, 1, 2, 3, 4,
|
|
/* 890 */ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
|
/* 900 */ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
|
/* 910 */ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
|
/* 920 */ 35, 36, 37, 38, 39, 40, 50, 174, 173, 14,
|
|
/* 930 */ 200, 173, 47, 61, 1, 2, 3, 4, 5, 6,
|
|
/* 940 */ 7, 8, 9, 10, 11, 12, 13, 177, 15, 16,
|
|
/* 950 */ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
|
|
/* 960 */ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
|
/* 970 */ 37, 38, 39, 40, 203, 183, 179, 216, 216, 216,
|
|
/* 980 */ 47, 196, 1, 2, 3, 4, 5, 6, 7, 8,
|
|
/* 990 */ 9, 10, 11, 12, 13, 62, 15, 16, 17, 18,
|
|
/* 1000 */ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
|
|
/* 1010 */ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
|
/* 1020 */ 39, 40, 179, 65, 54, 53, 44, 62, 47, 61,
|
|
/* 1030 */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
|
/* 1040 */ 11, 12, 13, 62, 15, 16, 17, 18, 19, 20,
|
|
/* 1050 */ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
|
/* 1060 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
|
/* 1070 */ 45, 54, 54, 49, 65, 47, 47, 47, 1, 2,
|
|
/* 1080 */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
|
|
/* 1090 */ 13, 62, 15, 16, 17, 18, 19, 20, 21, 22,
|
|
/* 1100 */ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
|
/* 1110 */ 33, 34, 35, 36, 37, 38, 39, 40, 49, 49,
|
|
/* 1120 */ 66, 66, 66, 61, 47, 45, 1, 2, 3, 4,
|
|
/* 1130 */ 5, 6, 7, 8, 9, 10, 11, 12, 13, 62,
|
|
/* 1140 */ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
|
/* 1150 */ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
|
/* 1160 */ 35, 36, 37, 38, 39, 40, 45, 65, 54, 66,
|
|
/* 1170 */ 65, 71, 47, 62, 1, 2, 3, 4, 5, 6,
|
|
/* 1180 */ 7, 8, 9, 10, 11, 12, 13, 62, 15, 16,
|
|
/* 1190 */ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
|
|
/* 1200 */ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
|
|
/* 1210 */ 37, 38, 39, 40, 61, 45, 176, 177, 62, 61,
|
|
/* 1220 */ 47, 45, 1, 2, 3, 4, 5, 6, 7, 8,
|
|
/* 1230 */ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
|
|
/* 1240 */ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
|
|
/* 1250 */ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
|
/* 1260 */ 39, 40, 176, 177, 224, 62, 61, 61, 47, 45,
|
|
/* 1270 */ 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
|
|
/* 1280 */ 36, 37, 38, 39, 40, 54, 246, 247, 248, 49,
|
|
/* 1290 */ 117, 47, 1, 2, 3, 4, 5, 6, 7, 8,
|
|
/* 1300 */ 9, 10, 11, 12, 13, 219, 15, 16, 17, 18,
|
|
/* 1310 */ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
|
|
/* 1320 */ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
|
/* 1330 */ 39, 40, 246, 247, 248, 249, 250, 1, 47, 54,
|
|
/* 1340 */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
|
/* 1350 */ 11, 12, 13, 62, 15, 16, 17, 18, 19, 20,
|
|
/* 1360 */ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
|
/* 1370 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
|
/* 1380 */ 50, 50, 66, 65, 50, 1, 47, 14, 49, 45,
|
|
/* 1390 */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
|
/* 1400 */ 11, 12, 13, 45, 15, 16, 17, 18, 19, 20,
|
|
/* 1410 */ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
|
/* 1420 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
|
/* 1430 */ 156, 44, 14, 45, 49, 49, 47, 45, 45, 49,
|
|
/* 1440 */ 53, 54, 45, 201, 49, 49, 65, 1, 49, 117,
|
|
/* 1450 */ 1, 64, 27, 28, 29, 30, 31, 32, 33, 34,
|
|
/* 1460 */ 35, 36, 37, 38, 39, 40, 65, 225, 226, 227,
|
|
/* 1470 */ 228, 54, 47, 231, 117, 46, 49, 90, 91, 92,
|
|
/* 1480 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
|
|
/* 1490 */ 103, 104, 105, 106, 107, 54, 109, 110, 111, 20,
|
|
/* 1500 */ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
|
/* 1510 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
|
/* 1520 */ 133, 134, 135, 66, 49, 49, 47, 49, 1, 46,
|
|
/* 1530 */ 73, 74, 117, 62, 13, 50, 15, 16, 17, 18,
|
|
/* 1540 */ 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
|
|
/* 1550 */ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
|
/* 1560 */ 39, 40, 159, 21, 201, 117, 20, 50, 47, 21,
|
|
/* 1570 */ 176, 177, 160, 20, 50, 21, 20, 20, 1, 176,
|
|
/* 1580 */ 177, 169, 170, 171, 54, 21, 21, 54, 225, 226,
|
|
/* 1590 */ 227, 228, 66, 190, 231, 54, 33, 34, 186, 187,
|
|
/* 1600 */ 188, 189, 190, 146, 201, 42, 43, 44, 45, 65,
|
|
/* 1610 */ 201, 45, 49, 219, 62, 21, 204, 54, 20, 216,
|
|
/* 1620 */ 62, 218, 54, 54, 61, 47, 14, 1, 225, 226,
|
|
/* 1630 */ 227, 228, 61, 70, 225, 226, 227, 228, 54, 66,
|
|
/* 1640 */ 246, 247, 248, 249, 250, 82, 177, 54, 236, 246,
|
|
/* 1650 */ 247, 248, 159, 201, 251, 252, 253, 254, 255, 256,
|
|
/* 1660 */ 257, 258, 259, 260, 261, 262, 49, 54, 265, 176,
|
|
/* 1670 */ 177, 70, 14, 50, 52, 54, 49, 225, 226, 227,
|
|
/* 1680 */ 228, 50, 54, 190, 50, 63, 50, 14, 66, 67,
|
|
/* 1690 */ 68, 69, 54, 71, 201, 73, 74, 75, 49, 136,
|
|
/* 1700 */ 137, 138, 139, 140, 141, 142, 143, 144, 145, 54,
|
|
/* 1710 */ 268, 218, 268, 176, 177, 246, 247, 248, 225, 226,
|
|
/* 1720 */ 227, 228, 268, 28, 29, 30, 31, 32, 33, 34,
|
|
/* 1730 */ 35, 36, 37, 38, 39, 40, 268, 176, 177, 246,
|
|
/* 1740 */ 247, 248, 47, 268, 251, 252, 253, 254, 255, 256,
|
|
/* 1750 */ 257, 258, 259, 260, 261, 262, 52, 177, 265, 268,
|
|
/* 1760 */ 268, 268, 201, 268, 159, 268, 268, 63, 146, 268,
|
|
/* 1770 */ 66, 268, 68, 69, 177, 71, 268, 73, 74, 75,
|
|
/* 1780 */ 268, 176, 177, 246, 247, 248, 225, 226, 227, 228,
|
|
/* 1790 */ 268, 254, 268, 201, 268, 190, 268, 268, 268, 268,
|
|
/* 1800 */ 268, 264, 268, 268, 268, 268, 201, 246, 247, 248,
|
|
/* 1810 */ 201, 268, 268, 268, 268, 254, 268, 225, 226, 227,
|
|
/* 1820 */ 228, 216, 261, 231, 263, 264, 246, 247, 248, 268,
|
|
/* 1830 */ 225, 226, 227, 228, 225, 226, 227, 228, 268, 268,
|
|
/* 1840 */ 231, 268, 268, 246, 247, 248, 268, 268, 268, 268,
|
|
/* 1850 */ 146, 246, 247, 248, 268, 268, 251, 252, 253, 254,
|
|
/* 1860 */ 255, 256, 257, 258, 259, 260, 261, 262, 268, 268,
|
|
/* 1870 */ 265, 268, 268, 16, 17, 18, 19, 20, 21, 22,
|
|
/* 1880 */ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
|
|
/* 1890 */ 33, 34, 35, 36, 37, 38, 39, 40, 268, 159,
|
|
/* 1900 */ 176, 177, 268, 268, 47, 176, 177, 268, 176, 177,
|
|
/* 1910 */ 33, 34, 33, 34, 268, 268, 176, 177, 33, 34,
|
|
/* 1920 */ 268, 42, 43, 268, 45, 268, 49, 268, 49, 268,
|
|
/* 1930 */ 190, 54, 268, 54, 49, 268, 268, 268, 268, 54,
|
|
/* 1940 */ 61, 201, 159, 66, 268, 268, 268, 268, 224, 70,
|
|
/* 1950 */ 268, 66, 160, 224, 268, 268, 224, 268, 268, 176,
|
|
/* 1960 */ 177, 82, 170, 171, 268, 225, 226, 227, 228, 268,
|
|
/* 1970 */ 246, 247, 248, 190, 268, 246, 247, 248, 246, 247,
|
|
/* 1980 */ 248, 268, 190, 268, 201, 193, 246, 247, 248, 268,
|
|
/* 1990 */ 268, 251, 252, 253, 254, 255, 256, 257, 258, 259,
|
|
/* 2000 */ 260, 261, 262, 268, 268, 265, 268, 268, 225, 226,
|
|
/* 2010 */ 227, 228, 268, 268, 268, 136, 137, 138, 139, 140,
|
|
/* 2020 */ 141, 142, 143, 144, 145, 268, 268, 268, 236, 246,
|
|
/* 2030 */ 247, 248, 268, 159, 251, 252, 253, 254, 255, 256,
|
|
/* 2040 */ 257, 258, 259, 260, 261, 262, 268, 268, 265, 268,
|
|
/* 2050 */ 176, 177, 268, 268, 268, 268, 268, 268, 48, 268,
|
|
/* 2060 */ 268, 268, 52, 268, 190, 268, 268, 268, 268, 268,
|
|
/* 2070 */ 268, 268, 268, 63, 268, 201, 159, 67, 68, 69,
|
|
/* 2080 */ 268, 71, 177, 73, 74, 75, 268, 268, 268, 176,
|
|
/* 2090 */ 177, 268, 268, 176, 177, 268, 268, 268, 268, 225,
|
|
/* 2100 */ 226, 227, 228, 268, 268, 268, 268, 190, 268, 268,
|
|
/* 2110 */ 268, 268, 268, 268, 268, 268, 268, 177, 201, 268,
|
|
/* 2120 */ 246, 247, 248, 268, 268, 251, 252, 253, 254, 255,
|
|
/* 2130 */ 256, 257, 258, 259, 260, 261, 262, 224, 268, 265,
|
|
/* 2140 */ 268, 268, 225, 226, 227, 228, 268, 176, 177, 268,
|
|
/* 2150 */ 268, 246, 247, 248, 176, 177, 146, 176, 177, 246,
|
|
/* 2160 */ 247, 248, 268, 246, 247, 248, 177, 268, 251, 252,
|
|
/* 2170 */ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
|
|
/* 2180 */ 268, 268, 265, 268, 268, 268, 246, 247, 248, 159,
|
|
/* 2190 */ 268, 268, 268, 176, 177, 268, 176, 177, 268, 176,
|
|
/* 2200 */ 177, 268, 33, 34, 268, 268, 176, 177, 268, 268,
|
|
/* 2210 */ 268, 42, 43, 268, 45, 268, 268, 246, 247, 248,
|
|
/* 2220 */ 190, 268, 53, 54, 246, 247, 248, 246, 247, 248,
|
|
/* 2230 */ 61, 201, 268, 268, 268, 246, 247, 248, 268, 70,
|
|
/* 2240 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
|
|
/* 2250 */ 268, 82, 176, 177, 268, 225, 226, 227, 228, 268,
|
|
/* 2260 */ 268, 268, 159, 246, 247, 248, 246, 247, 248, 246,
|
|
/* 2270 */ 247, 248, 268, 268, 268, 268, 246, 247, 248, 176,
|
|
/* 2280 */ 177, 251, 252, 253, 254, 255, 256, 257, 258, 259,
|
|
/* 2290 */ 260, 261, 262, 190, 268, 265, 268, 268, 268, 268,
|
|
/* 2300 */ 268, 268, 268, 159, 201, 136, 137, 138, 139, 140,
|
|
/* 2310 */ 141, 142, 143, 144, 145, 268, 176, 177, 268, 268,
|
|
/* 2320 */ 176, 177, 246, 247, 248, 268, 268, 268, 225, 226,
|
|
/* 2330 */ 227, 228, 268, 268, 190, 268, 268, 268, 268, 268,
|
|
/* 2340 */ 176, 177, 268, 268, 268, 201, 176, 177, 268, 246,
|
|
/* 2350 */ 247, 248, 176, 177, 251, 252, 253, 254, 255, 256,
|
|
/* 2360 */ 257, 258, 259, 260, 261, 262, 176, 177, 265, 225,
|
|
/* 2370 */ 226, 227, 228, 176, 177, 268, 268, 176, 177, 268,
|
|
/* 2380 */ 176, 177, 268, 176, 177, 268, 246, 247, 248, 177,
|
|
/* 2390 */ 246, 247, 248, 268, 268, 251, 252, 253, 254, 255,
|
|
/* 2400 */ 256, 257, 258, 259, 260, 261, 262, 176, 177, 265,
|
|
/* 2410 */ 246, 247, 248, 268, 268, 159, 246, 247, 248, 268,
|
|
/* 2420 */ 268, 268, 246, 247, 248, 268, 268, 268, 176, 177,
|
|
/* 2430 */ 268, 268, 176, 177, 268, 268, 246, 247, 248, 268,
|
|
/* 2440 */ 268, 268, 268, 246, 247, 248, 190, 246, 247, 248,
|
|
/* 2450 */ 246, 247, 248, 246, 247, 248, 268, 201, 246, 247,
|
|
/* 2460 */ 248, 268, 268, 268, 268, 268, 268, 268, 268, 268,
|
|
/* 2470 */ 268, 268, 268, 268, 268, 268, 268, 246, 247, 248,
|
|
/* 2480 */ 268, 225, 226, 227, 228, 268, 268, 268, 268, 268,
|
|
/* 2490 */ 268, 176, 177, 268, 176, 177, 268, 268, 246, 247,
|
|
/* 2500 */ 248, 268, 246, 247, 248, 176, 177, 251, 252, 253,
|
|
/* 2510 */ 254, 255, 256, 257, 258, 259, 260, 261, 262, 268,
|
|
/* 2520 */ 268, 265, 17, 18, 19, 20, 21, 22, 23, 24,
|
|
/* 2530 */ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
|
/* 2540 */ 35, 36, 37, 38, 39, 40, 33, 34, 176, 177,
|
|
/* 2550 */ 268, 268, 47, 268, 268, 42, 43, 268, 45, 33,
|
|
/* 2560 */ 34, 246, 247, 248, 246, 247, 248, 54, 42, 43,
|
|
/* 2570 */ 268, 45, 33, 34, 61, 246, 247, 248, 65, 268,
|
|
/* 2580 */ 54, 42, 43, 70, 45, 268, 268, 61, 268, 176,
|
|
/* 2590 */ 177, 268, 268, 54, 268, 82, 70, 268, 268, 268,
|
|
/* 2600 */ 61, 268, 268, 268, 268, 268, 268, 268, 82, 70,
|
|
/* 2610 */ 268, 268, 268, 268, 268, 176, 177, 268, 246, 247,
|
|
/* 2620 */ 248, 82, 176, 177, 268, 176, 177, 268, 176, 177,
|
|
/* 2630 */ 268, 176, 177, 268, 176, 177, 268, 268, 268, 268,
|
|
/* 2640 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 136,
|
|
/* 2650 */ 137, 138, 139, 140, 141, 142, 143, 144, 145, 246,
|
|
/* 2660 */ 247, 248, 136, 137, 138, 139, 140, 141, 142, 143,
|
|
/* 2670 */ 144, 145, 176, 177, 268, 136, 137, 138, 139, 140,
|
|
/* 2680 */ 141, 142, 143, 144, 145, 246, 247, 248, 176, 177,
|
|
/* 2690 */ 268, 268, 246, 247, 248, 246, 247, 248, 246, 247,
|
|
/* 2700 */ 248, 246, 247, 248, 246, 247, 248, 176, 177, 268,
|
|
/* 2710 */ 176, 177, 268, 176, 177, 268, 176, 177, 268, 176,
|
|
/* 2720 */ 177, 268, 176, 177, 268, 176, 177, 268, 268, 176,
|
|
/* 2730 */ 177, 268, 176, 177, 268, 176, 177, 268, 176, 177,
|
|
/* 2740 */ 268, 268, 246, 247, 248, 176, 177, 268, 176, 177,
|
|
/* 2750 */ 268, 176, 177, 268, 176, 177, 268, 268, 246, 247,
|
|
/* 2760 */ 248, 176, 177, 268, 176, 177, 268, 176, 177, 268,
|
|
/* 2770 */ 176, 177, 268, 176, 177, 268, 268, 246, 247, 248,
|
|
/* 2780 */ 246, 247, 248, 246, 247, 248, 246, 247, 248, 246,
|
|
/* 2790 */ 247, 248, 246, 247, 248, 246, 247, 248, 268, 246,
|
|
/* 2800 */ 247, 248, 246, 247, 248, 246, 247, 248, 246, 247,
|
|
/* 2810 */ 248, 176, 177, 268, 268, 246, 247, 248, 246, 247,
|
|
/* 2820 */ 248, 246, 247, 248, 246, 247, 248, 176, 177, 268,
|
|
/* 2830 */ 268, 246, 247, 248, 246, 247, 248, 246, 247, 248,
|
|
/* 2840 */ 246, 247, 248, 246, 247, 248, 176, 177, 268, 176,
|
|
/* 2850 */ 177, 268, 176, 177, 268, 176, 177, 268, 176, 177,
|
|
/* 2860 */ 268, 176, 177, 268, 176, 177, 268, 268, 268, 176,
|
|
/* 2870 */ 177, 268, 268, 268, 268, 268, 268, 268, 268, 268,
|
|
/* 2880 */ 268, 246, 247, 248, 268, 268, 268, 268, 268, 268,
|
|
/* 2890 */ 268, 268, 268, 268, 268, 268, 268, 246, 247, 248,
|
|
/* 2900 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
|
|
/* 2910 */ 268, 268, 268, 268, 268, 268, 246, 247, 248, 246,
|
|
/* 2920 */ 247, 248, 246, 247, 248, 246, 247, 248, 246, 247,
|
|
/* 2930 */ 248, 246, 247, 248, 246, 247, 248, 268, 268, 246,
|
|
/* 2940 */ 247, 248,
|
|
};
|
|
#define YY_SHIFT_USE_DFLT (2942)
|
|
#define YY_SHIFT_COUNT (402)
|
|
#define YY_SHIFT_MIN (-33)
|
|
#define YY_SHIFT_MAX (2539)
|
|
static const short yy_shift_ofst[] = {
|
|
/* 0 */ 2942, 241, -33, 241, 104, 241, 241, 241, 241, 241,
|
|
/* 10 */ 241, 241, 452, 1622, 2010, 1704, 353, 466, 434, 434,
|
|
/* 20 */ 2526, 2526, 2526, 2539, 2539, 2526, -10, -10, -10, -10,
|
|
/* 30 */ -10, -10, 1563, 1879, 2169, 2539, 2539, 2539, 2539, 2539,
|
|
/* 40 */ 2539, 2539, 1877, 1457, 1387, -10, 2513, 2539, 2539, 2539,
|
|
/* 50 */ 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539,
|
|
/* 60 */ 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539,
|
|
/* 70 */ 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539,
|
|
/* 80 */ 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539,
|
|
/* 90 */ 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539,
|
|
/* 100 */ 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 1885,
|
|
/* 110 */ 2539, 2539, 2539, 2539, 2539, 2539, 2539, 2539, 283, -14,
|
|
/* 120 */ 25, 69, -30, 347, 329, 357, 39, 217, 227, 249,
|
|
/* 130 */ 227, 249, 2942, 1389, 97, 120, 120, 120, -27, 519,
|
|
/* 140 */ 345, 351, 482, 482, 527, 482, 482, 482, 482, 656,
|
|
/* 150 */ 654, 706, 726, 725, 750, 775, 726, 778, 217, 778,
|
|
/* 160 */ 802, 227, 227, 482, 860, 482, 69, 876, 725, 915,
|
|
/* 170 */ 725, 872, 2942, 2942, 2942, 2942, 2942, 2942, 2942, 2942,
|
|
/* 180 */ 597, 660, 723, 786, 834, 885, 933, 981, 1029, 1077,
|
|
/* 190 */ 1125, 1173, 1221, 1291, 1339, 1389, 1389, 1389, 1389, 1389,
|
|
/* 200 */ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389,
|
|
/* 210 */ 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1389, 1521,
|
|
/* 220 */ 1857, 2505, 1479, 1479, 1479, 1244, 1244, 1244, 1244, 1244,
|
|
/* 230 */ 1244, 1425, 1695, 187, 96, 534, 534, 534, 488, 488,
|
|
/* 240 */ 269, 648, 328, 112, 450, 511, 526, 123, 589, 391,
|
|
/* 250 */ 590, 536, 591, 592, 143, 652, 669, 671, 718, 458,
|
|
/* 260 */ 594, 191, 721, 714, 715, -11, -11, -11, -11, -11,
|
|
/* 270 */ 958, 970, 972, 982, 965, 968, 1025, 982, 1017, 1018,
|
|
/* 280 */ 982, 982, 1024, 1009, 1028, 1030, 1069, 1070, 1054, 1055,
|
|
/* 290 */ 1056, 1062, 1080, 1121, 1102, 1103, 1105, 1114, 1100, 1111,
|
|
/* 300 */ 1153, 1170, 1156, 1158, 1176, 1203, 1205, 1206, 1224, 1231,
|
|
/* 310 */ 1240, 1336, 1285, 1330, 1331, 1316, 1318, 1334, 1384, 1373,
|
|
/* 320 */ 1344, 1358, 1274, 1418, 1388, 1385, 1386, 1392, 1393, 1397,
|
|
/* 330 */ 654, 1390, 1395, 1396, 1381, 1446, 1417, 1332, 1399, 1401,
|
|
/* 340 */ 1449, 1357, 1429, 1427, 1475, 1476, 1478, 1441, 1527, 1415,
|
|
/* 350 */ 1483, 1471, 1485, 1448, 1542, 1546, 1548, 1517, 1553, 1554,
|
|
/* 360 */ 1524, 1556, 1557, 982, 1564, 1530, 1565, 1556, 1533, 1577,
|
|
/* 370 */ 1526, 1544, 1541, 1566, 1552, 1594, 1568, 1598, 1558, 1569,
|
|
/* 380 */ 1578, 1571, 1612, 1626, 1584, 1573, 1593, 1617, 1601, 1623,
|
|
/* 390 */ 1613, 1658, 1621, 1631, 1628, 1634, 1636, 1627, 1673, 1638,
|
|
/* 400 */ 1649, 1655, 1571,
|
|
};
|
|
#define YY_REDUCE_USE_DFLT (-195)
|
|
#define YY_REDUCE_COUNT (179)
|
|
#define YY_REDUCE_MIN (-194)
|
|
#define YY_REDUCE_MAX (2693)
|
|
static const short yy_reduce_ofst[] = {
|
|
/* 0 */ -20, 1403, 1493, 1605, 1740, 1783, 1874, 1917, 2030, 2103,
|
|
/* 10 */ 2144, 2256, 1561, -8, -8, 1412, 38, -164, 122, 129,
|
|
/* 20 */ 242, 1086, 1394, 263, 1537, -17, -186, -175, 1242, 1363,
|
|
/* 30 */ 1592, 1609, 180, 1040, 121, 402, 1724, 1729, 61, 1732,
|
|
/* 40 */ 1913, 407, 309, 1792, 1409, 1452, 469, 535, 1971, 1978,
|
|
/* 50 */ 1981, 2017, 2020, 2023, 2076, 2140, 2164, 2170, 2176, 2190,
|
|
/* 60 */ 2197, 2201, 2204, 2207, 2231, 2252, 2315, 2318, 2329, 2372,
|
|
/* 70 */ 2413, 2439, 2446, 2449, 2452, 2455, 2458, 2496, 2512, 2531,
|
|
/* 80 */ 2534, 2537, 2540, 2543, 2546, 2549, 2553, 2556, 2559, 2562,
|
|
/* 90 */ 2569, 2572, 2575, 2578, 2585, 2588, 2591, 2594, 2597, 2635,
|
|
/* 100 */ 2651, 2670, 2673, 2676, 2679, 2682, 2685, 2688, 2693, 132,
|
|
/* 110 */ 532, 1469, 1580, 1597, 1905, 1940, 1989, 2212, -184, 33,
|
|
/* 120 */ -84, -57, 21, -194, -187, 84, 170, 154, 84, 229,
|
|
/* 130 */ 204, 247, 310, 82, 100, 156, 166, 219, 126, 236,
|
|
/* 140 */ 239, 321, 354, 380, 384, 403, 427, 454, 490, 510,
|
|
/* 150 */ 550, 552, 557, 613, 586, 635, 616, 636, 567, 637,
|
|
/* 160 */ 640, 236, 236, 695, 650, 699, 686, 753, 755, 730,
|
|
/* 170 */ 758, 770, 771, 792, 797, 761, 762, 763, 785, 843,
|
|
};
|
|
static const YYACTIONTYPE yy_default[] = {
|
|
/* 0 */ 1046, 1134, 1419, 1134, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 10 */ 1419, 1419, 1367, 1225, 1225, 1225, 1419, 1419, 1225, 1225,
|
|
/* 20 */ 1326, 1326, 1326, 1419, 1367, 1326, 1419, 1419, 1419, 1419,
|
|
/* 30 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1055, 1419,
|
|
/* 40 */ 1419, 1055, 1419, 1225, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 50 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 60 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 70 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 80 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 90 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 100 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 110 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1259,
|
|
/* 120 */ 1419, 1113, 1419, 1165, 1379, 1222, 1259, 1419, 1222, 1419,
|
|
/* 130 */ 1398, 1419, 1135, 1151, 1419, 1148, 1148, 1148, 1419, 1380,
|
|
/* 140 */ 1419, 1419, 1419, 1419, 1060, 1419, 1419, 1419, 1419, 1167,
|
|
/* 150 */ 1134, 1419, 1130, 1387, 1228, 1419, 1130, 1419, 1419, 1419,
|
|
/* 160 */ 1250, 1223, 1213, 1419, 1209, 1419, 1390, 1389, 1387, 1109,
|
|
/* 170 */ 1387, 1419, 1118, 1062, 1075, 1134, 1134, 1134, 1094, 1075,
|
|
/* 180 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 190 */ 1419, 1419, 1419, 1419, 1419, 1149, 1258, 1381, 1376, 1324,
|
|
/* 200 */ 1409, 1358, 1377, 1391, 1115, 1328, 1321, 1320, 1319, 1318,
|
|
/* 210 */ 1317, 1316, 1315, 1314, 1313, 1312, 1311, 1310, 1327, 1323,
|
|
/* 220 */ 1309, 1308, 1304, 1303, 1302, 1301, 1300, 1299, 1298, 1297,
|
|
/* 230 */ 1296, 1295, 1307, 1306, 1305, 1294, 1293, 1292, 1284, 1285,
|
|
/* 240 */ 1059, 1419, 1407, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 250 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 260 */ 1419, 1419, 1419, 1419, 1419, 1291, 1290, 1288, 1287, 1286,
|
|
/* 270 */ 1419, 1419, 1419, 1061, 1419, 1419, 1419, 1067, 1419, 1419,
|
|
/* 280 */ 1179, 1178, 1419, 1419, 1419, 1069, 1419, 1419, 1419, 1419,
|
|
/* 290 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 300 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 310 */ 1419, 1257, 1419, 1404, 1366, 1419, 1419, 1378, 1419, 1419,
|
|
/* 320 */ 1419, 1419, 1370, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 330 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 340 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1263, 1419, 1419,
|
|
/* 350 */ 1198, 1419, 1400, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 360 */ 1419, 1419, 1419, 1204, 1419, 1419, 1419, 1240, 1419, 1114,
|
|
/* 370 */ 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 380 */ 1289, 1412, 1263, 1419, 1419, 1419, 1419, 1419, 1419, 1419,
|
|
/* 390 */ 1419, 1419, 1419, 1091, 1419, 1419, 1090, 1419, 1419, 1419,
|
|
/* 400 */ 1419, 1419, 1056,
|
|
};
|
|
/********** End of lemon-generated parsing tables *****************************/
|
|
|
|
/* The next table maps tokens (terminal symbols) into fallback tokens.
|
|
** If a construct like the following:
|
|
**
|
|
** %fallback ID X Y Z.
|
|
**
|
|
** appears in the grammar, then ID becomes a fallback token for X, Y,
|
|
** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
|
|
** but it does not parse, the type of the token is changed to ID and
|
|
** the parse is retried before an error is thrown.
|
|
**
|
|
** This feature can be used, for example, to cause some keywords in a language
|
|
** to revert to identifiers if they keyword does not apply in the context where
|
|
** it appears.
|
|
*/
|
|
#ifdef YYFALLBACK
|
|
static const YYCODETYPE yyFallback[] = {
|
|
0, /* $ => nothing */
|
|
0, /* EQ => nothing */
|
|
0, /* MULEQ => nothing */
|
|
0, /* DIVEQ => nothing */
|
|
0, /* MODEQ => nothing */
|
|
0, /* ADDEQ => nothing */
|
|
0, /* SUBEQ => nothing */
|
|
0, /* LSHEQ => nothing */
|
|
0, /* RSHEQ => nothing */
|
|
0, /* ANDEQ => nothing */
|
|
0, /* OREQ => nothing */
|
|
0, /* XOREQ => nothing */
|
|
0, /* URSHEQ => nothing */
|
|
0, /* QUESTION => nothing */
|
|
0, /* COLON => nothing */
|
|
0, /* OROR => nothing */
|
|
0, /* ANDAND => nothing */
|
|
0, /* EQEQ => nothing */
|
|
0, /* NEQ => nothing */
|
|
0, /* APPROXEQ => nothing */
|
|
0, /* LT => nothing */
|
|
0, /* GT => nothing */
|
|
0, /* LTEQ => nothing */
|
|
0, /* GTEQ => nothing */
|
|
0, /* LTGTEQ => nothing */
|
|
0, /* IS => nothing */
|
|
0, /* DOTDOT => nothing */
|
|
0, /* OR => nothing */
|
|
0, /* XOR => nothing */
|
|
0, /* AND => nothing */
|
|
0, /* LSH => nothing */
|
|
0, /* RSH => nothing */
|
|
0, /* URSH => nothing */
|
|
0, /* SUB => nothing */
|
|
0, /* ADD => nothing */
|
|
0, /* MUL => nothing */
|
|
0, /* DIV => nothing */
|
|
0, /* MOD => nothing */
|
|
0, /* CROSSPROD => nothing */
|
|
0, /* DOTPROD => nothing */
|
|
0, /* POW => nothing */
|
|
0, /* UNARY => nothing */
|
|
0, /* ADDADD => nothing */
|
|
0, /* SUBSUB => nothing */
|
|
0, /* DOT => nothing */
|
|
0, /* LPAREN => nothing */
|
|
0, /* LBRACKET => nothing */
|
|
0, /* SCOPE => nothing */
|
|
0, /* EOF => nothing */
|
|
0, /* SEMICOLON => nothing */
|
|
0, /* COMMA => nothing */
|
|
0, /* INCLUDE => nothing */
|
|
0, /* EXTEND => nothing */
|
|
0, /* CLASS => nothing */
|
|
0, /* IDENTIFIER => nothing */
|
|
0, /* ABSTRACT => nothing */
|
|
0, /* NATIVE => nothing */
|
|
0, /* UI => nothing */
|
|
0, /* PLAY => nothing */
|
|
0, /* REPLACES => nothing */
|
|
0, /* VERSION => nothing */
|
|
0, /* STRCONST => nothing */
|
|
0, /* RPAREN => nothing */
|
|
54, /* DEFAULT => IDENTIFIER */
|
|
54, /* COLOR => IDENTIFIER */
|
|
0, /* LBRACE => nothing */
|
|
0, /* RBRACE => nothing */
|
|
0, /* MIXIN => nothing */
|
|
54, /* PROPERTY => IDENTIFIER */
|
|
0, /* FLAGDEF => nothing */
|
|
0, /* INTCONST => nothing */
|
|
0, /* STRUCT => nothing */
|
|
0, /* CLEARSCOPE => nothing */
|
|
0, /* CONST => nothing */
|
|
0, /* ENUM => nothing */
|
|
0, /* STATES => nothing */
|
|
0, /* NWS => nothing */
|
|
0, /* STOP => nothing */
|
|
0, /* WAIT => nothing */
|
|
0, /* FAIL => nothing */
|
|
0, /* LOOP => nothing */
|
|
0, /* GOTO => nothing */
|
|
0, /* SUPER => nothing */
|
|
0, /* BRIGHT => nothing */
|
|
0, /* FAST => nothing */
|
|
0, /* SLOW => nothing */
|
|
0, /* NODELAY => nothing */
|
|
0, /* CANRAISE => nothing */
|
|
0, /* OFFSET => nothing */
|
|
0, /* LIGHT => nothing */
|
|
54, /* SBYTE => IDENTIFIER */
|
|
54, /* BYTE => IDENTIFIER */
|
|
54, /* SHORT => IDENTIFIER */
|
|
54, /* USHORT => IDENTIFIER */
|
|
54, /* INT => IDENTIFIER */
|
|
54, /* UINT => IDENTIFIER */
|
|
54, /* BOOL => IDENTIFIER */
|
|
54, /* FLOAT => IDENTIFIER */
|
|
54, /* DOUBLE => IDENTIFIER */
|
|
54, /* VECTOR2 => IDENTIFIER */
|
|
54, /* VECTOR3 => IDENTIFIER */
|
|
54, /* VECTOR4 => IDENTIFIER */
|
|
54, /* NAME => IDENTIFIER */
|
|
54, /* SOUND => IDENTIFIER */
|
|
54, /* STATE => IDENTIFIER */
|
|
0, /* LET => nothing */
|
|
0, /* ATSIGN => nothing */
|
|
0, /* READONLY => nothing */
|
|
54, /* STRING => IDENTIFIER */
|
|
54, /* MAP => IDENTIFIER */
|
|
54, /* MAPITERATOR => IDENTIFIER */
|
|
54, /* ARRAY => IDENTIFIER */
|
|
54, /* VOID => IDENTIFIER */
|
|
54, /* UINT8 => IDENTIFIER */
|
|
54, /* INT8 => IDENTIFIER */
|
|
54, /* UINT16 => IDENTIFIER */
|
|
54, /* INT16 => IDENTIFIER */
|
|
};
|
|
#endif /* YYFALLBACK */
|
|
|
|
/* The following structure represents a single element of the
|
|
** parser's stack. Information stored includes:
|
|
**
|
|
** + The state number for the parser at this level of the stack.
|
|
**
|
|
** + The value of the token stored at this level of the stack.
|
|
** (In other words, the "major" token.)
|
|
**
|
|
** + The semantic value stored at this level of the stack. This is
|
|
** the information used by the action routines in the grammar.
|
|
** It is sometimes called the "minor" token.
|
|
**
|
|
** After the "shift" half of a SHIFTREDUCE action, the stateno field
|
|
** actually contains the reduce action for the second half of the
|
|
** SHIFTREDUCE.
|
|
*/
|
|
struct yyStackEntry {
|
|
YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */
|
|
YYCODETYPE major; /* The major token value. This is the code
|
|
** number for the token at this stack level */
|
|
YYMINORTYPE minor; /* The user-supplied minor token value. This
|
|
** is the value of the token */
|
|
};
|
|
typedef struct yyStackEntry yyStackEntry;
|
|
|
|
/* The state of the parser is completely contained in an instance of
|
|
** the following structure */
|
|
struct yyParser {
|
|
yyStackEntry *yytos; /* Pointer to top element of the stack */
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
int yyhwm; /* High-water mark of the stack */
|
|
#endif
|
|
#ifndef YYNOERRORRECOVERY
|
|
int yyerrcnt; /* Shifts left before out of the error */
|
|
#endif
|
|
ZCCParseARG_SDECL /* A place to hold %extra_argument */
|
|
#if YYSTACKDEPTH<=0
|
|
int yystksz; /* Current side of the stack */
|
|
yyStackEntry *yystack; /* The parser's stack */
|
|
yyStackEntry yystk0; /* First stack entry */
|
|
#else
|
|
yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
|
|
#endif
|
|
};
|
|
typedef struct yyParser yyParser;
|
|
|
|
#ifndef NDEBUG
|
|
#include <stdio.h>
|
|
static FILE *yyTraceFILE = 0;
|
|
static char *yyTracePrompt = 0;
|
|
#endif /* NDEBUG */
|
|
|
|
#ifndef NDEBUG
|
|
/*
|
|
** Turn parser tracing on by giving a stream to which to write the trace
|
|
** and a prompt to preface each trace message. Tracing is turned off
|
|
** by making either argument NULL
|
|
**
|
|
** Inputs:
|
|
** <ul>
|
|
** <li> A FILE* to which trace output should be written.
|
|
** If NULL, then tracing is turned off.
|
|
** <li> A prefix string written at the beginning of every
|
|
** line of trace output. If NULL, then tracing is
|
|
** turned off.
|
|
** </ul>
|
|
**
|
|
** Outputs:
|
|
** None.
|
|
*/
|
|
void ZCCParseTrace(FILE *TraceFILE, char *zTracePrompt){
|
|
yyTraceFILE = TraceFILE;
|
|
yyTracePrompt = zTracePrompt;
|
|
if( yyTraceFILE==0 ) yyTracePrompt = 0;
|
|
else if( yyTracePrompt==0 ) yyTraceFILE = 0;
|
|
}
|
|
#endif /* NDEBUG */
|
|
|
|
#ifndef NDEBUG
|
|
/* For tracing shifts, the names of all terminals and nonterminals
|
|
** are required. The following table supplies these names */
|
|
static const char *const yyTokenName[] = {
|
|
"$", "EQ", "MULEQ", "DIVEQ",
|
|
"MODEQ", "ADDEQ", "SUBEQ", "LSHEQ",
|
|
"RSHEQ", "ANDEQ", "OREQ", "XOREQ",
|
|
"URSHEQ", "QUESTION", "COLON", "OROR",
|
|
"ANDAND", "EQEQ", "NEQ", "APPROXEQ",
|
|
"LT", "GT", "LTEQ", "GTEQ",
|
|
"LTGTEQ", "IS", "DOTDOT", "OR",
|
|
"XOR", "AND", "LSH", "RSH",
|
|
"URSH", "SUB", "ADD", "MUL",
|
|
"DIV", "MOD", "CROSSPROD", "DOTPROD",
|
|
"POW", "UNARY", "ADDADD", "SUBSUB",
|
|
"DOT", "LPAREN", "LBRACKET", "SCOPE",
|
|
"EOF", "SEMICOLON", "COMMA", "INCLUDE",
|
|
"EXTEND", "CLASS", "IDENTIFIER", "ABSTRACT",
|
|
"NATIVE", "UI", "PLAY", "REPLACES",
|
|
"VERSION", "STRCONST", "RPAREN", "DEFAULT",
|
|
"COLOR", "LBRACE", "RBRACE", "MIXIN",
|
|
"PROPERTY", "FLAGDEF", "INTCONST", "STRUCT",
|
|
"CLEARSCOPE", "CONST", "ENUM", "STATES",
|
|
"NWS", "STOP", "WAIT", "FAIL",
|
|
"LOOP", "GOTO", "SUPER", "BRIGHT",
|
|
"FAST", "SLOW", "NODELAY", "CANRAISE",
|
|
"OFFSET", "LIGHT", "SBYTE", "BYTE",
|
|
"SHORT", "USHORT", "INT", "UINT",
|
|
"BOOL", "FLOAT", "DOUBLE", "VECTOR2",
|
|
"VECTOR3", "VECTOR4", "NAME", "SOUND",
|
|
"STATE", "LET", "ATSIGN", "READONLY",
|
|
"STRING", "MAP", "MAPITERATOR", "ARRAY",
|
|
"VOID", "UINT8", "INT8", "UINT16",
|
|
"INT16", "RBRACKET", "ACTION", "DEPRECATED",
|
|
"STATIC", "PRIVATE", "PROTECTED", "LATENT",
|
|
"FINAL", "META", "TRANSIENT", "INTERNAL",
|
|
"VIRTUAL", "OVERRIDE", "VARARG", "VIRTUALSCOPE",
|
|
"ELLIPSIS", "IN", "OUT", "OPTIONAL",
|
|
"TILDE", "BANG", "SIZEOF", "ALIGNOF",
|
|
"UINTCONST", "FLOATCONST", "NAMECONST", "FALSE",
|
|
"TRUE", "NULLPTR", "STATICCONST", "CONTINUE",
|
|
"BREAK", "RETURN", "DO", "FOR",
|
|
"FOREACH", "WHILE", "UNTIL", "IF",
|
|
"ELSE", "SWITCH", "CASE", "error",
|
|
"declarator", "declarator_no_fun", "opt_func_body", "function_body",
|
|
"main", "translation_unit", "external_declaration", "mixin_definition",
|
|
"class_definition", "struct_def", "enum_def", "const_def",
|
|
"include_def", "opt_semicolon", "opt_comma", "opt_expr",
|
|
"expr", "string_constant", "class_head", "class_innards",
|
|
"class_member", "class_body", "class_ancestry", "class_flags",
|
|
"dottable_id", "mixin_statement", "property_def", "flag_def",
|
|
"states_def", "default_def", "staticarray_statement", "opt_struct_body",
|
|
"struct_body", "struct_member", "identifier_list", "states_opt",
|
|
"struct_flags", "enum_list", "opt_enum_list", "enumerator",
|
|
"enum_type", "int_type", "mixin_class_definition", "mixin_class_body",
|
|
"mixin_class_member", "states_body", "state_line", "state_label",
|
|
"state_flow", "state_flow_type", "state_goto_offset", "state_action",
|
|
"state_call", "state_call_params", "state_opts", "states_opts",
|
|
"scanner_mode", "light_list", "statement_list", "func_expr_list",
|
|
"default_statement_list", "default_statement", "property_statement", "flag_statement",
|
|
"expr_list", "type_name", "type_name1", "aggregate_type",
|
|
"type", "type_list", "type_list_or_void", "type_or_array",
|
|
"class_restrictor", "array_size", "array_size_expr", "variables_or_function",
|
|
"decl_flags", "func_params", "func_const", "variable_list",
|
|
"variable_name", "decl_flag", "opt_deprecation_message", "func_param_list",
|
|
"func_param", "func_param_flags", "primary", "unary_expr",
|
|
"constant", "func_expr_item", "named_expr", "compound_statement",
|
|
"statement", "labeled_statement", "expression_statement", "selection_statement",
|
|
"iteration_statement", "array_iteration_statement", "jump_statement", "assign_statement",
|
|
"assign_decl_statement", "local_var", "while_or_until", "for_init",
|
|
"for_bump", "if_front", "variable_list_with_init", "var_init",
|
|
};
|
|
#endif /* NDEBUG */
|
|
|
|
#ifndef NDEBUG
|
|
/* For tracing reduce actions, the names of all rules are required.
|
|
*/
|
|
static const char *const yyRuleName[] = {
|
|
/* 0 */ "main ::= translation_unit",
|
|
/* 1 */ "translation_unit ::=",
|
|
/* 2 */ "translation_unit ::= translation_unit external_declaration",
|
|
/* 3 */ "translation_unit ::= error",
|
|
/* 4 */ "external_declaration ::= mixin_definition",
|
|
/* 5 */ "external_declaration ::= class_definition",
|
|
/* 6 */ "external_declaration ::= struct_def",
|
|
/* 7 */ "external_declaration ::= enum_def",
|
|
/* 8 */ "external_declaration ::= const_def",
|
|
/* 9 */ "external_declaration ::= include_def",
|
|
/* 10 */ "opt_expr ::=",
|
|
/* 11 */ "include_def ::= INCLUDE string_constant",
|
|
/* 12 */ "class_definition ::= class_head class_body",
|
|
/* 13 */ "class_head ::= EXTEND CLASS IDENTIFIER",
|
|
/* 14 */ "class_head ::= CLASS IDENTIFIER class_ancestry class_flags",
|
|
/* 15 */ "class_ancestry ::=",
|
|
/* 16 */ "class_ancestry ::= COLON dottable_id",
|
|
/* 17 */ "class_flags ::=",
|
|
/* 18 */ "class_flags ::= class_flags ABSTRACT",
|
|
/* 19 */ "class_flags ::= class_flags NATIVE",
|
|
/* 20 */ "class_flags ::= class_flags UI",
|
|
/* 21 */ "class_flags ::= class_flags PLAY",
|
|
/* 22 */ "class_flags ::= class_flags REPLACES dottable_id",
|
|
/* 23 */ "class_flags ::= class_flags VERSION LPAREN STRCONST RPAREN",
|
|
/* 24 */ "dottable_id ::= IDENTIFIER",
|
|
/* 25 */ "dottable_id ::= dottable_id DOT IDENTIFIER",
|
|
/* 26 */ "dottable_id ::= dottable_id DOT DEFAULT",
|
|
/* 27 */ "dottable_id ::= dottable_id DOT COLOR",
|
|
/* 28 */ "class_body ::= SEMICOLON class_innards EOF",
|
|
/* 29 */ "class_body ::= LBRACE class_innards RBRACE",
|
|
/* 30 */ "class_innards ::=",
|
|
/* 31 */ "class_innards ::= class_innards class_member",
|
|
/* 32 */ "class_member ::= declarator",
|
|
/* 33 */ "class_member ::= mixin_statement",
|
|
/* 34 */ "class_member ::= enum_def",
|
|
/* 35 */ "class_member ::= struct_def",
|
|
/* 36 */ "class_member ::= states_def",
|
|
/* 37 */ "class_member ::= default_def",
|
|
/* 38 */ "class_member ::= const_def",
|
|
/* 39 */ "class_member ::= property_def",
|
|
/* 40 */ "class_member ::= flag_def",
|
|
/* 41 */ "class_member ::= staticarray_statement",
|
|
/* 42 */ "mixin_statement ::= MIXIN IDENTIFIER SEMICOLON",
|
|
/* 43 */ "property_def ::= PROPERTY IDENTIFIER COLON identifier_list SEMICOLON",
|
|
/* 44 */ "flag_def ::= FLAGDEF IDENTIFIER COLON IDENTIFIER COMMA INTCONST SEMICOLON",
|
|
/* 45 */ "identifier_list ::= IDENTIFIER",
|
|
/* 46 */ "identifier_list ::= states_opt COMMA IDENTIFIER",
|
|
/* 47 */ "struct_def ::= STRUCT IDENTIFIER struct_flags LBRACE opt_struct_body RBRACE opt_semicolon",
|
|
/* 48 */ "struct_def ::= EXTEND STRUCT IDENTIFIER LBRACE opt_struct_body RBRACE opt_semicolon",
|
|
/* 49 */ "struct_flags ::=",
|
|
/* 50 */ "struct_flags ::= struct_flags UI",
|
|
/* 51 */ "struct_flags ::= struct_flags PLAY",
|
|
/* 52 */ "struct_flags ::= struct_flags CLEARSCOPE",
|
|
/* 53 */ "struct_flags ::= struct_flags NATIVE",
|
|
/* 54 */ "struct_flags ::= struct_flags VERSION LPAREN STRCONST RPAREN",
|
|
/* 55 */ "opt_struct_body ::=",
|
|
/* 56 */ "opt_struct_body ::= error",
|
|
/* 57 */ "struct_body ::= struct_body struct_member",
|
|
/* 58 */ "struct_member ::= declarator",
|
|
/* 59 */ "struct_member ::= enum_def",
|
|
/* 60 */ "struct_member ::= const_def",
|
|
/* 61 */ "struct_member ::= staticarray_statement",
|
|
/* 62 */ "const_def ::= CONST IDENTIFIER EQ expr SEMICOLON",
|
|
/* 63 */ "enum_def ::= ENUM IDENTIFIER enum_type LBRACE opt_enum_list RBRACE opt_semicolon",
|
|
/* 64 */ "enum_type ::=",
|
|
/* 65 */ "enum_type ::= COLON int_type",
|
|
/* 66 */ "enum_list ::= error",
|
|
/* 67 */ "enum_list ::= enum_list COMMA enumerator",
|
|
/* 68 */ "opt_enum_list ::=",
|
|
/* 69 */ "enumerator ::= IDENTIFIER",
|
|
/* 70 */ "enumerator ::= IDENTIFIER EQ expr",
|
|
/* 71 */ "mixin_definition ::= mixin_class_definition",
|
|
/* 72 */ "mixin_class_definition ::= MIXIN CLASS IDENTIFIER LBRACE mixin_class_body RBRACE",
|
|
/* 73 */ "mixin_class_body ::=",
|
|
/* 74 */ "mixin_class_body ::= mixin_class_body mixin_class_member",
|
|
/* 75 */ "mixin_class_member ::= declarator",
|
|
/* 76 */ "mixin_class_member ::= enum_def",
|
|
/* 77 */ "mixin_class_member ::= struct_def",
|
|
/* 78 */ "mixin_class_member ::= states_def",
|
|
/* 79 */ "mixin_class_member ::= default_def",
|
|
/* 80 */ "mixin_class_member ::= const_def",
|
|
/* 81 */ "mixin_class_member ::= property_def",
|
|
/* 82 */ "mixin_class_member ::= flag_def",
|
|
/* 83 */ "mixin_class_member ::= staticarray_statement",
|
|
/* 84 */ "states_def ::= STATES states_opts scanner_mode LBRACE states_body RBRACE",
|
|
/* 85 */ "states_opts ::=",
|
|
/* 86 */ "states_opts ::= LPAREN states_opt RPAREN",
|
|
/* 87 */ "states_opt ::= IDENTIFIER",
|
|
/* 88 */ "states_opt ::= states_opt COMMA IDENTIFIER",
|
|
/* 89 */ "scanner_mode ::=",
|
|
/* 90 */ "states_body ::=",
|
|
/* 91 */ "states_body ::= error",
|
|
/* 92 */ "states_body ::= states_body state_line",
|
|
/* 93 */ "states_body ::= states_body state_label",
|
|
/* 94 */ "states_body ::= states_body state_flow",
|
|
/* 95 */ "state_label ::= NWS COLON",
|
|
/* 96 */ "state_flow_type ::= STOP",
|
|
/* 97 */ "state_flow_type ::= WAIT",
|
|
/* 98 */ "state_flow_type ::= FAIL",
|
|
/* 99 */ "state_flow_type ::= LOOP",
|
|
/* 100 */ "state_flow_type ::= GOTO dottable_id state_goto_offset",
|
|
/* 101 */ "state_flow_type ::= GOTO IDENTIFIER SCOPE dottable_id state_goto_offset",
|
|
/* 102 */ "state_flow_type ::= GOTO SUPER SCOPE dottable_id state_goto_offset",
|
|
/* 103 */ "state_goto_offset ::=",
|
|
/* 104 */ "state_goto_offset ::= ADD expr",
|
|
/* 105 */ "state_line ::= NWS NWS expr state_opts state_action",
|
|
/* 106 */ "state_opts ::=",
|
|
/* 107 */ "state_opts ::= state_opts BRIGHT",
|
|
/* 108 */ "state_opts ::= state_opts FAST",
|
|
/* 109 */ "state_opts ::= state_opts SLOW",
|
|
/* 110 */ "state_opts ::= state_opts NODELAY",
|
|
/* 111 */ "state_opts ::= state_opts CANRAISE",
|
|
/* 112 */ "state_opts ::= state_opts OFFSET LPAREN expr COMMA expr RPAREN",
|
|
/* 113 */ "state_opts ::= state_opts LIGHT LPAREN light_list RPAREN",
|
|
/* 114 */ "light_list ::= STRCONST",
|
|
/* 115 */ "light_list ::= light_list COMMA STRCONST",
|
|
/* 116 */ "state_action ::= LBRACE statement_list scanner_mode RBRACE",
|
|
/* 117 */ "state_action ::= LBRACE scanner_mode RBRACE",
|
|
/* 118 */ "state_action ::= LBRACE error scanner_mode RBRACE",
|
|
/* 119 */ "state_action ::= state_call scanner_mode SEMICOLON",
|
|
/* 120 */ "state_call ::=",
|
|
/* 121 */ "state_call ::= IDENTIFIER state_call_params",
|
|
/* 122 */ "state_call_params ::=",
|
|
/* 123 */ "state_call_params ::= LPAREN func_expr_list RPAREN",
|
|
/* 124 */ "default_def ::= DEFAULT LBRACE RBRACE",
|
|
/* 125 */ "default_def ::= DEFAULT LBRACE default_statement_list RBRACE",
|
|
/* 126 */ "default_def ::= DEFAULT LBRACE error RBRACE",
|
|
/* 127 */ "default_statement_list ::= default_statement",
|
|
/* 128 */ "default_statement_list ::= default_statement_list default_statement",
|
|
/* 129 */ "default_statement ::= SEMICOLON",
|
|
/* 130 */ "default_statement ::= error SEMICOLON",
|
|
/* 131 */ "default_statement ::= property_statement",
|
|
/* 132 */ "default_statement ::= flag_statement",
|
|
/* 133 */ "flag_statement ::= ADD dottable_id",
|
|
/* 134 */ "flag_statement ::= SUB dottable_id",
|
|
/* 135 */ "property_statement ::= dottable_id expr_list SEMICOLON",
|
|
/* 136 */ "property_statement ::= dottable_id SEMICOLON",
|
|
/* 137 */ "int_type ::= SBYTE",
|
|
/* 138 */ "int_type ::= BYTE",
|
|
/* 139 */ "int_type ::= SHORT",
|
|
/* 140 */ "int_type ::= USHORT",
|
|
/* 141 */ "int_type ::= INT",
|
|
/* 142 */ "int_type ::= UINT",
|
|
/* 143 */ "type_name1 ::= BOOL",
|
|
/* 144 */ "type_name1 ::= FLOAT",
|
|
/* 145 */ "type_name1 ::= DOUBLE",
|
|
/* 146 */ "type_name1 ::= VECTOR2",
|
|
/* 147 */ "type_name1 ::= VECTOR3",
|
|
/* 148 */ "type_name1 ::= VECTOR4",
|
|
/* 149 */ "type_name1 ::= NAME",
|
|
/* 150 */ "type_name1 ::= SOUND",
|
|
/* 151 */ "type_name1 ::= STATE",
|
|
/* 152 */ "type_name1 ::= COLOR",
|
|
/* 153 */ "type_name1 ::= LET",
|
|
/* 154 */ "type_name ::= type_name1",
|
|
/* 155 */ "type_name ::= IDENTIFIER",
|
|
/* 156 */ "type_name ::= ATSIGN IDENTIFIER",
|
|
/* 157 */ "type_name ::= READONLY LT IDENTIFIER GT",
|
|
/* 158 */ "type_name ::= READONLY LT ATSIGN IDENTIFIER GT",
|
|
/* 159 */ "type_name ::= DOT dottable_id",
|
|
/* 160 */ "aggregate_type ::= MAP LT type_or_array COMMA type_or_array GT",
|
|
/* 161 */ "aggregate_type ::= MAPITERATOR LT type_or_array COMMA type_or_array GT",
|
|
/* 162 */ "aggregate_type ::= ARRAY LT type_or_array GT",
|
|
/* 163 */ "aggregate_type ::= CLASS class_restrictor",
|
|
/* 164 */ "class_restrictor ::=",
|
|
/* 165 */ "class_restrictor ::= LT dottable_id GT",
|
|
/* 166 */ "type ::= type_name",
|
|
/* 167 */ "type ::= aggregate_type",
|
|
/* 168 */ "type_or_array ::= type array_size",
|
|
/* 169 */ "type_list ::= type_list COMMA type_or_array",
|
|
/* 170 */ "type_list_or_void ::= VOID",
|
|
/* 171 */ "array_size_expr ::= LBRACKET opt_expr RBRACKET",
|
|
/* 172 */ "array_size ::= array_size array_size_expr",
|
|
/* 173 */ "declarator ::= decl_flags type_list_or_void variables_or_function",
|
|
/* 174 */ "variables_or_function ::= IDENTIFIER LPAREN func_params RPAREN func_const opt_func_body",
|
|
/* 175 */ "variables_or_function ::= variable_list SEMICOLON",
|
|
/* 176 */ "variables_or_function ::= error SEMICOLON",
|
|
/* 177 */ "variable_name ::= IDENTIFIER",
|
|
/* 178 */ "variable_name ::= IDENTIFIER array_size",
|
|
/* 179 */ "variable_list ::= variable_list COMMA variable_name",
|
|
/* 180 */ "decl_flags ::=",
|
|
/* 181 */ "decl_flags ::= decl_flags decl_flag",
|
|
/* 182 */ "decl_flags ::= decl_flags ACTION states_opts",
|
|
/* 183 */ "opt_deprecation_message ::=",
|
|
/* 184 */ "opt_deprecation_message ::= COMMA STRCONST",
|
|
/* 185 */ "decl_flags ::= decl_flags DEPRECATED LPAREN STRCONST opt_deprecation_message RPAREN",
|
|
/* 186 */ "decl_flags ::= decl_flags VERSION LPAREN STRCONST RPAREN",
|
|
/* 187 */ "decl_flag ::= NATIVE",
|
|
/* 188 */ "decl_flag ::= STATIC",
|
|
/* 189 */ "decl_flag ::= PRIVATE",
|
|
/* 190 */ "decl_flag ::= PROTECTED",
|
|
/* 191 */ "decl_flag ::= LATENT",
|
|
/* 192 */ "decl_flag ::= FINAL",
|
|
/* 193 */ "decl_flag ::= META",
|
|
/* 194 */ "decl_flag ::= TRANSIENT",
|
|
/* 195 */ "decl_flag ::= READONLY",
|
|
/* 196 */ "decl_flag ::= INTERNAL",
|
|
/* 197 */ "decl_flag ::= VIRTUAL",
|
|
/* 198 */ "decl_flag ::= OVERRIDE",
|
|
/* 199 */ "decl_flag ::= ABSTRACT",
|
|
/* 200 */ "decl_flag ::= VARARG",
|
|
/* 201 */ "decl_flag ::= UI",
|
|
/* 202 */ "decl_flag ::= PLAY",
|
|
/* 203 */ "decl_flag ::= CLEARSCOPE",
|
|
/* 204 */ "decl_flag ::= VIRTUALSCOPE",
|
|
/* 205 */ "func_const ::=",
|
|
/* 206 */ "func_const ::= CONST",
|
|
/* 207 */ "opt_func_body ::= SEMICOLON",
|
|
/* 208 */ "func_params ::=",
|
|
/* 209 */ "func_params ::= VOID",
|
|
/* 210 */ "func_params ::= func_param_list COMMA ELLIPSIS",
|
|
/* 211 */ "func_param_list ::= func_param_list COMMA func_param",
|
|
/* 212 */ "func_param ::= func_param_flags type IDENTIFIER",
|
|
/* 213 */ "func_param ::= func_param_flags type IDENTIFIER EQ expr",
|
|
/* 214 */ "func_param_flags ::=",
|
|
/* 215 */ "func_param_flags ::= func_param_flags IN",
|
|
/* 216 */ "func_param_flags ::= func_param_flags OUT",
|
|
/* 217 */ "func_param_flags ::= func_param_flags OPTIONAL",
|
|
/* 218 */ "primary ::= IDENTIFIER",
|
|
/* 219 */ "primary ::= SUPER",
|
|
/* 220 */ "primary ::= constant",
|
|
/* 221 */ "primary ::= LPAREN expr COMMA expr COMMA expr COMMA expr RPAREN",
|
|
/* 222 */ "primary ::= LPAREN expr COMMA expr COMMA expr RPAREN",
|
|
/* 223 */ "primary ::= LPAREN expr COMMA expr RPAREN",
|
|
/* 224 */ "primary ::= LPAREN expr RPAREN",
|
|
/* 225 */ "primary ::= primary LPAREN func_expr_list RPAREN",
|
|
/* 226 */ "primary ::= LPAREN CLASS LT IDENTIFIER GT RPAREN LPAREN func_expr_list RPAREN",
|
|
/* 227 */ "primary ::= primary LBRACKET expr RBRACKET",
|
|
/* 228 */ "primary ::= primary DOT IDENTIFIER",
|
|
/* 229 */ "primary ::= primary ADDADD",
|
|
/* 230 */ "primary ::= primary SUBSUB",
|
|
/* 231 */ "unary_expr ::= SUB unary_expr",
|
|
/* 232 */ "unary_expr ::= ADD unary_expr",
|
|
/* 233 */ "unary_expr ::= SUBSUB unary_expr",
|
|
/* 234 */ "unary_expr ::= ADDADD unary_expr",
|
|
/* 235 */ "unary_expr ::= TILDE unary_expr",
|
|
/* 236 */ "unary_expr ::= BANG unary_expr",
|
|
/* 237 */ "unary_expr ::= SIZEOF unary_expr",
|
|
/* 238 */ "unary_expr ::= ALIGNOF unary_expr",
|
|
/* 239 */ "expr ::= expr ADD expr",
|
|
/* 240 */ "expr ::= expr SUB expr",
|
|
/* 241 */ "expr ::= expr MUL expr",
|
|
/* 242 */ "expr ::= expr DIV expr",
|
|
/* 243 */ "expr ::= expr MOD expr",
|
|
/* 244 */ "expr ::= expr POW expr",
|
|
/* 245 */ "expr ::= expr CROSSPROD expr",
|
|
/* 246 */ "expr ::= expr DOTPROD expr",
|
|
/* 247 */ "expr ::= expr LSH expr",
|
|
/* 248 */ "expr ::= expr RSH expr",
|
|
/* 249 */ "expr ::= expr URSH expr",
|
|
/* 250 */ "expr ::= expr DOTDOT expr",
|
|
/* 251 */ "expr ::= expr LT expr",
|
|
/* 252 */ "expr ::= expr GT expr",
|
|
/* 253 */ "expr ::= expr LTEQ expr",
|
|
/* 254 */ "expr ::= expr GTEQ expr",
|
|
/* 255 */ "expr ::= expr LTGTEQ expr",
|
|
/* 256 */ "expr ::= expr IS expr",
|
|
/* 257 */ "expr ::= expr EQEQ expr",
|
|
/* 258 */ "expr ::= expr NEQ expr",
|
|
/* 259 */ "expr ::= expr APPROXEQ expr",
|
|
/* 260 */ "expr ::= expr AND expr",
|
|
/* 261 */ "expr ::= expr XOR expr",
|
|
/* 262 */ "expr ::= expr OR expr",
|
|
/* 263 */ "expr ::= expr ANDAND expr",
|
|
/* 264 */ "expr ::= expr OROR expr",
|
|
/* 265 */ "expr ::= expr EQ expr",
|
|
/* 266 */ "expr ::= expr ADDEQ expr",
|
|
/* 267 */ "expr ::= expr SUBEQ expr",
|
|
/* 268 */ "expr ::= expr MULEQ expr",
|
|
/* 269 */ "expr ::= expr DIVEQ expr",
|
|
/* 270 */ "expr ::= expr MODEQ expr",
|
|
/* 271 */ "expr ::= expr LSHEQ expr",
|
|
/* 272 */ "expr ::= expr RSHEQ expr",
|
|
/* 273 */ "expr ::= expr URSHEQ expr",
|
|
/* 274 */ "expr ::= expr ANDEQ expr",
|
|
/* 275 */ "expr ::= expr OREQ expr",
|
|
/* 276 */ "expr ::= expr XOREQ expr",
|
|
/* 277 */ "expr ::= expr SCOPE expr",
|
|
/* 278 */ "expr ::= expr QUESTION expr COLON expr",
|
|
/* 279 */ "expr_list ::= expr_list COMMA expr",
|
|
/* 280 */ "func_expr_list ::= func_expr_list COMMA func_expr_item",
|
|
/* 281 */ "func_expr_item ::=",
|
|
/* 282 */ "named_expr ::= IDENTIFIER COLON expr",
|
|
/* 283 */ "named_expr ::= expr",
|
|
/* 284 */ "string_constant ::= STRCONST",
|
|
/* 285 */ "string_constant ::= string_constant STRCONST",
|
|
/* 286 */ "constant ::= INTCONST",
|
|
/* 287 */ "constant ::= UINTCONST",
|
|
/* 288 */ "constant ::= FLOATCONST",
|
|
/* 289 */ "constant ::= NAMECONST",
|
|
/* 290 */ "constant ::= FALSE",
|
|
/* 291 */ "constant ::= TRUE",
|
|
/* 292 */ "constant ::= NULLPTR",
|
|
/* 293 */ "statement ::= SEMICOLON",
|
|
/* 294 */ "statement ::= labeled_statement",
|
|
/* 295 */ "statement ::= compound_statement",
|
|
/* 296 */ "statement ::= expression_statement SEMICOLON",
|
|
/* 297 */ "statement ::= assign_statement SEMICOLON",
|
|
/* 298 */ "statement ::= assign_decl_statement SEMICOLON",
|
|
/* 299 */ "statement ::= local_var SEMICOLON",
|
|
/* 300 */ "statement ::= error SEMICOLON",
|
|
/* 301 */ "statement ::= staticarray_statement",
|
|
/* 302 */ "staticarray_statement ::= STATICCONST type IDENTIFIER LBRACKET RBRACKET EQ LBRACE expr_list RBRACE SEMICOLON",
|
|
/* 303 */ "staticarray_statement ::= STATICCONST type LBRACKET RBRACKET IDENTIFIER EQ LBRACE expr_list RBRACE SEMICOLON",
|
|
/* 304 */ "jump_statement ::= CONTINUE SEMICOLON",
|
|
/* 305 */ "jump_statement ::= BREAK SEMICOLON",
|
|
/* 306 */ "jump_statement ::= RETURN SEMICOLON",
|
|
/* 307 */ "jump_statement ::= RETURN expr_list SEMICOLON",
|
|
/* 308 */ "compound_statement ::= LBRACE RBRACE",
|
|
/* 309 */ "compound_statement ::= LBRACE statement_list RBRACE",
|
|
/* 310 */ "compound_statement ::= LBRACE error RBRACE",
|
|
/* 311 */ "statement_list ::= statement",
|
|
/* 312 */ "statement_list ::= statement_list statement",
|
|
/* 313 */ "expression_statement ::= expr",
|
|
/* 314 */ "iteration_statement ::= while_or_until LPAREN expr RPAREN statement",
|
|
/* 315 */ "iteration_statement ::= DO statement while_or_until LPAREN expr RPAREN",
|
|
/* 316 */ "iteration_statement ::= FOR LPAREN for_init SEMICOLON opt_expr SEMICOLON for_bump RPAREN statement",
|
|
/* 317 */ "array_iteration_statement ::= FOREACH LPAREN variable_name COLON expr RPAREN statement",
|
|
/* 318 */ "while_or_until ::= WHILE",
|
|
/* 319 */ "while_or_until ::= UNTIL",
|
|
/* 320 */ "for_init ::= local_var",
|
|
/* 321 */ "for_init ::= for_bump",
|
|
/* 322 */ "for_bump ::=",
|
|
/* 323 */ "for_bump ::= expression_statement",
|
|
/* 324 */ "for_bump ::= for_bump COMMA expression_statement",
|
|
/* 325 */ "selection_statement ::= if_front",
|
|
/* 326 */ "selection_statement ::= if_front ELSE statement",
|
|
/* 327 */ "if_front ::= IF LPAREN expr RPAREN statement",
|
|
/* 328 */ "selection_statement ::= SWITCH LPAREN expr RPAREN statement",
|
|
/* 329 */ "labeled_statement ::= CASE expr COLON",
|
|
/* 330 */ "labeled_statement ::= DEFAULT COLON",
|
|
/* 331 */ "assign_statement ::= LBRACKET expr_list RBRACKET EQ expr",
|
|
/* 332 */ "assign_decl_statement ::= LET LBRACKET identifier_list RBRACKET EQ expr",
|
|
/* 333 */ "local_var ::= type variable_list_with_init",
|
|
/* 334 */ "var_init ::= IDENTIFIER",
|
|
/* 335 */ "var_init ::= IDENTIFIER array_size",
|
|
/* 336 */ "var_init ::= IDENTIFIER EQ expr",
|
|
/* 337 */ "var_init ::= IDENTIFIER EQ LBRACE expr_list RBRACE",
|
|
/* 338 */ "var_init ::= IDENTIFIER array_size EQ LBRACE expr_list RBRACE",
|
|
/* 339 */ "var_init ::= IDENTIFIER EQ LBRACE error RBRACE",
|
|
/* 340 */ "variable_list_with_init ::= variable_list_with_init COMMA var_init",
|
|
/* 341 */ "translation_unit ::= translation_unit EOF",
|
|
/* 342 */ "opt_semicolon ::=",
|
|
/* 343 */ "opt_semicolon ::= SEMICOLON",
|
|
/* 344 */ "opt_comma ::=",
|
|
/* 345 */ "opt_comma ::= COMMA",
|
|
/* 346 */ "opt_expr ::= expr",
|
|
/* 347 */ "opt_struct_body ::= struct_body",
|
|
/* 348 */ "struct_body ::= struct_member",
|
|
/* 349 */ "enum_list ::= enumerator",
|
|
/* 350 */ "opt_enum_list ::= enum_list opt_comma",
|
|
/* 351 */ "state_flow ::= state_flow_type scanner_mode SEMICOLON",
|
|
/* 352 */ "type_name1 ::= int_type",
|
|
/* 353 */ "type_or_array ::= type",
|
|
/* 354 */ "type_list ::= type_or_array",
|
|
/* 355 */ "type_list_or_void ::= type_list",
|
|
/* 356 */ "array_size ::= array_size_expr",
|
|
/* 357 */ "variable_list ::= variable_name",
|
|
/* 358 */ "opt_func_body ::= function_body",
|
|
/* 359 */ "func_params ::= func_param_list",
|
|
/* 360 */ "func_param_list ::= func_param",
|
|
/* 361 */ "primary ::= LPAREN error RPAREN",
|
|
/* 362 */ "unary_expr ::= primary",
|
|
/* 363 */ "expr ::= unary_expr",
|
|
/* 364 */ "expr_list ::= expr",
|
|
/* 365 */ "func_expr_list ::= func_expr_item",
|
|
/* 366 */ "func_expr_item ::= named_expr",
|
|
/* 367 */ "constant ::= string_constant",
|
|
/* 368 */ "function_body ::= compound_statement",
|
|
/* 369 */ "statement ::= selection_statement",
|
|
/* 370 */ "statement ::= iteration_statement",
|
|
/* 371 */ "statement ::= array_iteration_statement",
|
|
/* 372 */ "statement ::= jump_statement",
|
|
/* 373 */ "variable_list_with_init ::= var_init",
|
|
};
|
|
#endif /* NDEBUG */
|
|
|
|
|
|
#if YYSTACKDEPTH<=0
|
|
/*
|
|
** Try to increase the size of the parser stack. Return the number
|
|
** of errors. Return 0 on success.
|
|
*/
|
|
static int yyGrowStack(yyParser *p){
|
|
int newSize;
|
|
int idx;
|
|
yyStackEntry *pNew;
|
|
|
|
newSize = p->yystksz*2 + 100;
|
|
idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
|
|
if( p->yystack==&p->yystk0 ){
|
|
pNew = (yyStackEntry *)malloc(newSize*sizeof(pNew[0]));
|
|
if( pNew ) pNew[0] = p->yystk0;
|
|
}else{
|
|
pNew = (yyStackEntry *)realloc(p->yystack, newSize*sizeof(pNew[0]));
|
|
}
|
|
if( pNew ){
|
|
p->yystack = pNew;
|
|
p->yytos = &p->yystack[idx];
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
|
|
yyTracePrompt, p->yystksz, newSize);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
p->yystksz = newSize;
|
|
}
|
|
return pNew==0;
|
|
}
|
|
#endif
|
|
|
|
/* Datatype of the argument to the memory allocated passed as the
|
|
** second argument to ZCCParseAlloc() below. This can be changed by
|
|
** putting an appropriate #define in the %include section of the input
|
|
** grammar.
|
|
*/
|
|
#ifndef YYMALLOCARGTYPE
|
|
# define YYMALLOCARGTYPE size_t
|
|
#endif
|
|
|
|
/*
|
|
** This function allocates a new parser.
|
|
** The only argument is a pointer to a function which works like
|
|
** malloc.
|
|
**
|
|
** Inputs:
|
|
** A pointer to the function used to allocate memory.
|
|
**
|
|
** Outputs:
|
|
** A pointer to a parser. This pointer is used in subsequent calls
|
|
** to ZCCParse and ZCCParseFree.
|
|
*/
|
|
void *ZCCParseAlloc(void *(CDECL *mallocProc)(YYMALLOCARGTYPE)){
|
|
yyParser *pParser;
|
|
pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
|
|
if( pParser ){
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
pParser->yyhwm = 0;
|
|
#endif
|
|
#if YYSTACKDEPTH<=0
|
|
pParser->yytos = NULL;
|
|
pParser->yystack = NULL;
|
|
pParser->yystksz = 0;
|
|
if( yyGrowStack(pParser) ){
|
|
pParser->yystack = &pParser->yystk0;
|
|
pParser->yystksz = 1;
|
|
}
|
|
#endif
|
|
#ifndef YYNOERRORRECOVERY
|
|
pParser->yyerrcnt = -1;
|
|
#endif
|
|
pParser->yytos = pParser->yystack;
|
|
pParser->yystack[0].stateno = 0;
|
|
pParser->yystack[0].major = 0;
|
|
}
|
|
return pParser;
|
|
}
|
|
|
|
/* The following function deletes the "minor type" or semantic value
|
|
** associated with a symbol. The symbol can be either a terminal
|
|
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
|
|
** a pointer to the value to be deleted. The code used to do the
|
|
** deletions is derived from the %destructor and/or %token_destructor
|
|
** directives of the input grammar.
|
|
*/
|
|
static void yy_destructor(
|
|
yyParser *yypParser, /* The parser */
|
|
YYCODETYPE yymajor, /* Type code for object to destroy */
|
|
YYMINORTYPE *yypminor /* The object to be destroyed */
|
|
){
|
|
ZCCParseARG_FETCH;
|
|
switch( yymajor ){
|
|
/* Here is inserted the actions which take place when a
|
|
** terminal or non-terminal is destroyed. This can happen
|
|
** when the symbol is popped from the stack during a
|
|
** reduce or during error processing or when a parser is
|
|
** being destroyed before it is finished parsing.
|
|
**
|
|
** Note: during a reduce, the only symbols destroyed are those
|
|
** which appear on the RHS of the rule, but which are *not* used
|
|
** inside the C code.
|
|
*/
|
|
/********* Begin destructor definitions ***************************************/
|
|
/* TERMINAL Destructor */
|
|
case 1: /* EQ */
|
|
case 2: /* MULEQ */
|
|
case 3: /* DIVEQ */
|
|
case 4: /* MODEQ */
|
|
case 5: /* ADDEQ */
|
|
case 6: /* SUBEQ */
|
|
case 7: /* LSHEQ */
|
|
case 8: /* RSHEQ */
|
|
case 9: /* ANDEQ */
|
|
case 10: /* OREQ */
|
|
case 11: /* XOREQ */
|
|
case 12: /* URSHEQ */
|
|
case 13: /* QUESTION */
|
|
case 14: /* COLON */
|
|
case 15: /* OROR */
|
|
case 16: /* ANDAND */
|
|
case 17: /* EQEQ */
|
|
case 18: /* NEQ */
|
|
case 19: /* APPROXEQ */
|
|
case 20: /* LT */
|
|
case 21: /* GT */
|
|
case 22: /* LTEQ */
|
|
case 23: /* GTEQ */
|
|
case 24: /* LTGTEQ */
|
|
case 25: /* IS */
|
|
case 26: /* DOTDOT */
|
|
case 27: /* OR */
|
|
case 28: /* XOR */
|
|
case 29: /* AND */
|
|
case 30: /* LSH */
|
|
case 31: /* RSH */
|
|
case 32: /* URSH */
|
|
case 33: /* SUB */
|
|
case 34: /* ADD */
|
|
case 35: /* MUL */
|
|
case 36: /* DIV */
|
|
case 37: /* MOD */
|
|
case 38: /* CROSSPROD */
|
|
case 39: /* DOTPROD */
|
|
case 40: /* POW */
|
|
case 41: /* UNARY */
|
|
case 42: /* ADDADD */
|
|
case 43: /* SUBSUB */
|
|
case 44: /* DOT */
|
|
case 45: /* LPAREN */
|
|
case 46: /* LBRACKET */
|
|
case 47: /* SCOPE */
|
|
case 48: /* EOF */
|
|
case 49: /* SEMICOLON */
|
|
case 50: /* COMMA */
|
|
case 51: /* INCLUDE */
|
|
case 52: /* EXTEND */
|
|
case 53: /* CLASS */
|
|
case 54: /* IDENTIFIER */
|
|
case 55: /* ABSTRACT */
|
|
case 56: /* NATIVE */
|
|
case 57: /* UI */
|
|
case 58: /* PLAY */
|
|
case 59: /* REPLACES */
|
|
case 60: /* VERSION */
|
|
case 61: /* STRCONST */
|
|
case 62: /* RPAREN */
|
|
case 63: /* DEFAULT */
|
|
case 64: /* COLOR */
|
|
case 65: /* LBRACE */
|
|
case 66: /* RBRACE */
|
|
case 67: /* MIXIN */
|
|
case 68: /* PROPERTY */
|
|
case 69: /* FLAGDEF */
|
|
case 70: /* INTCONST */
|
|
case 71: /* STRUCT */
|
|
case 72: /* CLEARSCOPE */
|
|
case 73: /* CONST */
|
|
case 74: /* ENUM */
|
|
case 75: /* STATES */
|
|
case 76: /* NWS */
|
|
case 77: /* STOP */
|
|
case 78: /* WAIT */
|
|
case 79: /* FAIL */
|
|
case 80: /* LOOP */
|
|
case 81: /* GOTO */
|
|
case 82: /* SUPER */
|
|
case 83: /* BRIGHT */
|
|
case 84: /* FAST */
|
|
case 85: /* SLOW */
|
|
case 86: /* NODELAY */
|
|
case 87: /* CANRAISE */
|
|
case 88: /* OFFSET */
|
|
case 89: /* LIGHT */
|
|
case 90: /* SBYTE */
|
|
case 91: /* BYTE */
|
|
case 92: /* SHORT */
|
|
case 93: /* USHORT */
|
|
case 94: /* INT */
|
|
case 95: /* UINT */
|
|
case 96: /* BOOL */
|
|
case 97: /* FLOAT */
|
|
case 98: /* DOUBLE */
|
|
case 99: /* VECTOR2 */
|
|
case 100: /* VECTOR3 */
|
|
case 101: /* VECTOR4 */
|
|
case 102: /* NAME */
|
|
case 103: /* SOUND */
|
|
case 104: /* STATE */
|
|
case 105: /* LET */
|
|
case 106: /* ATSIGN */
|
|
case 107: /* READONLY */
|
|
case 108: /* STRING */
|
|
case 109: /* MAP */
|
|
case 110: /* MAPITERATOR */
|
|
case 111: /* ARRAY */
|
|
case 112: /* VOID */
|
|
case 113: /* UINT8 */
|
|
case 114: /* INT8 */
|
|
case 115: /* UINT16 */
|
|
case 116: /* INT16 */
|
|
case 117: /* RBRACKET */
|
|
case 118: /* ACTION */
|
|
case 119: /* DEPRECATED */
|
|
case 120: /* STATIC */
|
|
case 121: /* PRIVATE */
|
|
case 122: /* PROTECTED */
|
|
case 123: /* LATENT */
|
|
case 124: /* FINAL */
|
|
case 125: /* META */
|
|
case 126: /* TRANSIENT */
|
|
case 127: /* INTERNAL */
|
|
case 128: /* VIRTUAL */
|
|
case 129: /* OVERRIDE */
|
|
case 130: /* VARARG */
|
|
case 131: /* VIRTUALSCOPE */
|
|
case 132: /* ELLIPSIS */
|
|
case 133: /* IN */
|
|
case 134: /* OUT */
|
|
case 135: /* OPTIONAL */
|
|
case 136: /* TILDE */
|
|
case 137: /* BANG */
|
|
case 138: /* SIZEOF */
|
|
case 139: /* ALIGNOF */
|
|
case 140: /* UINTCONST */
|
|
case 141: /* FLOATCONST */
|
|
case 142: /* NAMECONST */
|
|
case 143: /* FALSE */
|
|
case 144: /* TRUE */
|
|
case 145: /* NULLPTR */
|
|
case 146: /* STATICCONST */
|
|
case 147: /* CONTINUE */
|
|
case 148: /* BREAK */
|
|
case 149: /* RETURN */
|
|
case 150: /* DO */
|
|
case 151: /* FOR */
|
|
case 152: /* FOREACH */
|
|
case 153: /* WHILE */
|
|
case 154: /* UNTIL */
|
|
case 155: /* IF */
|
|
case 156: /* ELSE */
|
|
case 157: /* SWITCH */
|
|
case 158: /* CASE */
|
|
{
|
|
#line 117 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
|
|
#line 1957 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
/********* End destructor definitions *****************************************/
|
|
default: break; /* If no destructor action specified: do nothing */
|
|
}
|
|
}
|
|
|
|
/*
|
|
** Pop the parser's stack once.
|
|
**
|
|
** If there is a destructor routine associated with the token which
|
|
** is popped from the stack, then call it.
|
|
*/
|
|
static void yy_pop_parser_stack(yyParser *pParser){
|
|
yyStackEntry *yytos;
|
|
assert( pParser->yytos!=0 );
|
|
assert( pParser->yytos > pParser->yystack );
|
|
yytos = pParser->yytos--;
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sPopping %s\n",
|
|
yyTracePrompt,
|
|
yyTokenName[yytos->major]);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
yy_destructor(pParser, yytos->major, &yytos->minor);
|
|
}
|
|
|
|
/*
|
|
** Deallocate and destroy a parser. Destructors are called for
|
|
** all stack elements before shutting the parser down.
|
|
**
|
|
** If the YYPARSEFREENEVERNULL macro exists (for example because it
|
|
** is defined in a %include section of the input grammar) then it is
|
|
** assumed that the input pointer is never NULL.
|
|
*/
|
|
void ZCCParseFree(
|
|
void *p, /* The parser to be deleted */
|
|
void (CDECL *freeProc)(void*) /* Function used to reclaim memory */
|
|
){
|
|
yyParser *pParser = (yyParser*)p;
|
|
#ifndef YYPARSEFREENEVERNULL
|
|
if( pParser==0 ) return;
|
|
#endif
|
|
while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
|
|
#if YYSTACKDEPTH<=0
|
|
if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
|
|
#endif
|
|
(*freeProc)((void*)pParser);
|
|
}
|
|
|
|
/*
|
|
** Return the peak depth of the stack for a parser.
|
|
*/
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
int ZCCParseStackPeak(void *p){
|
|
yyParser *pParser = (yyParser*)p;
|
|
return pParser->yyhwm;
|
|
}
|
|
#endif
|
|
|
|
/*
|
|
** Find the appropriate action for a parser given the terminal
|
|
** look-ahead token iLookAhead.
|
|
*/
|
|
static unsigned int yy_find_shift_action(
|
|
yyParser *pParser, /* The parser */
|
|
YYCODETYPE iLookAhead /* The look-ahead token */
|
|
){
|
|
int i;
|
|
int stateno = pParser->yytos->stateno;
|
|
|
|
if( stateno>=YY_MIN_REDUCE ) return stateno;
|
|
assert( stateno <= YY_SHIFT_COUNT );
|
|
do{
|
|
i = yy_shift_ofst[stateno];
|
|
assert( iLookAhead!=YYNOCODE );
|
|
i += iLookAhead;
|
|
if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
|
|
#ifdef YYFALLBACK
|
|
YYCODETYPE iFallback; /* Fallback token */
|
|
if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
|
|
&& (iFallback = yyFallback[iLookAhead])!=0 ){
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
|
|
yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
|
|
iLookAhead = iFallback;
|
|
continue;
|
|
}
|
|
#endif
|
|
#ifdef YYWILDCARD
|
|
{
|
|
int j = i - iLookAhead + YYWILDCARD;
|
|
if(
|
|
#if YY_SHIFT_MIN+YYWILDCARD<0
|
|
j>=0 &&
|
|
#endif
|
|
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
|
|
j<YY_ACTTAB_COUNT &&
|
|
#endif
|
|
yy_lookahead[j]==YYWILDCARD && iLookAhead>0
|
|
){
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
|
|
yyTracePrompt, yyTokenName[iLookAhead],
|
|
yyTokenName[YYWILDCARD]);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif /* NDEBUG */
|
|
return yy_action[j];
|
|
}
|
|
}
|
|
#endif /* YYWILDCARD */
|
|
return yy_default[stateno];
|
|
}else{
|
|
return yy_action[i];
|
|
}
|
|
}while(1);
|
|
}
|
|
|
|
/*
|
|
** Find the appropriate action for a parser given the non-terminal
|
|
** look-ahead token iLookAhead.
|
|
*/
|
|
static int yy_find_reduce_action(
|
|
int stateno, /* Current state number */
|
|
YYCODETYPE iLookAhead /* The look-ahead token */
|
|
){
|
|
int i;
|
|
#ifdef YYERRORSYMBOL
|
|
if( stateno>YY_REDUCE_COUNT ){
|
|
return yy_default[stateno];
|
|
}
|
|
#else
|
|
assert( stateno<=YY_REDUCE_COUNT );
|
|
#endif
|
|
i = yy_reduce_ofst[stateno];
|
|
assert( i!=YY_REDUCE_USE_DFLT );
|
|
assert( iLookAhead!=YYNOCODE );
|
|
i += iLookAhead;
|
|
#ifdef YYERRORSYMBOL
|
|
if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
|
|
return yy_default[stateno];
|
|
}
|
|
#else
|
|
assert( i>=0 && i<YY_ACTTAB_COUNT );
|
|
assert( yy_lookahead[i]==iLookAhead );
|
|
#endif
|
|
return yy_action[i];
|
|
}
|
|
|
|
/*
|
|
** The following routine is called if the stack overflows.
|
|
*/
|
|
static void yyStackOverflow(yyParser *yypParser){
|
|
ZCCParseARG_FETCH;
|
|
yypParser->yytos--;
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
|
|
/* Here code is inserted which will execute if the parser
|
|
** stack every overflows */
|
|
/******** Begin %stack_overflow code ******************************************/
|
|
/******** End %stack_overflow code ********************************************/
|
|
ZCCParseARG_STORE; /* Suppress warning about unused %extra_argument var */
|
|
}
|
|
|
|
/*
|
|
** Print tracing information for a SHIFT action
|
|
*/
|
|
#ifndef NDEBUG
|
|
static void yyTraceShift(yyParser *yypParser, int yyNewState){
|
|
if( yyTraceFILE ){
|
|
if( yyNewState<YYNSTATE ){
|
|
fprintf(yyTraceFILE,"%sShift '%s', go to state %d\n",
|
|
yyTracePrompt,yyTokenName[yypParser->yytos->major],
|
|
yyNewState);
|
|
}else{
|
|
fprintf(yyTraceFILE,"%sShift '%s'\n",
|
|
yyTracePrompt,yyTokenName[yypParser->yytos->major]);
|
|
}
|
|
fflush(yyTraceFILE);
|
|
}
|
|
}
|
|
#else
|
|
# define yyTraceShift(X,Y)
|
|
#endif
|
|
|
|
/*
|
|
** Perform a shift action.
|
|
*/
|
|
static void yy_shift(
|
|
yyParser *yypParser, /* The parser to be shifted */
|
|
int yyNewState, /* The new state to shift in */
|
|
int yyMajor, /* The major token to shift in */
|
|
ZCCParseTOKENTYPE yyMinor /* The minor token to shift in */
|
|
){
|
|
yyStackEntry *yytos;
|
|
yypParser->yytos++;
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
|
|
yypParser->yyhwm++;
|
|
assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
|
|
}
|
|
#endif
|
|
#if YYSTACKDEPTH>0
|
|
if( yypParser->yytos>=&yypParser->yystack[YYSTACKDEPTH] ){
|
|
yyStackOverflow(yypParser);
|
|
return;
|
|
}
|
|
#else
|
|
if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
|
|
if( yyGrowStack(yypParser) ){
|
|
yyStackOverflow(yypParser);
|
|
return;
|
|
}
|
|
}
|
|
#endif
|
|
if( yyNewState > YY_MAX_SHIFT ){
|
|
yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
|
|
}
|
|
yytos = yypParser->yytos;
|
|
yytos->stateno = (YYACTIONTYPE)yyNewState;
|
|
yytos->major = (YYCODETYPE)yyMajor;
|
|
yytos->minor.yy0 = yyMinor;
|
|
yyTraceShift(yypParser, yyNewState);
|
|
}
|
|
|
|
/* The following table contains information about every rule that
|
|
** is used during the reduce.
|
|
*/
|
|
static const struct {
|
|
YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
|
|
unsigned char nrhs; /* Number of right-hand side symbols in the rule */
|
|
} yyRuleInfo[] = {
|
|
{ 164, 1 },
|
|
{ 165, 0 },
|
|
{ 165, 2 },
|
|
{ 165, 1 },
|
|
{ 166, 1 },
|
|
{ 166, 1 },
|
|
{ 166, 1 },
|
|
{ 166, 1 },
|
|
{ 166, 1 },
|
|
{ 166, 1 },
|
|
{ 175, 0 },
|
|
{ 172, 2 },
|
|
{ 168, 2 },
|
|
{ 178, 3 },
|
|
{ 178, 4 },
|
|
{ 182, 0 },
|
|
{ 182, 2 },
|
|
{ 183, 0 },
|
|
{ 183, 2 },
|
|
{ 183, 2 },
|
|
{ 183, 2 },
|
|
{ 183, 2 },
|
|
{ 183, 3 },
|
|
{ 183, 5 },
|
|
{ 184, 1 },
|
|
{ 184, 3 },
|
|
{ 184, 3 },
|
|
{ 184, 3 },
|
|
{ 181, 3 },
|
|
{ 181, 3 },
|
|
{ 179, 0 },
|
|
{ 179, 2 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 180, 1 },
|
|
{ 185, 3 },
|
|
{ 186, 5 },
|
|
{ 187, 7 },
|
|
{ 194, 1 },
|
|
{ 194, 3 },
|
|
{ 169, 7 },
|
|
{ 169, 7 },
|
|
{ 196, 0 },
|
|
{ 196, 2 },
|
|
{ 196, 2 },
|
|
{ 196, 2 },
|
|
{ 196, 2 },
|
|
{ 196, 5 },
|
|
{ 191, 0 },
|
|
{ 191, 1 },
|
|
{ 192, 2 },
|
|
{ 193, 1 },
|
|
{ 193, 1 },
|
|
{ 193, 1 },
|
|
{ 193, 1 },
|
|
{ 171, 5 },
|
|
{ 170, 7 },
|
|
{ 200, 0 },
|
|
{ 200, 2 },
|
|
{ 197, 1 },
|
|
{ 197, 3 },
|
|
{ 198, 0 },
|
|
{ 199, 1 },
|
|
{ 199, 3 },
|
|
{ 167, 1 },
|
|
{ 202, 6 },
|
|
{ 203, 0 },
|
|
{ 203, 2 },
|
|
{ 204, 1 },
|
|
{ 204, 1 },
|
|
{ 204, 1 },
|
|
{ 204, 1 },
|
|
{ 204, 1 },
|
|
{ 204, 1 },
|
|
{ 204, 1 },
|
|
{ 204, 1 },
|
|
{ 204, 1 },
|
|
{ 188, 6 },
|
|
{ 215, 0 },
|
|
{ 215, 3 },
|
|
{ 195, 1 },
|
|
{ 195, 3 },
|
|
{ 216, 0 },
|
|
{ 205, 0 },
|
|
{ 205, 1 },
|
|
{ 205, 2 },
|
|
{ 205, 2 },
|
|
{ 205, 2 },
|
|
{ 207, 2 },
|
|
{ 209, 1 },
|
|
{ 209, 1 },
|
|
{ 209, 1 },
|
|
{ 209, 1 },
|
|
{ 209, 3 },
|
|
{ 209, 5 },
|
|
{ 209, 5 },
|
|
{ 210, 0 },
|
|
{ 210, 2 },
|
|
{ 206, 5 },
|
|
{ 214, 0 },
|
|
{ 214, 2 },
|
|
{ 214, 2 },
|
|
{ 214, 2 },
|
|
{ 214, 2 },
|
|
{ 214, 2 },
|
|
{ 214, 7 },
|
|
{ 214, 5 },
|
|
{ 217, 1 },
|
|
{ 217, 3 },
|
|
{ 211, 4 },
|
|
{ 211, 3 },
|
|
{ 211, 4 },
|
|
{ 211, 3 },
|
|
{ 212, 0 },
|
|
{ 212, 2 },
|
|
{ 213, 0 },
|
|
{ 213, 3 },
|
|
{ 189, 3 },
|
|
{ 189, 4 },
|
|
{ 189, 4 },
|
|
{ 220, 1 },
|
|
{ 220, 2 },
|
|
{ 221, 1 },
|
|
{ 221, 2 },
|
|
{ 221, 1 },
|
|
{ 221, 1 },
|
|
{ 223, 2 },
|
|
{ 223, 2 },
|
|
{ 222, 3 },
|
|
{ 222, 2 },
|
|
{ 201, 1 },
|
|
{ 201, 1 },
|
|
{ 201, 1 },
|
|
{ 201, 1 },
|
|
{ 201, 1 },
|
|
{ 201, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 226, 1 },
|
|
{ 225, 1 },
|
|
{ 225, 1 },
|
|
{ 225, 2 },
|
|
{ 225, 4 },
|
|
{ 225, 5 },
|
|
{ 225, 2 },
|
|
{ 227, 6 },
|
|
{ 227, 6 },
|
|
{ 227, 4 },
|
|
{ 227, 2 },
|
|
{ 232, 0 },
|
|
{ 232, 3 },
|
|
{ 228, 1 },
|
|
{ 228, 1 },
|
|
{ 231, 2 },
|
|
{ 229, 3 },
|
|
{ 230, 1 },
|
|
{ 234, 3 },
|
|
{ 233, 2 },
|
|
{ 160, 3 },
|
|
{ 235, 6 },
|
|
{ 235, 2 },
|
|
{ 235, 2 },
|
|
{ 240, 1 },
|
|
{ 240, 2 },
|
|
{ 239, 3 },
|
|
{ 236, 0 },
|
|
{ 236, 2 },
|
|
{ 236, 3 },
|
|
{ 242, 0 },
|
|
{ 242, 2 },
|
|
{ 236, 6 },
|
|
{ 236, 5 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 241, 1 },
|
|
{ 238, 0 },
|
|
{ 238, 1 },
|
|
{ 162, 1 },
|
|
{ 237, 0 },
|
|
{ 237, 1 },
|
|
{ 237, 3 },
|
|
{ 243, 3 },
|
|
{ 244, 3 },
|
|
{ 244, 5 },
|
|
{ 245, 0 },
|
|
{ 245, 2 },
|
|
{ 245, 2 },
|
|
{ 245, 2 },
|
|
{ 246, 1 },
|
|
{ 246, 1 },
|
|
{ 246, 1 },
|
|
{ 246, 9 },
|
|
{ 246, 7 },
|
|
{ 246, 5 },
|
|
{ 246, 3 },
|
|
{ 246, 4 },
|
|
{ 246, 9 },
|
|
{ 246, 4 },
|
|
{ 246, 3 },
|
|
{ 246, 2 },
|
|
{ 246, 2 },
|
|
{ 247, 2 },
|
|
{ 247, 2 },
|
|
{ 247, 2 },
|
|
{ 247, 2 },
|
|
{ 247, 2 },
|
|
{ 247, 2 },
|
|
{ 247, 2 },
|
|
{ 247, 2 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 3 },
|
|
{ 176, 5 },
|
|
{ 224, 3 },
|
|
{ 219, 3 },
|
|
{ 249, 0 },
|
|
{ 250, 3 },
|
|
{ 250, 1 },
|
|
{ 177, 1 },
|
|
{ 177, 2 },
|
|
{ 248, 1 },
|
|
{ 248, 1 },
|
|
{ 248, 1 },
|
|
{ 248, 1 },
|
|
{ 248, 1 },
|
|
{ 248, 1 },
|
|
{ 248, 1 },
|
|
{ 252, 1 },
|
|
{ 252, 1 },
|
|
{ 252, 1 },
|
|
{ 252, 2 },
|
|
{ 252, 2 },
|
|
{ 252, 2 },
|
|
{ 252, 2 },
|
|
{ 252, 2 },
|
|
{ 252, 1 },
|
|
{ 190, 10 },
|
|
{ 190, 10 },
|
|
{ 258, 2 },
|
|
{ 258, 2 },
|
|
{ 258, 2 },
|
|
{ 258, 3 },
|
|
{ 251, 2 },
|
|
{ 251, 3 },
|
|
{ 251, 3 },
|
|
{ 218, 1 },
|
|
{ 218, 2 },
|
|
{ 254, 1 },
|
|
{ 256, 5 },
|
|
{ 256, 6 },
|
|
{ 256, 9 },
|
|
{ 257, 7 },
|
|
{ 262, 1 },
|
|
{ 262, 1 },
|
|
{ 263, 1 },
|
|
{ 263, 1 },
|
|
{ 264, 0 },
|
|
{ 264, 1 },
|
|
{ 264, 3 },
|
|
{ 255, 1 },
|
|
{ 255, 3 },
|
|
{ 265, 5 },
|
|
{ 255, 5 },
|
|
{ 253, 3 },
|
|
{ 253, 2 },
|
|
{ 259, 5 },
|
|
{ 260, 6 },
|
|
{ 261, 2 },
|
|
{ 267, 1 },
|
|
{ 267, 2 },
|
|
{ 267, 3 },
|
|
{ 267, 5 },
|
|
{ 267, 6 },
|
|
{ 267, 5 },
|
|
{ 266, 3 },
|
|
{ 165, 2 },
|
|
{ 173, 0 },
|
|
{ 173, 1 },
|
|
{ 174, 0 },
|
|
{ 174, 1 },
|
|
{ 175, 1 },
|
|
{ 191, 1 },
|
|
{ 192, 1 },
|
|
{ 197, 1 },
|
|
{ 198, 2 },
|
|
{ 208, 3 },
|
|
{ 226, 1 },
|
|
{ 231, 1 },
|
|
{ 229, 1 },
|
|
{ 230, 1 },
|
|
{ 233, 1 },
|
|
{ 239, 1 },
|
|
{ 162, 1 },
|
|
{ 237, 1 },
|
|
{ 243, 1 },
|
|
{ 246, 3 },
|
|
{ 247, 1 },
|
|
{ 176, 1 },
|
|
{ 224, 1 },
|
|
{ 219, 1 },
|
|
{ 249, 1 },
|
|
{ 248, 1 },
|
|
{ 163, 1 },
|
|
{ 252, 1 },
|
|
{ 252, 1 },
|
|
{ 252, 1 },
|
|
{ 252, 1 },
|
|
{ 266, 1 },
|
|
};
|
|
|
|
static void yy_accept(yyParser*); /* Forward Declaration */
|
|
|
|
/*
|
|
** Perform a reduce action and the shift that must immediately
|
|
** follow the reduce.
|
|
*/
|
|
static void yy_reduce(
|
|
yyParser *yypParser, /* The parser */
|
|
unsigned int yyruleno /* Number of the rule by which to reduce */
|
|
){
|
|
int yygoto; /* The next state */
|
|
int yyact; /* The next action */
|
|
yyStackEntry *yymsp; /* The top of the parser's stack */
|
|
int yysize; /* Amount to pop the stack */
|
|
ZCCParseARG_FETCH;
|
|
yymsp = yypParser->yytos;
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
|
|
yysize = yyRuleInfo[yyruleno].nrhs;
|
|
fprintf(yyTraceFILE, "%sReduce [%s], go to state %d.\n", yyTracePrompt,
|
|
yyRuleName[yyruleno], yymsp[-yysize].stateno);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif /* NDEBUG */
|
|
|
|
/* Check that the stack is large enough to grow by a single entry
|
|
** if the RHS of the rule is empty. This ensures that there is room
|
|
** enough on the stack to push the LHS value */
|
|
if( yyRuleInfo[yyruleno].nrhs==0 ){
|
|
#ifdef YYTRACKMAXSTACKDEPTH
|
|
if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
|
|
yypParser->yyhwm++;
|
|
assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
|
|
}
|
|
#endif
|
|
#if YYSTACKDEPTH>0
|
|
if( yypParser->yytos>=&yypParser->yystack[YYSTACKDEPTH-1] ){
|
|
yyStackOverflow(yypParser);
|
|
return;
|
|
}
|
|
#else
|
|
if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
|
|
if( yyGrowStack(yypParser) ){
|
|
yyStackOverflow(yypParser);
|
|
return;
|
|
}
|
|
yymsp = yypParser->yytos;
|
|
}
|
|
#endif
|
|
}
|
|
|
|
switch( yyruleno ){
|
|
/* Beginning here are the reduction cases. A typical example
|
|
** follows:
|
|
** case 0:
|
|
** #line <lineno> <grammarfile>
|
|
** { ... } // User supplied code
|
|
** #line <lineno> <thisfile>
|
|
** break;
|
|
*/
|
|
/********** Begin reduce actions **********************************************/
|
|
YYMINORTYPE yylhsminor;
|
|
case 0: /* main ::= translation_unit */
|
|
#line 173 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ stat->TopNode = yymsp[0].minor.yy296; DPrintf(DMSG_SPAMMY, "Parse complete\n"); }
|
|
#line 2645 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 1: /* translation_unit ::= */
|
|
case 30: /*class_innards ::= */ yytestcase(yyruleno==30);
|
|
case 55: /*opt_struct_body ::= */ yytestcase(yyruleno==55);
|
|
case 73: /*mixin_class_body ::= */ yytestcase(yyruleno==73);
|
|
#line 176 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy296 = NULL; }
|
|
#line 2653 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 2: /* translation_unit ::= translation_unit external_declaration */
|
|
case 31: /*class_innards ::= class_innards class_member */ yytestcase(yyruleno==31);
|
|
case 74: /*mixin_class_body ::= mixin_class_body mixin_class_member */ yytestcase(yyruleno==74);
|
|
#line 177 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ SAFE_APPEND(yymsp[-1].minor.yy296,yymsp[0].minor.yy296); }
|
|
#line 2660 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 3: /* translation_unit ::= error */
|
|
case 56: /*opt_struct_body ::= error */ yytestcase(yyruleno==56);
|
|
#line 179 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = NULL; }
|
|
#line 2666 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 4: /* external_declaration ::= mixin_definition */
|
|
#line 182 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy282; /*X-overwrites-A*/ }
|
|
#line 2671 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 5: /* external_declaration ::= class_definition */
|
|
#line 183 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy20; /*X-overwrites-A*/ }
|
|
#line 2676 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 6: /* external_declaration ::= struct_def */
|
|
case 35: /*class_member ::= struct_def */ yytestcase(yyruleno==35);
|
|
case 77: /*mixin_class_member ::= struct_def */ yytestcase(yyruleno==77);
|
|
#line 184 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy299; /*X-overwrites-A*/ }
|
|
#line 2683 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 7: /* external_declaration ::= enum_def */
|
|
case 34: /*class_member ::= enum_def */ yytestcase(yyruleno==34);
|
|
case 59: /*struct_member ::= enum_def */ yytestcase(yyruleno==59);
|
|
case 76: /*mixin_class_member ::= enum_def */ yytestcase(yyruleno==76);
|
|
#line 185 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy179; /*X-overwrites-A*/ }
|
|
#line 2691 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 8: /* external_declaration ::= const_def */
|
|
case 38: /*class_member ::= const_def */ yytestcase(yyruleno==38);
|
|
case 60: /*struct_member ::= const_def */ yytestcase(yyruleno==60);
|
|
case 80: /*mixin_class_member ::= const_def */ yytestcase(yyruleno==80);
|
|
#line 186 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy499; /*X-overwrites-A*/ }
|
|
#line 2699 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 9: /* external_declaration ::= include_def */
|
|
#line 187 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = nullptr; }
|
|
#line 2704 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 10: /* opt_expr ::= */
|
|
#line 198 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[1].minor.yy318 = NULL;
|
|
}
|
|
#line 2711 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 11: /* include_def ::= INCLUDE string_constant */
|
|
{ yy_destructor(yypParser,51,&yymsp[-1].minor);
|
|
#line 205 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
AddInclude(yymsp[0].minor.yy471);
|
|
}
|
|
#line 2719 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 12: /* class_definition ::= class_head class_body */
|
|
#line 219 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[-1].minor.yy20->Body = yymsp[0].minor.yy296;
|
|
yymsp[-1].minor.yy20 = yymsp[-1].minor.yy20; /*X-overwrites-A*/
|
|
}
|
|
#line 2728 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 13: /* class_head ::= EXTEND CLASS IDENTIFIER */
|
|
{ yy_destructor(yypParser,52,&yymsp[-2].minor);
|
|
#line 225 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Class,head,yymsp[-1].minor.yy0);
|
|
head->NodeName = yymsp[0].minor.yy0.Name();
|
|
head->ParentName = nullptr;
|
|
head->Flags = ZCC_Extension;
|
|
head->Replaces = nullptr;
|
|
head->Version = {0, 0};
|
|
head->Type = nullptr;
|
|
head->Symbol = nullptr;
|
|
yymsp[-2].minor.yy20 = head;
|
|
}
|
|
#line 2744 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 14: /* class_head ::= CLASS IDENTIFIER class_ancestry class_flags */
|
|
#line 239 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Class,head,yymsp[-3].minor.yy0);
|
|
head->NodeName = yymsp[-2].minor.yy0.Name();
|
|
head->ParentName = yymsp[-1].minor.yy165;
|
|
head->Flags = yymsp[0].minor.yy87.Flags;
|
|
head->Replaces = yymsp[0].minor.yy87.Replaces;
|
|
head->Version = yymsp[0].minor.yy87.Version;
|
|
head->Type = nullptr;
|
|
head->Symbol = nullptr;
|
|
yylhsminor.yy20 = head;
|
|
}
|
|
#line 2760 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-3].minor.yy20 = yylhsminor.yy20;
|
|
break;
|
|
case 15: /* class_ancestry ::= */
|
|
case 164: /*class_restrictor ::= */ yytestcase(yyruleno==164);
|
|
#line 252 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy165 = NULL; }
|
|
#line 2767 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 16: /* class_ancestry ::= COLON dottable_id */
|
|
{ yy_destructor(yypParser,14,&yymsp[-1].minor);
|
|
#line 253 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy165 = yymsp[0].minor.yy165; /*yymsp[-1].minor.yy165-overwrites-yymsp[0].minor.yy165*/ }
|
|
#line 2773 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 17: /* class_flags ::= */
|
|
#line 256 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy87.Flags = 0; yymsp[1].minor.yy87.Replaces = NULL; yymsp[1].minor.yy87.Version = {0,0}; }
|
|
#line 2779 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 18: /* class_flags ::= class_flags ABSTRACT */
|
|
#line 257 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-1].minor.yy87.Flags | ZCC_Abstract; yylhsminor.yy87.Replaces = yymsp[-1].minor.yy87.Replaces; }
|
|
#line 2784 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,55,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 19: /* class_flags ::= class_flags NATIVE */
|
|
#line 258 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-1].minor.yy87.Flags | ZCC_Native; yylhsminor.yy87.Replaces = yymsp[-1].minor.yy87.Replaces; }
|
|
#line 2791 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,56,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 20: /* class_flags ::= class_flags UI */
|
|
#line 259 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-1].minor.yy87.Flags | ZCC_UIFlag; yylhsminor.yy87.Replaces = yymsp[-1].minor.yy87.Replaces; }
|
|
#line 2798 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,57,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 21: /* class_flags ::= class_flags PLAY */
|
|
#line 260 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-1].minor.yy87.Flags | ZCC_Play; yylhsminor.yy87.Replaces = yymsp[-1].minor.yy87.Replaces; }
|
|
#line 2805 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,58,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 22: /* class_flags ::= class_flags REPLACES dottable_id */
|
|
#line 261 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-2].minor.yy87.Flags; yylhsminor.yy87.Replaces = yymsp[0].minor.yy165; }
|
|
#line 2812 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,59,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 23: /* class_flags ::= class_flags VERSION LPAREN STRCONST RPAREN */
|
|
#line 262 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-4].minor.yy87.Flags | ZCC_Version; yylhsminor.yy87.Replaces = yymsp[-4].minor.yy87.Replaces; yylhsminor.yy87.Version = yymsp[-1].minor.yy0.String->GetChars(); }
|
|
#line 2819 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,60,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
yymsp[-4].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 24: /* dottable_id ::= IDENTIFIER */
|
|
case 45: /*identifier_list ::= IDENTIFIER */ yytestcase(yyruleno==45);
|
|
case 87: /*states_opt ::= IDENTIFIER */ yytestcase(yyruleno==87);
|
|
#line 270 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Identifier,id,yymsp[0].minor.yy0);
|
|
id->Id = yymsp[0].minor.yy0.Name();
|
|
yylhsminor.yy165 = id;
|
|
}
|
|
#line 2834 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy165 = yylhsminor.yy165;
|
|
break;
|
|
case 25: /* dottable_id ::= dottable_id DOT IDENTIFIER */
|
|
#line 276 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Identifier,id2,yymsp[-2].minor.yy165);
|
|
id2->Id = yymsp[0].minor.yy0.Name();
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy165, id2);
|
|
yymsp[-2].minor.yy165 = yymsp[-2].minor.yy165; /*X-overwrites-A*/
|
|
}
|
|
#line 2845 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,44,&yymsp[-1].minor);
|
|
break;
|
|
case 26: /* dottable_id ::= dottable_id DOT DEFAULT */
|
|
#line 283 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Identifier,id2,yymsp[-2].minor.yy165);
|
|
id2->Id = NAME_Default;
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy165, id2);
|
|
yymsp[-2].minor.yy165 = yymsp[-2].minor.yy165; /*X-overwrites-A*/
|
|
}
|
|
#line 2856 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,44,&yymsp[-1].minor);
|
|
yy_destructor(yypParser,63,&yymsp[0].minor);
|
|
break;
|
|
case 27: /* dottable_id ::= dottable_id DOT COLOR */
|
|
#line 294 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Identifier,id2,yymsp[-2].minor.yy165);
|
|
id2->Id = NAME_Color;
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy165, id2);
|
|
yymsp[-2].minor.yy165 = yymsp[-2].minor.yy165; /*X-overwrites-A*/
|
|
}
|
|
#line 2868 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,44,&yymsp[-1].minor);
|
|
yy_destructor(yypParser,64,&yymsp[0].minor);
|
|
break;
|
|
case 28: /* class_body ::= SEMICOLON class_innards EOF */
|
|
{ yy_destructor(yypParser,49,&yymsp[-2].minor);
|
|
#line 311 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy296 = yymsp[-1].minor.yy296; /*yymsp[-2].minor.yy296-overwrites-yymsp[-1].minor.yy296*/ }
|
|
#line 2876 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,48,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 29: /* class_body ::= LBRACE class_innards RBRACE */
|
|
{ yy_destructor(yypParser,65,&yymsp[-2].minor);
|
|
#line 312 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy296 = yymsp[-1].minor.yy296; /*yymsp[-2].minor.yy296-overwrites-yymsp[-1].minor.yy296*/ }
|
|
#line 2884 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 32: /* class_member ::= declarator */
|
|
case 58: /*struct_member ::= declarator */ yytestcase(yyruleno==58);
|
|
case 75: /*mixin_class_member ::= declarator */ yytestcase(yyruleno==75);
|
|
#line 325 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy23; /*X-overwrites-A*/ }
|
|
#line 2893 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 33: /* class_member ::= mixin_statement */
|
|
#line 326 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy399; /*X-overwrites-A*/ }
|
|
#line 2898 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 36: /* class_member ::= states_def */
|
|
case 78: /*mixin_class_member ::= states_def */ yytestcase(yyruleno==78);
|
|
#line 329 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy70; /*X-overwrites-A*/ }
|
|
#line 2904 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 37: /* class_member ::= default_def */
|
|
case 79: /*mixin_class_member ::= default_def */ yytestcase(yyruleno==79);
|
|
#line 330 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy431; /*X-overwrites-A*/ }
|
|
#line 2910 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 39: /* class_member ::= property_def */
|
|
case 81: /*mixin_class_member ::= property_def */ yytestcase(yyruleno==81);
|
|
#line 332 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy443; /*X-overwrites-A*/ }
|
|
#line 2916 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 40: /* class_member ::= flag_def */
|
|
case 82: /*mixin_class_member ::= flag_def */ yytestcase(yyruleno==82);
|
|
#line 333 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy155; /*X-overwrites-A*/ }
|
|
#line 2922 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 41: /* class_member ::= staticarray_statement */
|
|
case 61: /*struct_member ::= staticarray_statement */ yytestcase(yyruleno==61);
|
|
case 83: /*mixin_class_member ::= staticarray_statement */ yytestcase(yyruleno==83);
|
|
#line 334 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy296 = yymsp[0].minor.yy106; /*X-overwrites-A*/ }
|
|
#line 2929 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 42: /* mixin_statement ::= MIXIN IDENTIFIER SEMICOLON */
|
|
#line 339 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(MixinStmt,stmt,yymsp[-2].minor.yy0);
|
|
stmt->MixinName = yymsp[-1].minor.yy0.Name();
|
|
yylhsminor.yy399 = stmt;
|
|
}
|
|
#line 2938 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-2].minor.yy399 = yylhsminor.yy399;
|
|
break;
|
|
case 43: /* property_def ::= PROPERTY IDENTIFIER COLON identifier_list SEMICOLON */
|
|
#line 354 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Property,def,yymsp[-4].minor.yy0);
|
|
def->NodeName = yymsp[-3].minor.yy0.Name();
|
|
def->Body = yymsp[-1].minor.yy165;
|
|
yylhsminor.yy443 = def;
|
|
}
|
|
#line 2950 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,14,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-4].minor.yy443 = yylhsminor.yy443;
|
|
break;
|
|
case 44: /* flag_def ::= FLAGDEF IDENTIFIER COLON IDENTIFIER COMMA INTCONST SEMICOLON */
|
|
#line 362 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(FlagDef,def,yymsp[-6].minor.yy0);
|
|
def->NodeName = yymsp[-5].minor.yy0.Name();
|
|
def->RefName = yymsp[-3].minor.yy0.Name();
|
|
def->BitValue = yymsp[-1].minor.yy0.Int;
|
|
yylhsminor.yy155 = def;
|
|
}
|
|
#line 2964 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,14,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,50,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-6].minor.yy155 = yylhsminor.yy155;
|
|
break;
|
|
case 46: /* identifier_list ::= states_opt COMMA IDENTIFIER */
|
|
case 88: /*states_opt ::= states_opt COMMA IDENTIFIER */ yytestcase(yyruleno==88);
|
|
#line 379 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Identifier,id,yymsp[0].minor.yy0);
|
|
id->Id = yymsp[0].minor.yy0.Name();
|
|
yymsp[-2].minor.yy165 = yymsp[-2].minor.yy165; /*X-overwrites-A*/
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy165, id);
|
|
}
|
|
#line 2979 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 47: /* struct_def ::= STRUCT IDENTIFIER struct_flags LBRACE opt_struct_body RBRACE opt_semicolon */
|
|
#line 387 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Struct,def,yymsp[-6].minor.yy0);
|
|
def->NodeName = yymsp[-5].minor.yy0.Name();
|
|
def->Body = yymsp[-2].minor.yy296;
|
|
def->Type = nullptr;
|
|
def->Symbol = nullptr;
|
|
def->Version = yymsp[-4].minor.yy87.Version;
|
|
def->Flags = yymsp[-4].minor.yy87.Flags;
|
|
yylhsminor.yy299 = def;
|
|
}
|
|
#line 2994 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,65,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,66,&yymsp[-1].minor);
|
|
yymsp[-6].minor.yy299 = yylhsminor.yy299;
|
|
break;
|
|
case 48: /* struct_def ::= EXTEND STRUCT IDENTIFIER LBRACE opt_struct_body RBRACE opt_semicolon */
|
|
{ yy_destructor(yypParser,52,&yymsp[-6].minor);
|
|
#line 399 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Struct,def,yymsp[-5].minor.yy0);
|
|
def->NodeName = yymsp[-4].minor.yy0.Name();
|
|
def->Body = yymsp[-2].minor.yy296;
|
|
def->Type = nullptr;
|
|
def->Symbol = nullptr;
|
|
def->Flags = ZCC_Extension;
|
|
yymsp[-6].minor.yy299 = def;
|
|
}
|
|
#line 3011 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,65,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,66,&yymsp[-1].minor);
|
|
}
|
|
break;
|
|
case 49: /* struct_flags ::= */
|
|
#line 410 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy87.Flags = 0; yymsp[1].minor.yy87.Version = {0, 0}; }
|
|
#line 3019 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 50: /* struct_flags ::= struct_flags UI */
|
|
#line 411 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-1].minor.yy87.Flags | ZCC_UIFlag; }
|
|
#line 3024 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,57,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 51: /* struct_flags ::= struct_flags PLAY */
|
|
#line 412 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-1].minor.yy87.Flags | ZCC_Play; }
|
|
#line 3031 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,58,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 52: /* struct_flags ::= struct_flags CLEARSCOPE */
|
|
#line 413 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-1].minor.yy87.Flags | ZCC_ClearScope; }
|
|
#line 3038 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,72,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 53: /* struct_flags ::= struct_flags NATIVE */
|
|
#line 414 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-1].minor.yy87.Flags | ZCC_Native; }
|
|
#line 3045 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,56,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 54: /* struct_flags ::= struct_flags VERSION LPAREN STRCONST RPAREN */
|
|
#line 415 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy87.Flags = yymsp[-4].minor.yy87.Flags | ZCC_Version; yylhsminor.yy87.Version = yymsp[-1].minor.yy0.String->GetChars(); }
|
|
#line 3052 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,60,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
yymsp[-4].minor.yy87 = yylhsminor.yy87;
|
|
break;
|
|
case 57: /* struct_body ::= struct_body struct_member */
|
|
#line 423 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy296 = yymsp[-1].minor.yy296; /*X-overwrites-A*/ AppendTreeNodeSibling(yymsp[-1].minor.yy296, yymsp[0].minor.yy296); }
|
|
#line 3061 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 62: /* const_def ::= CONST IDENTIFIER EQ expr SEMICOLON */
|
|
#line 433 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ConstantDef,def,yymsp[-4].minor.yy0);
|
|
def->NodeName = yymsp[-3].minor.yy0.Name();
|
|
def->Value = yymsp[-1].minor.yy318;
|
|
def->Symbol = NULL;
|
|
yylhsminor.yy499 = def;
|
|
}
|
|
#line 3072 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,1,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-4].minor.yy499 = yylhsminor.yy499;
|
|
break;
|
|
case 63: /* enum_def ::= ENUM IDENTIFIER enum_type LBRACE opt_enum_list RBRACE opt_semicolon */
|
|
#line 450 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Enum,def,yymsp[-6].minor.yy0);
|
|
def->NodeName = yymsp[-5].minor.yy0.Name();
|
|
def->EnumType = (EZCCBuiltinType)yymsp[-4].minor.yy0.Int;
|
|
def->Elements = yymsp[-2].minor.yy499;
|
|
def->Symbol = nullptr;
|
|
|
|
// If the first element does not have an explicit value, make it 0.
|
|
if (yymsp[-2].minor.yy499 != NULL)
|
|
{
|
|
ZCC_ConstantDef *node = yymsp[-2].minor.yy499, *prev = node;
|
|
|
|
if (node->Value == NULL)
|
|
{
|
|
NEW_INTCONST_NODE(zero, TypeSInt32, 0, yymsp[-2].minor.yy499);
|
|
node->Value = zero;
|
|
}
|
|
for (node = static_cast<ZCC_ConstantDef *>(node->SiblingNext);
|
|
node != yymsp[-2].minor.yy499;
|
|
prev = node, node = static_cast<ZCC_ConstantDef *>(node->SiblingNext))
|
|
{
|
|
assert(node->NodeType == AST_ConstantDef);
|
|
// Leave explicit values alone.
|
|
if (node->Value != NULL)
|
|
{
|
|
continue;
|
|
}
|
|
// Compute implicit values by adding one to the preceding value.
|
|
assert(prev->Value != NULL);
|
|
// If the preceding node is a constant, then we can do this now.
|
|
if (prev->Value->Operation == PEX_ConstValue && prev->Value->Type->isInt())
|
|
{
|
|
NEW_INTCONST_NODE(cval, prev->Value->Type, static_cast<ZCC_ExprConstant *>(prev->Value)->IntVal + 1, node);
|
|
node->Value = cval;
|
|
}
|
|
// Otherwise, create a new addition expression to add 1.
|
|
else
|
|
{
|
|
NEW_INTCONST_NODE(one, TypeSInt32, 1, yymsp[-6].minor.yy0);
|
|
NEW_AST_NODE(ExprID, label, node);
|
|
label->Operation = PEX_ID;
|
|
label->Identifier = prev->NodeName;
|
|
label->Type = NULL;
|
|
|
|
BINARY_EXPR(label, one, PEX_Add);
|
|
node->Value = expr2;
|
|
}
|
|
}
|
|
// Add a new terminating node, to indicate that the ConstantDefs for this enum are done.
|
|
NEW_AST_NODE(EnumTerminator,term,yymsp[-1].minor.yy0);
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy499, term);
|
|
}
|
|
if (yymsp[-2].minor.yy499 != NULL)
|
|
{
|
|
AppendTreeNodeSibling(def, yymsp[-2].minor.yy499);
|
|
}
|
|
yylhsminor.yy179 = def;
|
|
}
|
|
#line 3137 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,65,&yymsp[-3].minor);
|
|
yymsp[-6].minor.yy179 = yylhsminor.yy179;
|
|
break;
|
|
case 64: /* enum_type ::= */
|
|
#line 509 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy0.Int = ZCC_IntAuto; yymsp[1].minor.yy0.SourceLoc = stat->sc->GetMessageLine(); }
|
|
#line 3144 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 65: /* enum_type ::= COLON int_type */
|
|
{ yy_destructor(yypParser,14,&yymsp[-1].minor);
|
|
#line 510 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; /*yymsp[-1].minor.yy0-overwrites-yymsp[0].minor.yy0*/ }
|
|
#line 3150 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 66: /* enum_list ::= error */
|
|
#line 512 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy499 = NULL; }
|
|
#line 3156 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 67: /* enum_list ::= enum_list COMMA enumerator */
|
|
#line 514 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy499 = yymsp[-2].minor.yy499; /*X-overwrites-A*/ AppendTreeNodeSibling(yymsp[-2].minor.yy499, yymsp[0].minor.yy499); }
|
|
#line 3161 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 68: /* opt_enum_list ::= */
|
|
#line 516 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy499 = NULL; }
|
|
#line 3167 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 69: /* enumerator ::= IDENTIFIER */
|
|
#line 520 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ConstantDef,node,yymsp[0].minor.yy0);
|
|
node->NodeName = yymsp[0].minor.yy0.Name();
|
|
node->Value = NULL;
|
|
node->Symbol = NULL;
|
|
yylhsminor.yy499 = node;
|
|
}
|
|
#line 3178 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy499 = yylhsminor.yy499;
|
|
break;
|
|
case 70: /* enumerator ::= IDENTIFIER EQ expr */
|
|
#line 528 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ConstantDef,node,yymsp[-2].minor.yy0);
|
|
node->NodeName = yymsp[-2].minor.yy0.Name();
|
|
node->Value = yymsp[0].minor.yy318;
|
|
node->Symbol = NULL;
|
|
yylhsminor.yy499 = node;
|
|
}
|
|
#line 3190 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,1,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy499 = yylhsminor.yy499;
|
|
break;
|
|
case 71: /* mixin_definition ::= mixin_class_definition */
|
|
#line 542 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy282 = yymsp[0].minor.yy282; /*X-overwrites-A*/ }
|
|
#line 3197 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 72: /* mixin_class_definition ::= MIXIN CLASS IDENTIFIER LBRACE mixin_class_body RBRACE */
|
|
#line 549 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(MixinDef,def,yymsp[-5].minor.yy0);
|
|
def->Body = yymsp[-1].minor.yy296;
|
|
def->NodeName = yymsp[-3].minor.yy0.Name();
|
|
def->MixinType = ZCC_Mixin_Class;
|
|
def->Symbol = nullptr;
|
|
yylhsminor.yy282 = def;
|
|
}
|
|
#line 3209 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,53,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,65,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
yymsp[-5].minor.yy282 = yylhsminor.yy282;
|
|
break;
|
|
case 84: /* states_def ::= STATES states_opts scanner_mode LBRACE states_body RBRACE */
|
|
#line 598 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(States,def,yymsp[-5].minor.yy0);
|
|
def->Flags = yymsp[-4].minor.yy165;
|
|
def->Body = yymsp[-1].minor.yy266;
|
|
yylhsminor.yy70 = def;
|
|
}
|
|
#line 3223 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,65,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
yymsp[-5].minor.yy70 = yylhsminor.yy70;
|
|
break;
|
|
case 85: /* states_opts ::= */
|
|
#line 605 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy165 = nullptr; }
|
|
#line 3231 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 86: /* states_opts ::= LPAREN states_opt RPAREN */
|
|
{ yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
#line 606 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy165 = yymsp[-1].minor.yy165; /*yymsp[-2].minor.yy165-overwrites-yymsp[-1].minor.yy165*/ }
|
|
#line 3237 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 89: /* scanner_mode ::= */
|
|
#line 635 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ stat->sc->SetStateMode(true); }
|
|
#line 3244 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 90: /* states_body ::= */
|
|
#line 637 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy266 = NULL; }
|
|
#line 3249 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 91: /* states_body ::= error */
|
|
#line 638 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy266 = NULL; }
|
|
#line 3254 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 92: /* states_body ::= states_body state_line */
|
|
case 93: /*states_body ::= states_body state_label */ yytestcase(yyruleno==93);
|
|
case 94: /*states_body ::= states_body state_flow */ yytestcase(yyruleno==94);
|
|
#line 639 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ SAFE_APPEND(yymsp[-1].minor.yy266,yymsp[0].minor.yy266); }
|
|
#line 3261 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 95: /* state_label ::= NWS COLON */
|
|
#line 644 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(StateLabel, label, yymsp[-1].minor.yy0);
|
|
label->Label = yymsp[-1].minor.yy0.Name();
|
|
yylhsminor.yy266 = label;
|
|
}
|
|
#line 3270 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,14,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 96: /* state_flow_type ::= STOP */
|
|
#line 652 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ NEW_AST_NODE(StateStop, flow, yymsp[0].minor.yy0); yylhsminor.yy266 = flow; }
|
|
#line 3277 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 97: /* state_flow_type ::= WAIT */
|
|
#line 653 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ NEW_AST_NODE(StateWait, flow, yymsp[0].minor.yy0); yylhsminor.yy266 = flow; }
|
|
#line 3283 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 98: /* state_flow_type ::= FAIL */
|
|
#line 654 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ NEW_AST_NODE(StateFail, flow, yymsp[0].minor.yy0); yylhsminor.yy266 = flow; }
|
|
#line 3289 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 99: /* state_flow_type ::= LOOP */
|
|
#line 655 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ NEW_AST_NODE(StateLoop, flow, yymsp[0].minor.yy0); yylhsminor.yy266 = flow; }
|
|
#line 3295 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 100: /* state_flow_type ::= GOTO dottable_id state_goto_offset */
|
|
#line 657 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(StateGoto, flow, yymsp[-2].minor.yy0);
|
|
flow->Label = yymsp[-1].minor.yy165;
|
|
flow->Offset = yymsp[0].minor.yy318;
|
|
flow->Qualifier = nullptr;
|
|
yylhsminor.yy266 = flow;
|
|
}
|
|
#line 3307 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-2].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 101: /* state_flow_type ::= GOTO IDENTIFIER SCOPE dottable_id state_goto_offset */
|
|
#line 666 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(StateGoto, flow, yymsp[-4].minor.yy0);
|
|
flow->Label = yymsp[-1].minor.yy165;
|
|
flow->Offset = yymsp[0].minor.yy318;
|
|
|
|
NEW_AST_NODE(Identifier,id,yymsp[-3].minor.yy0);
|
|
id->Id = yymsp[-3].minor.yy0.Name();
|
|
flow->Qualifier =id;
|
|
yylhsminor.yy266 = flow;
|
|
}
|
|
#line 3322 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,47,&yymsp[-2].minor);
|
|
yymsp[-4].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 102: /* state_flow_type ::= GOTO SUPER SCOPE dottable_id state_goto_offset */
|
|
#line 678 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(StateGoto, flow, yymsp[-4].minor.yy0);
|
|
flow->Label = yymsp[-1].minor.yy165;
|
|
flow->Offset = yymsp[0].minor.yy318;
|
|
|
|
NEW_AST_NODE(Identifier,id,yymsp[-3].minor.yy0);
|
|
id->Id = NAME_Super;
|
|
flow->Qualifier =id;
|
|
yylhsminor.yy266 = flow;
|
|
}
|
|
#line 3338 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,47,&yymsp[-2].minor);
|
|
yymsp[-4].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 103: /* state_goto_offset ::= */
|
|
#line 689 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy318 = NULL; }
|
|
#line 3345 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 104: /* state_goto_offset ::= ADD expr */
|
|
{ yy_destructor(yypParser,34,&yymsp[-1].minor);
|
|
#line 690 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy318 = yymsp[0].minor.yy318; /*yymsp[-1].minor.yy318-overwrites-yymsp[0].minor.yy318*/ }
|
|
#line 3351 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 105: /* state_line ::= NWS NWS expr state_opts state_action */
|
|
#line 693 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(StateLine, line, yymsp[-4].minor.yy0);
|
|
line->Sprite = stat->Strings.Alloc(FName(yymsp[-4].minor.yy0.Name()).GetChars());
|
|
line->Frames = stat->Strings.Alloc(FName(yymsp[-3].minor.yy0.Name()).GetChars());
|
|
line->Duration = yymsp[-2].minor.yy318;
|
|
line->bBright = yymsp[-1].minor.yy332.Bright;
|
|
line->bFast = yymsp[-1].minor.yy332.Fast;
|
|
line->bSlow = yymsp[-1].minor.yy332.Slow;
|
|
line->bNoDelay = yymsp[-1].minor.yy332.NoDelay;
|
|
line->bCanRaise = yymsp[-1].minor.yy332.CanRaise;
|
|
line->Offset = yymsp[-1].minor.yy332.Offset;
|
|
line->Lights = yymsp[-1].minor.yy332.Lights;
|
|
line->Action = yymsp[0].minor.yy296;
|
|
yylhsminor.yy266 = line;
|
|
}
|
|
#line 3371 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-4].minor.yy266 = yylhsminor.yy266;
|
|
break;
|
|
case 106: /* state_opts ::= */
|
|
#line 709 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ StateOpts opts; opts.Zero(); yymsp[1].minor.yy332 = opts; }
|
|
#line 3377 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 107: /* state_opts ::= state_opts BRIGHT */
|
|
#line 710 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy332.Bright = true; yymsp[-1].minor.yy332 = yymsp[-1].minor.yy332; /*X-overwrites-A*/ }
|
|
#line 3382 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,83,&yymsp[0].minor);
|
|
break;
|
|
case 108: /* state_opts ::= state_opts FAST */
|
|
#line 711 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy332.Fast = true; yymsp[-1].minor.yy332 = yymsp[-1].minor.yy332; /*X-overwrites-A*/ }
|
|
#line 3388 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,84,&yymsp[0].minor);
|
|
break;
|
|
case 109: /* state_opts ::= state_opts SLOW */
|
|
#line 712 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy332.Slow = true; yymsp[-1].minor.yy332 = yymsp[-1].minor.yy332; /*X-overwrites-A*/ }
|
|
#line 3394 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,85,&yymsp[0].minor);
|
|
break;
|
|
case 110: /* state_opts ::= state_opts NODELAY */
|
|
#line 713 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy332.NoDelay = true; yymsp[-1].minor.yy332 = yymsp[-1].minor.yy332; /*X-overwrites-A*/ }
|
|
#line 3400 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,86,&yymsp[0].minor);
|
|
break;
|
|
case 111: /* state_opts ::= state_opts CANRAISE */
|
|
#line 714 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy332.CanRaise = true; yymsp[-1].minor.yy332 = yymsp[-1].minor.yy332; /*X-overwrites-A*/ }
|
|
#line 3406 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,87,&yymsp[0].minor);
|
|
break;
|
|
case 112: /* state_opts ::= state_opts OFFSET LPAREN expr COMMA expr RPAREN */
|
|
#line 715 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-6].minor.yy332.Offset = yymsp[-3].minor.yy318; AppendTreeNodeSibling(yymsp[-3].minor.yy318, yymsp[-1].minor.yy318); yymsp[-6].minor.yy332 = yymsp[-6].minor.yy332; /*X-overwrites-A*/ }
|
|
#line 3412 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,88,&yymsp[-5].minor);
|
|
yy_destructor(yypParser,45,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,50,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
break;
|
|
case 113: /* state_opts ::= state_opts LIGHT LPAREN light_list RPAREN */
|
|
#line 716 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-4].minor.yy332 = yymsp[-4].minor.yy332; /*X-overwrites-A*/ yymsp[-4].minor.yy332.Lights = yymsp[-1].minor.yy471; }
|
|
#line 3421 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,89,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
break;
|
|
case 114: /* light_list ::= STRCONST */
|
|
case 284: /*string_constant ::= STRCONST */ yytestcase(yyruleno==284);
|
|
#line 721 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprConstant, strconst, yymsp[0].minor.yy0);
|
|
strconst->Operation = PEX_ConstValue;
|
|
strconst->Type = TypeString;
|
|
strconst->StringVal = yymsp[0].minor.yy0.String;
|
|
yylhsminor.yy471 = strconst;
|
|
}
|
|
#line 3436 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 115: /* light_list ::= light_list COMMA STRCONST */
|
|
#line 730 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprConstant, strconst, yymsp[0].minor.yy0);
|
|
strconst->Operation = PEX_ConstValue;
|
|
strconst->Type = TypeString;
|
|
strconst->StringVal = yymsp[0].minor.yy0.String;
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy471, strconst);
|
|
yymsp[-2].minor.yy471 = yymsp[-2].minor.yy471; /*X-overwrites-A*/
|
|
}
|
|
#line 3449 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 116: /* state_action ::= LBRACE statement_list scanner_mode RBRACE */
|
|
#line 741 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(CompoundStmt,stmt,yymsp[-3].minor.yy0);
|
|
stmt->Content = yymsp[-2].minor.yy156;
|
|
yylhsminor.yy296 = stmt;
|
|
}
|
|
#line 3459 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
yymsp[-3].minor.yy296 = yylhsminor.yy296;
|
|
break;
|
|
case 117: /* state_action ::= LBRACE scanner_mode RBRACE */
|
|
{ yy_destructor(yypParser,65,&yymsp[-2].minor);
|
|
#line 747 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[-2].minor.yy296 = NULL;
|
|
}
|
|
#line 3469 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 118: /* state_action ::= LBRACE error scanner_mode RBRACE */
|
|
{ yy_destructor(yypParser,65,&yymsp[-3].minor);
|
|
#line 750 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-3].minor.yy296 = NULL; }
|
|
#line 3477 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 119: /* state_action ::= state_call scanner_mode SEMICOLON */
|
|
#line 751 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy296 = yymsp[-2].minor.yy445; /*X-overwrites-A*/ }
|
|
#line 3484 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
break;
|
|
case 120: /* state_call ::= */
|
|
#line 753 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy445 = NULL; }
|
|
#line 3490 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 121: /* state_call ::= IDENTIFIER state_call_params */
|
|
#line 755 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprFuncCall, expr, yymsp[-1].minor.yy0);
|
|
NEW_AST_NODE(ExprID, func, yymsp[-1].minor.yy0);
|
|
|
|
func->Operation = PEX_ID;
|
|
func->Identifier = yymsp[-1].minor.yy0.Name();
|
|
expr->Operation = PEX_FuncCall;
|
|
expr->Function = func;
|
|
expr->Parameters = yymsp[0].minor.yy138;
|
|
yylhsminor.yy445 = expr;
|
|
}
|
|
#line 3505 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy445 = yylhsminor.yy445;
|
|
break;
|
|
case 122: /* state_call_params ::= */
|
|
#line 767 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy138 = NULL; }
|
|
#line 3511 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 123: /* state_call_params ::= LPAREN func_expr_list RPAREN */
|
|
{ yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
#line 768 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy138 = yymsp[-1].minor.yy138; /*yymsp[-2].minor.yy138-overwrites-yymsp[-1].minor.yy138*/ }
|
|
#line 3517 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 124: /* default_def ::= DEFAULT LBRACE RBRACE */
|
|
{ yy_destructor(yypParser,63,&yymsp[-2].minor);
|
|
#line 776 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Default,stmt,yymsp[-1].minor.yy0);
|
|
stmt->Content = NULL;
|
|
yymsp[-2].minor.yy431 = stmt;
|
|
}
|
|
#line 3529 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 125: /* default_def ::= DEFAULT LBRACE default_statement_list RBRACE */
|
|
{ yy_destructor(yypParser,63,&yymsp[-3].minor);
|
|
#line 782 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Default,stmt,yymsp[-2].minor.yy0);
|
|
stmt->Content = yymsp[-1].minor.yy156;
|
|
yymsp[-3].minor.yy431 = stmt;
|
|
}
|
|
#line 3541 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 126: /* default_def ::= DEFAULT LBRACE error RBRACE */
|
|
{ yy_destructor(yypParser,63,&yymsp[-3].minor);
|
|
#line 788 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Default,stmt,yymsp[-2].minor.yy0);
|
|
stmt->Content = NULL;
|
|
yymsp[-3].minor.yy431 = stmt;
|
|
}
|
|
#line 3553 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 127: /* default_statement_list ::= default_statement */
|
|
case 311: /*statement_list ::= statement */ yytestcase(yyruleno==311);
|
|
#line 795 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[0].minor.yy156 = yymsp[0].minor.yy156; /*X-overwrites-A*/
|
|
}
|
|
#line 3563 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 128: /* default_statement_list ::= default_statement_list default_statement */
|
|
case 312: /*statement_list ::= statement_list statement */ yytestcase(yyruleno==312);
|
|
#line 799 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
SAFE_APPEND(yymsp[-1].minor.yy156,yymsp[0].minor.yy156);
|
|
}
|
|
#line 3571 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 129: /* default_statement ::= SEMICOLON */
|
|
case 293: /*statement ::= SEMICOLON */ yytestcase(yyruleno==293);
|
|
{ yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
#line 804 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = NULL; }
|
|
#line 3578 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 130: /* default_statement ::= error SEMICOLON */
|
|
case 300: /*statement ::= error SEMICOLON */ yytestcase(yyruleno==300);
|
|
#line 805 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy156 = NULL; }
|
|
#line 3585 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
break;
|
|
case 131: /* default_statement ::= property_statement */
|
|
#line 807 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = yymsp[0].minor.yy315; /*X-overwrites-A*/ }
|
|
#line 3591 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 132: /* default_statement ::= flag_statement */
|
|
#line 808 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = yymsp[0].minor.yy52; /*X-overwrites-A*/ }
|
|
#line 3596 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 133: /* flag_statement ::= ADD dottable_id */
|
|
{ yy_destructor(yypParser,34,&yymsp[-1].minor);
|
|
#line 813 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(FlagStmt, type, yymsp[0].minor.yy165);
|
|
type->set = true;
|
|
type->name = yymsp[0].minor.yy165;
|
|
yymsp[-1].minor.yy52 = type;
|
|
}
|
|
#line 3607 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 134: /* flag_statement ::= SUB dottable_id */
|
|
{ yy_destructor(yypParser,33,&yymsp[-1].minor);
|
|
#line 820 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(FlagStmt, type, yymsp[0].minor.yy165);
|
|
type->set = false;
|
|
type->name = yymsp[0].minor.yy165;
|
|
yymsp[-1].minor.yy52 = type;
|
|
}
|
|
#line 3619 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 135: /* property_statement ::= dottable_id expr_list SEMICOLON */
|
|
#line 830 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(PropertyStmt,stmt,yymsp[-2].minor.yy165);
|
|
stmt->Prop = yymsp[-2].minor.yy165;
|
|
stmt->Values = yymsp[-1].minor.yy318;
|
|
yylhsminor.yy315 = stmt;
|
|
}
|
|
#line 3630 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-2].minor.yy315 = yylhsminor.yy315;
|
|
break;
|
|
case 136: /* property_statement ::= dottable_id SEMICOLON */
|
|
#line 838 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(PropertyStmt,stmt,yymsp[-1].minor.yy165);
|
|
stmt->Prop = yymsp[-1].minor.yy165;
|
|
stmt->Values = nullptr;
|
|
yylhsminor.yy315 = stmt;
|
|
}
|
|
#line 3642 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy315 = yylhsminor.yy315;
|
|
break;
|
|
case 137: /* int_type ::= SBYTE */
|
|
#line 850 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_SInt8; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3649 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 138: /* int_type ::= BYTE */
|
|
#line 851 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_UInt8; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3655 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 139: /* int_type ::= SHORT */
|
|
#line 852 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_SInt16; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3661 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 140: /* int_type ::= USHORT */
|
|
#line 853 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_UInt16; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3667 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 141: /* int_type ::= INT */
|
|
#line 854 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_SInt32; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3673 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 142: /* int_type ::= UINT */
|
|
#line 855 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_UInt32; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3679 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 143: /* type_name1 ::= BOOL */
|
|
#line 857 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Bool; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3685 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 144: /* type_name1 ::= FLOAT */
|
|
#line 859 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_FloatAuto; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3691 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 145: /* type_name1 ::= DOUBLE */
|
|
#line 860 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Float64; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3697 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 146: /* type_name1 ::= VECTOR2 */
|
|
#line 862 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Vector2; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3703 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 147: /* type_name1 ::= VECTOR3 */
|
|
#line 863 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Vector3; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3709 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 148: /* type_name1 ::= VECTOR4 */
|
|
#line 864 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Vector4; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3715 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 149: /* type_name1 ::= NAME */
|
|
#line 865 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Name; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3721 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 150: /* type_name1 ::= SOUND */
|
|
#line 866 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Sound; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3727 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 151: /* type_name1 ::= STATE */
|
|
#line 867 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_State; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3733 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 152: /* type_name1 ::= COLOR */
|
|
#line 868 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Color; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3739 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 153: /* type_name1 ::= LET */
|
|
#line 869 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Let; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 3745 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 154: /* type_name ::= type_name1 */
|
|
#line 872 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(BasicType, type, yymsp[0].minor.yy0);
|
|
type->Type = (EZCCBuiltinType)yymsp[0].minor.yy0.Int;
|
|
type->UserType = NULL;
|
|
type->isconst = false;
|
|
yylhsminor.yy310 = type;
|
|
}
|
|
#line 3757 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy310 = yylhsminor.yy310;
|
|
break;
|
|
case 155: /* type_name ::= IDENTIFIER */
|
|
#line 880 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(BasicType, type, yymsp[0].minor.yy0);
|
|
NEW_AST_NODE(Identifier, id, yymsp[0].minor.yy0);
|
|
type->Type = ZCC_UserType;
|
|
type->UserType = id;
|
|
type->isconst = false;
|
|
id->Id = yymsp[0].minor.yy0.Name();
|
|
yylhsminor.yy310 = type;
|
|
}
|
|
#line 3771 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy310 = yylhsminor.yy310;
|
|
break;
|
|
case 156: /* type_name ::= ATSIGN IDENTIFIER */
|
|
{ yy_destructor(yypParser,106,&yymsp[-1].minor);
|
|
#line 891 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(BasicType, type, yymsp[0].minor.yy0);
|
|
NEW_AST_NODE(Identifier, id, yymsp[0].minor.yy0);
|
|
type->Type = ZCC_NativeType;
|
|
type->UserType = id;
|
|
type->isconst = false;
|
|
id->Id = yymsp[0].minor.yy0.Name();
|
|
yymsp[-1].minor.yy310 = type;
|
|
}
|
|
#line 3786 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 157: /* type_name ::= READONLY LT IDENTIFIER GT */
|
|
{ yy_destructor(yypParser,107,&yymsp[-3].minor);
|
|
#line 902 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(BasicType, type, yymsp[-1].minor.yy0);
|
|
NEW_AST_NODE(Identifier, id, yymsp[-1].minor.yy0);
|
|
type->Type = ZCC_UserType;
|
|
type->UserType = id;
|
|
type->isconst = true;
|
|
id->Id = yymsp[-1].minor.yy0.Name();
|
|
yymsp[-3].minor.yy310 = type;
|
|
}
|
|
#line 3801 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,20,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,21,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 158: /* type_name ::= READONLY LT ATSIGN IDENTIFIER GT */
|
|
{ yy_destructor(yypParser,107,&yymsp[-4].minor);
|
|
#line 913 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(BasicType, type, yymsp[-1].minor.yy0);
|
|
NEW_AST_NODE(Identifier, id, yymsp[-1].minor.yy0);
|
|
type->Type = ZCC_NativeType;
|
|
type->UserType = id;
|
|
type->isconst = true;
|
|
id->Id = yymsp[-1].minor.yy0.Name();
|
|
yymsp[-4].minor.yy310 = type;
|
|
}
|
|
#line 3818 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,20,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,106,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,21,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 159: /* type_name ::= DOT dottable_id */
|
|
{ yy_destructor(yypParser,44,&yymsp[-1].minor);
|
|
#line 924 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(BasicType, type, yymsp[0].minor.yy165);
|
|
type->Type = ZCC_UserType;
|
|
type->UserType = yymsp[0].minor.yy165;
|
|
type->isconst = false;
|
|
yymsp[-1].minor.yy310 = type;
|
|
}
|
|
#line 3834 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 160: /* aggregate_type ::= MAP LT type_or_array COMMA type_or_array GT */
|
|
#line 948 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(MapType,map,yymsp[-5].minor.yy0);
|
|
map->KeyType = yymsp[-3].minor.yy104;
|
|
map->ValueType = yymsp[-1].minor.yy104;
|
|
yylhsminor.yy104 = map;
|
|
}
|
|
#line 3845 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,20,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,50,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,21,&yymsp[0].minor);
|
|
yymsp[-5].minor.yy104 = yylhsminor.yy104;
|
|
break;
|
|
case 161: /* aggregate_type ::= MAPITERATOR LT type_or_array COMMA type_or_array GT */
|
|
#line 956 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(MapIteratorType,map_it,yymsp[-5].minor.yy0);
|
|
map_it->KeyType = yymsp[-3].minor.yy104;
|
|
map_it->ValueType = yymsp[-1].minor.yy104;
|
|
yylhsminor.yy104 = map_it;
|
|
}
|
|
#line 3859 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,20,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,50,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,21,&yymsp[0].minor);
|
|
yymsp[-5].minor.yy104 = yylhsminor.yy104;
|
|
break;
|
|
case 162: /* aggregate_type ::= ARRAY LT type_or_array GT */
|
|
#line 964 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(DynArrayType,arr,yymsp[-3].minor.yy0);
|
|
arr->ElementType = yymsp[-1].minor.yy104;
|
|
yylhsminor.yy104 = arr;
|
|
}
|
|
#line 3872 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,20,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,21,&yymsp[0].minor);
|
|
yymsp[-3].minor.yy104 = yylhsminor.yy104;
|
|
break;
|
|
case 163: /* aggregate_type ::= CLASS class_restrictor */
|
|
#line 971 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ClassType,cls,yymsp[-1].minor.yy0);
|
|
cls->Restriction = yymsp[0].minor.yy165;
|
|
yylhsminor.yy104 = cls;
|
|
}
|
|
#line 3884 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy104 = yylhsminor.yy104;
|
|
break;
|
|
case 165: /* class_restrictor ::= LT dottable_id GT */
|
|
{ yy_destructor(yypParser,20,&yymsp[-2].minor);
|
|
#line 977 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy165 = yymsp[-1].minor.yy165; /*yymsp[-2].minor.yy165-overwrites-yymsp[-1].minor.yy165*/ }
|
|
#line 3891 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,21,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 166: /* type ::= type_name */
|
|
#line 979 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy104 = yymsp[0].minor.yy310; /*X-overwrites-A*/ yymsp[0].minor.yy104->ArraySize = NULL; }
|
|
#line 3898 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 167: /* type ::= aggregate_type */
|
|
#line 980 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy104 = yymsp[0].minor.yy104; /*X-overwrites-A*/ yymsp[0].minor.yy104->ArraySize = NULL; }
|
|
#line 3903 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 168: /* type_or_array ::= type array_size */
|
|
#line 983 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy104 = yymsp[-1].minor.yy104; /*X-overwrites-A*/ yymsp[-1].minor.yy104->ArraySize = yymsp[0].minor.yy318; }
|
|
#line 3908 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 169: /* type_list ::= type_list COMMA type_or_array */
|
|
#line 986 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy104 = yymsp[-2].minor.yy104; /*X-overwrites-A*/ AppendTreeNodeSibling(yymsp[-2].minor.yy104, yymsp[0].minor.yy104); }
|
|
#line 3913 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 170: /* type_list_or_void ::= VOID */
|
|
{ yy_destructor(yypParser,112,&yymsp[0].minor);
|
|
#line 988 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy104 = NULL; }
|
|
#line 3920 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 171: /* array_size_expr ::= LBRACKET opt_expr RBRACKET */
|
|
#line 992 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
if (yymsp[-1].minor.yy318 == NULL)
|
|
{
|
|
NEW_AST_NODE(Expression,nil,yymsp[-2].minor.yy0.SourceLoc);
|
|
nil->Operation = PEX_Nil;
|
|
nil->Type = NULL;
|
|
yylhsminor.yy318 = nil;
|
|
}
|
|
else
|
|
{
|
|
yylhsminor.yy318 = yymsp[-1].minor.yy318;
|
|
}
|
|
}
|
|
#line 3938 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,117,&yymsp[0].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 172: /* array_size ::= array_size array_size_expr */
|
|
#line 1007 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
AppendTreeNodeSibling(yymsp[-1].minor.yy318, yymsp[0].minor.yy318);
|
|
yymsp[-1].minor.yy318 = yymsp[-1].minor.yy318; /*X-overwrites-A*/
|
|
}
|
|
#line 3948 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 173: /* declarator ::= decl_flags type_list_or_void variables_or_function */
|
|
#line 1016 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
if (yymsp[0].minor.yy432.FuncName == NAME_None && yymsp[0].minor.yy432.VarNames == NULL)
|
|
{ // An error. yymsp[-2].minor.yy295 message was already printed.
|
|
yylhsminor.yy23 = NULL;
|
|
}
|
|
else if (yymsp[0].minor.yy432.FuncName != NAME_None)
|
|
{ // yymsp[-2].minor.yy295 function
|
|
NEW_AST_NODE(FuncDeclarator, decl, yymsp[-2].minor.yy295 == nullptr? yymsp[0].minor.yy432.SourceLoc : yymsp[-2].minor.yy295->SourceLoc);
|
|
decl->Type = yymsp[-1].minor.yy104;
|
|
decl->Params = yymsp[0].minor.yy432.FuncParams;
|
|
decl->Name = yymsp[0].minor.yy432.FuncName;
|
|
decl->UseFlags = yymsp[-2].minor.yy295 == nullptr? nullptr : yymsp[-2].minor.yy295->Id;
|
|
decl->Flags = (yymsp[-2].minor.yy295 == nullptr? 0 : yymsp[-2].minor.yy295->Flags) | yymsp[0].minor.yy432.FuncFlags;
|
|
decl->DeprecationMessage = yymsp[-2].minor.yy295 == nullptr ? nullptr : yymsp[-2].minor.yy295->DeprecationMessage;
|
|
if (yymsp[-2].minor.yy295 == nullptr) decl->Version = {0,0,0};
|
|
else decl->Version = yymsp[-2].minor.yy295->Version;
|
|
|
|
decl->Body = yymsp[0].minor.yy432.FuncBody;
|
|
yylhsminor.yy23 = decl;
|
|
}
|
|
else if (yymsp[-1].minor.yy104 != NULL && yymsp[-1].minor.yy104->SiblingNext == yymsp[-1].minor.yy104)
|
|
{ // yymsp[-2].minor.yy295 variable
|
|
NEW_AST_NODE(VarDeclarator, decl, yymsp[-2].minor.yy295 == nullptr? yymsp[-1].minor.yy104->SourceLoc : yymsp[-2].minor.yy295->SourceLoc);
|
|
decl->Type = yymsp[-1].minor.yy104;
|
|
decl->Names = yymsp[0].minor.yy432.VarNames;
|
|
if (yymsp[-2].minor.yy295 == nullptr)
|
|
{
|
|
decl->Flags = 0;
|
|
decl->Version = {0,0,0};
|
|
decl->DeprecationMessage = nullptr;
|
|
}
|
|
else
|
|
{
|
|
decl->Flags = yymsp[-2].minor.yy295->Flags;
|
|
decl->Version = yymsp[-2].minor.yy295->Version;
|
|
decl->DeprecationMessage = yymsp[-2].minor.yy295->DeprecationMessage;
|
|
}
|
|
yylhsminor.yy23 = decl;
|
|
}
|
|
else
|
|
{ // An invalid
|
|
if (yymsp[-1].minor.yy104 == NULL)
|
|
{
|
|
stat->sc->ScriptMessage("Variables may not be of type void.\n");
|
|
}
|
|
else
|
|
{
|
|
stat->sc->ScriptMessage("Variables may be of only one type.\n");
|
|
}
|
|
yylhsminor.yy23 = NULL;
|
|
}
|
|
}
|
|
#line 4004 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-2].minor.yy23 = yylhsminor.yy23;
|
|
break;
|
|
case 174: /* variables_or_function ::= IDENTIFIER LPAREN func_params RPAREN func_const opt_func_body */
|
|
#line 1071 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
VarOrFun fun;
|
|
|
|
fun.VarNames = NULL;
|
|
fun.FuncParams = yymsp[-3].minor.yy491;
|
|
fun.FuncFlags = yymsp[-1].minor.yy0.Int;
|
|
fun.FuncName = yymsp[-5].minor.yy0.Name();
|
|
fun.FuncBody = yymsp[0].minor.yy55;
|
|
fun.SourceLoc = yymsp[-5].minor.yy0.SourceLoc;
|
|
yylhsminor.yy432 = fun;
|
|
}
|
|
#line 4020 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,62,&yymsp[-2].minor);
|
|
yymsp[-5].minor.yy432 = yylhsminor.yy432;
|
|
break;
|
|
case 175: /* variables_or_function ::= variable_list SEMICOLON */
|
|
#line 1083 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
VarOrFun var;
|
|
|
|
var.VarNames = yymsp[-1].minor.yy180;
|
|
var.FuncParams = NULL;
|
|
var.FuncFlags = 0;
|
|
var.FuncName = NAME_None;
|
|
var.FuncBody = NULL;
|
|
var.SourceLoc = yymsp[-1].minor.yy180->SourceLoc;
|
|
yylhsminor.yy432 = var;
|
|
}
|
|
#line 4038 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy432 = yylhsminor.yy432;
|
|
break;
|
|
case 176: /* variables_or_function ::= error SEMICOLON */
|
|
#line 1095 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
VarOrFun bad;
|
|
bad.VarNames = NULL;
|
|
bad.FuncParams = NULL;
|
|
bad.FuncFlags = 0;
|
|
bad.FuncName = NAME_None;
|
|
bad.FuncBody = NULL;
|
|
bad.SourceLoc = yymsp[0].minor.yy0.SourceLoc;
|
|
yymsp[-1].minor.yy432 = bad;
|
|
}
|
|
#line 4054 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 177: /* variable_name ::= IDENTIFIER */
|
|
#line 1112 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VarName,var,yymsp[0].minor.yy0);
|
|
var->Name = ENamedName(yymsp[0].minor.yy0.Int);
|
|
var->ArraySize = NULL;
|
|
yylhsminor.yy180 = var;
|
|
}
|
|
#line 4064 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy180 = yylhsminor.yy180;
|
|
break;
|
|
case 178: /* variable_name ::= IDENTIFIER array_size */
|
|
#line 1119 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VarName,var,yymsp[-1].minor.yy0);
|
|
var->Name = ENamedName(yymsp[-1].minor.yy0.Int);
|
|
var->ArraySize = yymsp[0].minor.yy318;
|
|
yylhsminor.yy180 = var;
|
|
}
|
|
#line 4075 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy180 = yylhsminor.yy180;
|
|
break;
|
|
case 179: /* variable_list ::= variable_list COMMA variable_name */
|
|
#line 1128 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy180, yymsp[0].minor.yy180);
|
|
yymsp[-2].minor.yy180 = yymsp[-2].minor.yy180; /*X-overwrites-A*/
|
|
}
|
|
#line 4084 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 180: /* decl_flags ::= */
|
|
#line 1134 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy295 = NULL; }
|
|
#line 4090 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 181: /* decl_flags ::= decl_flags decl_flag */
|
|
#line 1136 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
if (yymsp[-1].minor.yy295 == nullptr)
|
|
{
|
|
NEW_AST_NODE(DeclFlags,nil_f,yymsp[0].minor.yy0);
|
|
yylhsminor.yy295 = nil_f;
|
|
yylhsminor.yy295->Id = nullptr;
|
|
yylhsminor.yy295->Flags = yymsp[0].minor.yy0.Int;
|
|
yylhsminor.yy295->Version = { 0, 0 };
|
|
yylhsminor.yy295->DeprecationMessage = nullptr;
|
|
}
|
|
else
|
|
{
|
|
yylhsminor.yy295 = yymsp[-1].minor.yy295;
|
|
yylhsminor.yy295->Flags |= yymsp[0].minor.yy0.Int;
|
|
}
|
|
}
|
|
#line 4110 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy295 = yylhsminor.yy295;
|
|
break;
|
|
case 182: /* decl_flags ::= decl_flags ACTION states_opts */
|
|
#line 1155 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
if (yymsp[-2].minor.yy295 == nullptr)
|
|
{
|
|
NEW_AST_NODE(DeclFlags,nil_f,yymsp[-1].minor.yy0.SourceLoc);
|
|
yylhsminor.yy295 = nil_f;
|
|
yylhsminor.yy295->Flags = ZCC_Action;
|
|
yylhsminor.yy295->Id = nullptr;
|
|
yylhsminor.yy295->Version = { 0, 0 };
|
|
yylhsminor.yy295->DeprecationMessage = nullptr;
|
|
}
|
|
else
|
|
{
|
|
yylhsminor.yy295 = yymsp[-2].minor.yy295;
|
|
yylhsminor.yy295->Flags |= ZCC_Action;
|
|
}
|
|
yylhsminor.yy295->Id = yymsp[0].minor.yy165;
|
|
}
|
|
#line 4132 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-2].minor.yy295 = yylhsminor.yy295;
|
|
break;
|
|
case 183: /* opt_deprecation_message ::= */
|
|
#line 1173 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy0.String = nullptr; yymsp[1].minor.yy0.SourceLoc = stat->sc->GetMessageLine(); }
|
|
#line 4138 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 184: /* opt_deprecation_message ::= COMMA STRCONST */
|
|
{ yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
#line 1174 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
|
|
#line 4144 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 185: /* decl_flags ::= decl_flags DEPRECATED LPAREN STRCONST opt_deprecation_message RPAREN */
|
|
#line 1177 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
if (yymsp[-5].minor.yy295 == nullptr)
|
|
{
|
|
NEW_AST_NODE(DeclFlags,nil_f,yymsp[-4].minor.yy0.SourceLoc);
|
|
yylhsminor.yy295 = nil_f;
|
|
yylhsminor.yy295->Flags = ZCC_Deprecated;
|
|
yylhsminor.yy295->Id = nullptr;
|
|
yylhsminor.yy295->Version = { 0, 0 };
|
|
}
|
|
else
|
|
{
|
|
yylhsminor.yy295 = yymsp[-5].minor.yy295;
|
|
yylhsminor.yy295->Flags |= ZCC_Deprecated;
|
|
}
|
|
yylhsminor.yy295->Version = yymsp[-2].minor.yy0.String->GetChars();
|
|
yylhsminor.yy295->DeprecationMessage = yymsp[-1].minor.yy0.String;
|
|
}
|
|
#line 4166 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
yymsp[-5].minor.yy295 = yylhsminor.yy295;
|
|
break;
|
|
case 186: /* decl_flags ::= decl_flags VERSION LPAREN STRCONST RPAREN */
|
|
#line 1196 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
if (yymsp[-4].minor.yy295 == nullptr)
|
|
{
|
|
NEW_AST_NODE(DeclFlags,nil_f,yymsp[-3].minor.yy0.SourceLoc);
|
|
yylhsminor.yy295 = nil_f;
|
|
yylhsminor.yy295->Flags = ZCC_Version;
|
|
yylhsminor.yy295->Id = nullptr;
|
|
yylhsminor.yy295->Version = { 0, 0 };
|
|
yylhsminor.yy295->DeprecationMessage = nullptr;
|
|
}
|
|
else
|
|
{
|
|
yylhsminor.yy295 = yymsp[-4].minor.yy295;
|
|
yylhsminor.yy295->Flags |= ZCC_Version;
|
|
}
|
|
yylhsminor.yy295->Version = yymsp[-1].minor.yy0.String->GetChars();
|
|
}
|
|
#line 4190 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
yymsp[-4].minor.yy295 = yylhsminor.yy295;
|
|
break;
|
|
case 187: /* decl_flag ::= NATIVE */
|
|
#line 1214 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Native; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4198 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 188: /* decl_flag ::= STATIC */
|
|
#line 1215 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Static; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4204 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 189: /* decl_flag ::= PRIVATE */
|
|
#line 1216 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Private; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4210 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 190: /* decl_flag ::= PROTECTED */
|
|
#line 1217 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Protected; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4216 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 191: /* decl_flag ::= LATENT */
|
|
#line 1218 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Latent; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4222 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 192: /* decl_flag ::= FINAL */
|
|
#line 1219 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Final; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4228 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 193: /* decl_flag ::= META */
|
|
#line 1220 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Meta; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4234 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 194: /* decl_flag ::= TRANSIENT */
|
|
#line 1221 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Transient; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4240 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 195: /* decl_flag ::= READONLY */
|
|
#line 1222 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_ReadOnly; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4246 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 196: /* decl_flag ::= INTERNAL */
|
|
#line 1223 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Internal; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4252 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 197: /* decl_flag ::= VIRTUAL */
|
|
#line 1224 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Virtual; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4258 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 198: /* decl_flag ::= OVERRIDE */
|
|
#line 1225 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Override; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4264 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 199: /* decl_flag ::= ABSTRACT */
|
|
#line 1226 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Abstract; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4270 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 200: /* decl_flag ::= VARARG */
|
|
#line 1227 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_VarArg; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4276 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 201: /* decl_flag ::= UI */
|
|
#line 1228 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_UIFlag; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4282 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 202: /* decl_flag ::= PLAY */
|
|
#line 1229 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_Play; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4288 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 203: /* decl_flag ::= CLEARSCOPE */
|
|
#line 1230 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_ClearScope; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4294 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 204: /* decl_flag ::= VIRTUALSCOPE */
|
|
#line 1231 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_VirtualScope; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4300 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 205: /* func_const ::= */
|
|
#line 1233 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy0.Int = 0; yymsp[1].minor.yy0.SourceLoc = stat->sc->GetMessageLine(); }
|
|
#line 4306 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 206: /* func_const ::= CONST */
|
|
#line 1234 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = ZCC_FuncConst; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4311 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 207: /* opt_func_body ::= SEMICOLON */
|
|
{ yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
#line 1236 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy55 = NULL; }
|
|
#line 4318 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 208: /* func_params ::= */
|
|
#line 1243 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy491 = NULL; }
|
|
#line 4324 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 209: /* func_params ::= VOID */
|
|
{ yy_destructor(yypParser,112,&yymsp[0].minor);
|
|
#line 1244 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy491 = NULL; }
|
|
#line 4330 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 210: /* func_params ::= func_param_list COMMA ELLIPSIS */
|
|
#line 1248 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(FuncParamDecl,parm,stat->sc->GetMessageLine());
|
|
parm->Type = nullptr;
|
|
parm->Name = NAME_None;
|
|
parm->Flags = 0;
|
|
parm->Default = nullptr;
|
|
yymsp[-2].minor.yy491 = yymsp[-2].minor.yy491; /*X-overwrites-A*/
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy491, parm);
|
|
}
|
|
#line 4344 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
yy_destructor(yypParser,132,&yymsp[0].minor);
|
|
break;
|
|
case 211: /* func_param_list ::= func_param_list COMMA func_param */
|
|
#line 1259 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy491 = yymsp[-2].minor.yy491; /*X-overwrites-A*/ AppendTreeNodeSibling(yymsp[-2].minor.yy491, yymsp[0].minor.yy491); }
|
|
#line 4351 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 212: /* func_param ::= func_param_flags type IDENTIFIER */
|
|
#line 1262 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(FuncParamDecl,parm,yymsp[-2].minor.yy0.SourceLoc ? yymsp[-2].minor.yy0.SourceLoc : yymsp[-1].minor.yy104->SourceLoc);
|
|
parm->Type = yymsp[-1].minor.yy104;
|
|
parm->Name = yymsp[0].minor.yy0.Name();
|
|
parm->Flags = yymsp[-2].minor.yy0.Int;
|
|
parm->Default = nullptr;
|
|
yylhsminor.yy491 = parm;
|
|
}
|
|
#line 4364 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-2].minor.yy491 = yylhsminor.yy491;
|
|
break;
|
|
case 213: /* func_param ::= func_param_flags type IDENTIFIER EQ expr */
|
|
#line 1272 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(FuncParamDecl,parm,yymsp[-4].minor.yy0.SourceLoc ? yymsp[-4].minor.yy0.SourceLoc : yymsp[-3].minor.yy104->SourceLoc);
|
|
parm->Type = yymsp[-3].minor.yy104;
|
|
parm->Name = yymsp[-2].minor.yy0.Name();
|
|
parm->Flags = yymsp[-4].minor.yy0.Int;
|
|
parm->Default = yymsp[0].minor.yy318;
|
|
yylhsminor.yy491 = parm;
|
|
}
|
|
#line 4377 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,1,&yymsp[-1].minor);
|
|
yymsp[-4].minor.yy491 = yylhsminor.yy491;
|
|
break;
|
|
case 214: /* func_param_flags ::= */
|
|
#line 1281 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy0.Int = 0; yymsp[1].minor.yy0.SourceLoc = 0; }
|
|
#line 4384 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 215: /* func_param_flags ::= func_param_flags IN */
|
|
#line 1282 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = yymsp[-1].minor.yy0.Int | ZCC_In; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4389 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 216: /* func_param_flags ::= func_param_flags OUT */
|
|
#line 1283 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = yymsp[-1].minor.yy0.Int | ZCC_Out; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4395 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 217: /* func_param_flags ::= func_param_flags OPTIONAL */
|
|
#line 1284 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yylhsminor.yy0.Int = yymsp[-1].minor.yy0.Int | ZCC_Optional; yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc; }
|
|
#line 4401 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 218: /* primary ::= IDENTIFIER */
|
|
#line 1300 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprID, expr, yymsp[0].minor.yy0);
|
|
expr->Operation = PEX_ID;
|
|
expr->Identifier = yymsp[0].minor.yy0.Name();
|
|
expr->Type = NULL;
|
|
yylhsminor.yy318 = expr;
|
|
}
|
|
#line 4413 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 219: /* primary ::= SUPER */
|
|
#line 1308 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(Expression, expr, yymsp[0].minor.yy0);
|
|
expr->Operation = PEX_Super;
|
|
expr->Type = NULL;
|
|
yylhsminor.yy318 = expr;
|
|
}
|
|
#line 4424 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 220: /* primary ::= constant */
|
|
#line 1314 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy318 = yymsp[0].minor.yy471; /*X-overwrites-A*/ }
|
|
#line 4430 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 221: /* primary ::= LPAREN expr COMMA expr COMMA expr COMMA expr RPAREN */
|
|
{ yy_destructor(yypParser,45,&yymsp[-8].minor);
|
|
#line 1316 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VectorValue, expr, yymsp[-7].minor.yy318);
|
|
expr->Operation = PEX_Vector;
|
|
expr->Type = TypeVector4;
|
|
expr->X = yymsp[-7].minor.yy318;
|
|
expr->Y = yymsp[-5].minor.yy318;
|
|
expr->Z = yymsp[-3].minor.yy318;
|
|
expr->W = yymsp[-1].minor.yy318;
|
|
yymsp[-8].minor.yy318 = expr;
|
|
}
|
|
#line 4445 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-6].minor);
|
|
yy_destructor(yypParser,50,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,50,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 222: /* primary ::= LPAREN expr COMMA expr COMMA expr RPAREN */
|
|
{ yy_destructor(yypParser,45,&yymsp[-6].minor);
|
|
#line 1327 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VectorValue, expr, yymsp[-5].minor.yy318);
|
|
expr->Operation = PEX_Vector;
|
|
expr->Type = TypeVector3;
|
|
expr->X = yymsp[-5].minor.yy318;
|
|
expr->Y = yymsp[-3].minor.yy318;
|
|
expr->Z = yymsp[-1].minor.yy318;
|
|
expr->W = nullptr;
|
|
yymsp[-6].minor.yy318 = expr;
|
|
}
|
|
#line 4465 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,50,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 223: /* primary ::= LPAREN expr COMMA expr RPAREN */
|
|
{ yy_destructor(yypParser,45,&yymsp[-4].minor);
|
|
#line 1338 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VectorValue, expr, yymsp[-3].minor.yy318);
|
|
expr->Operation = PEX_Vector;
|
|
expr->Type = TypeVector2;
|
|
expr->X = yymsp[-3].minor.yy318;
|
|
expr->Y = yymsp[-1].minor.yy318;
|
|
expr->Z = nullptr;
|
|
expr->W = nullptr;
|
|
yymsp[-4].minor.yy318 = expr;
|
|
}
|
|
#line 4484 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 224: /* primary ::= LPAREN expr RPAREN */
|
|
{ yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
#line 1349 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[-2].minor.yy318 = yymsp[-1].minor.yy318; /*yymsp[-2].minor.yy318-overwrites-yymsp[-1].minor.yy318*/
|
|
}
|
|
#line 4495 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 225: /* primary ::= primary LPAREN func_expr_list RPAREN */
|
|
#line 1354 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprFuncCall, expr, yymsp[-3].minor.yy318);
|
|
expr->Operation = PEX_FuncCall;
|
|
expr->Type = NULL;
|
|
expr->Function = yymsp[-3].minor.yy318;
|
|
expr->Parameters = yymsp[-1].minor.yy138;
|
|
yylhsminor.yy318 = expr;
|
|
}
|
|
#line 4509 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
yymsp[-3].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 226: /* primary ::= LPAREN CLASS LT IDENTIFIER GT RPAREN LPAREN func_expr_list RPAREN */
|
|
{ yy_destructor(yypParser,45,&yymsp[-8].minor);
|
|
#line 1363 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ClassCast, expr, yymsp[-5].minor.yy0);
|
|
expr->Operation = PEX_ClassCast;
|
|
expr->ClassName = ENamedName(yymsp[-5].minor.yy0.Int);
|
|
expr->Parameters = yymsp[-1].minor.yy138;
|
|
yymsp[-8].minor.yy318 = expr;
|
|
}
|
|
#line 4524 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,53,&yymsp[-7].minor);
|
|
yy_destructor(yypParser,20,&yymsp[-6].minor);
|
|
yy_destructor(yypParser,21,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,62,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 227: /* primary ::= primary LBRACKET expr RBRACKET */
|
|
#line 1371 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprBinary, expr, yymsp[-1].minor.yy318);
|
|
expr->Operation = PEX_ArrayAccess;
|
|
expr->Type = NULL;
|
|
expr->Left = yymsp[-3].minor.yy318;
|
|
expr->Right = yymsp[-1].minor.yy318;
|
|
yylhsminor.yy318 = expr;
|
|
}
|
|
#line 4543 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,46,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,117,&yymsp[0].minor);
|
|
yymsp[-3].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 228: /* primary ::= primary DOT IDENTIFIER */
|
|
#line 1380 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprMemberAccess, expr, yymsp[0].minor.yy0);
|
|
expr->Operation = PEX_MemberAccess;
|
|
expr->Type = NULL;
|
|
expr->Left = yymsp[-2].minor.yy318;
|
|
expr->Right = ENamedName(yymsp[0].minor.yy0.Int);
|
|
yylhsminor.yy318 = expr;
|
|
}
|
|
#line 4558 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,44,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 229: /* primary ::= primary ADDADD */
|
|
#line 1389 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
UNARY_EXPR(yymsp[-1].minor.yy318,PEX_PostInc);
|
|
yylhsminor.yy318 = expr1;
|
|
}
|
|
#line 4568 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,42,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 230: /* primary ::= primary SUBSUB */
|
|
#line 1394 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
UNARY_EXPR(yymsp[-1].minor.yy318,PEX_PostDec);
|
|
yylhsminor.yy318 = expr1;
|
|
}
|
|
#line 4578 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,43,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 231: /* unary_expr ::= SUB unary_expr */
|
|
{ yy_destructor(yypParser,33,&yymsp[-1].minor);
|
|
#line 1410 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
ZCC_ExprConstant *con = static_cast<ZCC_ExprConstant *>(yymsp[0].minor.yy318);
|
|
if (yymsp[0].minor.yy318->Operation == PEX_ConstValue && (con->Type->isInt() || con->Type->isFloat()))
|
|
{ // For constants, manipulate the child node directly, and don't create a new node.
|
|
if (con->Type->isInt())
|
|
{
|
|
con->IntVal = -con->IntVal;
|
|
}
|
|
else
|
|
{
|
|
con->DoubleVal = -con->DoubleVal;
|
|
}
|
|
yymsp[-1].minor.yy318 = yymsp[0].minor.yy318;
|
|
}
|
|
else
|
|
{ // For everything else, create a new node and do the negation later.
|
|
UNARY_EXPR(yymsp[0].minor.yy318,PEX_Negate);
|
|
yymsp[-1].minor.yy318 = expr1;
|
|
}
|
|
}
|
|
#line 4605 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 232: /* unary_expr ::= ADD unary_expr */
|
|
{ yy_destructor(yypParser,34,&yymsp[-1].minor);
|
|
#line 1431 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
// Even though this is really a no-op, we still need to make a node for
|
|
// it so we can type check that it is being applied to something numeric.
|
|
// But we can do that right now for constant numerals.
|
|
ZCC_ExprConstant *con = static_cast<ZCC_ExprConstant *>(yymsp[0].minor.yy318);
|
|
if (yymsp[0].minor.yy318->Operation != PEX_ConstValue || (!con->Type->isInt() && !con->Type->isFloat()))
|
|
{
|
|
UNARY_EXPR(yymsp[0].minor.yy318,PEX_AntiNegate);
|
|
yymsp[-1].minor.yy318 = expr1;
|
|
}
|
|
else
|
|
{
|
|
yymsp[-1].minor.yy318 = yymsp[0].minor.yy318;
|
|
}
|
|
}
|
|
#line 4626 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 233: /* unary_expr ::= SUBSUB unary_expr */
|
|
{ yy_destructor(yypParser,43,&yymsp[-1].minor);
|
|
#line 1447 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
UNARY_EXPR(yymsp[0].minor.yy318,PEX_PreDec);
|
|
yymsp[-1].minor.yy318 = expr1;
|
|
}
|
|
#line 4636 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 234: /* unary_expr ::= ADDADD unary_expr */
|
|
{ yy_destructor(yypParser,42,&yymsp[-1].minor);
|
|
#line 1452 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
UNARY_EXPR(yymsp[0].minor.yy318,PEX_PreInc);
|
|
yymsp[-1].minor.yy318 = expr1;
|
|
}
|
|
#line 4646 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 235: /* unary_expr ::= TILDE unary_expr */
|
|
{ yy_destructor(yypParser,136,&yymsp[-1].minor);
|
|
#line 1457 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
UNARY_EXPR(yymsp[0].minor.yy318,PEX_BitNot);
|
|
yymsp[-1].minor.yy318 = expr1;
|
|
}
|
|
#line 4656 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 236: /* unary_expr ::= BANG unary_expr */
|
|
{ yy_destructor(yypParser,137,&yymsp[-1].minor);
|
|
#line 1462 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
UNARY_EXPR(yymsp[0].minor.yy318,PEX_BoolNot);
|
|
yymsp[-1].minor.yy318 = expr1;
|
|
}
|
|
#line 4666 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 237: /* unary_expr ::= SIZEOF unary_expr */
|
|
{ yy_destructor(yypParser,138,&yymsp[-1].minor);
|
|
#line 1467 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
UNARY_EXPR(yymsp[0].minor.yy318,PEX_SizeOf);
|
|
yymsp[-1].minor.yy318 = expr1;
|
|
}
|
|
#line 4676 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 238: /* unary_expr ::= ALIGNOF unary_expr */
|
|
{ yy_destructor(yypParser,139,&yymsp[-1].minor);
|
|
#line 1472 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
UNARY_EXPR(yymsp[0].minor.yy318,PEX_AlignOf);
|
|
yymsp[-1].minor.yy318 = expr1;
|
|
}
|
|
#line 4686 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 239: /* expr ::= expr ADD expr */
|
|
#line 1485 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Add);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4695 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,34,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 240: /* expr ::= expr SUB expr */
|
|
#line 1490 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Sub);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4705 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,33,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 241: /* expr ::= expr MUL expr */
|
|
#line 1495 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Mul);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4715 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,35,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 242: /* expr ::= expr DIV expr */
|
|
#line 1500 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Div);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4725 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,36,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 243: /* expr ::= expr MOD expr */
|
|
#line 1505 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Mod);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4735 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,37,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 244: /* expr ::= expr POW expr */
|
|
#line 1510 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Pow);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4745 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,40,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 245: /* expr ::= expr CROSSPROD expr */
|
|
#line 1515 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_CrossProduct);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4755 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,38,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 246: /* expr ::= expr DOTPROD expr */
|
|
#line 1520 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_DotProduct);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4765 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,39,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 247: /* expr ::= expr LSH expr */
|
|
#line 1525 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_LeftShift);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4775 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,30,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 248: /* expr ::= expr RSH expr */
|
|
#line 1530 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_RightShift);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4785 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,31,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 249: /* expr ::= expr URSH expr */
|
|
#line 1535 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_URightShift);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4795 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,32,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 250: /* expr ::= expr DOTDOT expr */
|
|
#line 1540 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Concat);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4805 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,26,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 251: /* expr ::= expr LT expr */
|
|
#line 1546 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_LT);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4815 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,20,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 252: /* expr ::= expr GT expr */
|
|
#line 1551 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_GT);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4825 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,21,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 253: /* expr ::= expr LTEQ expr */
|
|
#line 1556 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_LTEQ);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4835 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,22,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 254: /* expr ::= expr GTEQ expr */
|
|
#line 1561 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_GTEQ);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4845 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,23,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 255: /* expr ::= expr LTGTEQ expr */
|
|
#line 1566 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_LTGTEQ);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4855 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,24,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 256: /* expr ::= expr IS expr */
|
|
#line 1571 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Is);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4865 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,25,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 257: /* expr ::= expr EQEQ expr */
|
|
#line 1577 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_EQEQ);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4875 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,17,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 258: /* expr ::= expr NEQ expr */
|
|
#line 1582 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_NEQ);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4885 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,18,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 259: /* expr ::= expr APPROXEQ expr */
|
|
#line 1587 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_APREQ);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4895 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,19,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 260: /* expr ::= expr AND expr */
|
|
#line 1593 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_BitAnd);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4905 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,29,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 261: /* expr ::= expr XOR expr */
|
|
#line 1598 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_BitXor);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4915 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,28,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 262: /* expr ::= expr OR expr */
|
|
#line 1603 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_BitOr);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4925 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,27,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 263: /* expr ::= expr ANDAND expr */
|
|
#line 1608 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_BoolAnd);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4935 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,16,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 264: /* expr ::= expr OROR expr */
|
|
#line 1613 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_BoolOr);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4945 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,15,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 265: /* expr ::= expr EQ expr */
|
|
#line 1618 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Assign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4955 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,1,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 266: /* expr ::= expr ADDEQ expr */
|
|
#line 1623 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_AddAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4965 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,5,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 267: /* expr ::= expr SUBEQ expr */
|
|
#line 1628 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_SubAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4975 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,6,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 268: /* expr ::= expr MULEQ expr */
|
|
#line 1633 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_MulAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4985 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,2,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 269: /* expr ::= expr DIVEQ expr */
|
|
#line 1638 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_DivAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 4995 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,3,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 270: /* expr ::= expr MODEQ expr */
|
|
#line 1643 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_ModAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 5005 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,4,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 271: /* expr ::= expr LSHEQ expr */
|
|
#line 1648 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_LshAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 5015 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,7,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 272: /* expr ::= expr RSHEQ expr */
|
|
#line 1653 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_RshAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 5025 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,8,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 273: /* expr ::= expr URSHEQ expr */
|
|
#line 1658 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_URshAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 5035 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,12,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 274: /* expr ::= expr ANDEQ expr */
|
|
#line 1663 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_AndAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 5045 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,9,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 275: /* expr ::= expr OREQ expr */
|
|
#line 1668 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_OrAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 5055 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,10,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 276: /* expr ::= expr XOREQ expr */
|
|
#line 1673 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_XorAssign);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 5065 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,11,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 277: /* expr ::= expr SCOPE expr */
|
|
#line 1680 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
BINARY_EXPR(yymsp[-2].minor.yy318,yymsp[0].minor.yy318,PEX_Scope);
|
|
yylhsminor.yy318 = expr2;
|
|
}
|
|
#line 5075 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,47,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 278: /* expr ::= expr QUESTION expr COLON expr */
|
|
#line 1688 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprTrinary, expr, yymsp[-4].minor.yy318);
|
|
expr->Operation = PEX_Trinary;
|
|
expr->Type = NULL;
|
|
expr->Test = yymsp[-4].minor.yy318;
|
|
expr->Left = yymsp[-2].minor.yy318;
|
|
expr->Right = yymsp[0].minor.yy318;
|
|
yylhsminor.yy318 = expr;
|
|
}
|
|
#line 5090 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,13,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,14,&yymsp[-1].minor);
|
|
yymsp[-4].minor.yy318 = yylhsminor.yy318;
|
|
break;
|
|
case 279: /* expr_list ::= expr_list COMMA expr */
|
|
#line 1704 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[-2].minor.yy318 = yymsp[-2].minor.yy318; /*X-overwrites-A*/
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy318, yymsp[0].minor.yy318);
|
|
}
|
|
#line 5101 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 280: /* func_expr_list ::= func_expr_list COMMA func_expr_item */
|
|
#line 1720 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
// Omitted parameters still need to appear as nodes in the list.
|
|
if (yymsp[-2].minor.yy138 == NULL)
|
|
{
|
|
NEW_AST_NODE(FuncParm,nil_a,yymsp[-1].minor.yy0);
|
|
nil_a->Value = NULL;
|
|
nil_a->Label = NAME_None;
|
|
yymsp[-2].minor.yy138 = nil_a;
|
|
}
|
|
if (yymsp[0].minor.yy138 == NULL)
|
|
{
|
|
NEW_AST_NODE(FuncParm,nil_b,yymsp[-1].minor.yy0);
|
|
nil_b->Value = NULL;
|
|
nil_b->Label = NAME_None;
|
|
yymsp[0].minor.yy138 = nil_b;
|
|
}
|
|
yymsp[-2].minor.yy138 = yymsp[-2].minor.yy138; /*X-overwrites-A*/
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy138, yymsp[0].minor.yy138);
|
|
}
|
|
#line 5125 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 281: /* func_expr_item ::= */
|
|
#line 1741 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[1].minor.yy138 = NULL;
|
|
}
|
|
#line 5132 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 282: /* named_expr ::= IDENTIFIER COLON expr */
|
|
#line 1747 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(FuncParm, parm, yymsp[-2].minor.yy0);
|
|
parm->Value = yymsp[0].minor.yy318;
|
|
parm->Label = ENamedName(yymsp[-2].minor.yy0.Int);
|
|
yylhsminor.yy138 = parm;
|
|
}
|
|
#line 5142 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,14,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy138 = yylhsminor.yy138;
|
|
break;
|
|
case 283: /* named_expr ::= expr */
|
|
#line 1754 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(FuncParm, parm, yymsp[0].minor.yy318);
|
|
parm->Value = yymsp[0].minor.yy318;
|
|
parm->Label = NAME_None;
|
|
yylhsminor.yy138 = parm;
|
|
}
|
|
#line 5154 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy138 = yylhsminor.yy138;
|
|
break;
|
|
case 285: /* string_constant ::= string_constant STRCONST */
|
|
#line 1775 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprConstant, strconst, yymsp[-1].minor.yy471);
|
|
strconst->Operation = PEX_ConstValue;
|
|
strconst->Type = TypeString;
|
|
strconst->StringVal = stat->Strings.Alloc(*(yymsp[-1].minor.yy471->StringVal) + *(yymsp[0].minor.yy0.String));
|
|
yylhsminor.yy471 = strconst;
|
|
}
|
|
#line 5166 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 286: /* constant ::= INTCONST */
|
|
#line 1785 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_INTCONST_NODE(intconst, TypeSInt32, yymsp[0].minor.yy0.Int, yymsp[0].minor.yy0);
|
|
yylhsminor.yy471 = intconst;
|
|
}
|
|
#line 5175 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 287: /* constant ::= UINTCONST */
|
|
#line 1790 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_INTCONST_NODE(intconst, TypeUInt32, yymsp[0].minor.yy0.Int, yymsp[0].minor.yy0);
|
|
yylhsminor.yy471 = intconst;
|
|
}
|
|
#line 5184 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 288: /* constant ::= FLOATCONST */
|
|
#line 1795 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprConstant, floatconst, yymsp[0].minor.yy0);
|
|
floatconst->Operation = PEX_ConstValue;
|
|
floatconst->Type = TypeFloat64;
|
|
floatconst->DoubleVal = yymsp[0].minor.yy0.Float;
|
|
yylhsminor.yy471 = floatconst;
|
|
}
|
|
#line 5196 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 289: /* constant ::= NAMECONST */
|
|
#line 1803 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprConstant, floatconst, yymsp[0].minor.yy0);
|
|
floatconst->Operation = PEX_ConstValue;
|
|
floatconst->Type = TypeName;
|
|
floatconst->IntVal = yymsp[0].minor.yy0.Int;
|
|
yylhsminor.yy471 = floatconst;
|
|
}
|
|
#line 5208 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 290: /* constant ::= FALSE */
|
|
#line 1811 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_INTCONST_NODE(boolconst, TypeBool, false, yymsp[0].minor.yy0);
|
|
yylhsminor.yy471 = boolconst;
|
|
}
|
|
#line 5217 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 291: /* constant ::= TRUE */
|
|
#line 1816 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_INTCONST_NODE(boolconst, TypeBool, true, yymsp[0].minor.yy0);
|
|
yylhsminor.yy471 = boolconst;
|
|
}
|
|
#line 5226 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 292: /* constant ::= NULLPTR */
|
|
#line 1821 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExprConstant, nullptrconst, yymsp[0].minor.yy0);
|
|
nullptrconst->Operation = PEX_ConstValue;
|
|
nullptrconst->Type = TypeNullPtr;
|
|
nullptrconst->StringVal = nullptr;
|
|
yylhsminor.yy471 = nullptrconst;
|
|
}
|
|
#line 5238 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy471 = yylhsminor.yy471;
|
|
break;
|
|
case 294: /* statement ::= labeled_statement */
|
|
#line 1835 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = yymsp[0].minor.yy442; /*X-overwrites-A*/ }
|
|
#line 5244 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 295: /* statement ::= compound_statement */
|
|
#line 1836 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = yymsp[0].minor.yy55; /*X-overwrites-A*/ }
|
|
#line 5249 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 296: /* statement ::= expression_statement SEMICOLON */
|
|
#line 1837 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy156 = yymsp[-1].minor.yy302; /*X-overwrites-A*/ }
|
|
#line 5254 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
break;
|
|
case 297: /* statement ::= assign_statement SEMICOLON */
|
|
#line 1842 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy156 = yymsp[-1].minor.yy271; /*X-overwrites-A*/ }
|
|
#line 5260 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
break;
|
|
case 298: /* statement ::= assign_decl_statement SEMICOLON */
|
|
#line 1843 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy156 = yymsp[-1].minor.yy251; /*X-overwrites-A*/ }
|
|
#line 5266 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
break;
|
|
case 299: /* statement ::= local_var SEMICOLON */
|
|
#line 1844 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-1].minor.yy156 = yymsp[-1].minor.yy66; /*X-overwrites-A*/ }
|
|
#line 5272 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
break;
|
|
case 301: /* statement ::= staticarray_statement */
|
|
#line 1846 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = yymsp[0].minor.yy106; /*X-overwrites-A*/ }
|
|
#line 5278 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 302: /* staticarray_statement ::= STATICCONST type IDENTIFIER LBRACKET RBRACKET EQ LBRACE expr_list RBRACE SEMICOLON */
|
|
{ yy_destructor(yypParser,146,&yymsp[-9].minor);
|
|
#line 1853 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(StaticArrayStatement, stmt, yymsp[-8].minor.yy104);
|
|
stmt->Type = yymsp[-8].minor.yy104;
|
|
stmt->Id = ENamedName(yymsp[-7].minor.yy0.Int);
|
|
stmt->Values = yymsp[-2].minor.yy318;
|
|
yymsp[-9].minor.yy106 = stmt;
|
|
}
|
|
#line 5290 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,46,&yymsp[-6].minor);
|
|
yy_destructor(yypParser,117,&yymsp[-5].minor);
|
|
yy_destructor(yypParser,1,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,65,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,66,&yymsp[-1].minor);
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 303: /* staticarray_statement ::= STATICCONST type LBRACKET RBRACKET IDENTIFIER EQ LBRACE expr_list RBRACE SEMICOLON */
|
|
{ yy_destructor(yypParser,146,&yymsp[-9].minor);
|
|
#line 1862 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(StaticArrayStatement, stmt, yymsp[-8].minor.yy104);
|
|
stmt->Type = yymsp[-8].minor.yy104;
|
|
stmt->Id = ENamedName(yymsp[-5].minor.yy0.Int);
|
|
stmt->Values = yymsp[-2].minor.yy318;
|
|
yymsp[-9].minor.yy106 = stmt;
|
|
}
|
|
#line 5309 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,46,&yymsp[-7].minor);
|
|
yy_destructor(yypParser,117,&yymsp[-6].minor);
|
|
yy_destructor(yypParser,1,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,65,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,66,&yymsp[-1].minor);
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 304: /* jump_statement ::= CONTINUE SEMICOLON */
|
|
#line 1875 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ContinueStmt, stmt, yymsp[-1].minor.yy0);
|
|
yylhsminor.yy156 = stmt;
|
|
}
|
|
#line 5324 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 305: /* jump_statement ::= BREAK SEMICOLON */
|
|
#line 1880 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(BreakStmt, stmt, yymsp[-1].minor.yy0);
|
|
yylhsminor.yy156 = stmt;
|
|
}
|
|
#line 5334 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 306: /* jump_statement ::= RETURN SEMICOLON */
|
|
#line 1885 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ReturnStmt, stmt, yymsp[-1].minor.yy0);
|
|
stmt->Values = NULL;
|
|
yylhsminor.yy156 = stmt;
|
|
}
|
|
#line 5345 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 307: /* jump_statement ::= RETURN expr_list SEMICOLON */
|
|
#line 1891 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ReturnStmt, stmt, yymsp[-2].minor.yy0);
|
|
stmt->Values = yymsp[-1].minor.yy318;
|
|
yylhsminor.yy156 = stmt;
|
|
}
|
|
#line 5356 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
yymsp[-2].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 308: /* compound_statement ::= LBRACE RBRACE */
|
|
#line 1903 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(CompoundStmt,stmt,yymsp[-1].minor.yy0);
|
|
stmt->Content = NULL;
|
|
yylhsminor.yy55 = stmt;
|
|
}
|
|
#line 5367 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy55 = yylhsminor.yy55;
|
|
break;
|
|
case 309: /* compound_statement ::= LBRACE statement_list RBRACE */
|
|
#line 1909 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(CompoundStmt,stmt,yymsp[-2].minor.yy0);
|
|
stmt->Content = yymsp[-1].minor.yy156;
|
|
yylhsminor.yy55 = stmt;
|
|
}
|
|
#line 5378 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
yymsp[-2].minor.yy55 = yylhsminor.yy55;
|
|
break;
|
|
case 310: /* compound_statement ::= LBRACE error RBRACE */
|
|
#line 1915 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(CompoundStmt,stmt,yymsp[-2].minor.yy0);
|
|
stmt->Content = NULL;
|
|
yylhsminor.yy55 = stmt;
|
|
}
|
|
#line 5389 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
yymsp[-2].minor.yy55 = yylhsminor.yy55;
|
|
break;
|
|
case 313: /* expression_statement ::= expr */
|
|
#line 1935 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ExpressionStmt, stmt, yymsp[0].minor.yy318);
|
|
stmt->Expression = yymsp[0].minor.yy318;
|
|
yylhsminor.yy302 = stmt;
|
|
}
|
|
#line 5400 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy302 = yylhsminor.yy302;
|
|
break;
|
|
case 314: /* iteration_statement ::= while_or_until LPAREN expr RPAREN statement */
|
|
#line 1947 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(IterationStmt, iter, yymsp[-4].minor.yy0);
|
|
if (yymsp[-4].minor.yy0.Int == ZCC_UNTIL)
|
|
{ // Negate the loop condition
|
|
UNARY_EXPR(yymsp[-2].minor.yy318,PEX_BoolNot);
|
|
iter->LoopCondition = expr1;
|
|
}
|
|
else
|
|
{
|
|
iter->LoopCondition = yymsp[-2].minor.yy318;
|
|
}
|
|
iter->LoopStatement = yymsp[0].minor.yy156;
|
|
iter->LoopBumper = NULL;
|
|
iter->CheckAt = ZCC_IterationStmt::Start;
|
|
yylhsminor.yy156 = iter;
|
|
}
|
|
#line 5421 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,62,&yymsp[-1].minor);
|
|
yymsp[-4].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 315: /* iteration_statement ::= DO statement while_or_until LPAREN expr RPAREN */
|
|
#line 1965 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(IterationStmt, iter, yymsp[-5].minor.yy0);
|
|
if (yymsp[-3].minor.yy0.Int == ZCC_UNTIL)
|
|
{ // Negate the loop condition
|
|
UNARY_EXPR(yymsp[-1].minor.yy318,PEX_BoolNot);
|
|
iter->LoopCondition = expr1;
|
|
}
|
|
else
|
|
{
|
|
iter->LoopCondition = yymsp[-1].minor.yy318;
|
|
}
|
|
iter->LoopStatement = yymsp[-4].minor.yy156;
|
|
iter->LoopBumper = NULL;
|
|
iter->CheckAt = ZCC_IterationStmt::End;
|
|
yylhsminor.yy156 = iter;
|
|
}
|
|
#line 5444 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
yymsp[-5].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 316: /* iteration_statement ::= FOR LPAREN for_init SEMICOLON opt_expr SEMICOLON for_bump RPAREN statement */
|
|
#line 1983 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(IterationStmt, iter, yymsp[-8].minor.yy0);
|
|
iter->LoopCondition = yymsp[-4].minor.yy318;
|
|
iter->LoopStatement = yymsp[0].minor.yy156;
|
|
iter->LoopBumper = yymsp[-2].minor.yy156;
|
|
iter->CheckAt = ZCC_IterationStmt::Start;
|
|
// The initialization expression appears outside the loop
|
|
// for_init may be NULL if there is no initialization.
|
|
SAFE_APPEND(yymsp[-6].minor.yy156, iter);
|
|
// And the whole thing gets wrapped inside a compound statement in case the loop
|
|
// initializer defined any variables.
|
|
NEW_AST_NODE(CompoundStmt, wrap, yymsp[-8].minor.yy0);
|
|
wrap->Content = yymsp[-6].minor.yy156;
|
|
yylhsminor.yy156 = wrap;
|
|
}
|
|
#line 5466 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-7].minor);
|
|
yy_destructor(yypParser,49,&yymsp[-5].minor);
|
|
yy_destructor(yypParser,49,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,62,&yymsp[-1].minor);
|
|
yymsp[-8].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 317: /* array_iteration_statement ::= FOREACH LPAREN variable_name COLON expr RPAREN statement */
|
|
#line 2002 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(ArrayIterationStmt, iter, yymsp[-6].minor.yy0);
|
|
iter->ItName = yymsp[-4].minor.yy180;
|
|
iter->ItArray = yymsp[-2].minor.yy318;
|
|
iter->LoopStatement = yymsp[0].minor.yy156;
|
|
yylhsminor.yy156 = iter;
|
|
}
|
|
#line 5482 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-5].minor);
|
|
yy_destructor(yypParser,14,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,62,&yymsp[-1].minor);
|
|
yymsp[-6].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 318: /* while_or_until ::= WHILE */
|
|
#line 2011 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yylhsminor.yy0.Int = ZCC_WHILE;
|
|
yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc;
|
|
}
|
|
#line 5494 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 319: /* while_or_until ::= UNTIL */
|
|
#line 2016 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yylhsminor.yy0.Int = ZCC_UNTIL;
|
|
yylhsminor.yy0.SourceLoc = yymsp[0].minor.yy0.SourceLoc;
|
|
}
|
|
#line 5503 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy0 = yylhsminor.yy0;
|
|
break;
|
|
case 320: /* for_init ::= local_var */
|
|
#line 2022 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = yymsp[0].minor.yy66 /*X-overwrites-A*/; }
|
|
#line 5509 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 321: /* for_init ::= for_bump */
|
|
#line 2023 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = yymsp[0].minor.yy156 /*X-overwrites-A*/; }
|
|
#line 5514 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 322: /* for_bump ::= */
|
|
#line 2026 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[1].minor.yy156 = NULL; }
|
|
#line 5519 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 323: /* for_bump ::= expression_statement */
|
|
#line 2027 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[0].minor.yy156 = yymsp[0].minor.yy302; /*X-overwrites-A*/ }
|
|
#line 5524 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 324: /* for_bump ::= for_bump COMMA expression_statement */
|
|
#line 2028 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{ yymsp[-2].minor.yy156 = yymsp[-2].minor.yy156; /*X-overwrites-A*/ AppendTreeNodeSibling(yymsp[-2].minor.yy156, yymsp[0].minor.yy302); }
|
|
#line 5529 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 325: /* selection_statement ::= if_front */
|
|
#line 2042 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[0].minor.yy156 = yymsp[0].minor.yy481; /*X-overwrites-A*/
|
|
}
|
|
#line 5537 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
break;
|
|
case 326: /* selection_statement ::= if_front ELSE statement */
|
|
#line 2046 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[-2].minor.yy481->FalsePath = yymsp[0].minor.yy156;
|
|
yymsp[-2].minor.yy156 = yymsp[-2].minor.yy481; /*X-overwrites-A*/
|
|
}
|
|
#line 5545 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,156,&yymsp[-1].minor);
|
|
break;
|
|
case 327: /* if_front ::= IF LPAREN expr RPAREN statement */
|
|
#line 2052 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(IfStmt,stmt,yymsp[-4].minor.yy0);
|
|
stmt->Condition = yymsp[-2].minor.yy318;
|
|
stmt->TruePath = yymsp[0].minor.yy156;
|
|
stmt->FalsePath = NULL;
|
|
yylhsminor.yy481 = stmt;
|
|
}
|
|
#line 5557 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,62,&yymsp[-1].minor);
|
|
yymsp[-4].minor.yy481 = yylhsminor.yy481;
|
|
break;
|
|
case 328: /* selection_statement ::= SWITCH LPAREN expr RPAREN statement */
|
|
#line 2063 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(SwitchStmt,stmt,yymsp[-4].minor.yy0);
|
|
stmt->Condition = yymsp[-2].minor.yy318;
|
|
stmt->Content = yymsp[0].minor.yy156;
|
|
yylhsminor.yy156 = stmt;
|
|
}
|
|
#line 5570 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,45,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,62,&yymsp[-1].minor);
|
|
yymsp[-4].minor.yy156 = yylhsminor.yy156;
|
|
break;
|
|
case 329: /* labeled_statement ::= CASE expr COLON */
|
|
#line 2075 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(CaseStmt,stmt,yymsp[-2].minor.yy0);
|
|
stmt->Condition = yymsp[-1].minor.yy318;
|
|
yylhsminor.yy442 = stmt;
|
|
}
|
|
#line 5582 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,14,&yymsp[0].minor);
|
|
yymsp[-2].minor.yy442 = yylhsminor.yy442;
|
|
break;
|
|
case 330: /* labeled_statement ::= DEFAULT COLON */
|
|
#line 2081 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(CaseStmt,stmt,yymsp[-1].minor.yy0);
|
|
stmt->Condition = NULL;
|
|
yylhsminor.yy442 = stmt;
|
|
}
|
|
#line 5593 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,14,&yymsp[0].minor);
|
|
yymsp[-1].minor.yy442 = yylhsminor.yy442;
|
|
break;
|
|
case 331: /* assign_statement ::= LBRACKET expr_list RBRACKET EQ expr */
|
|
{ yy_destructor(yypParser,46,&yymsp[-4].minor);
|
|
#line 2094 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(AssignStmt,stmt,yymsp[-3].minor.yy318);
|
|
stmt->AssignOp = ZCC_EQ;
|
|
stmt->Dests = yymsp[-3].minor.yy318;
|
|
stmt->Sources = yymsp[0].minor.yy318;
|
|
yymsp[-4].minor.yy271 = stmt;
|
|
}
|
|
#line 5607 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,117,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,1,&yymsp[-1].minor);
|
|
}
|
|
break;
|
|
case 332: /* assign_decl_statement ::= LET LBRACKET identifier_list RBRACKET EQ expr */
|
|
{ yy_destructor(yypParser,105,&yymsp[-5].minor);
|
|
#line 2105 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(AssignDeclStmt,stmt,yymsp[-3].minor.yy165);
|
|
stmt->AssignOp = ZCC_EQ;
|
|
stmt->Dests = yymsp[-3].minor.yy165;
|
|
stmt->Sources = yymsp[0].minor.yy318;
|
|
yymsp[-5].minor.yy251 = stmt;
|
|
}
|
|
#line 5622 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,46,&yymsp[-4].minor);
|
|
yy_destructor(yypParser,117,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,1,&yymsp[-1].minor);
|
|
}
|
|
break;
|
|
case 333: /* local_var ::= type variable_list_with_init */
|
|
#line 2118 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(LocalVarStmt,vardef,yymsp[-1].minor.yy104);
|
|
vardef->Type = yymsp[-1].minor.yy104;
|
|
vardef->Vars = yymsp[0].minor.yy275;
|
|
yylhsminor.yy66 = vardef;
|
|
}
|
|
#line 5636 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy66 = yylhsminor.yy66;
|
|
break;
|
|
case 334: /* var_init ::= IDENTIFIER */
|
|
#line 2127 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VarInit,var,yymsp[0].minor.yy0);
|
|
var->Name = ENamedName(yymsp[0].minor.yy0.Int);
|
|
var->ArraySize = NULL;
|
|
var->Init = NULL;
|
|
var->InitIsArray = false;
|
|
yylhsminor.yy275 = var;
|
|
}
|
|
#line 5649 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[0].minor.yy275 = yylhsminor.yy275;
|
|
break;
|
|
case 335: /* var_init ::= IDENTIFIER array_size */
|
|
#line 2137 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VarInit,var,yymsp[-1].minor.yy0);
|
|
var->Name = ENamedName(yymsp[-1].minor.yy0.Int);
|
|
var->ArraySize = yymsp[0].minor.yy318;
|
|
var->Init = NULL;
|
|
var->InitIsArray = false;
|
|
yylhsminor.yy275 = var;
|
|
}
|
|
#line 5662 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yymsp[-1].minor.yy275 = yylhsminor.yy275;
|
|
break;
|
|
case 336: /* var_init ::= IDENTIFIER EQ expr */
|
|
#line 2147 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VarInit,var,yymsp[-2].minor.yy0);
|
|
var->Name = ENamedName(yymsp[-2].minor.yy0.Int);
|
|
var->ArraySize = NULL;
|
|
var->Init = yymsp[0].minor.yy318;
|
|
var->InitIsArray = false;
|
|
yylhsminor.yy275 = var;
|
|
}
|
|
#line 5675 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,1,&yymsp[-1].minor);
|
|
yymsp[-2].minor.yy275 = yylhsminor.yy275;
|
|
break;
|
|
case 337: /* var_init ::= IDENTIFIER EQ LBRACE expr_list RBRACE */
|
|
#line 2157 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VarInit,var,yymsp[-4].minor.yy0);
|
|
var->Name = ENamedName(yymsp[-4].minor.yy0.Int);
|
|
var->ArraySize = NULL;
|
|
var->Init = yymsp[-1].minor.yy318;
|
|
var->InitIsArray = true;
|
|
yylhsminor.yy275 = var;
|
|
}
|
|
#line 5689 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,1,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,65,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
yymsp[-4].minor.yy275 = yylhsminor.yy275;
|
|
break;
|
|
case 338: /* var_init ::= IDENTIFIER array_size EQ LBRACE expr_list RBRACE */
|
|
#line 2167 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
NEW_AST_NODE(VarInit,var,yymsp[-5].minor.yy0);
|
|
var->Name = ENamedName(yymsp[-5].minor.yy0.Int);
|
|
var->ArraySize = yymsp[-4].minor.yy318;
|
|
var->Init = yymsp[-1].minor.yy318;
|
|
var->InitIsArray = true;
|
|
yylhsminor.yy275 = var;
|
|
}
|
|
#line 5705 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,1,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,65,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
yymsp[-5].minor.yy275 = yylhsminor.yy275;
|
|
break;
|
|
case 339: /* var_init ::= IDENTIFIER EQ LBRACE error RBRACE */
|
|
{ yy_destructor(yypParser,54,&yymsp[-4].minor);
|
|
#line 2177 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
yymsp[-4].minor.yy275 = NULL;
|
|
}
|
|
#line 5717 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,1,&yymsp[-3].minor);
|
|
yy_destructor(yypParser,65,&yymsp[-2].minor);
|
|
yy_destructor(yypParser,66,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
case 340: /* variable_list_with_init ::= variable_list_with_init COMMA var_init */
|
|
#line 2185 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
AppendTreeNodeSibling(yymsp[-2].minor.yy275, yymsp[0].minor.yy275);
|
|
yymsp[-2].minor.yy275 = yymsp[-2].minor.yy275; /*X-overwrites-A*/
|
|
}
|
|
#line 5729 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,50,&yymsp[-1].minor);
|
|
break;
|
|
case 341: /* translation_unit ::= translation_unit EOF */
|
|
#line 178 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
}
|
|
#line 5736 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,48,&yymsp[0].minor);
|
|
break;
|
|
case 343: /* opt_semicolon ::= SEMICOLON */
|
|
{ yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
#line 191 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
}
|
|
#line 5744 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 345: /* opt_comma ::= COMMA */
|
|
{ yy_destructor(yypParser,50,&yymsp[0].minor);
|
|
#line 194 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
}
|
|
#line 5752 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
}
|
|
break;
|
|
case 351: /* state_flow ::= state_flow_type scanner_mode SEMICOLON */
|
|
#line 650 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
}
|
|
#line 5759 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,49,&yymsp[0].minor);
|
|
break;
|
|
case 361: /* primary ::= LPAREN error RPAREN */
|
|
{ yy_destructor(yypParser,45,&yymsp[-2].minor);
|
|
#line 1352 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
{
|
|
}
|
|
#line 5767 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
yy_destructor(yypParser,62,&yymsp[0].minor);
|
|
}
|
|
break;
|
|
default:
|
|
/* (342) opt_semicolon ::= */ yytestcase(yyruleno==342);
|
|
/* (344) opt_comma ::= */ yytestcase(yyruleno==344);
|
|
/* (346) opt_expr ::= expr */ yytestcase(yyruleno==346);
|
|
/* (347) opt_struct_body ::= struct_body */ yytestcase(yyruleno==347);
|
|
/* (348) struct_body ::= struct_member */ yytestcase(yyruleno==348);
|
|
/* (349) enum_list ::= enumerator */ yytestcase(yyruleno==349);
|
|
/* (350) opt_enum_list ::= enum_list opt_comma */ yytestcase(yyruleno==350);
|
|
/* (352) type_name1 ::= int_type */ yytestcase(yyruleno==352);
|
|
/* (353) type_or_array ::= type */ yytestcase(yyruleno==353);
|
|
/* (354) type_list ::= type_or_array */ yytestcase(yyruleno==354);
|
|
/* (355) type_list_or_void ::= type_list */ yytestcase(yyruleno==355);
|
|
/* (356) array_size ::= array_size_expr */ yytestcase(yyruleno==356);
|
|
/* (357) variable_list ::= variable_name */ yytestcase(yyruleno==357);
|
|
/* (358) opt_func_body ::= function_body */ yytestcase(yyruleno==358);
|
|
/* (359) func_params ::= func_param_list */ yytestcase(yyruleno==359);
|
|
/* (360) func_param_list ::= func_param */ yytestcase(yyruleno==360);
|
|
/* (362) unary_expr ::= primary */ yytestcase(yyruleno==362);
|
|
/* (363) expr ::= unary_expr */ yytestcase(yyruleno==363);
|
|
/* (364) expr_list ::= expr */ yytestcase(yyruleno==364);
|
|
/* (365) func_expr_list ::= func_expr_item */ yytestcase(yyruleno==365);
|
|
/* (366) func_expr_item ::= named_expr */ yytestcase(yyruleno==366);
|
|
/* (367) constant ::= string_constant */ yytestcase(yyruleno==367);
|
|
/* (368) function_body ::= compound_statement */ yytestcase(yyruleno==368);
|
|
/* (369) statement ::= selection_statement */ yytestcase(yyruleno==369);
|
|
/* (370) statement ::= iteration_statement */ yytestcase(yyruleno==370);
|
|
/* (371) statement ::= array_iteration_statement */ yytestcase(yyruleno==371);
|
|
/* (372) statement ::= jump_statement */ yytestcase(yyruleno==372);
|
|
/* (373) variable_list_with_init ::= var_init */ yytestcase(yyruleno==373);
|
|
break;
|
|
/********** End reduce actions ************************************************/
|
|
};
|
|
assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
|
|
yygoto = yyRuleInfo[yyruleno].lhs;
|
|
yysize = yyRuleInfo[yyruleno].nrhs;
|
|
yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto);
|
|
if( yyact <= YY_MAX_SHIFTREDUCE ){
|
|
if( yyact>YY_MAX_SHIFT ){
|
|
yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
|
|
}
|
|
yymsp -= yysize-1;
|
|
yypParser->yytos = yymsp;
|
|
yymsp->stateno = (YYACTIONTYPE)yyact;
|
|
yymsp->major = (YYCODETYPE)yygoto;
|
|
yyTraceShift(yypParser, yyact);
|
|
}else{
|
|
assert( yyact == YY_ACCEPT_ACTION );
|
|
yypParser->yytos -= yysize;
|
|
yy_accept(yypParser);
|
|
}
|
|
}
|
|
|
|
/*
|
|
** The following code executes when the parse fails
|
|
*/
|
|
#ifndef YYNOERRORRECOVERY
|
|
static void yy_parse_failed(
|
|
yyParser *yypParser /* The parser */
|
|
){
|
|
ZCCParseARG_FETCH;
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
|
|
/* Here code is inserted which will be executed whenever the
|
|
** parser fails */
|
|
/************ Begin %parse_failure code ***************************************/
|
|
#line 148 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
/**failed = true;*/
|
|
#line 5843 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
/************ End %parse_failure code *****************************************/
|
|
ZCCParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
|
}
|
|
#endif /* YYNOERRORRECOVERY */
|
|
|
|
/*
|
|
** The following code executes when a syntax error first occurs.
|
|
*/
|
|
static void yy_syntax_error(
|
|
yyParser *yypParser, /* The parser */
|
|
int yymajor, /* The major type of the error token */
|
|
ZCCParseTOKENTYPE yyminor /* The minor type of the error token */
|
|
){
|
|
ZCCParseARG_FETCH;
|
|
#define TOKEN yyminor
|
|
/************ Begin %syntax_error code ****************************************/
|
|
#line 121 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
|
|
FString unexpected, expecting;
|
|
|
|
int i;
|
|
int stateno = yypParser->yytos->stateno;
|
|
|
|
unexpected << "Unexpected " << ZCCTokenName(yymajor);
|
|
|
|
// Determine all the terminals that the parser would have accepted at this point
|
|
// (see yy_find_shift_action). This list can get quite long. Is it worthwhile to
|
|
// print it when not debugging the grammar, or would that be too confusing to
|
|
// the average user?
|
|
if (stateno < YY_SHIFT_MAX && (i = yy_shift_ofst[stateno])!=YY_SHIFT_USE_DFLT)
|
|
{
|
|
for (int j = 1; j < YYERRORSYMBOL; ++j)
|
|
{
|
|
int k = i + j;
|
|
if (k >= 0 && k < YY_ACTTAB_COUNT && yy_lookahead[k] == j)
|
|
{
|
|
expecting << (expecting.IsEmpty() ? "Expecting " : " or ") << ZCCTokenName(j);
|
|
}
|
|
}
|
|
}
|
|
stat->sc->ScriptMessage("%s\n%s\n", unexpected.GetChars(), expecting.GetChars());
|
|
FScriptPosition::ErrorCounter++;
|
|
#line 5886 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
/************ End %syntax_error code ******************************************/
|
|
ZCCParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
|
}
|
|
|
|
/*
|
|
** The following is executed when the parser accepts
|
|
*/
|
|
static void yy_accept(
|
|
yyParser *yypParser /* The parser */
|
|
){
|
|
ZCCParseARG_FETCH;
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt = -1;
|
|
#endif
|
|
#if 0
|
|
assert( yypParser->yytos==yypParser->yystack );
|
|
#else
|
|
while (yypParser->yytos>yypParser->yystack) yy_pop_parser_stack(yypParser);
|
|
#endif
|
|
/* Here code is inserted which will be executed whenever the
|
|
** parser accepts */
|
|
/*********** Begin %parse_accept code *****************************************/
|
|
#line 147 "C:/Dev/Quest/Raze-master/source/common/scripting/frontend/zcc-parse.lemon"
|
|
DPrintf(DMSG_SPAMMY, "Input accepted\n");
|
|
#line 5917 "C:/Dev/Quest/Raze-master/build/source/zcc-parse.c"
|
|
/*********** End %parse_accept code *******************************************/
|
|
ZCCParseARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
|
}
|
|
|
|
/* The main parser program.
|
|
** The first argument is a pointer to a structure obtained from
|
|
** "ZCCParseAlloc" which describes the current state of the parser.
|
|
** The second argument is the major token number. The third is
|
|
** the minor token. The fourth optional argument is whatever the
|
|
** user wants (and specified in the grammar) and is available for
|
|
** use by the action routines.
|
|
**
|
|
** Inputs:
|
|
** <ul>
|
|
** <li> A pointer to the parser (an opaque structure.)
|
|
** <li> The major token number.
|
|
** <li> The minor token number.
|
|
** <li> An option argument of a grammar-specified type.
|
|
** </ul>
|
|
**
|
|
** Outputs:
|
|
** None.
|
|
*/
|
|
void ZCCParse(
|
|
void *yyp, /* The parser */
|
|
int yymajor, /* The major token code number */
|
|
ZCCParseTOKENTYPE yyminor /* The value for the token */
|
|
ZCCParseARG_PDECL /* Optional %extra_argument parameter */
|
|
){
|
|
YYMINORTYPE yyminorunion;
|
|
unsigned int yyact; /* The parser action. */
|
|
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
|
|
int yyendofinput; /* True if we are at the end of input */
|
|
#endif
|
|
#ifdef YYERRORSYMBOL
|
|
int yyerrorhit = 0; /* True if yymajor has invoked an error */
|
|
#endif
|
|
yyParser *yypParser; /* The parser */
|
|
|
|
yypParser = (yyParser*)yyp;
|
|
assert( yypParser->yytos!=0 );
|
|
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
|
|
yyendofinput = (yymajor==0);
|
|
#endif
|
|
ZCCParseARG_STORE;
|
|
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
|
|
do{
|
|
yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
|
|
if( yyact <= YY_MAX_SHIFTREDUCE ){
|
|
yy_shift(yypParser,yyact,yymajor,yyminor);
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt--;
|
|
#endif
|
|
yymajor = YYNOCODE;
|
|
}else if( yyact <= YY_MAX_REDUCE ){
|
|
yy_reduce(yypParser,yyact-YY_MIN_REDUCE);
|
|
}else{
|
|
assert( yyact == YY_ERROR_ACTION );
|
|
yyminorunion.yy0 = yyminor;
|
|
#ifdef YYERRORSYMBOL
|
|
int yymx;
|
|
#endif
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
#ifdef YYERRORSYMBOL
|
|
/* A syntax error has occurred.
|
|
** The response to an error depends upon whether or not the
|
|
** grammar defines an error token "ERROR".
|
|
**
|
|
** This is what we do if the grammar does define ERROR:
|
|
**
|
|
** * Call the %syntax_error function.
|
|
**
|
|
** * Begin popping the stack until we enter a state where
|
|
** it is legal to shift the error symbol, then shift
|
|
** the error symbol.
|
|
**
|
|
** * Set the error count to three.
|
|
**
|
|
** * Begin accepting and shifting new tokens. No new error
|
|
** processing will occur until three tokens have been
|
|
** shifted successfully.
|
|
**
|
|
*/
|
|
if( yypParser->yyerrcnt<0 ){
|
|
yy_syntax_error(yypParser,yymajor,yyminor);
|
|
}
|
|
yymx = yypParser->yytos->major;
|
|
if( yymx==YYERRORSYMBOL || yyerrorhit ){
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sDiscard input token %s\n",
|
|
yyTracePrompt,yyTokenName[yymajor]);
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
|
|
yymajor = YYNOCODE;
|
|
}else{
|
|
while( yypParser->yytos >= yypParser->yystack
|
|
&& yymx != YYERRORSYMBOL
|
|
&& (yyact = yy_find_reduce_action(
|
|
yypParser->yytos->stateno,
|
|
YYERRORSYMBOL)) >= YY_MIN_REDUCE
|
|
){
|
|
yy_pop_parser_stack(yypParser);
|
|
}
|
|
if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
|
|
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
|
|
yy_parse_failed(yypParser);
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt = -1;
|
|
#endif
|
|
yymajor = YYNOCODE;
|
|
}else if( yymx!=YYERRORSYMBOL ){
|
|
yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
|
|
}
|
|
}
|
|
yypParser->yyerrcnt = 3;
|
|
yyerrorhit = 1;
|
|
#elif defined(YYNOERRORRECOVERY)
|
|
/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
|
|
** do any kind of error recovery. Instead, simply invoke the syntax
|
|
** error routine and continue going as if nothing had happened.
|
|
**
|
|
** Applications can set this macro (for example inside %include) if
|
|
** they intend to abandon the parse upon the first syntax error seen.
|
|
*/
|
|
yy_syntax_error(yypParser,yymajor, yyminor);
|
|
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
|
|
yymajor = YYNOCODE;
|
|
|
|
#else /* YYERRORSYMBOL is not defined */
|
|
/* This is what we do if the grammar does not define ERROR:
|
|
**
|
|
** * Report an error message, and throw away the input token.
|
|
**
|
|
** * If the input token is $, then fail the parse.
|
|
**
|
|
** As before, subsequent error messages are suppressed until
|
|
** three input tokens have been successfully shifted.
|
|
*/
|
|
if( yypParser->yyerrcnt<=0 ){
|
|
yy_syntax_error(yypParser,yymajor, yyminor);
|
|
}
|
|
yypParser->yyerrcnt = 3;
|
|
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
|
|
if( yyendofinput ){
|
|
yy_parse_failed(yypParser);
|
|
#ifndef YYNOERRORRECOVERY
|
|
yypParser->yyerrcnt = -1;
|
|
#endif
|
|
}
|
|
yymajor = YYNOCODE;
|
|
#endif
|
|
}
|
|
}while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
yyStackEntry *i;
|
|
char cDiv = '[';
|
|
fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
|
|
for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
|
|
fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
|
|
cDiv = ' ';
|
|
}
|
|
fprintf(yyTraceFILE,"]\n");
|
|
fflush(yyTraceFILE);
|
|
}
|
|
#endif
|
|
return;
|
|
}
|