📄 chsgram.cc
字号:
/* A Bison parser, made from chsgram.y with Bison version GNU Bison version 1.24
*/
#define YYBISON 1 /* Identify Bison output. */
#define yyparse CHSparse
#define yylex CHSlex
#define yyerror CHSerror
#define yylval CHSlval
#define yychar CHSchar
#define yydebug CHSdebug
#define yynerrs CHSnerrs
#define rwDEFINE 258
#define rwENDDEF 259
#define rwDECLARE 260
#define rwBREAK 261
#define rwELSE 262
#define rwCONTINUE 263
#define rwGLOBAL 264
#define rwIF 265
#define rwNIL 266
#define rwRETURN 267
#define rwWHILE 268
#define rwDO 269
#define rwENDIF 270
#define rwENDWHILE 271
#define rwENDFOR 272
#define rwDEFAULT 273
#define rwFOR 274
#define rwDATABLOCK 275
#define rwSWITCH 276
#define rwCASE 277
#define rwSWITCHSTR 278
#define rwCASEOR 279
#define rwPACKAGE 280
#define rwNAMESPACE 281
#define rwCLASS 282
#define ILLEGAL_TOKEN 283
#define CHRCONST 284
#define INTCONST 285
#define TTAG 286
#define VAR 287
#define IDENT 288
#define VSTR 289
#define STRATOM 290
#define TAGATOM 291
#define FLTCONST 292
#define opOBJPTR 293
#define opMINUSMINUS 294
#define opPLUSPLUS 295
#define STMT_SEP 296
#define opSHL 297
#define opSHR 298
#define opPLASN 299
#define opMIASN 300
#define opMLASN 301
#define opDVASN 302
#define opMODASN 303
#define opANDASN 304
#define opXORASN 305
#define opORASN 306
#define opSLASN 307
#define opSRASN 308
#define opCAT 309
#define opEQ 310
#define opNE 311
#define opGE 312
#define opLE 313
#define opAND 314
#define opOR 315
#define opSTREQ 316
#define opCOLONCOLON 317
#define opMDASN 318
#define opNDASN 319
#define opNTASN 320
#define opSTRNE 321
#define UNARY 322
#line 1 "chsgram.y"
// Make sure we don't get gram.h twice.
#define _CHSGRAM_H_
#define _CMDGRAM_H_
#include <stdlib.h>
#include <stdio.h>
#include "console/console.h"
#include "console/compiler.h"
#include "console/consoleInternal.h"
#ifndef YYDEBUG
#define YYDEBUG 0
#endif
#define YYSSIZE 350
int outtext(char *fmt, ...);
extern int serrors;
#define nil 0
#undef YY_ARGS
#define YY_ARGS(x) x
int CHSlex();
void CHSerror(char *, ...);
#define alloca dMalloc
#line 32 "chsgram.y"
/* Reserved Word Definitions */
#line 42 "chsgram.y"
/* Constants and Identifier Definitions */
#line 55 "chsgram.y"
/* Operator Definitions */
#line 68 "chsgram.y"
typedef union {
char c;
int i;
const char * s;
char * str;
double f;
StmtNode * stmt;
ExprNode * expr;
SlotAssignNode * slist;
VarNode * var;
SlotDecl slot;
ObjectBlockDecl odcl;
ObjectDeclNode * od;
AssignDecl asn;
IfStmtNode * ifnode;
} YYSTYPE;
#ifndef YYLTYPE
typedef
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 352
#define YYFLAG -32768
#define YYNTBASE 93
#define YYTRANSLATE(x) ((unsigned)(x) <= 322 ? yytranslate[x] : 130)
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, 58, 2, 2, 2, 48, 47, 2, 49,
50, 40, 38, 51, 39, 45, 41, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 52, 53, 42,
44, 43, 89, 59, 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,
85, 2, 92, 56, 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, 54, 46, 55, 57, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 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, 2, 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, 60, 61, 62, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
78, 79, 80, 81, 82, 83, 84, 86, 87, 88,
90, 91
};
#if YYDEBUG != 0
static const short yyprhs[] = { 0,
0, 2, 3, 6, 8, 10, 12, 19, 21, 24,
25, 28, 30, 32, 34, 36, 38, 41, 44, 47,
51, 54, 59, 66, 75, 86, 87, 89, 91, 93,
97, 101, 103, 105, 116, 127, 135, 136, 139, 140,
142, 143, 146, 147, 149, 151, 154, 157, 161, 165,
167, 175, 183, 188, 196, 202, 204, 208, 214, 222,
228, 235, 245, 254, 263, 271, 280, 288, 296, 303,
305, 307, 311, 315, 319, 323, 327, 331, 335, 339,
343, 346, 349, 352, 355, 357, 363, 367, 371, 375,
379, 383, 387, 391, 395, 399, 403, 407, 411, 415,
418, 421, 423, 425, 427, 429, 431, 433, 435, 437,
439, 444, 449, 453, 460, 464, 471, 475, 482, 484,
488, 490, 492, 495, 498, 501, 504, 507, 510, 513,
516, 519, 522, 524, 526, 530, 534, 541, 548, 551,
554, 560, 566, 569, 573, 579, 584, 591, 598, 605,
612, 613, 615, 617, 621, 623, 626, 631, 636, 644,
646
};
static const short yyrhs[] = { 94,
0, 0, 94, 95, 0, 99, 0, 100, 0, 96,
0, 25, 33, 54, 97, 55, 53, 0, 100, 0,
97, 100, 0, 0, 98, 99, 0, 115, 0, 116,
0, 117, 0, 104, 0, 112, 0, 6, 53, 0,
8, 53, 0, 12, 53, 0, 12, 119, 53, 0,
118, 53, 0, 31, 44, 119, 53, 0, 31, 44,
119, 51, 119, 53, 0, 3, 33, 49, 101, 50,
54, 98, 55, 0, 3, 33, 84, 33, 49, 101,
50, 54, 98, 55, 0, 0, 102, 0, 33, 0,
32, 0, 102, 51, 33, 0, 102, 51, 32, 0,
33, 0, 32, 0, 20, 33, 49, 33, 106, 50,
54, 127, 55, 53, 0, 5, 121, 49, 107, 106,
108, 50, 54, 109, 55, 0, 5, 121, 49, 107,
106, 108, 50, 0, 0, 52, 33, 0, 0, 119,
0, 0, 51, 126, 0, 0, 127, 0, 110, 0,
127, 110, 0, 105, 53, 0, 110, 105, 53, 0,
54, 98, 55, 0, 99, 0, 21, 49, 119, 50,
54, 113, 55, 0, 23, 49, 119, 50, 54, 113,
55, 0, 22, 114, 52, 98, 0, 22, 114, 52,
98, 18, 52, 98, 0, 22, 114, 52, 98, 113,
0, 119, 0, 114, 24, 119, 0, 10, 49, 119,
50, 111, 0, 10, 49, 119, 50, 111, 7, 111,
0, 13, 49, 119, 50, 111, 0, 14, 111, 13,
49, 119, 50, 0, 19, 49, 119, 53, 119, 53,
119, 50, 111, 0, 19, 49, 119, 53, 119, 53,
50, 111, 0, 19, 49, 119, 53, 53, 119, 50,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -