-/* A Bison parser, made by GNU Bison 3.5.4. */
+/* A Bison parser, made by GNU Bison 3.6.4. */
/* Bison implementation for Yacc-like parsers in C
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
+ especially those whose name start with YY_ or yy_. They are
+ private implementation details that can be changed or removed. */
+
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
-/* Undocumented macros, especially those whose name start with YY_,
- are private implementation details. Do not rely on them. */
-
/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "3.5.4"
+#define YYBISON_VERSION "3.6.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
# endif
# endif
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
/* Use api.header.include to #include this header
instead of duplicating it here. */
#ifndef YY_JSCYY_GRAMMAR_HPP_INCLUDED
extern int jscyydebug;
#endif
-/* Token type. */
+/* Token kinds. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
- NULLTOKEN = 258,
- TRUETOKEN = 259,
- FALSETOKEN = 260,
- BREAK = 261,
- CASE = 262,
- DEFAULT = 263,
- FOR = 264,
- NEW = 265,
- VAR = 266,
- CONSTTOKEN = 267,
- CONTINUE = 268,
- FUNCTION = 269,
- RETURN = 270,
- VOIDTOKEN = 271,
- DELETETOKEN = 272,
- IF = 273,
- THISTOKEN = 274,
- DO = 275,
- WHILE = 276,
- INTOKEN = 277,
- INSTANCEOF = 278,
- TYPEOF = 279,
- SWITCH = 280,
- WITH = 281,
- RESERVED = 282,
- THROW = 283,
- TRY = 284,
- CATCH = 285,
- FINALLY = 286,
- DEBUGGER = 287,
- IF_WITHOUT_ELSE = 288,
- ELSE = 289,
- EQEQ = 290,
- NE = 291,
- STREQ = 292,
- STRNEQ = 293,
- LE = 294,
- GE = 295,
- OR = 296,
- AND = 297,
- PLUSPLUS = 298,
- MINUSMINUS = 299,
- LSHIFT = 300,
- RSHIFT = 301,
- URSHIFT = 302,
- PLUSEQUAL = 303,
- MINUSEQUAL = 304,
- MULTEQUAL = 305,
- DIVEQUAL = 306,
- LSHIFTEQUAL = 307,
- RSHIFTEQUAL = 308,
- URSHIFTEQUAL = 309,
- ANDEQUAL = 310,
- MODEQUAL = 311,
- XOREQUAL = 312,
- OREQUAL = 313,
- OPENBRACE = 314,
- CLOSEBRACE = 315,
- NUMBER = 316,
- IDENT = 317,
- STRING = 318,
- AUTOPLUSPLUS = 319,
- AUTOMINUSMINUS = 320
+ YYEMPTY = -2,
+ YYEOF = 0, /* "end of file" */
+ YYerror = 256, /* error */
+ YYUNDEF = 257, /* "invalid token" */
+ NULLTOKEN = 258, /* NULLTOKEN */
+ TRUETOKEN = 259, /* TRUETOKEN */
+ FALSETOKEN = 260, /* FALSETOKEN */
+ BREAK = 261, /* BREAK */
+ CASE = 262, /* CASE */
+ DEFAULT = 263, /* DEFAULT */
+ FOR = 264, /* FOR */
+ NEW = 265, /* NEW */
+ VAR = 266, /* VAR */
+ CONSTTOKEN = 267, /* CONSTTOKEN */
+ CONTINUE = 268, /* CONTINUE */
+ FUNCTION = 269, /* FUNCTION */
+ RETURN = 270, /* RETURN */
+ VOIDTOKEN = 271, /* VOIDTOKEN */
+ DELETETOKEN = 272, /* DELETETOKEN */
+ IF = 273, /* IF */
+ THISTOKEN = 274, /* THISTOKEN */
+ DO = 275, /* DO */
+ WHILE = 276, /* WHILE */
+ INTOKEN = 277, /* INTOKEN */
+ INSTANCEOF = 278, /* INSTANCEOF */
+ TYPEOF = 279, /* TYPEOF */
+ SWITCH = 280, /* SWITCH */
+ WITH = 281, /* WITH */
+ RESERVED = 282, /* RESERVED */
+ THROW = 283, /* THROW */
+ TRY = 284, /* TRY */
+ CATCH = 285, /* CATCH */
+ FINALLY = 286, /* FINALLY */
+ DEBUGGER = 287, /* DEBUGGER */
+ IF_WITHOUT_ELSE = 288, /* IF_WITHOUT_ELSE */
+ ELSE = 289, /* ELSE */
+ EQEQ = 290, /* EQEQ */
+ NE = 291, /* NE */
+ STREQ = 292, /* STREQ */
+ STRNEQ = 293, /* STRNEQ */
+ LE = 294, /* LE */
+ GE = 295, /* GE */
+ OR = 296, /* OR */
+ AND = 297, /* AND */
+ PLUSPLUS = 298, /* PLUSPLUS */
+ MINUSMINUS = 299, /* MINUSMINUS */
+ LSHIFT = 300, /* LSHIFT */
+ RSHIFT = 301, /* RSHIFT */
+ URSHIFT = 302, /* URSHIFT */
+ PLUSEQUAL = 303, /* PLUSEQUAL */
+ MINUSEQUAL = 304, /* MINUSEQUAL */
+ MULTEQUAL = 305, /* MULTEQUAL */
+ DIVEQUAL = 306, /* DIVEQUAL */
+ LSHIFTEQUAL = 307, /* LSHIFTEQUAL */
+ RSHIFTEQUAL = 308, /* RSHIFTEQUAL */
+ URSHIFTEQUAL = 309, /* URSHIFTEQUAL */
+ ANDEQUAL = 310, /* ANDEQUAL */
+ MODEQUAL = 311, /* MODEQUAL */
+ XOREQUAL = 312, /* XOREQUAL */
+ OREQUAL = 313, /* OREQUAL */
+ OPENBRACE = 314, /* OPENBRACE */
+ CLOSEBRACE = 315, /* CLOSEBRACE */
+ NUMBER = 316, /* NUMBER */
+ IDENT = 317, /* IDENT */
+ STRING = 318, /* STRING */
+ AUTOPLUSPLUS = 319, /* AUTOPLUSPLUS */
+ AUTOMINUSMINUS = 320 /* AUTOMINUSMINUS */
};
+ typedef enum yytokentype yytoken_kind_t;
#endif
/* Value type. */
int jscyyparse (void *globalPtr);
#endif /* !YY_JSCYY_GRAMMAR_HPP_INCLUDED */
+/* Symbol kind. */
+enum yysymbol_kind_t
+{
+ YYSYMBOL_YYEMPTY = -2,
+ YYSYMBOL_YYEOF = 0, /* "end of file" */
+ YYSYMBOL_YYerror = 1, /* error */
+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
+ YYSYMBOL_NULLTOKEN = 3, /* NULLTOKEN */
+ YYSYMBOL_TRUETOKEN = 4, /* TRUETOKEN */
+ YYSYMBOL_FALSETOKEN = 5, /* FALSETOKEN */
+ YYSYMBOL_BREAK = 6, /* BREAK */
+ YYSYMBOL_CASE = 7, /* CASE */
+ YYSYMBOL_DEFAULT = 8, /* DEFAULT */
+ YYSYMBOL_FOR = 9, /* FOR */
+ YYSYMBOL_NEW = 10, /* NEW */
+ YYSYMBOL_VAR = 11, /* VAR */
+ YYSYMBOL_CONSTTOKEN = 12, /* CONSTTOKEN */
+ YYSYMBOL_CONTINUE = 13, /* CONTINUE */
+ YYSYMBOL_FUNCTION = 14, /* FUNCTION */
+ YYSYMBOL_RETURN = 15, /* RETURN */
+ YYSYMBOL_VOIDTOKEN = 16, /* VOIDTOKEN */
+ YYSYMBOL_DELETETOKEN = 17, /* DELETETOKEN */
+ YYSYMBOL_IF = 18, /* IF */
+ YYSYMBOL_THISTOKEN = 19, /* THISTOKEN */
+ YYSYMBOL_DO = 20, /* DO */
+ YYSYMBOL_WHILE = 21, /* WHILE */
+ YYSYMBOL_INTOKEN = 22, /* INTOKEN */
+ YYSYMBOL_INSTANCEOF = 23, /* INSTANCEOF */
+ YYSYMBOL_TYPEOF = 24, /* TYPEOF */
+ YYSYMBOL_SWITCH = 25, /* SWITCH */
+ YYSYMBOL_WITH = 26, /* WITH */
+ YYSYMBOL_RESERVED = 27, /* RESERVED */
+ YYSYMBOL_THROW = 28, /* THROW */
+ YYSYMBOL_TRY = 29, /* TRY */
+ YYSYMBOL_CATCH = 30, /* CATCH */
+ YYSYMBOL_FINALLY = 31, /* FINALLY */
+ YYSYMBOL_DEBUGGER = 32, /* DEBUGGER */
+ YYSYMBOL_IF_WITHOUT_ELSE = 33, /* IF_WITHOUT_ELSE */
+ YYSYMBOL_ELSE = 34, /* ELSE */
+ YYSYMBOL_EQEQ = 35, /* EQEQ */
+ YYSYMBOL_NE = 36, /* NE */
+ YYSYMBOL_STREQ = 37, /* STREQ */
+ YYSYMBOL_STRNEQ = 38, /* STRNEQ */
+ YYSYMBOL_LE = 39, /* LE */
+ YYSYMBOL_GE = 40, /* GE */
+ YYSYMBOL_OR = 41, /* OR */
+ YYSYMBOL_AND = 42, /* AND */
+ YYSYMBOL_PLUSPLUS = 43, /* PLUSPLUS */
+ YYSYMBOL_MINUSMINUS = 44, /* MINUSMINUS */
+ YYSYMBOL_LSHIFT = 45, /* LSHIFT */
+ YYSYMBOL_RSHIFT = 46, /* RSHIFT */
+ YYSYMBOL_URSHIFT = 47, /* URSHIFT */
+ YYSYMBOL_PLUSEQUAL = 48, /* PLUSEQUAL */
+ YYSYMBOL_MINUSEQUAL = 49, /* MINUSEQUAL */
+ YYSYMBOL_MULTEQUAL = 50, /* MULTEQUAL */
+ YYSYMBOL_DIVEQUAL = 51, /* DIVEQUAL */
+ YYSYMBOL_LSHIFTEQUAL = 52, /* LSHIFTEQUAL */
+ YYSYMBOL_RSHIFTEQUAL = 53, /* RSHIFTEQUAL */
+ YYSYMBOL_URSHIFTEQUAL = 54, /* URSHIFTEQUAL */
+ YYSYMBOL_ANDEQUAL = 55, /* ANDEQUAL */
+ YYSYMBOL_MODEQUAL = 56, /* MODEQUAL */
+ YYSYMBOL_XOREQUAL = 57, /* XOREQUAL */
+ YYSYMBOL_OREQUAL = 58, /* OREQUAL */
+ YYSYMBOL_OPENBRACE = 59, /* OPENBRACE */
+ YYSYMBOL_CLOSEBRACE = 60, /* CLOSEBRACE */
+ YYSYMBOL_NUMBER = 61, /* NUMBER */
+ YYSYMBOL_IDENT = 62, /* IDENT */
+ YYSYMBOL_STRING = 63, /* STRING */
+ YYSYMBOL_AUTOPLUSPLUS = 64, /* AUTOPLUSPLUS */
+ YYSYMBOL_AUTOMINUSMINUS = 65, /* AUTOMINUSMINUS */
+ YYSYMBOL_66_ = 66, /* '/' */
+ YYSYMBOL_67_ = 67, /* ':' */
+ YYSYMBOL_68_ = 68, /* '(' */
+ YYSYMBOL_69_ = 69, /* ')' */
+ YYSYMBOL_70_ = 70, /* ',' */
+ YYSYMBOL_71_ = 71, /* '[' */
+ YYSYMBOL_72_ = 72, /* ']' */
+ YYSYMBOL_73_ = 73, /* '.' */
+ YYSYMBOL_74_ = 74, /* '+' */
+ YYSYMBOL_75_ = 75, /* '-' */
+ YYSYMBOL_76_ = 76, /* '~' */
+ YYSYMBOL_77_ = 77, /* '!' */
+ YYSYMBOL_78_ = 78, /* '*' */
+ YYSYMBOL_79_ = 79, /* '%' */
+ YYSYMBOL_80_ = 80, /* '<' */
+ YYSYMBOL_81_ = 81, /* '>' */
+ YYSYMBOL_82_ = 82, /* '&' */
+ YYSYMBOL_83_ = 83, /* '^' */
+ YYSYMBOL_84_ = 84, /* '|' */
+ YYSYMBOL_85_ = 85, /* '?' */
+ YYSYMBOL_86_ = 86, /* '=' */
+ YYSYMBOL_87_ = 87, /* ';' */
+ YYSYMBOL_YYACCEPT = 88, /* $accept */
+ YYSYMBOL_Literal = 89, /* Literal */
+ YYSYMBOL_Property = 90, /* Property */
+ YYSYMBOL_PropertyList = 91, /* PropertyList */
+ YYSYMBOL_PrimaryExpr = 92, /* PrimaryExpr */
+ YYSYMBOL_PrimaryExprNoBrace = 93, /* PrimaryExprNoBrace */
+ YYSYMBOL_ArrayLiteral = 94, /* ArrayLiteral */
+ YYSYMBOL_ElementList = 95, /* ElementList */
+ YYSYMBOL_ElisionOpt = 96, /* ElisionOpt */
+ YYSYMBOL_Elision = 97, /* Elision */
+ YYSYMBOL_MemberExpr = 98, /* MemberExpr */
+ YYSYMBOL_MemberExprNoBF = 99, /* MemberExprNoBF */
+ YYSYMBOL_NewExpr = 100, /* NewExpr */
+ YYSYMBOL_NewExprNoBF = 101, /* NewExprNoBF */
+ YYSYMBOL_CallExpr = 102, /* CallExpr */
+ YYSYMBOL_CallExprNoBF = 103, /* CallExprNoBF */
+ YYSYMBOL_Arguments = 104, /* Arguments */
+ YYSYMBOL_ArgumentList = 105, /* ArgumentList */
+ YYSYMBOL_LeftHandSideExpr = 106, /* LeftHandSideExpr */
+ YYSYMBOL_LeftHandSideExprNoBF = 107, /* LeftHandSideExprNoBF */
+ YYSYMBOL_PostfixExpr = 108, /* PostfixExpr */
+ YYSYMBOL_PostfixExprNoBF = 109, /* PostfixExprNoBF */
+ YYSYMBOL_UnaryExprCommon = 110, /* UnaryExprCommon */
+ YYSYMBOL_UnaryExpr = 111, /* UnaryExpr */
+ YYSYMBOL_UnaryExprNoBF = 112, /* UnaryExprNoBF */
+ YYSYMBOL_MultiplicativeExpr = 113, /* MultiplicativeExpr */
+ YYSYMBOL_MultiplicativeExprNoBF = 114, /* MultiplicativeExprNoBF */
+ YYSYMBOL_AdditiveExpr = 115, /* AdditiveExpr */
+ YYSYMBOL_AdditiveExprNoBF = 116, /* AdditiveExprNoBF */
+ YYSYMBOL_ShiftExpr = 117, /* ShiftExpr */
+ YYSYMBOL_ShiftExprNoBF = 118, /* ShiftExprNoBF */
+ YYSYMBOL_RelationalExpr = 119, /* RelationalExpr */
+ YYSYMBOL_RelationalExprNoIn = 120, /* RelationalExprNoIn */
+ YYSYMBOL_RelationalExprNoBF = 121, /* RelationalExprNoBF */
+ YYSYMBOL_EqualityExpr = 122, /* EqualityExpr */
+ YYSYMBOL_EqualityExprNoIn = 123, /* EqualityExprNoIn */
+ YYSYMBOL_EqualityExprNoBF = 124, /* EqualityExprNoBF */
+ YYSYMBOL_BitwiseANDExpr = 125, /* BitwiseANDExpr */
+ YYSYMBOL_BitwiseANDExprNoIn = 126, /* BitwiseANDExprNoIn */
+ YYSYMBOL_BitwiseANDExprNoBF = 127, /* BitwiseANDExprNoBF */
+ YYSYMBOL_BitwiseXORExpr = 128, /* BitwiseXORExpr */
+ YYSYMBOL_BitwiseXORExprNoIn = 129, /* BitwiseXORExprNoIn */
+ YYSYMBOL_BitwiseXORExprNoBF = 130, /* BitwiseXORExprNoBF */
+ YYSYMBOL_BitwiseORExpr = 131, /* BitwiseORExpr */
+ YYSYMBOL_BitwiseORExprNoIn = 132, /* BitwiseORExprNoIn */
+ YYSYMBOL_BitwiseORExprNoBF = 133, /* BitwiseORExprNoBF */
+ YYSYMBOL_LogicalANDExpr = 134, /* LogicalANDExpr */
+ YYSYMBOL_LogicalANDExprNoIn = 135, /* LogicalANDExprNoIn */
+ YYSYMBOL_LogicalANDExprNoBF = 136, /* LogicalANDExprNoBF */
+ YYSYMBOL_LogicalORExpr = 137, /* LogicalORExpr */
+ YYSYMBOL_LogicalORExprNoIn = 138, /* LogicalORExprNoIn */
+ YYSYMBOL_LogicalORExprNoBF = 139, /* LogicalORExprNoBF */
+ YYSYMBOL_ConditionalExpr = 140, /* ConditionalExpr */
+ YYSYMBOL_ConditionalExprNoIn = 141, /* ConditionalExprNoIn */
+ YYSYMBOL_ConditionalExprNoBF = 142, /* ConditionalExprNoBF */
+ YYSYMBOL_AssignmentExpr = 143, /* AssignmentExpr */
+ YYSYMBOL_AssignmentExprNoIn = 144, /* AssignmentExprNoIn */
+ YYSYMBOL_AssignmentExprNoBF = 145, /* AssignmentExprNoBF */
+ YYSYMBOL_AssignmentOperator = 146, /* AssignmentOperator */
+ YYSYMBOL_Expr = 147, /* Expr */
+ YYSYMBOL_ExprNoIn = 148, /* ExprNoIn */
+ YYSYMBOL_ExprNoBF = 149, /* ExprNoBF */
+ YYSYMBOL_Statement = 150, /* Statement */
+ YYSYMBOL_Block = 151, /* Block */
+ YYSYMBOL_VariableStatement = 152, /* VariableStatement */
+ YYSYMBOL_VariableDeclarationList = 153, /* VariableDeclarationList */
+ YYSYMBOL_VariableDeclarationListNoIn = 154, /* VariableDeclarationListNoIn */
+ YYSYMBOL_ConstStatement = 155, /* ConstStatement */
+ YYSYMBOL_ConstDeclarationList = 156, /* ConstDeclarationList */
+ YYSYMBOL_ConstDeclaration = 157, /* ConstDeclaration */
+ YYSYMBOL_Initializer = 158, /* Initializer */
+ YYSYMBOL_InitializerNoIn = 159, /* InitializerNoIn */
+ YYSYMBOL_EmptyStatement = 160, /* EmptyStatement */
+ YYSYMBOL_ExprStatement = 161, /* ExprStatement */
+ YYSYMBOL_IfStatement = 162, /* IfStatement */
+ YYSYMBOL_IterationStatement = 163, /* IterationStatement */
+ YYSYMBOL_ExprOpt = 164, /* ExprOpt */
+ YYSYMBOL_ExprNoInOpt = 165, /* ExprNoInOpt */
+ YYSYMBOL_ContinueStatement = 166, /* ContinueStatement */
+ YYSYMBOL_BreakStatement = 167, /* BreakStatement */
+ YYSYMBOL_ReturnStatement = 168, /* ReturnStatement */
+ YYSYMBOL_WithStatement = 169, /* WithStatement */
+ YYSYMBOL_SwitchStatement = 170, /* SwitchStatement */
+ YYSYMBOL_CaseBlock = 171, /* CaseBlock */
+ YYSYMBOL_CaseClausesOpt = 172, /* CaseClausesOpt */
+ YYSYMBOL_CaseClauses = 173, /* CaseClauses */
+ YYSYMBOL_CaseClause = 174, /* CaseClause */
+ YYSYMBOL_DefaultClause = 175, /* DefaultClause */
+ YYSYMBOL_LabelledStatement = 176, /* LabelledStatement */
+ YYSYMBOL_ThrowStatement = 177, /* ThrowStatement */
+ YYSYMBOL_TryStatement = 178, /* TryStatement */
+ YYSYMBOL_DebuggerStatement = 179, /* DebuggerStatement */
+ YYSYMBOL_FunctionDeclaration = 180, /* FunctionDeclaration */
+ YYSYMBOL_FunctionExpr = 181, /* FunctionExpr */
+ YYSYMBOL_FormalParameterList = 182, /* FormalParameterList */
+ YYSYMBOL_FunctionBody = 183, /* FunctionBody */
+ YYSYMBOL_Program = 184, /* Program */
+ YYSYMBOL_SourceElements = 185, /* SourceElements */
+ YYSYMBOL_Literal_NoNode = 186, /* Literal_NoNode */
+ YYSYMBOL_Property_NoNode = 187, /* Property_NoNode */
+ YYSYMBOL_PropertyList_NoNode = 188, /* PropertyList_NoNode */
+ YYSYMBOL_PrimaryExpr_NoNode = 189, /* PrimaryExpr_NoNode */
+ YYSYMBOL_PrimaryExprNoBrace_NoNode = 190, /* PrimaryExprNoBrace_NoNode */
+ YYSYMBOL_ArrayLiteral_NoNode = 191, /* ArrayLiteral_NoNode */
+ YYSYMBOL_ElementList_NoNode = 192, /* ElementList_NoNode */
+ YYSYMBOL_ElisionOpt_NoNode = 193, /* ElisionOpt_NoNode */
+ YYSYMBOL_Elision_NoNode = 194, /* Elision_NoNode */
+ YYSYMBOL_MemberExpr_NoNode = 195, /* MemberExpr_NoNode */
+ YYSYMBOL_MemberExprNoBF_NoNode = 196, /* MemberExprNoBF_NoNode */
+ YYSYMBOL_NewExpr_NoNode = 197, /* NewExpr_NoNode */
+ YYSYMBOL_NewExprNoBF_NoNode = 198, /* NewExprNoBF_NoNode */
+ YYSYMBOL_CallExpr_NoNode = 199, /* CallExpr_NoNode */
+ YYSYMBOL_CallExprNoBF_NoNode = 200, /* CallExprNoBF_NoNode */
+ YYSYMBOL_Arguments_NoNode = 201, /* Arguments_NoNode */
+ YYSYMBOL_ArgumentList_NoNode = 202, /* ArgumentList_NoNode */
+ YYSYMBOL_LeftHandSideExpr_NoNode = 203, /* LeftHandSideExpr_NoNode */
+ YYSYMBOL_LeftHandSideExprNoBF_NoNode = 204, /* LeftHandSideExprNoBF_NoNode */
+ YYSYMBOL_PostfixExpr_NoNode = 205, /* PostfixExpr_NoNode */
+ YYSYMBOL_PostfixExprNoBF_NoNode = 206, /* PostfixExprNoBF_NoNode */
+ YYSYMBOL_UnaryExprCommon_NoNode = 207, /* UnaryExprCommon_NoNode */
+ YYSYMBOL_UnaryExpr_NoNode = 208, /* UnaryExpr_NoNode */
+ YYSYMBOL_UnaryExprNoBF_NoNode = 209, /* UnaryExprNoBF_NoNode */
+ YYSYMBOL_MultiplicativeExpr_NoNode = 210, /* MultiplicativeExpr_NoNode */
+ YYSYMBOL_MultiplicativeExprNoBF_NoNode = 211, /* MultiplicativeExprNoBF_NoNode */
+ YYSYMBOL_AdditiveExpr_NoNode = 212, /* AdditiveExpr_NoNode */
+ YYSYMBOL_AdditiveExprNoBF_NoNode = 213, /* AdditiveExprNoBF_NoNode */
+ YYSYMBOL_ShiftExpr_NoNode = 214, /* ShiftExpr_NoNode */
+ YYSYMBOL_ShiftExprNoBF_NoNode = 215, /* ShiftExprNoBF_NoNode */
+ YYSYMBOL_RelationalExpr_NoNode = 216, /* RelationalExpr_NoNode */
+ YYSYMBOL_RelationalExprNoIn_NoNode = 217, /* RelationalExprNoIn_NoNode */
+ YYSYMBOL_RelationalExprNoBF_NoNode = 218, /* RelationalExprNoBF_NoNode */
+ YYSYMBOL_EqualityExpr_NoNode = 219, /* EqualityExpr_NoNode */
+ YYSYMBOL_EqualityExprNoIn_NoNode = 220, /* EqualityExprNoIn_NoNode */
+ YYSYMBOL_EqualityExprNoBF_NoNode = 221, /* EqualityExprNoBF_NoNode */
+ YYSYMBOL_BitwiseANDExpr_NoNode = 222, /* BitwiseANDExpr_NoNode */
+ YYSYMBOL_BitwiseANDExprNoIn_NoNode = 223, /* BitwiseANDExprNoIn_NoNode */
+ YYSYMBOL_BitwiseANDExprNoBF_NoNode = 224, /* BitwiseANDExprNoBF_NoNode */
+ YYSYMBOL_BitwiseXORExpr_NoNode = 225, /* BitwiseXORExpr_NoNode */
+ YYSYMBOL_BitwiseXORExprNoIn_NoNode = 226, /* BitwiseXORExprNoIn_NoNode */
+ YYSYMBOL_BitwiseXORExprNoBF_NoNode = 227, /* BitwiseXORExprNoBF_NoNode */
+ YYSYMBOL_BitwiseORExpr_NoNode = 228, /* BitwiseORExpr_NoNode */
+ YYSYMBOL_BitwiseORExprNoIn_NoNode = 229, /* BitwiseORExprNoIn_NoNode */
+ YYSYMBOL_BitwiseORExprNoBF_NoNode = 230, /* BitwiseORExprNoBF_NoNode */
+ YYSYMBOL_LogicalANDExpr_NoNode = 231, /* LogicalANDExpr_NoNode */
+ YYSYMBOL_LogicalANDExprNoIn_NoNode = 232, /* LogicalANDExprNoIn_NoNode */
+ YYSYMBOL_LogicalANDExprNoBF_NoNode = 233, /* LogicalANDExprNoBF_NoNode */
+ YYSYMBOL_LogicalORExpr_NoNode = 234, /* LogicalORExpr_NoNode */
+ YYSYMBOL_LogicalORExprNoIn_NoNode = 235, /* LogicalORExprNoIn_NoNode */
+ YYSYMBOL_LogicalORExprNoBF_NoNode = 236, /* LogicalORExprNoBF_NoNode */
+ YYSYMBOL_ConditionalExpr_NoNode = 237, /* ConditionalExpr_NoNode */
+ YYSYMBOL_ConditionalExprNoIn_NoNode = 238, /* ConditionalExprNoIn_NoNode */
+ YYSYMBOL_ConditionalExprNoBF_NoNode = 239, /* ConditionalExprNoBF_NoNode */
+ YYSYMBOL_AssignmentExpr_NoNode = 240, /* AssignmentExpr_NoNode */
+ YYSYMBOL_AssignmentExprNoIn_NoNode = 241, /* AssignmentExprNoIn_NoNode */
+ YYSYMBOL_AssignmentExprNoBF_NoNode = 242, /* AssignmentExprNoBF_NoNode */
+ YYSYMBOL_AssignmentOperator_NoNode = 243, /* AssignmentOperator_NoNode */
+ YYSYMBOL_Expr_NoNode = 244, /* Expr_NoNode */
+ YYSYMBOL_ExprNoIn_NoNode = 245, /* ExprNoIn_NoNode */
+ YYSYMBOL_ExprNoBF_NoNode = 246, /* ExprNoBF_NoNode */
+ YYSYMBOL_Statement_NoNode = 247, /* Statement_NoNode */
+ YYSYMBOL_Block_NoNode = 248, /* Block_NoNode */
+ YYSYMBOL_VariableStatement_NoNode = 249, /* VariableStatement_NoNode */
+ YYSYMBOL_VariableDeclarationList_NoNode = 250, /* VariableDeclarationList_NoNode */
+ YYSYMBOL_VariableDeclarationListNoIn_NoNode = 251, /* VariableDeclarationListNoIn_NoNode */
+ YYSYMBOL_ConstStatement_NoNode = 252, /* ConstStatement_NoNode */
+ YYSYMBOL_ConstDeclarationList_NoNode = 253, /* ConstDeclarationList_NoNode */
+ YYSYMBOL_ConstDeclaration_NoNode = 254, /* ConstDeclaration_NoNode */
+ YYSYMBOL_Initializer_NoNode = 255, /* Initializer_NoNode */
+ YYSYMBOL_InitializerNoIn_NoNode = 256, /* InitializerNoIn_NoNode */
+ YYSYMBOL_EmptyStatement_NoNode = 257, /* EmptyStatement_NoNode */
+ YYSYMBOL_ExprStatement_NoNode = 258, /* ExprStatement_NoNode */
+ YYSYMBOL_IfStatement_NoNode = 259, /* IfStatement_NoNode */
+ YYSYMBOL_IterationStatement_NoNode = 260, /* IterationStatement_NoNode */
+ YYSYMBOL_ExprOpt_NoNode = 261, /* ExprOpt_NoNode */
+ YYSYMBOL_ExprNoInOpt_NoNode = 262, /* ExprNoInOpt_NoNode */
+ YYSYMBOL_ContinueStatement_NoNode = 263, /* ContinueStatement_NoNode */
+ YYSYMBOL_BreakStatement_NoNode = 264, /* BreakStatement_NoNode */
+ YYSYMBOL_ReturnStatement_NoNode = 265, /* ReturnStatement_NoNode */
+ YYSYMBOL_WithStatement_NoNode = 266, /* WithStatement_NoNode */
+ YYSYMBOL_SwitchStatement_NoNode = 267, /* SwitchStatement_NoNode */
+ YYSYMBOL_CaseBlock_NoNode = 268, /* CaseBlock_NoNode */
+ YYSYMBOL_CaseClausesOpt_NoNode = 269, /* CaseClausesOpt_NoNode */
+ YYSYMBOL_CaseClauses_NoNode = 270, /* CaseClauses_NoNode */
+ YYSYMBOL_CaseClause_NoNode = 271, /* CaseClause_NoNode */
+ YYSYMBOL_DefaultClause_NoNode = 272, /* DefaultClause_NoNode */
+ YYSYMBOL_LabelledStatement_NoNode = 273, /* LabelledStatement_NoNode */
+ YYSYMBOL_ThrowStatement_NoNode = 274, /* ThrowStatement_NoNode */
+ YYSYMBOL_TryStatement_NoNode = 275, /* TryStatement_NoNode */
+ YYSYMBOL_DebuggerStatement_NoNode = 276, /* DebuggerStatement_NoNode */
+ YYSYMBOL_FunctionDeclaration_NoNode = 277, /* FunctionDeclaration_NoNode */
+ YYSYMBOL_FunctionExpr_NoNode = 278, /* FunctionExpr_NoNode */
+ YYSYMBOL_FormalParameterList_NoNode = 279, /* FormalParameterList_NoNode */
+ YYSYMBOL_FunctionBody_NoNode = 280, /* FunctionBody_NoNode */
+ YYSYMBOL_SourceElements_NoNode = 281 /* SourceElements_NoNode */
+};
+typedef enum yysymbol_kind_t yysymbol_kind_t;
+
/* Second part of user prologue. */
#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
+
/* Stored state numbers (used for stacks). */
typedef yytype_int16 yy_state_t;
# endif
#endif
+
#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
#define YY_ASSERT(E) ((void) (0 && (E)))
-#if ! defined yyoverflow || YYERROR_VERBOSE
+#if !defined yyoverflow
/* The parser invokes alloca or malloc; define the necessary symbols. */
# endif
# endif
# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
+#endif /* !defined yyoverflow */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
/* YYNSTATES -- Number of states. */
#define YYNSTATES 1082
-#define YYUNDEFTOK 2
#define YYMAXUTOK 320
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, with out-of-bounds checking. */
-#define YYTRANSLATE(YYX) \
- (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+#define YYTRANSLATE(YYX) \
+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \
+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
+ : YYSYMBOL_YYUNDEF)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex. */
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE || 0
+/** Accessing symbol of state STATE. */
+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
+
+#if YYDEBUG || 0
+/* The user-facing name of the symbol whose (internal) number is
+ YYSYMBOL. No bounds checking. */
+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
+
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
- "$end", "error", "$undefined", "NULLTOKEN", "TRUETOKEN", "FALSETOKEN",
- "BREAK", "CASE", "DEFAULT", "FOR", "NEW", "VAR", "CONSTTOKEN",
- "CONTINUE", "FUNCTION", "RETURN", "VOIDTOKEN", "DELETETOKEN", "IF",
- "THISTOKEN", "DO", "WHILE", "INTOKEN", "INSTANCEOF", "TYPEOF", "SWITCH",
- "WITH", "RESERVED", "THROW", "TRY", "CATCH", "FINALLY", "DEBUGGER",
- "IF_WITHOUT_ELSE", "ELSE", "EQEQ", "NE", "STREQ", "STRNEQ", "LE", "GE",
- "OR", "AND", "PLUSPLUS", "MINUSMINUS", "LSHIFT", "RSHIFT", "URSHIFT",
- "PLUSEQUAL", "MINUSEQUAL", "MULTEQUAL", "DIVEQUAL", "LSHIFTEQUAL",
- "RSHIFTEQUAL", "URSHIFTEQUAL", "ANDEQUAL", "MODEQUAL", "XOREQUAL",
- "OREQUAL", "OPENBRACE", "CLOSEBRACE", "NUMBER", "IDENT", "STRING",
- "AUTOPLUSPLUS", "AUTOMINUSMINUS", "'/'", "':'", "'('", "')'", "','",
- "'['", "']'", "'.'", "'+'", "'-'", "'~'", "'!'", "'*'", "'%'", "'<'",
- "'>'", "'&'", "'^'", "'|'", "'?'", "'='", "';'", "$accept", "Literal",
- "Property", "PropertyList", "PrimaryExpr", "PrimaryExprNoBrace",
- "ArrayLiteral", "ElementList", "ElisionOpt", "Elision", "MemberExpr",
- "MemberExprNoBF", "NewExpr", "NewExprNoBF", "CallExpr", "CallExprNoBF",
- "Arguments", "ArgumentList", "LeftHandSideExpr", "LeftHandSideExprNoBF",
- "PostfixExpr", "PostfixExprNoBF", "UnaryExprCommon", "UnaryExpr",
- "UnaryExprNoBF", "MultiplicativeExpr", "MultiplicativeExprNoBF",
- "AdditiveExpr", "AdditiveExprNoBF", "ShiftExpr", "ShiftExprNoBF",
- "RelationalExpr", "RelationalExprNoIn", "RelationalExprNoBF",
- "EqualityExpr", "EqualityExprNoIn", "EqualityExprNoBF", "BitwiseANDExpr",
+ "\"end of file\"", "error", "\"invalid token\"", "NULLTOKEN",
+ "TRUETOKEN", "FALSETOKEN", "BREAK", "CASE", "DEFAULT", "FOR", "NEW",
+ "VAR", "CONSTTOKEN", "CONTINUE", "FUNCTION", "RETURN", "VOIDTOKEN",
+ "DELETETOKEN", "IF", "THISTOKEN", "DO", "WHILE", "INTOKEN", "INSTANCEOF",
+ "TYPEOF", "SWITCH", "WITH", "RESERVED", "THROW", "TRY", "CATCH",
+ "FINALLY", "DEBUGGER", "IF_WITHOUT_ELSE", "ELSE", "EQEQ", "NE", "STREQ",
+ "STRNEQ", "LE", "GE", "OR", "AND", "PLUSPLUS", "MINUSMINUS", "LSHIFT",
+ "RSHIFT", "URSHIFT", "PLUSEQUAL", "MINUSEQUAL", "MULTEQUAL", "DIVEQUAL",
+ "LSHIFTEQUAL", "RSHIFTEQUAL", "URSHIFTEQUAL", "ANDEQUAL", "MODEQUAL",
+ "XOREQUAL", "OREQUAL", "OPENBRACE", "CLOSEBRACE", "NUMBER", "IDENT",
+ "STRING", "AUTOPLUSPLUS", "AUTOMINUSMINUS", "'/'", "':'", "'('", "')'",
+ "','", "'['", "']'", "'.'", "'+'", "'-'", "'~'", "'!'", "'*'", "'%'",
+ "'<'", "'>'", "'&'", "'^'", "'|'", "'?'", "'='", "';'", "$accept",
+ "Literal", "Property", "PropertyList", "PrimaryExpr",
+ "PrimaryExprNoBrace", "ArrayLiteral", "ElementList", "ElisionOpt",
+ "Elision", "MemberExpr", "MemberExprNoBF", "NewExpr", "NewExprNoBF",
+ "CallExpr", "CallExprNoBF", "Arguments", "ArgumentList",
+ "LeftHandSideExpr", "LeftHandSideExprNoBF", "PostfixExpr",
+ "PostfixExprNoBF", "UnaryExprCommon", "UnaryExpr", "UnaryExprNoBF",
+ "MultiplicativeExpr", "MultiplicativeExprNoBF", "AdditiveExpr",
+ "AdditiveExprNoBF", "ShiftExpr", "ShiftExprNoBF", "RelationalExpr",
+ "RelationalExprNoIn", "RelationalExprNoBF", "EqualityExpr",
+ "EqualityExprNoIn", "EqualityExprNoBF", "BitwiseANDExpr",
"BitwiseANDExprNoIn", "BitwiseANDExprNoBF", "BitwiseXORExpr",
"BitwiseXORExprNoIn", "BitwiseXORExprNoBF", "BitwiseORExpr",
"BitwiseORExprNoIn", "BitwiseORExprNoBF", "LogicalANDExpr",
"FormalParameterList_NoNode", "FunctionBody_NoNode",
"SourceElements_NoNode", YY_NULLPTR
};
+
+static const char *
+yysymbol_name (yysymbol_kind_t yysymbol)
+{
+ return yytname[yysymbol];
+}
#endif
-# ifdef YYPRINT
+#ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
(internal) symbol number NUM (which must be that of a token). */
static const yytype_int16 yytoknum[] =
44, 91, 93, 46, 43, 45, 126, 33, 42, 37,
60, 62, 38, 94, 124, 63, 61, 59
};
-# endif
+#endif
#define YYPACT_NINF (-941)
};
+enum { YYENOMEM = -2 };
+
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
} \
while (0)
-/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
-
+/* Backward compatibility with an undocumented macro.
+ Use YYerror or YYUNDEF. */
+#define YYERRCODE YYUNDEF
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
-#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
return res;
}
-# define YY_LOCATION_PRINT(File, Loc) \
+# define YY_LOCATION_PRINT(File, Loc) \
yy_location_print_ (File, &(Loc))
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+# endif /* !defined YY_LOCATION_PRINT */
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
- Type, Value, Location, globalPtr); \
+ Kind, Value, Location, globalPtr); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
`-----------------------------------*/
static void
-yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *globalPtr)
+yy_symbol_value_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *globalPtr)
{
FILE *yyoutput = yyo;
YYUSE (yyoutput);
if (!yyvaluep)
return;
# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+ if (yykind < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
# endif
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YYUSE (yytype);
+ YYUSE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
`---------------------------*/
static void
-yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *globalPtr)
+yy_symbol_print (FILE *yyo,
+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *globalPtr)
{
YYFPRINTF (yyo, "%s %s (",
- yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
YY_LOCATION_PRINT (yyo, *yylocationp);
YYFPRINTF (yyo, ": ");
- yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, globalPtr);
+ yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, globalPtr);
YYFPRINTF (yyo, ")");
}
`------------------------------------------------*/
static void
-yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, void *globalPtr)
+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
+ int yyrule, void *globalPtr)
{
int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr,
- yystos[+yyssp[yyi + 1 - yynrhs]],
- &yyvsp[(yyi + 1) - (yynrhs)]
- , &(yylsp[(yyi + 1) - (yynrhs)]) , globalPtr);
+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
+ &yyvsp[(yyi + 1) - (yynrhs)],
+ &(yylsp[(yyi + 1) - (yynrhs)]), globalPtr);
YYFPRINTF (stderr, "\n");
}
}
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YYDPRINTF(Args) ((void) 0)
+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
#endif
-#if YYERROR_VERBOSE
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
-# else
-/* Return the length of YYSTR. */
-static YYPTRDIFF_T
-yystrlen (const char *yystr)
-{
- YYPTRDIFF_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-{
- char *yyd = yydest;
- const char *yys = yysrc;
- while ((*yyd++ = *yys++) != '\0')
- continue;
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYPTRDIFF_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYPTRDIFF_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- else
- goto append;
-
- append:
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (yyres)
- return yystpcpy (yyres, yystr) - yyres;
- else
- return yystrlen (yystr);
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
- yy_state_t *yyssp, int yytoken)
-{
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULLPTR;
- /* Arguments of yyformat: reported tokens (one for the "unexpected",
- one per "expected"). */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Actual size of YYARG. */
- int yycount = 0;
- /* Cumulated lengths of YYARG. */
- YYPTRDIFF_T yysize = 0;
-
- /* There are many possibilities here to consider:
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[+*yyssp];
- YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
- yysize = yysize0;
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- {
- YYPTRDIFF_T yysize1
- = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
- return 2;
- }
- }
- }
- }
-
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- default: /* Avoid compiler warnings. */
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
-
- {
- /* Don't count the "%s"s in the final size, but reserve room for
- the terminator. */
- YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
- if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
- yysize = yysize1;
- else
- return 2;
- }
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
-
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- ++yyp;
- ++yyformat;
- }
- }
- return 0;
-}
-#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, void *globalPtr)
+yydestruct (const char *yymsg,
+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, void *globalPtr)
{
YYUSE (yyvaluep);
YYUSE (yylocationp);
YYUSE (globalPtr);
if (!yymsg)
yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- YYUSE (yytype);
+ YYUSE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
+
+
/*----------.
| yyparse. |
`----------*/
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
+ /* Their size. */
+ YYPTRDIFF_T yystacksize;
+
/* The state stack. */
yy_state_t yyssa[YYINITDEPTH];
yy_state_t *yyss;
YYLTYPE *yyls;
YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[3];
-
- YYPTRDIFF_T yystacksize;
-
int yyn;
+ /* The return value of yyparse. */
int yyresult;
/* Lookahead token as an internal (translated) token number. */
- int yytoken = 0;
+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
-#endif
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
Keep to zero when no symbol should be popped. */
int yylen = 0;
+ yynerrs = 0;
+ yystate = 0;
+ yyerrstatus = 0;
+
+ yystacksize = YYINITDEPTH;
yyssp = yyss = yyssa;
yyvsp = yyvs = yyvsa;
yylsp = yyls = yylsa;
- yystacksize = YYINITDEPTH;
+
YYDPRINTF ((stderr, "Starting parse\n"));
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
yylsp[0] = yylloc;
goto yysetstate;
YY_IGNORE_USELESS_CAST_BEGIN
*yyssp = YY_CAST (yy_state_t, yystate);
YY_IGNORE_USELESS_CAST_END
+ YY_STACK_PRINT (yyss, yyssp);
if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
YYSTACK_RELOCATE (yyls_alloc, yyls);
-# undef YYSTACK_RELOCATE
+# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
/* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
if (yychar == YYEMPTY)
{
- YYDPRINTF ((stderr, "Reading a token: "));
+ YYDPRINTF ((stderr, "Reading a token\n"));
yychar = yylex (&yylval, &yylloc, globalPtr);
}
if (yychar <= YYEOF)
{
- yychar = yytoken = YYEOF;
+ yychar = YYEOF;
+ yytoken = YYSYMBOL_YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
+ else if (yychar == YYerror)
+ {
+ /* The scanner already issued an error message, process directly
+ to error recovery. But do not keep the error token as
+ lookahead, it is too special and may lead us to an endless
+ loop in error recovery. */
+ yychar = YYUNDEF;
+ yytoken = YYSYMBOL_YYerror;
+ yyerror_range[1] = yylloc;
+ goto yyerrlab1;
+ }
else
{
yytoken = YYTRANSLATE (yychar);
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
*++yylsp = yyloc;
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
-#if ! YYERROR_VERBOSE
yyerror (&yylloc, globalPtr, YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (&yylloc, globalPtr, yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
-#endif
}
yyerror_range[1] = yylloc;
-
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
+ /* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
{
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ yyn += YYSYMBOL_YYerror;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
{
yyn = yytable[yyn];
if (0 < yyn)
yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
- yystos[yystate], yyvsp, yylsp, globalPtr);
+ YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, globalPtr);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
YY_IGNORE_MAYBE_UNINITIALIZED_END
yyerror_range[2] = yylloc;
- /* Using YYLLOC is tempting, but would change the location of
- the lookahead. YYLOC is available though. */
- YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
- *++yylsp = yyloc;
+ ++yylsp;
+ YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
/* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
goto yyreturn;
-#if !defined yyoverflow || YYERROR_VERBOSE
+#if !defined yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
- yystos[+*yyssp], yyvsp, yylsp, globalPtr);
+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, globalPtr);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
+
return yyresult;
}
+
#undef GLOBAL_DATA
static ExpressionNode* makeAssignNode(JSGlobalData* globalData, ExpressionNode* loc, Operator op, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments, int start, int divot, int end)