#include "FlexLexer.h"
#include <stdio.h>
#include <string>
#include <vector>
#include "parser.h"
#include "config.h"
Go to the source code of this file.
Classes | |
union | YYSTYPE |
union | yyalloc |
Defines | |
#define | YYBISON 1 |
#define | YYBISON_VERSION "2.1" |
#define | YYSKELETON_NAME "yacc.c" |
#define | YYPURE 0 |
#define | YYLSP_NEEDED 0 |
#define | END_OF_FILE 258 |
#define | EOL 259 |
#define | AND 260 |
#define | OR 261 |
#define | EQUAL 262 |
#define | EQUAL2 263 |
#define | LEFT_PAR 264 |
#define | RIGHT_PAR 265 |
#define | POWER 266 |
#define | LEFT_BRA 267 |
#define | RIGHT_BRA 268 |
#define | HOLE 269 |
#define | COMMA 270 |
#define | MAJ 271 |
#define | MIN 272 |
#define | INT 273 |
#define | PLUS 274 |
#define | TIMES 275 |
#define | RUN 276 |
#define | DOT 277 |
#define | SET 278 |
#define | HELP 279 |
#define | STEP 280 |
#define | INFO 281 |
#define | ZERO 282 |
#define | BEEP 283 |
#define | YYDEBUG 0 |
#define | YYERROR_VERBOSE 0 |
#define | YYTOKEN_TABLE 0 |
#define | yystype YYSTYPE |
#define | YYSTYPE_IS_DECLARED 1 |
#define | YYSTYPE_IS_TRIVIAL 1 |
#define | YYSIZE_T unsigned int |
#define | YY_(msgid) msgid |
#define | YYSTACK_ALLOC YYMALLOC |
#define | YYSTACK_FREE YYFREE |
#define | YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) |
#define | YYMALLOC malloc |
#define | YYFREE free |
#define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
#define | YYSTACK_BYTES(N) |
#define | YYCOPY(To, From, Count) |
#define | YYSTACK_RELOCATE(Stack) |
#define | YYFINAL 28 |
#define | YYLAST 112 |
#define | YYNTOKENS 29 |
#define | YYNNTS 15 |
#define | YYNRULES 44 |
#define | YYNSTATES 78 |
#define | YYUNDEFTOK 2 |
#define | YYMAXUTOK 283 |
#define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
#define | YYPACT_NINF -34 |
#define | YYTABLE_NINF -45 |
#define | yyerrok (yyerrstatus = 0) |
#define | yyclearin (yychar = YYEMPTY) |
#define | YYEMPTY (-2) |
#define | YYEOF 0 |
#define | YYACCEPT goto yyacceptlab |
#define | YYABORT goto yyabortlab |
#define | YYERROR goto yyerrorlab |
#define | YYFAIL goto yyerrlab |
#define | YYRECOVERING() (!!yyerrstatus) |
#define | YYBACKUP(Token, Value) |
#define | YYTERROR 1 |
#define | YYERRCODE 256 |
#define | YYRHSLOC(Rhs, K) ((Rhs)[K]) |
#define | YYLLOC_DEFAULT(Current, Rhs, N) |
#define | YY_LOCATION_PRINT(File, Loc) ((void) 0) |
#define | YYLEX yylex () |
#define | YYDPRINTF(Args) |
#define | YY_SYMBOL_PRINT(Title, Type, Value, Location) |
#define | YY_STACK_PRINT(Bottom, Top) |
#define | YY_REDUCE_PRINT(Rule) |
#define | YYINITDEPTH 200 |
#define | YYMAXDEPTH 10000 |
#define | YYPOPSTACK (yyvsp--, yyssp--) |
Typedefs | |
typedef short int | yysigned_char |
Enumerations | |
enum | yytokentype { END_OF_FILE = 258, EOL = 259, AND = 260, OR = 261, EQUAL = 262, EQUAL2 = 263, LEFT_PAR = 264, RIGHT_PAR = 265, POWER = 266, LEFT_BRA = 267, RIGHT_BRA = 268, HOLE = 269, COMMA = 270, MAJ = 271, MIN = 272, INT = 273, PLUS = 274, TIMES = 275, RUN = 276, DOT = 277, SET = 278, HELP = 279, STEP = 280, INFO = 281, ZERO = 282, BEEP = 283, END_OF_FILE = 258, EOL = 259, AND = 260, OR = 261, EQUAL = 262, EQUAL2 = 263, LEFT_PAR = 264, RIGHT_PAR = 265, POWER = 266, LEFT_BRA = 267, RIGHT_BRA = 268, HOLE = 269, COMMA = 270, MAJ = 271, MIN = 272, INT = 273, PLUS = 274, TIMES = 275, RUN = 276, DOT = 277, SET = 278, HELP = 279, STEP = 280, INFO = 281, ZERO = 282, BEEP = 283, END_OF_FILE = 258, EOL = 259, AND = 260, OR = 261, EQUAL = 262, EQUAL2 = 263, LEFT_PAR = 264, RIGHT_PAR = 265, POWER = 266, LEFT_BRA = 267, RIGHT_BRA = 268, HOLE = 269, COMMA = 270, MAJ = 271, MIN = 272, INT = 273, PLUS = 274, TIMES = 275, RUN = 276, DOT = 277, SET = 278, HELP = 279, STEP = 280, INFO = 281, ZERO = 282, BEEP = 283, END_OF_FILE = 258, EOL = 259, AND = 260, OR = 261, EQUAL = 262, EQUAL2 = 263, LEFT_PAR = 264, RIGHT_PAR = 265, POWER = 266, LEFT_BRA = 267, RIGHT_BRA = 268, HOLE = 269, COMMA = 270, MAJ = 271, MIN = 272, INT = 273, PLUS = 274, TIMES = 275, RUN = 276, DOT = 277, SET = 278, HELP = 279, STEP = 280, INFO = 281, ZERO = 282, BEEP = 283 } |
Functions | |
int | yylex () |
void | set_extParser (Parser *extP) |
int | yyerror (char *s) |
void | set_result (Node **r) |
static void | yydestruct (yymsg, yytype, yyvaluep) const char *yymsg |
int | yyparse () |
Variables | |
Node ** | result |
Parser * | extParser |
yyFlexLexer * | lexer |
int | numLine |
static const unsigned char | yytranslate [] |
static const unsigned char | yyr1 [] |
static const unsigned char | yyr2 [] |
static const unsigned char | yydefact [] |
static const yysigned_char | yydefgoto [] |
static const yysigned_char | yypact [] |
static const yysigned_char | yypgoto [] |
static const yysigned_char | yytable [] |
static const yysigned_char | yycheck [] |
static const unsigned char | yystos [] |
int | yytype |
YYSTYPE * | yyvaluep |
int | yychar |
YYSTYPE | yylval |
int | yynerrs |
#define AND 260 |
Definition at line 90 of file parser.tab.cpp.
#define BEEP 283 |
Definition at line 113 of file parser.tab.cpp.
#define COMMA 270 |
Definition at line 100 of file parser.tab.cpp.
#define DOT 277 |
Definition at line 107 of file parser.tab.cpp.
#define END_OF_FILE 258 |
Definition at line 88 of file parser.tab.cpp.
#define EOL 259 |
Definition at line 89 of file parser.tab.cpp.
#define EQUAL 262 |
Definition at line 92 of file parser.tab.cpp.
#define EQUAL2 263 |
Definition at line 93 of file parser.tab.cpp.
#define HELP 279 |
Definition at line 109 of file parser.tab.cpp.
#define HOLE 269 |
Definition at line 99 of file parser.tab.cpp.
#define INFO 281 |
Definition at line 111 of file parser.tab.cpp.
#define INT 273 |
Definition at line 103 of file parser.tab.cpp.
#define LEFT_BRA 267 |
Definition at line 97 of file parser.tab.cpp.
#define LEFT_PAR 264 |
Definition at line 94 of file parser.tab.cpp.
#define MAJ 271 |
Definition at line 101 of file parser.tab.cpp.
#define MIN 272 |
Definition at line 102 of file parser.tab.cpp.
#define OR 261 |
Definition at line 91 of file parser.tab.cpp.
#define PLUS 274 |
Definition at line 104 of file parser.tab.cpp.
#define POWER 266 |
Definition at line 96 of file parser.tab.cpp.
#define RIGHT_BRA 268 |
Definition at line 98 of file parser.tab.cpp.
#define RIGHT_PAR 265 |
Definition at line 95 of file parser.tab.cpp.
#define RUN 276 |
Definition at line 106 of file parser.tab.cpp.
#define SET 278 |
Definition at line 108 of file parser.tab.cpp.
#define STEP 280 |
Definition at line 110 of file parser.tab.cpp.
#define TIMES 275 |
Definition at line 105 of file parser.tab.cpp.
#define YY_ | ( | msgid | ) | msgid |
Definition at line 206 of file parser.tab.cpp.
#define YY_LOCATION_PRINT | ( | File, | |||
Loc | ) | ((void) 0) |
Definition at line 648 of file parser.tab.cpp.
#define YY_REDUCE_PRINT | ( | Rule | ) |
Definition at line 750 of file parser.tab.cpp.
#define YY_STACK_PRINT | ( | Bottom, | |||
Top | ) |
Definition at line 749 of file parser.tab.cpp.
#define YY_SYMBOL_PRINT | ( | Title, | |||
Type, | |||||
Value, | |||||
Location | ) |
Definition at line 748 of file parser.tab.cpp.
#define YYABORT goto yyabortlab |
Definition at line 577 of file parser.tab.cpp.
#define YYACCEPT goto yyacceptlab |
Definition at line 576 of file parser.tab.cpp.
#define YYBACKUP | ( | Token, | |||
Value | ) |
Value:
do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0)
Definition at line 589 of file parser.tab.cpp.
#define YYBISON 1 |
Definition at line 37 of file parser.tab.cpp.
#define YYBISON_VERSION "2.1" |
Definition at line 40 of file parser.tab.cpp.
#define yyclearin (yychar = YYEMPTY) |
Definition at line 572 of file parser.tab.cpp.
#define YYCOPY | ( | To, | |||
From, | |||||
Count | ) |
Value:
do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0)
Definition at line 295 of file parser.tab.cpp.
#define YYDEBUG 0 |
Definition at line 144 of file parser.tab.cpp.
#define YYDPRINTF | ( | Args | ) |
Definition at line 747 of file parser.tab.cpp.
#define YYEMPTY (-2) |
Definition at line 573 of file parser.tab.cpp.
#define YYEOF 0 |
Definition at line 574 of file parser.tab.cpp.
#define YYERRCODE 256 |
Definition at line 608 of file parser.tab.cpp.
#define yyerrok (yyerrstatus = 0) |
Definition at line 571 of file parser.tab.cpp.
#define YYERROR goto yyerrorlab |
Definition at line 578 of file parser.tab.cpp.
#define YYERROR_VERBOSE 0 |
Definition at line 152 of file parser.tab.cpp.
#define YYFAIL goto yyerrlab |
Definition at line 585 of file parser.tab.cpp.
#define YYFINAL 28 |
Definition at line 331 of file parser.tab.cpp.
#define YYFREE free |
Definition at line 255 of file parser.tab.cpp.
#define YYINITDEPTH 200 |
Definition at line 756 of file parser.tab.cpp.
#define YYLAST 112 |
Definition at line 333 of file parser.tab.cpp.
#define YYLEX yylex () |
Definition at line 658 of file parser.tab.cpp.
#define YYLLOC_DEFAULT | ( | Current, | |||
Rhs, | |||||
N | ) |
Value:
do \ if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (0)
Definition at line 617 of file parser.tab.cpp.
#define YYLSP_NEEDED 0 |
Definition at line 49 of file parser.tab.cpp.
#define YYMALLOC malloc |
Definition at line 248 of file parser.tab.cpp.
#define YYMAXDEPTH 10000 |
Definition at line 767 of file parser.tab.cpp.
#define YYMAXUTOK 283 |
Definition at line 346 of file parser.tab.cpp.
#define YYNNTS 15 |
Definition at line 338 of file parser.tab.cpp.
#define YYNRULES 44 |
Definition at line 340 of file parser.tab.cpp.
#define YYNSTATES 78 |
Definition at line 342 of file parser.tab.cpp.
#define YYNTOKENS 29 |
Definition at line 336 of file parser.tab.cpp.
#define YYPACT_NINF -34 |
Definition at line 500 of file parser.tab.cpp.
#define YYPOPSTACK (yyvsp--, yyssp--) |
#define YYPURE 0 |
Definition at line 46 of file parser.tab.cpp.
#define YYRECOVERING | ( | ) | (!!yyerrstatus) |
Definition at line 587 of file parser.tab.cpp.
#define YYRHSLOC | ( | Rhs, | |||
K | ) | ((Rhs)[K]) |
Definition at line 615 of file parser.tab.cpp.
#define YYSIZE_T unsigned int |
Definition at line 195 of file parser.tab.cpp.
#define YYSKELETON_NAME "yacc.c" |
Definition at line 43 of file parser.tab.cpp.
#define YYSTACK_ALLOC YYMALLOC |
Definition at line 239 of file parser.tab.cpp.
#define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) |
Definition at line 242 of file parser.tab.cpp.
#define YYSTACK_BYTES | ( | N | ) |
Value:
((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM)
Definition at line 284 of file parser.tab.cpp.
#define YYSTACK_FREE YYFREE |
Definition at line 240 of file parser.tab.cpp.
#define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
Definition at line 280 of file parser.tab.cpp.
#define YYSTACK_RELOCATE | ( | Stack | ) |
Value:
do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack, Stack, yysize); \ Stack = &yyptr->Stack; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (0)
Definition at line 311 of file parser.tab.cpp.
#define yystype YYSTYPE |
Definition at line 171 of file parser.tab.cpp.
#define YYSTYPE_IS_DECLARED 1 |
Definition at line 172 of file parser.tab.cpp.
#define YYSTYPE_IS_TRIVIAL 1 |
Definition at line 173 of file parser.tab.cpp.
#define YYTABLE_NINF -45 |
Definition at line 524 of file parser.tab.cpp.
#define YYTERROR 1 |
Definition at line 607 of file parser.tab.cpp.
#define YYTOKEN_TABLE 0 |
Definition at line 157 of file parser.tab.cpp.
#define YYTRANSLATE | ( | YYX | ) | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
Definition at line 348 of file parser.tab.cpp.
#define YYUNDEFTOK 2 |
Definition at line 345 of file parser.tab.cpp.
#define ZERO 282 |
Definition at line 112 of file parser.tab.cpp.
typedef short int yysigned_char |
Definition at line 327 of file parser.tab.cpp.
enum yytokentype |
Definition at line 58 of file parser.tab.cpp.
void set_extParser | ( | Parser * | extP | ) |
void set_result | ( | Node ** | r | ) |
int yyerror | ( | char * | s | ) |
int yylex | ( | void | ) |
int yyparse | ( | ) |
Definition at line 1725 of file parser.tab.cpp.
int numLine |
Definition at line 1726 of file parser.tab.cpp.
Definition at line 1723 of file parser.tab.cpp.
int yychar |
Definition at line 956 of file parser.tab.cpp.
const yysigned_char yycheck[] [static] |
Initial value:
{ 33, 5, 35, 0, 4, 10, 9, 4, 9, 36, 15, 14, 9, 16, 17, 16, 17, 14, 45, 16, 17, 7, 55, 10, 21, 11, 23, 24, 15, 56, 57, 9, 4, 66, 8, 9, 14, 9, 16, 17, 4, 74, 14, 4, 16, 17, 16, 17, 18, 21, 9, 23, 24, 6, 25, 26, 27, 28, 14, 8, 16, 17, 16, 17, 18, 8, 9, 5, 6, 16, 17, 10, 11, 31, 32, 63, 64, 10, 4, 9, 12, 5, 9, 6, 20, 19, 11, 22, 19, 9, 18, 13, 13, 22, 9, 2, 64, 74, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 31 }
Definition at line 541 of file parser.tab.cpp.
const unsigned char yydefact[] [static] |
Initial value:
{ 0, 4, 0, 25, 28, 27, 0, 0, 0, 0, 2, 0, 0, 0, 13, 23, 0, 0, 17, 0, 0, 5, 9, 10, 11, 12, 0, 6, 1, 3, 8, 0, 0, 0, 0, 0, 0, 22, 7, 14, 18, 28, 27, 15, 24, 0, 37, 0, 43, 44, 0, 42, 0, 0, 26, 0, 0, 0, 0, 0, 38, 40, 41, 0, 0, 0, 0, 34, 33, 30, 0, 29, 39, 0, 0, 31, 0, 32 }
Definition at line 479 of file parser.tab.cpp.
const yysigned_char yydefgoto[] [static] |
Initial value:
{ -1, 9, 10, 26, 11, 12, 13, 14, 15, 16, 69, 17, 47, 18, 19 }
Definition at line 492 of file parser.tab.cpp.
Definition at line 966 of file parser.tab.cpp.
int yynerrs |
Definition at line 969 of file parser.tab.cpp.
const yysigned_char yypact[] [static] |
Initial value:
{ 28, -34, -3, -34, 26, 57, 0, 29, 36, 3, -34, 39, -4, 47, 62, -34, 14, 41, -34, 51, 67, -34, -34, -34, -34, -34, 74, -34, -34, -34, -34, -3, 22, 44, 68, 44, 30, -34, -34, 76, -34, 70, 73, 77, 75, 46, 75, -5, -34, -34, 64, 66, 78, 79, -34, 44, 53, 53, 65, 71, 75, 69, -34, -1, -1, 72, 44, 70, 73, -34, 80, -34, -34, 61, 44, -34, 13, -34 }
Definition at line 501 of file parser.tab.cpp.
const yysigned_char yypgoto[] [static] |
Initial value:
{ -34, -34, 85, -34, 93, -34, -34, 42, -34, -33, 32, 12, 23, 81, -27 }
Definition at line 514 of file parser.tab.cpp.
const unsigned char yyr1[] [static] |
Initial value:
{ 0, 29, 30, 30, 31, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34, 34, 35, 35, 36, 36, 37, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39, 40, 40, 41, 41, 42, 42, 42, 42, 43, 43 }
Definition at line 457 of file parser.tab.cpp.
const unsigned char yyr2[] [static] |
Initial value:
{ 0, 2, 1, 2, 1, 2, 2, 3, 2, 1, 1, 1, 1, 1, 3, 3, 1, 1, 3, 3, 1, 3, 3, 1, 3, 1, 4, 1, 1, 7, 7, 3, 4, 1, 1, 1, 1, 1, 3, 7, 5, 5, 3, 1, 1 }
Definition at line 467 of file parser.tab.cpp.
const unsigned char yystos[] [static] |
Initial value:
{ 0, 4, 9, 14, 16, 17, 21, 23, 24, 30, 31, 33, 34, 35, 36, 37, 38, 40, 42, 43, 33, 4, 25, 26, 27, 28, 32, 4, 0, 31, 4, 5, 6, 7, 11, 9, 8, 10, 4, 36, 42, 16, 17, 36, 38, 12, 38, 41, 16, 17, 18, 43, 18, 43, 10, 15, 20, 19, 13, 13, 38, 43, 43, 22, 22, 19, 9, 16, 17, 39, 40, 39, 18, 38, 9, 10, 41, 10 }
Definition at line 559 of file parser.tab.cpp.
const yysigned_char yytable[] [static] |
Initial value:
{ 44, 31, 46, 28, 21, 54, 2, 1, 66, 51, 55, 3, 2, 4, 5, 67, 68, 3, 53, 4, 5, 33, 60, 77, 6, 34, 7, 8, 55, 61, 62, 2, 1, 73, -43, -35, 3, 2, 41, 42, 27, 46, 3, 30, 4, 5, 48, 49, 50, 6, 35, 7, 8, 32, 22, 23, 24, 25, 3, 36, 41, 42, 48, 49, 52, -44, -36, -16, -20, 48, 49, 75, 34, 39, 43, 70, 70, 37, 38, -35, 45, -19, -36, -21, 56, 57, 34, 63, 65, 74, 72, 58, 59, 64, 29, 20, 71, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40 }
Definition at line 525 of file parser.tab.cpp.
const unsigned char yytranslate[] [static] |
Definition at line 352 of file parser.tab.cpp.
int yytype |
Definition at line 924 of file parser.tab.cpp.
Definition at line 925 of file parser.tab.cpp.