hobbes
a language, embedded compiler, and runtime for efficient dynamic expression evaluation, data storage and analysis
hexpr.parse.H
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.2. */
2 
3 /* Bison interface for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 #ifndef YY_YY_HEXPR_PARSE_H_INCLUDED
34 # define YY_YY_HEXPR_PARSE_H_INCLUDED
35 /* Debug traces. */
36 #ifndef YYDEBUG
37 # define YYDEBUG 0
38 #endif
39 #if YYDEBUG
40 extern int yydebug;
41 #endif
42 
43 /* Token type. */
44 #ifndef YYTOKENTYPE
45 # define YYTOKENTYPE
47  {
48  TPARSEMODULE = 258,
49  TPARSEDEFN = 259,
50  TPARSEEXPR = 260,
51  TMODULE = 261,
52  TWHERE = 262,
53  TIMPORT = 263,
54  TTYPE = 264,
55  TDATA = 265,
56  TCLASS = 266,
57  TINST = 267,
58  TINDENT = 268,
59  TBOOL = 269,
60  TCHAR = 270,
61  TBYTE = 271,
62  TBYTES = 272,
63  TSHORT = 273,
64  TINT = 274,
65  TLONG = 275,
66  TFLOAT = 276,
67  TDOUBLE = 277,
68  TIDENT = 278,
69  TSTRING = 279,
70  TREGEX = 280,
72  TTIME = 282,
73  TDATETIME = 283,
74  TTUPSECTION = 284,
75  TCSTARROW = 285,
76  TARROW = 286,
77  TCOLON = 287,
78  TEXISTS = 288,
79  TASSIGN = 289,
80  TPARROW = 290,
81  TEQUALS = 291,
82  TASSUMP = 292,
83  TAPPEND = 293,
84  TPLUS = 294,
85  TMINUS = 295,
86  TTIMES = 296,
87  TDIVIDE = 297,
88  TREM = 298,
89  TDOT = 299,
90  TEQUIV = 300,
91  TEQ = 301,
92  TCIEQ = 302,
93  TNEQ = 303,
94  TLT = 304,
95  TLTE = 305,
96  TGT = 306,
97  TGTE = 307,
98  TNOT = 308,
99  TLET = 309,
100  TCASE = 310,
101  TDEFAULT = 311,
102  TMATCH = 312,
103  TMATCHES = 313,
104  TPARSE = 314,
105  TWITH = 315,
106  TOF = 316,
107  TAND = 317,
108  TOR = 318,
109  TIF = 319,
110  TTHEN = 320,
111  TELSE = 321,
112  TIN = 322,
113  TPACK = 323,
114  TUNPACK = 324,
115  TDO = 325,
116  TRETURN = 326,
117  TLPAREN = 327,
118  TRPAREN = 328,
119  TLBRACKET = 329,
120  TRBRACKET = 330,
121  TLBRACE = 331,
122  TRBRACE = 332,
123  TBAR = 333,
124  TCOMMA = 334,
125  TSEMICOLON = 335,
126  TFN = 336,
127  TCOMPOSE = 337,
128  TUPTO = 338,
129  TCARET = 339,
130  TAT = 340,
131  TDOLLAR = 341,
132  TQUESTION = 342,
133  TSQUOTE = 343,
134  TEQUOTE = 344
135  };
136 #endif
137 
138 /* Value type. */
139 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
140 typedef union YYSTYPE YYSTYPE;
141 union YYSTYPE
142 {
143 #line 292 "hexpr.y" /* yacc.c:1909 */
144 
155 
161 
168 
169  typedef std::pair<hobbes::PatternPtr, hobbes::ExprPtr> LetBinding;
170  typedef std::vector<LetBinding> LetBindings;
171 
172  LetBinding* letbinding;
173  LetBindings* letbindings;
174 
182 
183  std::string* string;
184  bool boolv;
185  char charv;
186  short shortv;
187  int intv;
188  long longv;
189  float floatv;
190  double doublev;
191 
193  hobbes::Grammar::value_type* prule;
199 
200 #line 201 "hexpr.parse.H" /* yacc.c:1909 */
201 };
202 # define YYSTYPE_IS_TRIVIAL 1
203 # define YYSTYPE_IS_DECLARED 1
204 #endif
205 
206 /* Location type. */
207 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
208 typedef struct YYLTYPE YYLTYPE;
209 struct YYLTYPE
210 {
215 };
216 # define YYLTYPE_IS_DECLARED 1
217 # define YYLTYPE_IS_TRIVIAL 1
218 #endif
219 
220 
221 extern YYSTYPE yylval;
222 extern YYLTYPE yylloc;
223 int yyparse (void);
224 
225 #endif /* !YY_YY_HEXPR_PARSE_H_INCLUDED */
int first_column
Definition: hexpr.parse.H:212
hobbes::QualType * qualtype
Definition: hexpr.parse.H:175
double doublev
Definition: hexpr.parse.H:190
Definition: hexpr.parse.H:124
std::pair< std::string, PatternPtr > Field
Definition: pattern.H:167
std::vector< GrammarRule > GrammarRules
Definition: grammar.H:80
Definition: pattern.H:48
Definition: hexpr.parse.H:98
Definition: hexpr.parse.H:123
hobbes::Expr * exp
Definition: hexpr.parse.H:156
Definition: hexpr.parse.H:134
hobbes::MVarTypeDefs * mvtydefs
Definition: hexpr.parse.H:150
hobbes::Module * module
Definition: hexpr.parse.H:145
Definition: hexpr.parse.H:109
Definition: hexpr.parse.H:90
hobbes::Record::Members * mreclist
Definition: hexpr.parse.H:180
Definition: hexpr.parse.H:57
hobbes::GrammarValue * pvalue
Definition: hexpr.parse.H:198
short shortv
Definition: hexpr.parse.H:186
hobbes::BoundGrammarValue * pbelem
Definition: hexpr.parse.H:197
std::vector< Member > Members
Definition: type.H:385
Definition: hexpr.parse.H:111
Definition: hexpr.parse.H:103
hobbes::MVarTypeDef * mvtydef
Definition: hexpr.parse.H:151
Definition: hexpr.parse.H:64
Definition: hexpr.parse.H:93
Definition: hexpr.parse.H:86
hobbes::Case::Bindings * vfields
Definition: hexpr.parse.H:159
hobbes::Case::Binding * vbind
Definition: hexpr.parse.H:160
Definition: hexpr.parse.H:75
Definition: hexpr.parse.H:129
Definition: hexpr.parse.H:119
Definition: hexpr.parse.H:116
Definition: hexpr.parse.H:132
std::vector< BoundGrammarValue > BoundGrammarValues
Definition: grammar.H:72
Definition: hexpr.parse.H:50
Definition: module.H:73
hobbes::GrammarRule * prdef
Definition: hexpr.parse.H:195
Definition: hexpr.parse.H:100
Definition: hexpr.parse.H:83
Definition: pattern.H:22
hobbes::MkRecord::FieldDefs * rfields
Definition: hexpr.parse.H:158
Definition: hexpr.parse.H:71
int last_column
Definition: hexpr.parse.H:214
int last_line
Definition: hexpr.parse.H:213
Definition: hexpr.parse.H:85
Definition: hexpr.parse.H:51
std::pair< hobbes::PatternPtr, hobbes::ExprPtr > LetBinding
Definition: hexpr.parse.H:169
hobbes::MatchRecord::Field * recpatfield
Definition: hexpr.parse.H:167
hobbes::PatternRow * patternexp
Definition: hexpr.parse.H:163
Definition: hexpr.parse.H:115
Definition: hexpr.parse.H:58
std::pair< str::seq, str::seq > CFunDepDef
Definition: module.H:107
Definition: hexpr.parse.H:96
hobbes::PatternRows * patternexps
Definition: hexpr.parse.H:162
hobbes::GrammarRules * prdefs
Definition: hexpr.parse.H:194
Definition: hexpr.parse.H:105
hobbes::ModuleDef * mdef
Definition: hexpr.parse.H:147
Definition: hexpr.parse.H:114
Definition: hexpr.parse.H:125
Definition: hexpr.parse.H:48
Definition: hexpr.parse.H:106
std::vector< ExprPtr > Exprs
Definition: expr.H:59
Definition: hexpr.parse.H:52
std::vector< GrammarSymDef > Grammar
Definition: grammar.H:83
std::vector< LetBinding > LetBindings
Definition: hexpr.parse.H:170
Definition: hexpr.parse.H:65
Definition: hexpr.parse.H:99
Definition: hexpr.parse.H:110
Definition: hexpr.parse.H:87
int intv
Definition: hexpr.parse.H:187
hobbes::str::seq * strings
Definition: hexpr.parse.H:154
std::string * string
Definition: hexpr.parse.H:183
hobbes::ModuleDefs * mdefs
Definition: hexpr.parse.H:146
Definition: hexpr.parse.H:121
Definition: hexpr.parse.H:76
Definition: hexpr.parse.H:97
const hobbes::MonoTypePtr * mtype
Definition: hexpr.parse.H:178
Definition: hexpr.parse.H:81
MonoType::ptr MonoTypePtr
Definition: type.H:71
Definition: hexpr.parse.H:88
hobbes::Exprs * exps
Definition: hexpr.parse.H:157
Definition: hexpr.parse.H:117
Definition: hexpr.parse.H:61
Definition: hexpr.parse.H:209
LetBinding * letbinding
Definition: hexpr.parse.H:172
std::vector< CFunDepDef > CFunDepDefs
Definition: module.H:108
Definition: hexpr.parse.H:112
Definition: hexpr.parse.H:62
Definition: hexpr.parse.H:107
Definition: hexpr.parse.H:49
Definition: hexpr.parse.H:66
Definition: hexpr.parse.H:120
Definition: hexpr.parse.H:60
Definition: hexpr.parse.H:89
Definition: hexpr.parse.H:118
Definition: hexpr.parse.H:73
Definition: grammar.H:18
Definition: hexpr.parse.H:131
yytokentype
Definition: hexpr.parse.H:46
Definition: hexpr.parse.H:53
Definition: hexpr.parse.H:79
int first_line
Definition: hexpr.parse.H:211
hobbes::Constraints * tconstraints
Definition: hexpr.parse.H:176
std::vector< ConstraintPtr > Constraints
Definition: type.H:35
hobbes::MVarDef * mvdef
Definition: hexpr.parse.H:153
Definition: hexpr.parse.H:127
Definition: hexpr.parse.H:84
Definition: hexpr.parse.H:59
Definition: hexpr.parse.H:95
Definition: grammar.H:67
hobbes::MonoTypes * mtypes
Definition: hexpr.parse.H:179
Definition: hexpr.parse.H:72
Definition: hexpr.parse.H:70
YYLTYPE yylloc
Definition: hexpr.parse.C:2402
Definition: hexpr.parse.H:67
YYSTYPE yylval
Definition: hexpr.parse.C:2396
Definition: hexpr.parse.H:74
float floatv
Definition: hexpr.parse.H:189
int yyparse(void)
Definition: hexpr.parse.C:2412
hobbes::CFunDepDef * fundep
Definition: hexpr.parse.H:148
Definition: hexpr.parse.H:91
Definition: hexpr.parse.H:80
Definition: hexpr.parse.H:56
Definition: hexpr.parse.H:78
Definition: hexpr.parse.H:94
std::vector< std::string > seq
Definition: str.H:19
std::vector< MVarTypeDefPtr > MVarTypeDefs
Definition: module.H:87
Definition: hexpr.parse.H:69
bool boolv
Definition: hexpr.parse.H:184
hobbes::Variant::Members * mvarlist
Definition: hexpr.parse.H:181
std::vector< FieldDef > FieldDefs
Definition: expr.H:461
Definition: hexpr.parse.H:141
std::vector< PatternPtr > Patterns
Definition: pattern.H:20
Definition: hexpr.parse.H:55
Definition: hexpr.parse.H:108
std::vector< Member > Members
Definition: type.H:435
Definition: hexpr.parse.H:133
std::vector< MVarDefPtr > MVarDefs
Definition: module.H:103
Definition: hexpr.parse.H:63
Definition: hexpr.parse.H:92
Definition: module.H:89
Definition: hexpr.parse.H:54
hobbes::CFunDepDefs * fundeps
Definition: hexpr.parse.H:149
std::vector< Field > Fields
Definition: pattern.H:168
Definition: hexpr.parse.H:130
Definition: expr.H:15
Definition: module.H:17
hobbes::Grammar * prules
Definition: hexpr.parse.H:192
std::vector< MonoTypePtr > MonoTypes
Definition: type.H:72
hobbes::Pattern * pattern
Definition: hexpr.parse.H:165
char charv
Definition: hexpr.parse.H:185
hobbes::BoundGrammarValues * pbelems
Definition: hexpr.parse.H:196
Definition: hexpr.parse.H:68
hobbes::MVarDefs * mvdefs
Definition: hexpr.parse.H:152
Definition: module.H:159
Definition: hexpr.parse.H:128
LetBindings * letbindings
Definition: hexpr.parse.H:173
Definition: hexpr.parse.H:104
Definition: hexpr.parse.H:102
Definition: hexpr.parse.H:101
Definition: hexpr.parse.H:77
long longv
Definition: hexpr.parse.H:188
Definition: expr.H:509
hobbes::Constraint * tconstraint
Definition: hexpr.parse.H:177
Definition: type.H:189
std::vector< PatternRow > PatternRows
Definition: pattern.H:31
Definition: hexpr.parse.H:82
Definition: type.H:213
Definition: hexpr.parse.H:122
hobbes::Grammar::value_type * prule
Definition: hexpr.parse.H:193
Definition: grammar.H:74
hobbes::MatchRecord::Fields * recpatfields
Definition: hexpr.parse.H:166
Definition: hexpr.parse.H:113
Definition: hexpr.parse.H:126
hobbes::Patterns * patterns
Definition: hexpr.parse.H:164
std::vector< Binding > Bindings
Definition: expr.H:517
std::vector< ModuleDefPtr > ModuleDefs
Definition: module.H:30