grammar.cpp
来自「将konqueror浏览器移植到ARM9 2410中」· C++ 代码 · 共 1,648 行 · 第 1/5 页
CPP
1,648 行
/* A Bison parser, made from grammar.y by GNU Bison version 1.28 */#define YYBISON 1 /* Identify Bison output. */#define yyparse kjsyyparse#define yylex kjsyylex#define yyerror kjsyyerror#define yylval kjsyylval#define yychar kjsyychar#define yydebug kjsyydebug#define yynerrs kjsyynerrs#define YYLSP_NEEDED#define NULLTOKEN 257#define TRUETOKEN 258#define FALSETOKEN 259#define STRING 260#define NUMBER 261#define BREAK 262#define CASE 263#define DEFAULT 264#define FOR 265#define NEW 266#define VAR 267#define CONTINUE 268#define FUNCTION 269#define RETURN 270#define VOID 271#define DELETE 272#define IF 273#define THIS 274#define DO 275#define WHILE 276#define ELSE 277#define IN 278#define INSTANCEOF 279#define TYPEOF 280#define SWITCH 281#define WITH 282#define RESERVED 283#define THROW 284#define TRY 285#define CATCH 286#define FINALLY 287#define EQEQ 288#define NE 289#define STREQ 290#define STRNEQ 291#define LE 292#define GE 293#define OR 294#define AND 295#define PLUSPLUS 296#define MINUSMINUS 297#define LSHIFT 298#define RSHIFT 299#define URSHIFT 300#define PLUSEQUAL 301#define MINUSEQUAL 302#define MULTEQUAL 303#define DIVEQUAL 304#define LSHIFTEQUAL 305#define RSHIFTEQUAL 306#define URSHIFTEQUAL 307#define ANDEQUAL 308#define MODEQUAL 309#define XOREQUAL 310#define OREQUAL 311#define IDENT 312#define AUTO 313#line 1 "grammar.y"/* * This file is part of the KDE libraries * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#ifdef HAVE_CONFIG_H#include <config.h>#endif#include <string.h>#include "kjs.h"#include "nodes.h"#include "lexer.h"/* default values for bison */#define YYDEBUG 0#define YYMAXDEPTH 0#ifdef KJS_DEBUGGER#define YYERROR_VERBOSE#define DBG(l, s, e) { l->setLoc(s.first_line, e.last_line); } // location#else#undef YYLSP_NEEDED#define DBG(l, s, e)#endifextern int yylex();int yyerror (const char *);bool automatic();using namespace KJS;#line 49 "grammar.y"typedef union { int ival; double dval; UString *ustr; Node *node; StatementNode *stat; ParameterNode *param; FunctionBodyNode *body; FuncDeclNode *func; ProgramNode *prog; AssignExprNode *init; SourceElementNode *src; SourceElementsNode *srcs; StatListNode *slist; ArgumentsNode *args; ArgumentListNode *alist; VarDeclNode *decl; VarDeclListNode *vlist; CaseBlockNode *cblk; ClauseListNode *clist; CaseClauseNode *ccl; ElementNode *elm; ElisionNode *eli; Operator op;} YYSTYPE;#ifndef YYLTYPEtypedef struct yyltype { int timestamp; int first_line; int first_column; int last_line; int last_column; char *text; } yyltype;#define YYLTYPE yyltype#endif#include <stdio.h>#ifndef __cplusplus#ifndef __STDC__#define const#endif#endif#define YYFINAL 358#define YYFLAG -32768#define YYNTBASE 84#define YYTRANSLATE(x) ((unsigned)(x) <= 313 ? yytranslate[x] : 148)static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 73, 2, 2, 2, 75, 78, 2, 61, 62, 74, 70, 67, 71, 69, 60, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 68, 83, 76, 82, 77, 81, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 65, 2, 66, 79, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 63, 80, 64, 72, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59};#if YYDEBUG != 0static const short yyprhs[] = { 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 24, 27, 31, 35, 39, 45, 48, 53, 54, 56, 58, 61, 65, 71, 73, 75, 77, 79, 81, 86, 90, 94, 96, 99, 102, 105, 110, 114, 117, 121, 123, 127, 129, 131, 133, 136, 139, 141, 144, 147, 150, 153, 157, 160, 164, 167, 170, 173, 176, 178, 182, 186, 190, 192, 196, 200, 202, 206, 210, 214, 216, 220, 224, 228, 232, 236, 240, 242, 246, 250, 254, 258, 260, 264, 266, 270, 272, 276, 278, 282, 284, 288, 290, 296, 298, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358, 360, 363, 367, 369, 372, 376, 380, 382, 386, 388, 391, 394, 396, 399, 402, 408, 416, 423, 429, 439, 450, 458, 467, 477, 478, 480, 483, 486, 490, 494, 497, 500, 504, 508, 511, 514, 518, 522, 528, 534, 538, 544, 545, 547, 549, 552, 556, 561, 564, 568, 572, 576, 580, 584, 589, 595, 598, 604, 611, 616, 622, 624, 628, 631, 635, 637, 639, 642, 644};static const short yyrhs[] = { 3, 0, 4, 0, 5, 0, 7, 0, 6, 0, 60, 0, 20, 0, 58, 0, 84, 0, 86, 0, 61, 113, 62, 0, 63, 64, 0, 63, 90, 64, 0, 65, 88, 66, 0, 65, 87, 66, 0, 65, 87, 67, 88, 66, 0, 88, 111, 0, 87, 67, 88, 111, 0, 0, 89, 0, 67, 0, 89, 67, 0, 91, 68, 111, 0, 90, 67, 91, 68, 111, 0, 58, 0, 6, 0, 7, 0, 85, 0, 142, 0, 92, 65, 113, 66, 0, 92, 69, 58, 0, 12, 92, 95, 0, 92, 0, 12, 93, 0, 92, 95, 0, 94, 95, 0, 94, 65, 113, 66, 0, 94, 69, 58, 0, 61, 62, 0, 61, 96, 62, 0, 111, 0, 96, 67, 111, 0, 93, 0, 94, 0, 97, 0, 97, 42, 0, 97, 43, 0, 98, 0, 18, 99, 0, 17, 99, 0, 26, 99, 0, 42, 99, 0, 59, 42, 99, 0, 43, 99, 0, 59, 43, 99, 0, 70, 99, 0, 71, 99, 0, 72, 99, 0, 73, 99, 0, 99, 0, 100, 74, 99, 0, 100, 60, 99, 0, 100, 75, 99, 0, 100, 0, 101, 70, 100, 0, 101, 71, 100, 0, 101, 0, 102, 44, 101, 0, 102, 45, 101, 0, 102, 46, 101, 0, 102, 0, 103, 76, 102, 0, 103, 77, 102, 0, 103, 38, 102, 0, 103, 39, 102, 0, 103, 25, 102, 0, 103, 24, 102, 0, 103, 0, 104, 34, 103, 0, 104, 35, 103, 0, 104, 36, 103, 0, 104, 37, 103, 0, 104, 0, 105, 78, 104, 0, 105, 0, 106, 79, 104, 0, 106, 0, 107, 80, 104, 0, 107, 0, 108, 41, 107, 0, 108, 0, 109, 40, 108, 0, 109, 0, 109, 81, 111, 68, 111, 0, 110, 0, 97, 112, 111, 0, 82, 0, 47, 0, 48, 0, 49, 0, 50, 0, 51, 0, 52, 0, 53, 0, 54, 0, 56, 0, 57, 0, 55, 0, 111, 0, 113, 67, 111, 0, 115, 0, 117, 0, 121, 0, 122, 0, 123, 0, 124, 0, 126, 0, 127, 0, 128, 0, 129, 0, 130, 0, 136, 0, 137, 0, 138, 0, 63, 64, 0, 63, 116, 64, 0, 114, 0, 116, 114, 0, 13, 118, 83, 0, 13, 118, 1, 0, 119, 0, 118, 67, 119, 0, 58, 0, 58, 120, 0, 82, 111, 0, 83, 0, 113, 83, 0, 113, 1, 0, 19, 61, 113, 62, 114, 0, 19, 61, 113, 62, 114, 23, 114, 0, 21, 114, 22, 61, 113, 62, 0, 22, 61, 113, 62, 114, 0, 11, 61, 125, 83, 125, 83, 125, 62, 114, 0, 11, 61, 13, 118, 83, 125, 83, 125, 62, 114, 0, 11, 61, 97, 24, 113, 62, 114, 0, 11, 61, 13, 58, 24, 113, 62, 114, 0, 11, 61, 13, 58, 120, 24, 113, 62, 114, 0, 0, 113, 0, 14, 83, 0, 14, 1, 0, 14, 58, 83, 0, 14, 58, 1, 0, 8, 83, 0, 8, 1, 0, 8, 58, 83, 0, 8, 58, 1, 0, 16, 83, 0, 16, 1, 0, 16, 113, 83, 0, 16, 113, 1, 0, 28, 61, 113, 62, 114, 0, 27, 61, 113, 62, 131, 0, 63, 132, 64, 0, 63, 132, 135, 132, 64, 0, 0, 133, 0, 134, 0, 133, 134, 0, 9, 113, 68, 0, 9, 113, 68, 116, 0, 10, 68, 0, 10, 68, 116, 0, 58, 68, 114, 0, 30, 113, 83, 0, 31, 115, 139, 0, 31, 115, 140, 0, 31, 115, 139, 140, 0, 32, 61, 58, 62, 115, 0, 33, 115, 0, 15, 58, 61, 62, 144, 0, 15, 58, 61, 143, 62, 144, 0, 15, 61, 62, 144, 0, 15, 61, 143, 62, 144, 0, 58, 0, 143, 67, 58, 0, 63, 64, 0, 63, 146, 64, 0, 146, 0, 147, 0, 146, 147, 0, 114, 0, 141, 0};#endif#if YYDEBUG != 0static const short yyrline[] = { 0, 156, 158, 159, 160, 161, 162, 167, 169, 171, 172, 173, 174, 175, 178, 180, 181, 184, 186, 190, 192, 195, 197, 200, 202, 206, 209, 210, 213, 215, 216, 217, 219, 222, 224, 227, 229, 230, 231, 234, 236, 239, 241, 244, 246, 249, 251, 252, 255, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 270, 272, 273, 274, 277, 279, 280, 283, 285, 286, 287, 290, 292, 294, 296, 298, 300, 302, 306, 308, 309, 310, 311, 314, 316, 319, 321, 324, 326, 329, 331, 335, 337, 341, 343, 347, 349, 353, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 368, 370, 373, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 390, 392, 395, 397, 400, 403, 412, 414, 418, 420, 423, 427, 431, 434, 441, 443, 447, 449, 450, 453, 456, 459, 463, 469, 471, 474, 476, 480, 482, 489, 491, 495, 497, 505, 507, 511, 512, 518, 523, 528, 530, 534, 536, 539, 541, 544, 546, 549, 551, 554, 560, 564, 566, 567, 570, 574, 578, 581, 585, 587, 592, 594, 598, 600, 603, 608,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?