1 Star 0 Fork 1

卐卍/编译原理虎书代码

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
y.tab.h 5.33 KB
一键复制 编辑 原始数据 按行查看 历史
/* A Bison parser, made by GNU Bison 3.8.2. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* 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. */
#ifndef YY_YY_Y_TAB_H_INCLUDED
# define YY_YY_Y_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int yydebug;
#endif
/* Token kinds. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
YYEMPTY = -2,
YYEOF = 0, /* "end of file" */
YYerror = 256, /* error */
YYUNDEF = 257, /* "invalid token" */
ID = 258, /* ID */
INT = 259, /* INT */
COMMA = 260, /* COMMA */
COLON = 261, /* COLON */
SEMICOLON = 262, /* SEMICOLON */
LPAREN = 263, /* LPAREN */
RPAREN = 264, /* RPAREN */
LBRACK = 265, /* LBRACK */
RBRACK = 266, /* RBRACK */
LBRACE = 267, /* LBRACE */
RBRACE = 268, /* RBRACE */
DOT = 269, /* DOT */
PLUS = 270, /* PLUS */
MINUS = 271, /* MINUS */
TIMES = 272, /* TIMES */
DIVIDE = 273, /* DIVIDE */
EQ = 274, /* EQ */
NEQ = 275, /* NEQ */
LT = 276, /* LT */
LE = 277, /* LE */
GT = 278, /* GT */
GE = 279, /* GE */
AND = 280, /* AND */
OR = 281, /* OR */
ASSIGN = 282, /* ASSIGN */
ARRAY = 283, /* ARRAY */
IF = 284, /* IF */
THEN = 285, /* THEN */
ELSE = 286, /* ELSE */
WHILE = 287, /* WHILE */
FOR = 288, /* FOR */
TO = 289, /* TO */
DO = 290, /* DO */
LET = 291, /* LET */
IN = 292, /* IN */
END = 293, /* END */
OF = 294, /* OF */
BREAK = 295, /* BREAK */
NIL = 296, /* NIL */
FUNCTION = 297, /* FUNCTION */
VAR = 298, /* VAR */
TYPE = 299 /* TYPE */
};
typedef enum yytokentype yytoken_kind_t;
#endif
/* Token kinds. */
#define YYEMPTY -2
#define YYEOF 0
#define YYerror 256
#define YYUNDEF 257
#define ID 258
#define INT 259
#define COMMA 260
#define COLON 261
#define SEMICOLON 262
#define LPAREN 263
#define RPAREN 264
#define LBRACK 265
#define RBRACK 266
#define LBRACE 267
#define RBRACE 268
#define DOT 269
#define PLUS 270
#define MINUS 271
#define TIMES 272
#define DIVIDE 273
#define EQ 274
#define NEQ 275
#define LT 276
#define LE 277
#define GT 278
#define GE 279
#define AND 280
#define OR 281
#define ASSIGN 282
#define ARRAY 283
#define IF 284
#define THEN 285
#define ELSE 286
#define WHILE 287
#define FOR 288
#define TO 289
#define DO 290
#define LET 291
#define IN 292
#define END 293
#define OF 294
#define BREAK 295
#define NIL 296
#define FUNCTION 297
#define VAR 298
#define TYPE 299
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
#line 28 "tiger.grm"
int pos;
int ival;
const char* sval;
A_yly_exp y_exp;
A_yly_expList y_exps;
A_yly_var y_var;
A_yly_varList y_vars;
#line 166 "y.tab.h"
};
typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
extern YYSTYPE yylval;
int yyparse (void);
#endif /* !YY_YY_Y_TAB_H_INCLUDED */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Happy_world_cn/hushu.git
git@gitee.com:Happy_world_cn/hushu.git
Happy_world_cn
hushu
编译原理虎书代码
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385