annotate Bison-Flex/Compiler-StackBase/UTF8/script-parser.hh @ 6:86c0a38332fe

update
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 17 May 2011 18:26:00 +0900
parents caede627f691
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* A Bison parser, made by GNU Bison 2.3. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 /* Skeleton interface for Bison LALR(1) parsers in C++
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 This program is free software; you can redistribute it and/or modify
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 the Free Software Foundation; either version 2, or (at your option)
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 any later version.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 This program is distributed in the hope that it will be useful,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 GNU General Public License for more details.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 along with this program; if not, write to the Free Software
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 Foundation, Inc., 51 Franklin Street, Fifth Floor,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 Boston, MA 02110-1301, USA. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 /* As a special exception, you may create a larger work that contains
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 part or all of the Bison parser skeleton and distribute that work
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 under terms of your choice, so long as that work isn't itself a
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 parser generator using the skeleton or a modified version thereof
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 as a parser skeleton. Alternatively, if you modify or redistribute
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 the parser skeleton itself, you may (at your option) remove this
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 special exception, which will cause the skeleton and the resulting
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 Bison output files to be licensed under the GNU General Public
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 License without this special exception.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 This special exception was added by the Free Software Foundation in
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 version 2.2 of Bison. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 /* C++ LALR(1) parser skeleton written by Akim Demaille. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 #ifndef PARSER_HEADER_H
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 # define PARSER_HEADER_H
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 #include <string>
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 #include <iostream>
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 #include "stack.hh"
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 namespace yy
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 {
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 class position;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 class location;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 }
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 /* First part of user declarations. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 #line 4 "script-parser.yy"
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 #ifdef _MSC_VER
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 #pragma warning(disable: 4800)
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 #pragma warning(disable: 4267)
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 #include <string>
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 #include "node.h"
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 class compiler;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
5
caede627f691 chage encoding
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
63 /* Line 303 of lalr1.cc. */
4
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 #line 65 "script-parser.hh"
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 #include "location.hh"
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 /* Enabling traces. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 #ifndef YYDEBUG
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 # define YYDEBUG 0
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 /* Enabling verbose error messages. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 #ifdef YYERROR_VERBOSE
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 # undef YYERROR_VERBOSE
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 # define YYERROR_VERBOSE 1
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 #else
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 # define YYERROR_VERBOSE 1
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 /* Enabling the token table. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 #ifndef YYTOKEN_TABLE
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 # define YYTOKEN_TABLE 0
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 If N is 0, then set CURRENT to the empty location which ends
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 the previous symbol: RHS[0] (always defined). */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 #ifndef YYLLOC_DEFAULT
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 # define YYLLOC_DEFAULT(Current, Rhs, N) \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 do { \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 if (N) \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 { \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 (Current).begin = (Rhs)[1].begin; \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 (Current).end = (Rhs)[N].end; \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 } \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 else \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 { \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 (Current).begin = (Current).end = (Rhs)[0].end; \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 } \
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 } while (false)
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 namespace yy
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 {
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 /// A Bison parser.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 class script_parser
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 {
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 public:
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 /// Symbol semantic values.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 #ifndef YYSTYPE
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 union semantic_type
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 #line 27 "script-parser.yy"
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 {
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 int ival;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 std::string *sval;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 int type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 CValueList *value_list;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 CArgList *arglist;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 CDeclList *decls;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 CStateList *states;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 CStatement *statement;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 CArgDef *argdef;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 CArgs *args;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 CValueNode *value;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 CNode *expr;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 CAssign *assign;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 CStateBlock *block;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 }
5
caede627f691 chage encoding
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
133 /* Line 303 of lalr1.cc. */
4
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 #line 135 "script-parser.hh"
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 ;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 #else
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 typedef YYSTYPE semantic_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 /// Symbol locations.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 typedef location location_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 /// Tokens.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 struct token
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 {
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 /* Tokens. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 enum yytokentype {
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 END_OF_FILE = 0,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 TK_IVAL = 258,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 TK_IDENTIFIER = 259,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 TK_SVAL = 260,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 TK_LOGOR = 261,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 TK_LOGAND = 262,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 TK_EQ = 263,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 TK_NE = 264,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 TK_GE = 265,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 TK_LE = 266,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 TK_LSHIFT = 267,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 TK_RSHIFT = 268,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 TK_ADD_ASSIGN = 269,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 TK_SUB_ASSIGN = 270,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 TK_MUL_ASSIGN = 271,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 TK_DIV_ASSIGN = 272,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 TK_MOD_ASSIGN = 273,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 TK_IF = 274,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 TK_ELSE = 275,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 TK_WHILE = 276,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 TK_FOR = 277,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 TK_SWITCH = 278,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 TK_CASE = 279,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 TK_DEFAULT = 280,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 TK_BREAK = 281,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 TK_RETURN = 282,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 TK_INTEGER = 283,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 TK_STRING = 284,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 TK_VOID = 285,
6
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
175 TK_GOTO = 286,
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
176 TK_CODE = 287,
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
177 TK_EXIT = 288,
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
178 NEG = 289
4
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 };
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 };
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 /// Token type.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 typedef token::yytokentype token_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 /// Build a parser object.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 script_parser (compiler& driver_yyarg);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 virtual ~script_parser ();
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 /// Parse.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 /// \returns 0 iff parsing succeeded.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 virtual int parse ();
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 /// The current debugging stream.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 std::ostream& debug_stream () const;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 /// Set the current debugging stream.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196 void set_debug_stream (std::ostream &);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 /// Type for debugging levels.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 typedef int debug_level_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 /// The current debugging level.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 debug_level_type debug_level () const;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 /// Set the current debugging level.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 void set_debug_level (debug_level_type l);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 private:
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 /// Report a syntax error.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 /// \param loc where the syntax error is found.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 /// \param msg a description of the syntax error.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 virtual void error (const location_type& loc, const std::string& msg);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 /// Generate an error message.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 /// \param state the state where the error occurred.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 /// \param tok the look-ahead token.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 virtual std::string yysyntax_error_ (int yystate, int tok);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 #if YYDEBUG
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 /// \brief Report a symbol value on the debug stream.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 /// \param yytype The token type.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 /// \param yyvaluep Its semantic value.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 /// \param yylocationp Its location.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 virtual void yy_symbol_value_print_ (int yytype,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 const semantic_type* yyvaluep,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 const location_type* yylocationp);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 /// \brief Report a symbol on the debug stream.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 /// \param yytype The token type.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 /// \param yyvaluep Its semantic value.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 /// \param yylocationp Its location.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 virtual void yy_symbol_print_ (int yytype,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 const semantic_type* yyvaluep,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 const location_type* yylocationp);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 #endif /* ! YYDEBUG */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
232
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 /// State numbers.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 typedef int state_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 /// State stack type.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 typedef stack<state_type> state_stack_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 /// Semantic value stack type.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 typedef stack<semantic_type> semantic_stack_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 /// location stack type.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 typedef stack<location_type> location_stack_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 /// The state stack.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 state_stack_type yystate_stack_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 /// The semantic value stack.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 semantic_stack_type yysemantic_stack_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 /// The location stack.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 location_stack_type yylocation_stack_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 /// Internal symbol numbers.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 typedef unsigned char token_number_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 /* Tables. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 /// For a state, the index in \a yytable_ of its portion.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 static const short int yypact_[];
6
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 5
diff changeset
255 static const short int yypact_ninf_;
4
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
256
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
257 /// For a state, default rule to reduce.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 /// Unless\a yytable_ specifies something else to do.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 /// Zero means the default is an error.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 static const unsigned char yydefact_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
261
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
262 static const short int yypgoto_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 static const signed char yydefgoto_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
264
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 /// What to do in a state.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 /// \a yytable_[yypact_[s]]: what to do in state \a s.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 /// - if positive, shift that token.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 /// - if negative, reduce the rule which number is the opposite.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269 /// - if zero, do what YYDEFACT says.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 static const short int yytable_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 static const signed char yytable_ninf_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 static const short int yycheck_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 /// For a state, its accessing symbol.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 static const unsigned char yystos_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
277
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 /// For a rule, its LHS.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 static const unsigned char yyr1_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 /// For a rule, its RHS length.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 static const unsigned char yyr2_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 /// For a symbol, its name in clear.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 static const char* const yytname_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
286 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
287
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
288 #if YYERROR_VERBOSE
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 /// Convert the symbol name \a n to a form suitable for a diagnostic.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 virtual std::string yytnamerr_ (const char *n);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
292
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 #if YYDEBUG
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 /// A type to store symbol numbers and -1.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 typedef signed char rhs_number_type;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 /// A `-1'-separated list of the rules' RHS.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 static const rhs_number_type yyrhs_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 /// For each rule, the index of the first RHS symbol in \a yyrhs_.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 static const unsigned short int yyprhs_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 /// For each rule, its source line number.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 static const unsigned char yyrline_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 /// For each scanner token number, its symbol number.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 static const unsigned short int yytoken_number_[];
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 /// Report on the debug stream that the rule \a r is going to be reduced.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 virtual void yy_reduce_print_ (int r);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 /// Print the state stack on the debug stream.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 virtual void yystack_print_ ();
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 #endif
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
309
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 /// Convert a scanner token number \a t to a symbol number.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 token_number_type yytranslate_ (int t);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
312
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
313 /// \brief Reclaim the memory associated to a symbol.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 /// \param yymsg Why this token is reclaimed.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315 /// \param yytype The symbol type.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 /// \param yyvaluep Its semantic value.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 /// \param yylocationp Its location.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 inline void yydestruct_ (const char* yymsg,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 int yytype,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 semantic_type* yyvaluep,
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 location_type* yylocationp);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 /// Pop \a n symbols the three stacks.
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
324 inline void yypop_ (unsigned int n = 1);
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
325
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 /* Constants. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
327 static const int yyeof_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 /* LAST_ -- Last index in TABLE_. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 static const int yylast_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 static const int yynnts_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 static const int yyempty_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 static const int yyfinal_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333 static const int yyterror_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 static const int yyerrcode_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 static const int yyntokens_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 static const unsigned int yyuser_token_number_max_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 static const token_number_type yyundef_token_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
338
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
339 /* Debugging. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 int yydebug_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 std::ostream* yycdebug_;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
343
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344 /* User arguments. */
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 compiler& driver;
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 };
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347 }
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
349
805d39d28230 add Compiler-stackbase
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 #endif /* ! defined PARSER_HEADER_H */