#include "parser.h"Classes | |
| union | YYSTYPE |
| union | yyalloc |
Defines | |
| #define | YYBISON 1 |
| #define | YYSKELETON_NAME "yacc.c" |
| #define | YYPURE 0 |
| #define | YYLSP_NEEDED 0 |
| #define | NUM 258 |
| #define | VAR 259 |
| #define | FNCT 260 |
| #define | NEG 261 |
| #define | YYDEBUG 0 |
| #define | YYERROR_VERBOSE 0 |
| #define | yystype YYSTYPE |
| #define | YYSTYPE_IS_DECLARED 1 |
| #define | YYSTYPE_IS_TRIVIAL 1 |
| #define | YYSTACK_ALLOC malloc |
| #define | YYSTACK_FREE free |
| #define | YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| #define | YYSTACK_BYTES(N) |
| #define | YYCOPY(To, From, Count) |
| #define | YYSTACK_RELOCATE(Stack) |
| #define | YYFINAL 2 |
| #define | YYLAST 114 |
| #define | YYNTOKENS 17 |
| #define | YYNNTS 4 |
| #define | YYNRULES 21 |
| #define | YYNSTATES 42 |
| #define | YYUNDEFTOK 2 |
| #define | YYMAXUTOK 261 |
| #define | YYTRANSLATE(YYX) ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| #define | YYPACT_NINF -13 |
| #define | YYTABLE_NINF -1 |
| #define | YYSIZE_T unsigned int |
| #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 yyerrlab1 |
| #define | YYFAIL goto yyerrlab |
| #define | YYRECOVERING() (!!yyerrstatus) |
| #define | YYBACKUP(Token, Value) |
| #define | YYTERROR 1 |
| #define | YYERRCODE 256 |
| #define | YYLLOC_DEFAULT(Current, Rhs, N) |
| #define | YYLEX yylex () |
| #define | YYDPRINTF(Args) |
| #define | YYDSYMPRINT(Args) |
| #define | YYDSYMPRINTF(Title, Token, 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 YYSTYPE | YYSTYPE |
| typedef short | yysigned_char |
Enumerations | |
| enum | yytokentype { NUM = 258, VAR = 259, FNCT = 260, NEG = 261 } |
Functions | |
| static void | yydestruct (int yytype, YYSTYPE *yyvaluep) |
| int | yyparse () |
| double | parse (char *str) |
| int | parse_errors () |
| int | yyerror (const char *s) |
| void | init_table (void) |
| void | delete_table (void) |
| symrec * | putsym (const char *sym_name, int sym_type) |
| symrec * | getsym (const char *sym_name) |
| symrec * | assign_variable (const char *symb_name, double value) |
| static int | getcharstr (void) |
| static void | ungetcstr (void) |
| int | yylex (void) |
Variables | |
| 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 unsigned char | yytable [] |
| static const yysigned_char | yycheck [] |
| static const unsigned char | yystos [] |
| int | yychar |
| YYSTYPE | yylval |
| int | yynerrs |
| symrec * | sym_table = (symrec *) 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ yytoken = YYTRANSLATE (yychar); \ YYPOPSTACK; \ goto yybackup; \ } \ else \ { \ yyerror ("syntax error: cannot back up");\ YYERROR; \ } \ while (0) |
|
|
|
|
|
|
|
|
Value: do \ { \ register YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: Current.first_line = Rhs[1].first_line; \ Current.first_column = Rhs[1].first_column; \ Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) |
|
|
|
|
|
|
|
|
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) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Initial value:
{
7, 13, 9, 6, 14, -1, 13, 14, 12, -1,
17, 18, 19, 20, 21, -1, -1, 0, 1, -1,
3, 4, 5, -1, 7, -1, 33, -1, -1, 36,
13, 14, 39, 3, 4, 5, -1, 7, 3, 4,
5, -1, 7, -1, 14, 15, -1, -1, -1, 14,
7, 8, 9, 10, -1, 12, -1, -1, 15, 16,
7, 8, 9, 10, -1, 12, -1, -1, 15, 16,
7, 8, 9, 10, -1, 12, -1, -1, 15, 16,
7, 8, 9, 10, -1, 12, -1, -1, 15, 7,
8, 9, 10, -1, 12, -1, -1, 15, 7, 8,
9, 10, -1, 12, 13, 7, 8, 9, 10, -1,
12, 9, 10, -1, 12
}
|
|
|
Initial value:
{
2, 0, 1, 0, 7, 8, 0, 0, 4, 0,
3, 0, 6, 0, 0, 19, 0, 0, 0, 0,
0, 0, 5, 9, 10, 0, 21, 16, 15, 17,
18, 20, 11, 0, 0, 12, 0, 0, 13, 0,
0, 14
}
|
|
|
Initial value:
{
-1, 1, 10, 11
}
|
|
|
|
|
|
|
|
|
Initial value:
{
-13, 17, -13, -12, -13, -3, -10, 35, -13, 35,
-13, 91, -13, 35, 30, -4, 73, 35, 35, 35,
35, 35, -13, 98, -13, 43, -13, 102, 102, -4,
-4, -4, -13, 35, 53, -13, 35, 63, -13, 35,
82, -13
}
|
|
|
Initial value:
{
-13, -13, -13, -7
}
|
|
|
Initial value:
{
0, 17, 18, 18, 19, 19, 19, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
20, 20
}
|
|
|
Initial value:
{
0, 2, 0, 2, 1, 2, 2, 1, 1, 3,
3, 4, 6, 8, 10, 3, 3, 3, 3, 2,
3, 3
}
|
|
|
Initial value:
{
0, 18, 0, 1, 3, 4, 5, 7, 13, 14,
19, 20, 13, 6, 14, 20, 20, 7, 8, 9,
10, 12, 13, 20, 15, 20, 15, 20, 20, 20,
20, 20, 15, 16, 20, 15, 16, 20, 15, 16,
20, 15
}
|
|
|
Initial value:
{
15, 12, 16, 13, 14, 0, 23, 25, 21, 0,
27, 28, 29, 30, 31, 0, 0, 2, 3, 0,
4, 5, 6, 0, 7, 0, 34, 0, 0, 37,
8, 9, 40, 4, 5, 6, 0, 7, 4, 5,
6, 0, 7, 0, 9, 24, 0, 0, 0, 9,
17, 18, 19, 20, 0, 21, 0, 0, 32, 33,
17, 18, 19, 20, 0, 21, 0, 0, 35, 36,
17, 18, 19, 20, 0, 21, 0, 0, 38, 39,
17, 18, 19, 20, 0, 21, 0, 0, 26, 17,
18, 19, 20, 0, 21, 0, 0, 41, 17, 18,
19, 20, 0, 21, 22, 17, 18, 19, 20, 0,
21, 19, 20, 0, 21
}
|
|
|
Initial value:
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2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