GCC Code Coverage Report
Directory: . Exec Total Coverage
File: build-coverage/src/parser/smt2/Smt2Parser.c Lines: 3330 4577 72.8 %
Date: 2021-08-20 Branches: 2564 5637 45.5 %

Line Exec Source
1
/** \file
2
 *  This C source file was generated by $ANTLR version 3.4
3
 *
4
 *     -  From the grammar source file : /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g
5
 *     -                            On : 2021-08-20 01:05:33
6
 *     -                for the parser : Smt2ParserParser
7
 *
8
 * Editing it, at least manually, is not wise.
9
 *
10
 * C language generator and runtime by Jim Idle, jimi|hereisanat|idle|dotgoeshere|ws.
11
 *
12
 *
13
*/
14
// [The "BSD license"]
15
// Copyright (c) 2005-2009 Jim Idle, Temporal Wave LLC
16
// http://www.temporal-wave.com
17
// http://www.linkedin.com/in/jimidle
18
//
19
// All rights reserved.
20
//
21
// Redistribution and use in source and binary forms, with or without
22
// modification, are permitted provided that the following conditions
23
// are met:
24
// 1. Redistributions of source code must retain the above copyright
25
//    notice, this list of conditions and the following disclaimer.
26
// 2. Redistributions in binary form must reproduce the above copyright
27
//    notice, this list of conditions and the following disclaimer in the
28
//    documentation and/or other materials provided with the distribution.
29
// 3. The name of the author may not be used to endorse or promote products
30
//    derived from this software without specific prior written permission.
31
//
32
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
33
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
34
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
35
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
36
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
37
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
38
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
39
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
41
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42
43
44
/* =============================================================================
45
 * This is what the grammar programmer asked us to put at the top of every file.
46
 */
47
48
/* ****************************************************************************
49
 * This file is part of the cvc5 project.
50
 *
51
 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
52
 * in the top-level source directory and their institutional affiliations.
53
 * All rights reserved.  See the file COPYING in the top-level source
54
 * directory for licensing information.
55
 * ****************************************************************************
56
 */
57
58
/* End of Header action.
59
 * =============================================================================
60
 */
61
62
/* -----------------------------------------
63
 * Include the ANTLR3 generated header file.
64
 */
65
#include    "Smt2Parser.h"
66
67
68
#include <set>
69
#include <sstream>
70
#include <string>
71
#include <unordered_set>
72
#include <vector>
73
74
#include "api/cpp/cvc5.h"
75
#include "base/output.h"
76
#include "options/set_language.h"
77
#include "parser/antlr_input.h"
78
#include "parser/parser.h"
79
#include "parser/smt2/smt2.h"
80
#include "util/floatingpoint_size.h"
81
#include "util/hash.h"
82
83
using namespace cvc5;
84
using namespace cvc5::parser;
85
86
/* These need to be macros so they can refer to the PARSER macro, which
87
 * will be defined by ANTLR *after* this section. (If they were functions,
88
 * PARSER would be undefined.) */
89
#undef PARSER_STATE
90
#define PARSER_STATE ((Smt2*)PARSER->super)
91
#undef SOLVER
92
#define SOLVER PARSER_STATE->getSolver()
93
#undef SYM_MAN
94
#define SYM_MAN PARSER_STATE->getSymbolManager()
95
#undef MK_TERM
96
#define MK_TERM SOLVER->mkTerm
97
#define UNSUPPORTED PARSER_STATE->unimplementedFeature
98
99
100
/* ----------------------------------------- */
101
102
103
104
105
106
/* MACROS that hide the C interface implementations from the
107
 * generated code, which makes it a little more understandable to the human eye.
108
 * I am very much against using C pre-processor macros for function calls and bits
109
 * of code as you cannot see what is happening when single stepping in debuggers
110
 * and so on. The exception (in my book at least) is for generated code, where you are
111
 * not maintaining it, but may wish to read and understand it. If you single step it, you know that input()
112
 * hides some indirect calls, but is always referring to the input stream. This is
113
 * probably more readable than ctx->input->istream->input(snarfle0->blarg) and allows me to rejig
114
 * the runtime interfaces without changing the generated code too often, without
115
 * confusing the reader of the generated output, who may not wish to know the gory
116
 * details of the interface inheritance.
117
 */
118
119
#define		CTX	ctx
120
121
/* Aids in accessing scopes for grammar programmers
122
 */
123
#undef	SCOPE_TYPE
124
#undef	SCOPE_STACK
125
#undef	SCOPE_TOP
126
#define	SCOPE_TYPE(scope)   pSmt2Parser_##scope##_SCOPE
127
#define SCOPE_STACK(scope)  pSmt2Parser_##scope##Stack
128
#define	SCOPE_TOP(scope)    ctx->pSmt2Parser_##scope##Top
129
#define	SCOPE_SIZE(scope)		ctx->pSmt2Parser_##scope##Stack_limit
130
#define SCOPE_INSTANCE(scope, i)	(ctx->SCOPE_STACK(scope)->get(ctx->SCOPE_STACK(scope),i))
131
132
/* Macros for accessing things in the parser
133
 */
134
135
#undef	    PARSER
136
#undef	    RECOGNIZER
137
#undef	    HAVEPARSEDRULE
138
#undef		MEMOIZE
139
#undef	    INPUT
140
#undef	    STRSTREAM
141
#undef	    HASEXCEPTION
142
#undef	    EXCEPTION
143
#undef	    MATCHT
144
#undef	    MATCHANYT
145
#undef	    FOLLOWSTACK
146
#undef	    FOLLOWPUSH
147
#undef	    FOLLOWPOP
148
#undef	    PRECOVER
149
#undef	    PREPORTERROR
150
#undef	    LA
151
#undef	    LT
152
#undef	    CONSTRUCTEX
153
#undef	    CONSUME
154
#undef	    MARK
155
#undef	    REWIND
156
#undef	    REWINDLAST
157
#undef	    PERRORRECOVERY
158
#undef	    HASFAILED
159
#undef	    FAILEDFLAG
160
#undef	    RECOVERFROMMISMATCHEDSET
161
#undef	    RECOVERFROMMISMATCHEDELEMENT
162
#undef		INDEX
163
#undef      ADAPTOR
164
#undef		SEEK
165
#undef	    RULEMEMO
166
#undef		DBG
167
168
#define	    PARSER				ctx->pParser
169
#define	    RECOGNIZER				PARSER->rec
170
#define	    PSRSTATE				RECOGNIZER->state
171
#define	    HAVEPARSEDRULE(r)			RECOGNIZER->alreadyParsedRule(RECOGNIZER, r)
172
#define	    MEMOIZE(ri,si)			RECOGNIZER->memoize(RECOGNIZER, ri, si)
173
#define	    INPUT				PARSER->tstream
174
#define	    STRSTREAM				INPUT
175
#define	    ISTREAM				INPUT->istream
176
#define	    INDEX()				ISTREAM->index(INPUT->istream)
177
#define	    HASEXCEPTION()			(PSRSTATE->error == ANTLR3_TRUE)
178
#define	    EXCEPTION				PSRSTATE->exception
179
#define	    MATCHT(t, fs)			RECOGNIZER->match(RECOGNIZER, t, fs)
180
#define	    MATCHANYT()				RECOGNIZER->matchAny(RECOGNIZER)
181
#define	    FOLLOWSTACK				PSRSTATE->following
182
#ifdef  SKIP_FOLLOW_SETS
183
#define	    FOLLOWPUSH(x)
184
#define	    FOLLOWPOP()
185
#else
186
#define	    FOLLOWPUSH(x)			FOLLOWSTACK->push(FOLLOWSTACK, ((void *)(&(x))), NULL)
187
#define	    FOLLOWPOP()				FOLLOWSTACK->pop(FOLLOWSTACK)
188
#endif
189
#define	    PRECOVER()				RECOGNIZER->recover(RECOGNIZER)
190
#define	    PREPORTERROR()			RECOGNIZER->reportError(RECOGNIZER)
191
#define	    LA(n)				INPUT->istream->_LA(ISTREAM, n)
192
#define	    LT(n)				INPUT->_LT(INPUT, n)
193
#define	    CONSTRUCTEX()			RECOGNIZER->exConstruct(RECOGNIZER)
194
#define	    CONSUME()				ISTREAM->consume(ISTREAM)
195
#define	    MARK()				ISTREAM->mark(ISTREAM)
196
#define	    REWIND(m)				ISTREAM->rewind(ISTREAM, m)
197
#define	    REWINDLAST()			ISTREAM->rewindLast(ISTREAM)
198
#define	    SEEK(n)				ISTREAM->seek(ISTREAM, n)
199
#define	    PERRORRECOVERY			PSRSTATE->errorRecovery
200
#define	    FAILEDFLAG				PSRSTATE->failed
201
#define	    HASFAILED()				(FAILEDFLAG == ANTLR3_TRUE)
202
#define	    BACKTRACKING			PSRSTATE->backtracking
203
#define	    RECOVERFROMMISMATCHEDSET(s)		RECOGNIZER->recoverFromMismatchedSet(RECOGNIZER, s)
204
#define	    RECOVERFROMMISMATCHEDELEMENT(e)	RECOGNIZER->recoverFromMismatchedElement(RECOGNIZER, s)
205
#define     ADAPTOR                         ctx->adaptor
206
#define		RULEMEMO						PSRSTATE->ruleMemo
207
#define		DBG								RECOGNIZER->debugger
208
209
210
#define		TOKTEXT(tok, txt)				tok, (pANTLR3_UINT8)txt
211
212
/* The 4 tokens defined below may well clash with your own #defines or token types. If so
213
 * then for the present you must use different names for your defines as these are hard coded
214
 * in the code generator. It would be better not to use such names internally, and maybe
215
 * we can change this in a forthcoming release. I deliberately do not #undef these
216
 * here as this will at least give you a redefined error somewhere if they clash.
217
 */
218
#define	    UP	    ANTLR3_TOKEN_UP
219
#define	    DOWN    ANTLR3_TOKEN_DOWN
220
#define	    EOR	    ANTLR3_TOKEN_EOR
221
#define	    INVALID ANTLR3_TOKEN_INVALID
222
223
224
/* =============================================================================
225
 * Functions to create and destroy scopes. First come the rule scopes, followed
226
 * by the global declared scopes.
227
 */
228
229
230
231
/* ============================================================================= */
232
233
/* =============================================================================
234
 * Start of recognizer
235
 */
236
237
238
/** \brief Table of all token names in symbolic order, mainly used for
239
 *         error reporting.
240
 */
241
pANTLR3_UINT8   Smt2ParserTokenNames[105+4]
242
     = {
243
        (pANTLR3_UINT8) "<invalid>",       /* String to print to indicate an invalid token */
244
        (pANTLR3_UINT8) "<EOR>",
245
        (pANTLR3_UINT8) "<DOWN>",
246
        (pANTLR3_UINT8) "<UP>",
247
        (pANTLR3_UINT8) "ALPHA",
248
        (pANTLR3_UINT8) "ASSERT_TOK",
249
        (pANTLR3_UINT8) "AS_TOK",
250
        (pANTLR3_UINT8) "ATTRIBUTE_INST_ADD_TO_POOL_TOK",
251
        (pANTLR3_UINT8) "ATTRIBUTE_INST_LEVEL",
252
        (pANTLR3_UINT8) "ATTRIBUTE_NAMED_TOK",
253
        (pANTLR3_UINT8) "ATTRIBUTE_NO_PATTERN_TOK",
254
        (pANTLR3_UINT8) "ATTRIBUTE_PATTERN_TOK",
255
        (pANTLR3_UINT8) "ATTRIBUTE_POOL_TOK",
256
        (pANTLR3_UINT8) "ATTRIBUTE_QUANTIFIER_ID_TOK",
257
        (pANTLR3_UINT8) "ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK",
258
        (pANTLR3_UINT8) "ATTRIBUTE_TOK",
259
        (pANTLR3_UINT8) "BINARY_LITERAL",
260
        (pANTLR3_UINT8) "BLOCK_MODEL_TOK",
261
        (pANTLR3_UINT8) "BLOCK_MODEL_VALUES_TOK",
262
        (pANTLR3_UINT8) "CHAR_TOK",
263
        (pANTLR3_UINT8) "CHECK_SAT_ASSUMING_TOK",
264
        (pANTLR3_UINT8) "CHECK_SAT_TOK",
265
        (pANTLR3_UINT8) "CHECK_SYNTH_TOK",
266
        (pANTLR3_UINT8) "COMMENT",
267
        (pANTLR3_UINT8) "COMPREHENSION_TOK",
268
        (pANTLR3_UINT8) "CONSTRAINT_TOK",
269
        (pANTLR3_UINT8) "CONST_TOK",
270
        (pANTLR3_UINT8) "DECIMAL_LITERAL",
271
        (pANTLR3_UINT8) "DECLARE_CODATATYPES_2_5_TOK",
272
        (pANTLR3_UINT8) "DECLARE_CODATATYPES_TOK",
273
        (pANTLR3_UINT8) "DECLARE_CODATATYPE_TOK",
274
        (pANTLR3_UINT8) "DECLARE_CONST_TOK",
275
        (pANTLR3_UINT8) "DECLARE_DATATYPES_2_5_TOK",
276
        (pANTLR3_UINT8) "DECLARE_DATATYPES_TOK",
277
        (pANTLR3_UINT8) "DECLARE_DATATYPE_TOK",
278
        (pANTLR3_UINT8) "DECLARE_FUNS_TOK",
279
        (pANTLR3_UINT8) "DECLARE_FUN_TOK",
280
        (pANTLR3_UINT8) "DECLARE_HEAP",
281
        (pANTLR3_UINT8) "DECLARE_POOL",
282
        (pANTLR3_UINT8) "DECLARE_PREDS_TOK",
283
        (pANTLR3_UINT8) "DECLARE_SORTS_TOK",
284
        (pANTLR3_UINT8) "DECLARE_SORT_TOK",
285
        (pANTLR3_UINT8) "DECLARE_VAR_TOK",
286
        (pANTLR3_UINT8) "DEFINE_CONST_TOK",
287
        (pANTLR3_UINT8) "DEFINE_FUNS_REC_TOK",
288
        (pANTLR3_UINT8) "DEFINE_FUN_REC_TOK",
289
        (pANTLR3_UINT8) "DEFINE_FUN_TOK",
290
        (pANTLR3_UINT8) "DEFINE_SORT_TOK",
291
        (pANTLR3_UINT8) "DEFINE_TOK",
292
        (pANTLR3_UINT8) "DIGIT",
293
        (pANTLR3_UINT8) "ECHO_TOK",
294
        (pANTLR3_UINT8) "EMP_TOK",
295
        (pANTLR3_UINT8) "EXISTS_TOK",
296
        (pANTLR3_UINT8) "EXIT_TOK",
297
        (pANTLR3_UINT8) "FORALL_TOK",
298
        (pANTLR3_UINT8) "GET_ABDUCT_TOK",
299
        (pANTLR3_UINT8) "GET_ASSERTIONS_TOK",
300
        (pANTLR3_UINT8) "GET_ASSIGNMENT_TOK",
301
        (pANTLR3_UINT8) "GET_INFO_TOK",
302
        (pANTLR3_UINT8) "GET_INTERPOL_TOK",
303
        (pANTLR3_UINT8) "GET_MODEL_TOK",
304
        (pANTLR3_UINT8) "GET_OPTION_TOK",
305
        (pANTLR3_UINT8) "GET_PROOF_TOK",
306
        (pANTLR3_UINT8) "GET_QE_DISJUNCT_TOK",
307
        (pANTLR3_UINT8) "GET_QE_TOK",
308
        (pANTLR3_UINT8) "GET_UNSAT_ASSUMPTIONS_TOK",
309
        (pANTLR3_UINT8) "GET_UNSAT_CORE_TOK",
310
        (pANTLR3_UINT8) "GET_VALUE_TOK",
311
        (pANTLR3_UINT8) "HEX_DIGIT",
312
        (pANTLR3_UINT8) "HEX_LITERAL",
313
        (pANTLR3_UINT8) "HO_ARROW_TOK",
314
        (pANTLR3_UINT8) "HO_LAMBDA_TOK",
315
        (pANTLR3_UINT8) "INCLUDE_TOK",
316
        (pANTLR3_UINT8) "INDEX_TOK",
317
        (pANTLR3_UINT8) "INTEGER_LITERAL",
318
        (pANTLR3_UINT8) "INV_CONSTRAINT_TOK",
319
        (pANTLR3_UINT8) "KEYWORD",
320
        (pANTLR3_UINT8) "LET_TOK",
321
        (pANTLR3_UINT8) "LPAREN_TOK",
322
        (pANTLR3_UINT8) "MATCH_TOK",
323
        (pANTLR3_UINT8) "NUMERAL",
324
        (pANTLR3_UINT8) "PAR_TOK",
325
        (pANTLR3_UINT8) "POP_TOK",
326
        (pANTLR3_UINT8) "PUSH_TOK",
327
        (pANTLR3_UINT8) "QUOTED_SYMBOL",
328
        (pANTLR3_UINT8) "RESET_ASSERTIONS_TOK",
329
        (pANTLR3_UINT8) "RESET_TOK",
330
        (pANTLR3_UINT8) "RPAREN_TOK",
331
        (pANTLR3_UINT8) "SET_FEATURE_TOK",
332
        (pANTLR3_UINT8) "SET_INFO_TOK",
333
        (pANTLR3_UINT8) "SET_LOGIC_TOK",
334
        (pANTLR3_UINT8) "SET_OPTION_TOK",
335
        (pANTLR3_UINT8) "SIMPLE_SYMBOL",
336
        (pANTLR3_UINT8) "SIMPLIFY_TOK",
337
        (pANTLR3_UINT8) "STRING_LITERAL",
338
        (pANTLR3_UINT8) "SYGUS_CONSTANT_TOK",
339
        (pANTLR3_UINT8) "SYGUS_VARIABLE_TOK",
340
        (pANTLR3_UINT8) "SYMBOL_CHAR",
341
        (pANTLR3_UINT8) "SYMBOL_CHAR_NOUNDERSCORE_NOATTRIBUTE",
342
        (pANTLR3_UINT8) "SYNTH_FUN_TOK",
343
        (pANTLR3_UINT8) "SYNTH_INV_TOK",
344
        (pANTLR3_UINT8) "TESTER_TOK",
345
        (pANTLR3_UINT8) "TUPLE_CONST_TOK",
346
        (pANTLR3_UINT8) "TUPLE_PROJECT_TOK",
347
        (pANTLR3_UINT8) "TUPLE_SEL_TOK",
348
        (pANTLR3_UINT8) "UNTERMINATED_QUOTED_SYMBOL",
349
        (pANTLR3_UINT8) "UPDATE_TOK",
350
        (pANTLR3_UINT8) "WHITESPACE",
351
        (pANTLR3_UINT8) "'\\\\'"
352
       };
353
354
355
356
// Forward declare the locally static matching functions we have generated.
357
//
358
static
359
 cvc5::api::Term
360
	parseExpr    (pSmt2Parser ctx);
361
static
362
 cvc5::Command*
363
	parseCommand    (pSmt2Parser ctx);
364
static
365
 cvc5::Command*
366
	parseSygus    (pSmt2Parser ctx);
367
static
368
 void
369
	command    (pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd);
370
static
371
 std::unique_ptr<cvc5::Command>
372
	sygusCommand    (pSmt2Parser ctx);
373
static
374
 void
375
	sygusGrammar    (pSmt2Parser ctx, cvc5::api::Grammar*& ret, const std::vector<cvc5::api::Term>& sygusVars, const std::string& fun);
376
static
377
 void
378
	setInfoInternal    (pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd);
379
static
380
 void
381
	setOptionInternal    (pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd);
382
static
383
 void
384
	smt25Command    (pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd);
385
static
386
 void
387
	extendedCommand    (pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd);
388
static
389
 void
390
	datatypeDefCommand    (pSmt2Parser ctx, bool isCo, std::unique_ptr<cvc5::Command>* cmd);
391
static
392
 void
393
	datatypesDefCommand    (pSmt2Parser ctx, bool isCo, std::unique_ptr<cvc5::Command>* cmd);
394
static
395
 void
396
	datatypesDef    (pSmt2Parser ctx, bool isCo, const std::vector<std::string>& dnames, const std::vector<int>& arities, std::unique_ptr<cvc5::Command>* cmd);
397
static
398
 void
399
	simpleSymbolicExprNoKeyword    (pSmt2Parser ctx, std::string& s);
400
static
401
 void
402
	keyword    (pSmt2Parser ctx, std::string& s);
403
static
404
 void
405
	simpleSymbolicExpr    (pSmt2Parser ctx, std::string& s);
406
static
407
 void
408
	symbolicExpr    (pSmt2Parser ctx, cvc5::api::Term& sexpr);
409
static
410
 void
411
	term    (pSmt2Parser ctx, cvc5::api::Term& expr, cvc5::api::Term& expr2);
412
static
413
 void
414
	termNonVariable    (pSmt2Parser ctx, cvc5::api::Term& expr, cvc5::api::Term& expr2);
415
static
416
 void
417
	qualIdentifier    (pSmt2Parser ctx, cvc5::ParseOp& p);
418
static
419
 void
420
	identifier    (pSmt2Parser ctx, cvc5::ParseOp& p);
421
static
422
 void
423
	termAtomic    (pSmt2Parser ctx, cvc5::api::Term& atomTerm);
424
static
425
 void
426
	attribute    (pSmt2Parser ctx, cvc5::api::Term& expr, cvc5::api::Term& retExpr);
427
static
428
 void
429
	termList    (pSmt2Parser ctx, std::vector<cvc5::api::Term>& formulas, cvc5::api::Term& expr);
430
static
431
 void
432
	str    (pSmt2Parser ctx, std::string& s, bool fsmtlib);
433
static
434
 void
435
	quantOp    (pSmt2Parser ctx, cvc5::api::Kind& kind);
436
static
437
 void
438
	functionName    (pSmt2Parser ctx, std::string& name, cvc5::parser::DeclarationCheck check);
439
static
440
 void
441
	sortList    (pSmt2Parser ctx, std::vector<cvc5::api::Sort>& sorts);
442
static
443
 void
444
	nonemptySortList    (pSmt2Parser ctx, std::vector<cvc5::api::Sort>& sorts);
445
static
446
 void
447
	sortedVarList    (pSmt2Parser ctx, std::vector<std::pair<std::string, cvc5::api::Sort> >& sortedVars);
448
static
449
 void
450
	boundVarList    (pSmt2Parser ctx, cvc5::api::Term& expr);
451
static
452
 void
453
	sortName    (pSmt2Parser ctx, std::string& name, cvc5::parser::DeclarationCheck check);
454
static
455
 void
456
	sortSymbol    (pSmt2Parser ctx, cvc5::api::Sort& t, cvc5::parser::DeclarationCheck check);
457
static
458
 void
459
	symbolList    (pSmt2Parser ctx, std::vector<std::string>& names, cvc5::parser::DeclarationCheck check, cvc5::parser::SymbolType type);
460
static
461
 void
462
	symbol    (pSmt2Parser ctx, std::string& id, cvc5::parser::DeclarationCheck check, cvc5::parser::SymbolType type);
463
static
464
 void
465
	nonemptyNumeralList    (pSmt2Parser ctx, std::vector<uint64_t>& numerals);
466
static
467
 void
468
	datatypeDef    (pSmt2Parser ctx, bool isCo, std::vector<cvc5::api::DatatypeDecl>& datatypes, std::vector< cvc5::api::Sort >& params);
469
static
470
 void
471
	constructorDef    (pSmt2Parser ctx, cvc5::api::DatatypeDecl& type);
472
static
473
 void
474
	selector    (pSmt2Parser ctx, cvc5::api::DatatypeConstructorDecl& ctor);
475
static void	Smt2ParserFree(pSmt2Parser ctx);
476
static void     Smt2ParserReset (pSmt2Parser ctx);
477
478
/* For use in tree output where we are accumulating rule labels via label += ruleRef
479
 * we need a function that knows how to free a return scope when the list is destroyed.
480
 * We cannot just use ANTLR3_FREE because in debug tracking mode, this is a macro.
481
 */
482
static	void ANTLR3_CDECL freeScope(void * scope)
483
{
484
    ANTLR3_FREE(scope);
485
}
486
487
/** \brief Name of the grammar file that generated this code
488
 */
489
static const char fileName[] = "/barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g";
490
491
/** \brief Return the name of the grammar file that generated this code.
492
 */
493
static const char * getGrammarFileName()
494
{
495
	return fileName;
496
}
497
/** \brief Create a new Smt2Parser parser and return a context for it.
498
 *
499
 * \param[in] instream Pointer to an input stream interface.
500
 *
501
 * \return Pointer to new parser context upon success.
502
 */
503
ANTLR3_API pSmt2Parser
504
5437
Smt2ParserNew   (pANTLR3_COMMON_TOKEN_STREAM instream)
505
{
506
	// See if we can create a new parser with the standard constructor
507
	//
508
5437
	return Smt2ParserNewSSD(instream, NULL);
509
}
510
511
/** \brief Create a new Smt2Parser parser and return a context for it.
512
 *
513
 * \param[in] instream Pointer to an input stream interface.
514
 *
515
 * \return Pointer to new parser context upon success.
516
 */
517
ANTLR3_API pSmt2Parser
518
5437
Smt2ParserNewSSD   (pANTLR3_COMMON_TOKEN_STREAM instream, pANTLR3_RECOGNIZER_SHARED_STATE state)
519
{
520
    pSmt2Parser ctx;	    /* Context structure we will build and return   */
521
522
5437
    ctx	= (pSmt2Parser) ANTLR3_CALLOC(1, sizeof(Smt2Parser));
523
524
5437
    if	(ctx == NULL)
525
    {
526
		// Failed to allocate memory for parser context
527
		//
528
        return  NULL;
529
    }
530
531
    /* -------------------------------------------------------------------
532
     * Memory for basic structure is allocated, now to fill in
533
     * the base ANTLR3 structures. We initialize the function pointers
534
     * for the standard ANTLR3 parser function set, but upon return
535
     * from here, the programmer may set the pointers to provide custom
536
     * implementations of each function.
537
     *
538
     * We don't use the macros defined in Smt2Parser.h here, in order that you can get a sense
539
     * of what goes where.
540
     */
541
542
    /* Create a base parser/recognizer, using the supplied token stream
543
     */
544
5437
    ctx->pParser	    = antlr3ParserNewStream(ANTLR3_SIZE_HINT, instream->tstream, state);
545
    /* Install the implementation of our Smt2Parser interface
546
     */
547
5437
    ctx->parseExpr	= parseExpr;
548
5437
    ctx->parseCommand	= parseCommand;
549
5437
    ctx->parseSygus	= parseSygus;
550
5437
    ctx->command	= command;
551
5437
    ctx->sygusCommand	= sygusCommand;
552
5437
    ctx->sygusGrammar	= sygusGrammar;
553
5437
    ctx->setInfoInternal	= setInfoInternal;
554
5437
    ctx->setOptionInternal	= setOptionInternal;
555
5437
    ctx->smt25Command	= smt25Command;
556
5437
    ctx->extendedCommand	= extendedCommand;
557
5437
    ctx->datatypeDefCommand	= datatypeDefCommand;
558
5437
    ctx->datatypesDefCommand	= datatypesDefCommand;
559
5437
    ctx->datatypesDef	= datatypesDef;
560
5437
    ctx->simpleSymbolicExprNoKeyword	= simpleSymbolicExprNoKeyword;
561
5437
    ctx->keyword	= keyword;
562
5437
    ctx->simpleSymbolicExpr	= simpleSymbolicExpr;
563
5437
    ctx->symbolicExpr	= symbolicExpr;
564
5437
    ctx->term	= term;
565
5437
    ctx->termNonVariable	= termNonVariable;
566
5437
    ctx->qualIdentifier	= qualIdentifier;
567
5437
    ctx->identifier	= identifier;
568
5437
    ctx->termAtomic	= termAtomic;
569
5437
    ctx->attribute	= attribute;
570
5437
    ctx->termList	= termList;
571
5437
    ctx->str	= str;
572
5437
    ctx->quantOp	= quantOp;
573
5437
    ctx->functionName	= functionName;
574
5437
    ctx->sortList	= sortList;
575
5437
    ctx->nonemptySortList	= nonemptySortList;
576
5437
    ctx->sortedVarList	= sortedVarList;
577
5437
    ctx->boundVarList	= boundVarList;
578
5437
    ctx->sortName	= sortName;
579
5437
    ctx->sortSymbol	= sortSymbol;
580
5437
    ctx->symbolList	= symbolList;
581
5437
    ctx->symbol	= symbol;
582
5437
    ctx->nonemptyNumeralList	= nonemptyNumeralList;
583
5437
    ctx->datatypeDef	= datatypeDef;
584
5437
    ctx->constructorDef	= constructorDef;
585
5437
    ctx->selector	= selector;
586
5437
    ctx->free			= Smt2ParserFree;
587
5437
    ctx->reset			= Smt2ParserReset;
588
5437
    ctx->getGrammarFileName	= getGrammarFileName;
589
590
    /* Install the scope pushing methods.
591
     */
592
593
    /* Install the token table
594
     */
595
5437
    PSRSTATE->tokenNames   = Smt2ParserTokenNames;
596
597
598
    /* Return the newly built parser to the caller
599
     */
600
5437
    return  ctx;
601
}
602
603
static void
604
Smt2ParserReset (pSmt2Parser ctx)
605
{
606
    RECOGNIZER->reset(RECOGNIZER);
607
}
608
609
/** Free the parser resources
610
 */
611
 static void
612
5437
 Smt2ParserFree(pSmt2Parser ctx)
613
 {
614
    /* Free any scope memory
615
     */
616
617
	// Free this parser
618
	//
619
5437
    ctx->pParser->free(ctx->pParser);
620
621
622
5437
    ANTLR3_FREE(ctx);
623
624
    /* Everything is released, so we can return
625
     */
626
5437
    return;
627
 }
628
629
/** Return token names used by this
630
parser
631
632
 *
633
 * The returned pointer is used as an index into the token names table (using the token
634
 * number as the index).
635
 *
636
 * \return Pointer to first char * in the table.
637
 */
638
static pANTLR3_UINT8    *getTokenNames()
639
{
640
        return Smt2ParserTokenNames;
641
}
642
643
644
/* Declare the bitsets
645
 */
646
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_parseExpr117  */
647
static	ANTLR3_BITWORD FOLLOW_term_in_parseExpr117_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
648
static  ANTLR3_BITSET_LIST FOLLOW_term_in_parseExpr117	= { FOLLOW_term_in_parseExpr117_bits, 1	};
649
/** Bitset defining follow set for error recovery in rule state: FOLLOW_EOF_in_parseExpr124  */
650
static	ANTLR3_BITWORD FOLLOW_EOF_in_parseExpr124_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
651
static  ANTLR3_BITSET_LIST FOLLOW_EOF_in_parseExpr124	= { FOLLOW_EOF_in_parseExpr124_bits, 1	};
652
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_parseCommand153  */
653
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_parseCommand153_bits[]	= { ANTLR3_UINT64_LIT(0xFFA5FBFEE0360020), ANTLR3_UINT64_LIT(0x000000003E6C000F) };
654
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_parseCommand153	= { FOLLOW_LPAREN_TOK_in_parseCommand153_bits, 2	};
655
/** Bitset defining follow set for error recovery in rule state: FOLLOW_command_in_parseCommand155  */
656
static	ANTLR3_BITWORD FOLLOW_command_in_parseCommand155_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
657
static  ANTLR3_BITSET_LIST FOLLOW_command_in_parseCommand155	= { FOLLOW_command_in_parseCommand155_bits, 2	};
658
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_parseCommand158  */
659
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_parseCommand158_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
660
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_parseCommand158	= { FOLLOW_RPAREN_TOK_in_parseCommand158_bits, 1	};
661
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_parseCommand171  */
662
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_parseCommand171_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000100) };
663
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_parseCommand171	= { FOLLOW_LPAREN_TOK_in_parseCommand171_bits, 2	};
664
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INCLUDE_TOK_in_parseCommand173  */
665
static	ANTLR3_BITWORD FOLLOW_INCLUDE_TOK_in_parseCommand173_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000040000000) };
666
static  ANTLR3_BITSET_LIST FOLLOW_INCLUDE_TOK_in_parseCommand173	= { FOLLOW_INCLUDE_TOK_in_parseCommand173_bits, 2	};
667
/** Bitset defining follow set for error recovery in rule state: FOLLOW_str_in_parseCommand175  */
668
static	ANTLR3_BITWORD FOLLOW_str_in_parseCommand175_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
669
static  ANTLR3_BITSET_LIST FOLLOW_str_in_parseCommand175	= { FOLLOW_str_in_parseCommand175_bits, 2	};
670
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_parseCommand178  */
671
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_parseCommand178_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
672
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_parseCommand178	= { FOLLOW_RPAREN_TOK_in_parseCommand178_bits, 1	};
673
/** Bitset defining follow set for error recovery in rule state: FOLLOW_EOF_in_parseCommand191  */
674
static	ANTLR3_BITWORD FOLLOW_EOF_in_parseCommand191_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
675
static  ANTLR3_BITSET_LIST FOLLOW_EOF_in_parseCommand191	= { FOLLOW_EOF_in_parseCommand191_bits, 1	};
676
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_parseSygus220  */
677
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_parseSygus220_bits[]	= { ANTLR3_UINT64_LIT(0xFFA5FFFEE2760020), ANTLR3_UINT64_LIT(0x000000183F6C080F) };
678
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_parseSygus220	= { FOLLOW_LPAREN_TOK_in_parseSygus220_bits, 2	};
679
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sygusCommand_in_parseSygus224  */
680
static	ANTLR3_BITWORD FOLLOW_sygusCommand_in_parseSygus224_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
681
static  ANTLR3_BITSET_LIST FOLLOW_sygusCommand_in_parseSygus224	= { FOLLOW_sygusCommand_in_parseSygus224_bits, 2	};
682
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_parseSygus226  */
683
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_parseSygus226_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
684
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_parseSygus226	= { FOLLOW_RPAREN_TOK_in_parseSygus226_bits, 1	};
685
/** Bitset defining follow set for error recovery in rule state: FOLLOW_EOF_in_parseSygus232  */
686
static	ANTLR3_BITWORD FOLLOW_EOF_in_parseSygus232_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
687
static  ANTLR3_BITSET_LIST FOLLOW_EOF_in_parseSygus232	= { FOLLOW_EOF_in_parseSygus232_bits, 1	};
688
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SET_LOGIC_TOK_in_command260  */
689
static	ANTLR3_BITWORD FOLLOW_SET_LOGIC_TOK_in_command260_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
690
static  ANTLR3_BITSET_LIST FOLLOW_SET_LOGIC_TOK_in_command260	= { FOLLOW_SET_LOGIC_TOK_in_command260_bits, 2	};
691
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_command262  */
692
static	ANTLR3_BITWORD FOLLOW_symbol_in_command262_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
693
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_command262	= { FOLLOW_symbol_in_command262_bits, 1	};
694
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SET_INFO_TOK_in_command281  */
695
static	ANTLR3_BITWORD FOLLOW_SET_INFO_TOK_in_command281_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000001000) };
696
static  ANTLR3_BITSET_LIST FOLLOW_SET_INFO_TOK_in_command281	= { FOLLOW_SET_INFO_TOK_in_command281_bits, 2	};
697
/** Bitset defining follow set for error recovery in rule state: FOLLOW_setInfoInternal_in_command283  */
698
static	ANTLR3_BITWORD FOLLOW_setInfoInternal_in_command283_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
699
static  ANTLR3_BITSET_LIST FOLLOW_setInfoInternal_in_command283	= { FOLLOW_setInfoInternal_in_command283_bits, 1	};
700
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_INFO_TOK_in_command296  */
701
static	ANTLR3_BITWORD FOLLOW_GET_INFO_TOK_in_command296_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000001000) };
702
static  ANTLR3_BITSET_LIST FOLLOW_GET_INFO_TOK_in_command296	= { FOLLOW_GET_INFO_TOK_in_command296_bits, 2	};
703
/** Bitset defining follow set for error recovery in rule state: FOLLOW_KEYWORD_in_command298  */
704
static	ANTLR3_BITWORD FOLLOW_KEYWORD_in_command298_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
705
static  ANTLR3_BITSET_LIST FOLLOW_KEYWORD_in_command298	= { FOLLOW_KEYWORD_in_command298_bits, 1	};
706
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SET_OPTION_TOK_in_command316  */
707
static	ANTLR3_BITWORD FOLLOW_SET_OPTION_TOK_in_command316_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000001000) };
708
static  ANTLR3_BITSET_LIST FOLLOW_SET_OPTION_TOK_in_command316	= { FOLLOW_SET_OPTION_TOK_in_command316_bits, 2	};
709
/** Bitset defining follow set for error recovery in rule state: FOLLOW_setOptionInternal_in_command318  */
710
static	ANTLR3_BITWORD FOLLOW_setOptionInternal_in_command318_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
711
static  ANTLR3_BITSET_LIST FOLLOW_setOptionInternal_in_command318	= { FOLLOW_setOptionInternal_in_command318_bits, 1	};
712
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_OPTION_TOK_in_command331  */
713
static	ANTLR3_BITWORD FOLLOW_GET_OPTION_TOK_in_command331_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000001000) };
714
static  ANTLR3_BITSET_LIST FOLLOW_GET_OPTION_TOK_in_command331	= { FOLLOW_GET_OPTION_TOK_in_command331_bits, 2	};
715
/** Bitset defining follow set for error recovery in rule state: FOLLOW_KEYWORD_in_command333  */
716
static	ANTLR3_BITWORD FOLLOW_KEYWORD_in_command333_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
717
static  ANTLR3_BITSET_LIST FOLLOW_KEYWORD_in_command333	= { FOLLOW_KEYWORD_in_command333_bits, 1	};
718
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_SORT_TOK_in_command351  */
719
static	ANTLR3_BITWORD FOLLOW_DECLARE_SORT_TOK_in_command351_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
720
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_SORT_TOK_in_command351	= { FOLLOW_DECLARE_SORT_TOK_in_command351_bits, 2	};
721
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_command363  */
722
static	ANTLR3_BITWORD FOLLOW_symbol_in_command363_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) };
723
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_command363	= { FOLLOW_symbol_in_command363_bits, 2	};
724
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_command378  */
725
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_command378_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
726
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_command378	= { FOLLOW_INTEGER_LITERAL_in_command378_bits, 1	};
727
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DEFINE_SORT_TOK_in_command396  */
728
static	ANTLR3_BITWORD FOLLOW_DEFINE_SORT_TOK_in_command396_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
729
static  ANTLR3_BITSET_LIST FOLLOW_DEFINE_SORT_TOK_in_command396	= { FOLLOW_DEFINE_SORT_TOK_in_command396_bits, 2	};
730
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_command404  */
731
static	ANTLR3_BITWORD FOLLOW_symbol_in_command404_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
732
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_command404	= { FOLLOW_symbol_in_command404_bits, 2	};
733
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_command417  */
734
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_command417_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010900000) };
735
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_command417	= { FOLLOW_LPAREN_TOK_in_command417_bits, 2	};
736
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbolList_in_command419  */
737
static	ANTLR3_BITWORD FOLLOW_symbolList_in_command419_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
738
static  ANTLR3_BITSET_LIST FOLLOW_symbolList_in_command419	= { FOLLOW_symbolList_in_command419_bits, 2	};
739
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_command422  */
740
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_command422_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
741
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_command422	= { FOLLOW_RPAREN_TOK_in_command422_bits, 2	};
742
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_command434  */
743
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_command434_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
744
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_command434	= { FOLLOW_sortSymbol_in_command434_bits, 1	};
745
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_FUN_TOK_in_command453  */
746
static	ANTLR3_BITWORD FOLLOW_DECLARE_FUN_TOK_in_command453_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
747
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_FUN_TOK_in_command453	= { FOLLOW_DECLARE_FUN_TOK_in_command453_bits, 2	};
748
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_command461  */
749
static	ANTLR3_BITWORD FOLLOW_symbol_in_command461_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
750
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_command461	= { FOLLOW_symbol_in_command461_bits, 2	};
751
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_command474  */
752
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_command474_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010904000) };
753
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_command474	= { FOLLOW_LPAREN_TOK_in_command474_bits, 2	};
754
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortList_in_command476  */
755
static	ANTLR3_BITWORD FOLLOW_sortList_in_command476_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
756
static  ANTLR3_BITSET_LIST FOLLOW_sortList_in_command476	= { FOLLOW_sortList_in_command476_bits, 2	};
757
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_command479  */
758
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_command479_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
759
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_command479	= { FOLLOW_RPAREN_TOK_in_command479_bits, 2	};
760
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_command485  */
761
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_command485_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
762
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_command485	= { FOLLOW_sortSymbol_in_command485_bits, 1	};
763
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DEFINE_FUN_TOK_in_command504  */
764
static	ANTLR3_BITWORD FOLLOW_DEFINE_FUN_TOK_in_command504_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
765
static  ANTLR3_BITSET_LIST FOLLOW_DEFINE_FUN_TOK_in_command504	= { FOLLOW_DEFINE_FUN_TOK_in_command504_bits, 2	};
766
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_command512  */
767
static	ANTLR3_BITWORD FOLLOW_symbol_in_command512_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
768
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_command512	= { FOLLOW_symbol_in_command512_bits, 2	};
769
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_command525  */
770
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_command525_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
771
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_command525	= { FOLLOW_LPAREN_TOK_in_command525_bits, 2	};
772
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortedVarList_in_command527  */
773
static	ANTLR3_BITWORD FOLLOW_sortedVarList_in_command527_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
774
static  ANTLR3_BITSET_LIST FOLLOW_sortedVarList_in_command527	= { FOLLOW_sortedVarList_in_command527_bits, 2	};
775
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_command530  */
776
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_command530_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
777
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_command530	= { FOLLOW_RPAREN_TOK_in_command530_bits, 2	};
778
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_command536  */
779
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_command536_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
780
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_command536	= { FOLLOW_sortSymbol_in_command536_bits, 2	};
781
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_command549  */
782
static	ANTLR3_BITWORD FOLLOW_term_in_command549_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
783
static  ANTLR3_BITSET_LIST FOLLOW_term_in_command549	= { FOLLOW_term_in_command549_bits, 1	};
784
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_DATATYPE_TOK_in_command562  */
785
static	ANTLR3_BITWORD FOLLOW_DECLARE_DATATYPE_TOK_in_command562_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
786
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_DATATYPE_TOK_in_command562	= { FOLLOW_DECLARE_DATATYPE_TOK_in_command562_bits, 2	};
787
/** Bitset defining follow set for error recovery in rule state: FOLLOW_datatypeDefCommand_in_command564  */
788
static	ANTLR3_BITWORD FOLLOW_datatypeDefCommand_in_command564_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
789
static  ANTLR3_BITSET_LIST FOLLOW_datatypeDefCommand_in_command564	= { FOLLOW_datatypeDefCommand_in_command564_bits, 1	};
790
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_DATATYPES_TOK_in_command571  */
791
static	ANTLR3_BITWORD FOLLOW_DECLARE_DATATYPES_TOK_in_command571_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
792
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_DATATYPES_TOK_in_command571	= { FOLLOW_DECLARE_DATATYPES_TOK_in_command571_bits, 2	};
793
/** Bitset defining follow set for error recovery in rule state: FOLLOW_datatypesDefCommand_in_command573  */
794
static	ANTLR3_BITWORD FOLLOW_datatypesDefCommand_in_command573_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
795
static  ANTLR3_BITSET_LIST FOLLOW_datatypesDefCommand_in_command573	= { FOLLOW_datatypesDefCommand_in_command573_bits, 1	};
796
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_VALUE_TOK_in_command586  */
797
static	ANTLR3_BITWORD FOLLOW_GET_VALUE_TOK_in_command586_bits[]	= { ANTLR3_UINT64_LIT(0xFFFFFFFFFFFFFFF0), ANTLR3_UINT64_LIT(0x00001FFFFFFFFFFF) };
798
static  ANTLR3_BITSET_LIST FOLLOW_GET_VALUE_TOK_in_command586	= { FOLLOW_GET_VALUE_TOK_in_command586_bits, 2	};
799
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_command596  */
800
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_command596_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
801
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_command596	= { FOLLOW_LPAREN_TOK_in_command596_bits, 2	};
802
/** Bitset defining follow set for error recovery in rule state: FOLLOW_termList_in_command598  */
803
static	ANTLR3_BITWORD FOLLOW_termList_in_command598_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
804
static  ANTLR3_BITSET_LIST FOLLOW_termList_in_command598	= { FOLLOW_termList_in_command598_bits, 2	};
805
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_command601  */
806
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_command601_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
807
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_command601	= { FOLLOW_RPAREN_TOK_in_command601_bits, 1	};
808
/** Bitset defining follow set for error recovery in rule state: FOLLOW_set_in_command617  */
809
static	ANTLR3_BITWORD FOLLOW_set_in_command617_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
810
static  ANTLR3_BITSET_LIST FOLLOW_set_in_command617	= { FOLLOW_set_in_command617_bits, 1	};
811
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_ASSIGNMENT_TOK_in_command644  */
812
static	ANTLR3_BITWORD FOLLOW_GET_ASSIGNMENT_TOK_in_command644_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
813
static  ANTLR3_BITSET_LIST FOLLOW_GET_ASSIGNMENT_TOK_in_command644	= { FOLLOW_GET_ASSIGNMENT_TOK_in_command644_bits, 1	};
814
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ASSERT_TOK_in_command664  */
815
static	ANTLR3_BITWORD FOLLOW_ASSERT_TOK_in_command664_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
816
static  ANTLR3_BITSET_LIST FOLLOW_ASSERT_TOK_in_command664	= { FOLLOW_ASSERT_TOK_in_command664_bits, 2	};
817
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_command678  */
818
static	ANTLR3_BITWORD FOLLOW_term_in_command678_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
819
static  ANTLR3_BITSET_LIST FOLLOW_term_in_command678	= { FOLLOW_term_in_command678_bits, 1	};
820
/** Bitset defining follow set for error recovery in rule state: FOLLOW_CHECK_SAT_TOK_in_command697  */
821
static	ANTLR3_BITWORD FOLLOW_CHECK_SAT_TOK_in_command697_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010002), ANTLR3_UINT64_LIT(0x0000024050104420) };
822
static  ANTLR3_BITSET_LIST FOLLOW_CHECK_SAT_TOK_in_command697	= { FOLLOW_CHECK_SAT_TOK_in_command697_bits, 2	};
823
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_command713  */
824
static	ANTLR3_BITWORD FOLLOW_term_in_command713_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
825
static  ANTLR3_BITSET_LIST FOLLOW_term_in_command713	= { FOLLOW_term_in_command713_bits, 1	};
826
/** Bitset defining follow set for error recovery in rule state: FOLLOW_CHECK_SAT_ASSUMING_TOK_in_command754  */
827
static	ANTLR3_BITWORD FOLLOW_CHECK_SAT_ASSUMING_TOK_in_command754_bits[]	= { ANTLR3_UINT64_LIT(0xFFFFFFFFFFFFFFF0), ANTLR3_UINT64_LIT(0x00001FFFFFFFFFFF) };
828
static  ANTLR3_BITSET_LIST FOLLOW_CHECK_SAT_ASSUMING_TOK_in_command754	= { FOLLOW_CHECK_SAT_ASSUMING_TOK_in_command754_bits, 2	};
829
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_command764  */
830
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_command764_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
831
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_command764	= { FOLLOW_LPAREN_TOK_in_command764_bits, 2	};
832
/** Bitset defining follow set for error recovery in rule state: FOLLOW_termList_in_command766  */
833
static	ANTLR3_BITWORD FOLLOW_termList_in_command766_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
834
static  ANTLR3_BITSET_LIST FOLLOW_termList_in_command766	= { FOLLOW_termList_in_command766_bits, 2	};
835
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_command769  */
836
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_command769_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
837
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_command769	= { FOLLOW_RPAREN_TOK_in_command769_bits, 1	};
838
/** Bitset defining follow set for error recovery in rule state: FOLLOW_set_in_command785  */
839
static	ANTLR3_BITWORD FOLLOW_set_in_command785_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
840
static  ANTLR3_BITSET_LIST FOLLOW_set_in_command785	= { FOLLOW_set_in_command785_bits, 1	};
841
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_ASSERTIONS_TOK_in_command812  */
842
static	ANTLR3_BITWORD FOLLOW_GET_ASSERTIONS_TOK_in_command812_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
843
static  ANTLR3_BITSET_LIST FOLLOW_GET_ASSERTIONS_TOK_in_command812	= { FOLLOW_GET_ASSERTIONS_TOK_in_command812_bits, 1	};
844
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_PROOF_TOK_in_command832  */
845
static	ANTLR3_BITWORD FOLLOW_GET_PROOF_TOK_in_command832_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
846
static  ANTLR3_BITSET_LIST FOLLOW_GET_PROOF_TOK_in_command832	= { FOLLOW_GET_PROOF_TOK_in_command832_bits, 1	};
847
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_UNSAT_ASSUMPTIONS_TOK_in_command852  */
848
static	ANTLR3_BITWORD FOLLOW_GET_UNSAT_ASSUMPTIONS_TOK_in_command852_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
849
static  ANTLR3_BITSET_LIST FOLLOW_GET_UNSAT_ASSUMPTIONS_TOK_in_command852	= { FOLLOW_GET_UNSAT_ASSUMPTIONS_TOK_in_command852_bits, 1	};
850
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_UNSAT_CORE_TOK_in_command872  */
851
static	ANTLR3_BITWORD FOLLOW_GET_UNSAT_CORE_TOK_in_command872_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
852
static  ANTLR3_BITSET_LIST FOLLOW_GET_UNSAT_CORE_TOK_in_command872	= { FOLLOW_GET_UNSAT_CORE_TOK_in_command872_bits, 1	};
853
/** Bitset defining follow set for error recovery in rule state: FOLLOW_PUSH_TOK_in_command892  */
854
static	ANTLR3_BITWORD FOLLOW_PUSH_TOK_in_command892_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000000400) };
855
static  ANTLR3_BITSET_LIST FOLLOW_PUSH_TOK_in_command892	= { FOLLOW_PUSH_TOK_in_command892_bits, 2	};
856
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_command910  */
857
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_command910_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
858
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_command910	= { FOLLOW_INTEGER_LITERAL_in_command910_bits, 1	};
859
/** Bitset defining follow set for error recovery in rule state: FOLLOW_POP_TOK_in_command934  */
860
static	ANTLR3_BITWORD FOLLOW_POP_TOK_in_command934_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000000400) };
861
static  ANTLR3_BITSET_LIST FOLLOW_POP_TOK_in_command934	= { FOLLOW_POP_TOK_in_command934_bits, 2	};
862
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_command952  */
863
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_command952_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
864
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_command952	= { FOLLOW_INTEGER_LITERAL_in_command952_bits, 1	};
865
/** Bitset defining follow set for error recovery in rule state: FOLLOW_EXIT_TOK_in_command986  */
866
static	ANTLR3_BITWORD FOLLOW_EXIT_TOK_in_command986_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
867
static  ANTLR3_BITSET_LIST FOLLOW_EXIT_TOK_in_command986	= { FOLLOW_EXIT_TOK_in_command986_bits, 1	};
868
/** Bitset defining follow set for error recovery in rule state: FOLLOW_smt25Command_in_command1005  */
869
static	ANTLR3_BITWORD FOLLOW_smt25Command_in_command1005_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
870
static  ANTLR3_BITSET_LIST FOLLOW_smt25Command_in_command1005	= { FOLLOW_smt25Command_in_command1005_bits, 1	};
871
/** Bitset defining follow set for error recovery in rule state: FOLLOW_extendedCommand_in_command1019  */
872
static	ANTLR3_BITWORD FOLLOW_extendedCommand_in_command1019_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
873
static  ANTLR3_BITSET_LIST FOLLOW_extendedCommand_in_command1019	= { FOLLOW_extendedCommand_in_command1019_bits, 1	};
874
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SIMPLE_SYMBOL_in_command1039  */
875
static	ANTLR3_BITWORD FOLLOW_SIMPLE_SYMBOL_in_command1039_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
876
static  ANTLR3_BITSET_LIST FOLLOW_SIMPLE_SYMBOL_in_command1039	= { FOLLOW_SIMPLE_SYMBOL_in_command1039_bits, 1	};
877
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_VAR_TOK_in_sygusCommand1073  */
878
static	ANTLR3_BITWORD FOLLOW_DECLARE_VAR_TOK_in_sygusCommand1073_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
879
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_VAR_TOK_in_sygusCommand1073	= { FOLLOW_DECLARE_VAR_TOK_in_sygusCommand1073_bits, 2	};
880
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_sygusCommand1081  */
881
static	ANTLR3_BITWORD FOLLOW_symbol_in_sygusCommand1081_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
882
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_sygusCommand1081	= { FOLLOW_symbol_in_sygusCommand1081_bits, 2	};
883
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_sygusCommand1094  */
884
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_sygusCommand1094_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
885
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_sygusCommand1094	= { FOLLOW_sortSymbol_in_sygusCommand1094_bits, 1	};
886
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SYNTH_FUN_TOK_in_sygusCommand1115  */
887
static	ANTLR3_BITWORD FOLLOW_SYNTH_FUN_TOK_in_sygusCommand1115_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
888
static  ANTLR3_BITSET_LIST FOLLOW_SYNTH_FUN_TOK_in_sygusCommand1115	= { FOLLOW_SYNTH_FUN_TOK_in_sygusCommand1115_bits, 2	};
889
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SYNTH_INV_TOK_in_sygusCommand1127  */
890
static	ANTLR3_BITWORD FOLLOW_SYNTH_INV_TOK_in_sygusCommand1127_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
891
static  ANTLR3_BITSET_LIST FOLLOW_SYNTH_INV_TOK_in_sygusCommand1127	= { FOLLOW_SYNTH_INV_TOK_in_sygusCommand1127_bits, 2	};
892
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_sygusCommand1147  */
893
static	ANTLR3_BITWORD FOLLOW_symbol_in_sygusCommand1147_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
894
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_sygusCommand1147	= { FOLLOW_symbol_in_sygusCommand1147_bits, 2	};
895
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusCommand1154  */
896
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusCommand1154_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
897
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusCommand1154	= { FOLLOW_LPAREN_TOK_in_sygusCommand1154_bits, 2	};
898
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortedVarList_in_sygusCommand1156  */
899
static	ANTLR3_BITWORD FOLLOW_sortedVarList_in_sygusCommand1156_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
900
static  ANTLR3_BITSET_LIST FOLLOW_sortedVarList_in_sygusCommand1156	= { FOLLOW_sortedVarList_in_sygusCommand1156_bits, 2	};
901
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sygusCommand1159  */
902
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sygusCommand1159_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000020010104000) };
903
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sygusCommand1159	= { FOLLOW_RPAREN_TOK_in_sygusCommand1159_bits, 2	};
904
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_sygusCommand1167  */
905
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_sygusCommand1167_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) };
906
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_sygusCommand1167	= { FOLLOW_sortSymbol_in_sygusCommand1167_bits, 2	};
907
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sygusGrammar_in_sygusCommand1219  */
908
static	ANTLR3_BITWORD FOLLOW_sygusGrammar_in_sygusCommand1219_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
909
static  ANTLR3_BITSET_LIST FOLLOW_sygusGrammar_in_sygusCommand1219	= { FOLLOW_sygusGrammar_in_sygusCommand1219_bits, 1	};
910
/** Bitset defining follow set for error recovery in rule state: FOLLOW_CONSTRAINT_TOK_in_sygusCommand1245  */
911
static	ANTLR3_BITWORD FOLLOW_CONSTRAINT_TOK_in_sygusCommand1245_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
912
static  ANTLR3_BITSET_LIST FOLLOW_CONSTRAINT_TOK_in_sygusCommand1245	= { FOLLOW_CONSTRAINT_TOK_in_sygusCommand1245_bits, 2	};
913
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_sygusCommand1253  */
914
static	ANTLR3_BITWORD FOLLOW_term_in_sygusCommand1253_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
915
static  ANTLR3_BITSET_LIST FOLLOW_term_in_sygusCommand1253	= { FOLLOW_term_in_sygusCommand1253_bits, 1	};
916
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INV_CONSTRAINT_TOK_in_sygusCommand1272  */
917
static	ANTLR3_BITWORD FOLLOW_INV_CONSTRAINT_TOK_in_sygusCommand1272_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
918
static  ANTLR3_BITSET_LIST FOLLOW_INV_CONSTRAINT_TOK_in_sygusCommand1272	= { FOLLOW_INV_CONSTRAINT_TOK_in_sygusCommand1272_bits, 2	};
919
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_sygusCommand1280  */
920
static	ANTLR3_BITWORD FOLLOW_symbol_in_sygusCommand1280_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000020010100000) };
921
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_sygusCommand1280	= { FOLLOW_symbol_in_sygusCommand1280_bits, 2	};
922
/** Bitset defining follow set for error recovery in rule state: FOLLOW_CHECK_SYNTH_TOK_in_sygusCommand1304  */
923
static	ANTLR3_BITWORD FOLLOW_CHECK_SYNTH_TOK_in_sygusCommand1304_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
924
static  ANTLR3_BITSET_LIST FOLLOW_CHECK_SYNTH_TOK_in_sygusCommand1304	= { FOLLOW_CHECK_SYNTH_TOK_in_sygusCommand1304_bits, 1	};
925
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SET_FEATURE_TOK_in_sygusCommand1322  */
926
static	ANTLR3_BITWORD FOLLOW_SET_FEATURE_TOK_in_sygusCommand1322_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000001000) };
927
static  ANTLR3_BITSET_LIST FOLLOW_SET_FEATURE_TOK_in_sygusCommand1322	= { FOLLOW_SET_FEATURE_TOK_in_sygusCommand1322_bits, 2	};
928
/** Bitset defining follow set for error recovery in rule state: FOLLOW_keyword_in_sygusCommand1324  */
929
static	ANTLR3_BITWORD FOLLOW_keyword_in_sygusCommand1324_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310020), ANTLR3_UINT64_LIT(0x000002007E7C542E) };
930
static  ANTLR3_BITSET_LIST FOLLOW_keyword_in_sygusCommand1324	= { FOLLOW_keyword_in_sygusCommand1324_bits, 2	};
931
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbolicExpr_in_sygusCommand1327  */
932
static	ANTLR3_BITWORD FOLLOW_symbolicExpr_in_sygusCommand1327_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
933
static  ANTLR3_BITSET_LIST FOLLOW_symbolicExpr_in_sygusCommand1327	= { FOLLOW_symbolicExpr_in_sygusCommand1327_bits, 1	};
934
/** Bitset defining follow set for error recovery in rule state: FOLLOW_command_in_sygusCommand1340  */
935
static	ANTLR3_BITWORD FOLLOW_command_in_sygusCommand1340_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
936
static  ANTLR3_BITSET_LIST FOLLOW_command_in_sygusCommand1340	= { FOLLOW_command_in_sygusCommand1340_bits, 1	};
937
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusGrammar1368  */
938
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusGrammar1368_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
939
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusGrammar1368	= { FOLLOW_LPAREN_TOK_in_sygusGrammar1368_bits, 2	};
940
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusGrammar1383  */
941
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusGrammar1383_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
942
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusGrammar1383	= { FOLLOW_LPAREN_TOK_in_sygusGrammar1383_bits, 2	};
943
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_sygusGrammar1385  */
944
static	ANTLR3_BITWORD FOLLOW_symbol_in_sygusGrammar1385_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
945
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_sygusGrammar1385	= { FOLLOW_symbol_in_sygusGrammar1385_bits, 2	};
946
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_sygusGrammar1392  */
947
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_sygusGrammar1392_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
948
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_sygusGrammar1392	= { FOLLOW_sortSymbol_in_sygusGrammar1392_bits, 2	};
949
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusGrammar1417  */
950
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusGrammar1417_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
951
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusGrammar1417	= { FOLLOW_LPAREN_TOK_in_sygusGrammar1417_bits, 2	};
952
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sygusGrammar1433  */
953
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sygusGrammar1433_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
954
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sygusGrammar1433	= { FOLLOW_RPAREN_TOK_in_sygusGrammar1433_bits, 2	};
955
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sygusGrammar1450  */
956
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sygusGrammar1450_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
957
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sygusGrammar1450	= { FOLLOW_RPAREN_TOK_in_sygusGrammar1450_bits, 2	};
958
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusGrammar1461  */
959
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusGrammar1461_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
960
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusGrammar1461	= { FOLLOW_LPAREN_TOK_in_sygusGrammar1461_bits, 2	};
961
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusGrammar1471  */
962
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusGrammar1471_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
963
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusGrammar1471	= { FOLLOW_LPAREN_TOK_in_sygusGrammar1471_bits, 2	};
964
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_sygusGrammar1477  */
965
static	ANTLR3_BITWORD FOLLOW_symbol_in_sygusGrammar1477_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
966
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_sygusGrammar1477	= { FOLLOW_symbol_in_sygusGrammar1477_bits, 2	};
967
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_sygusGrammar1480  */
968
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_sygusGrammar1480_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
969
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_sygusGrammar1480	= { FOLLOW_sortSymbol_in_sygusGrammar1480_bits, 2	};
970
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusGrammar1493  */
971
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusGrammar1493_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
972
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusGrammar1493	= { FOLLOW_LPAREN_TOK_in_sygusGrammar1493_bits, 2	};
973
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_sygusGrammar1507  */
974
static	ANTLR3_BITWORD FOLLOW_term_in_sygusGrammar1507_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050904420) };
975
static  ANTLR3_BITSET_LIST FOLLOW_term_in_sygusGrammar1507	= { FOLLOW_term_in_sygusGrammar1507_bits, 2	};
976
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusGrammar1520  */
977
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusGrammar1520_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000080000000) };
978
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusGrammar1520	= { FOLLOW_LPAREN_TOK_in_sygusGrammar1520_bits, 2	};
979
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SYGUS_CONSTANT_TOK_in_sygusGrammar1522  */
980
static	ANTLR3_BITWORD FOLLOW_SYGUS_CONSTANT_TOK_in_sygusGrammar1522_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
981
static  ANTLR3_BITSET_LIST FOLLOW_SYGUS_CONSTANT_TOK_in_sygusGrammar1522	= { FOLLOW_SYGUS_CONSTANT_TOK_in_sygusGrammar1522_bits, 2	};
982
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_sygusGrammar1524  */
983
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_sygusGrammar1524_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
984
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_sygusGrammar1524	= { FOLLOW_sortSymbol_in_sygusGrammar1524_bits, 2	};
985
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sygusGrammar1527  */
986
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sygusGrammar1527_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050904420) };
987
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sygusGrammar1527	= { FOLLOW_RPAREN_TOK_in_sygusGrammar1527_bits, 2	};
988
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sygusGrammar1539  */
989
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sygusGrammar1539_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000100000000) };
990
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sygusGrammar1539	= { FOLLOW_LPAREN_TOK_in_sygusGrammar1539_bits, 2	};
991
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SYGUS_VARIABLE_TOK_in_sygusGrammar1541  */
992
static	ANTLR3_BITWORD FOLLOW_SYGUS_VARIABLE_TOK_in_sygusGrammar1541_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
993
static  ANTLR3_BITSET_LIST FOLLOW_SYGUS_VARIABLE_TOK_in_sygusGrammar1541	= { FOLLOW_SYGUS_VARIABLE_TOK_in_sygusGrammar1541_bits, 2	};
994
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_sygusGrammar1543  */
995
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_sygusGrammar1543_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
996
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_sygusGrammar1543	= { FOLLOW_sortSymbol_in_sygusGrammar1543_bits, 2	};
997
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sygusGrammar1546  */
998
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sygusGrammar1546_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050904420) };
999
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sygusGrammar1546	= { FOLLOW_RPAREN_TOK_in_sygusGrammar1546_bits, 2	};
1000
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sygusGrammar1561  */
1001
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sygusGrammar1561_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1002
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sygusGrammar1561	= { FOLLOW_RPAREN_TOK_in_sygusGrammar1561_bits, 2	};
1003
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sygusGrammar1567  */
1004
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sygusGrammar1567_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1005
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sygusGrammar1567	= { FOLLOW_RPAREN_TOK_in_sygusGrammar1567_bits, 2	};
1006
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sygusGrammar1582  */
1007
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sygusGrammar1582_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1008
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sygusGrammar1582	= { FOLLOW_RPAREN_TOK_in_sygusGrammar1582_bits, 1	};
1009
/** Bitset defining follow set for error recovery in rule state: FOLLOW_KEYWORD_in_setInfoInternal1603  */
1010
static	ANTLR3_BITWORD FOLLOW_KEYWORD_in_setInfoInternal1603_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310020), ANTLR3_UINT64_LIT(0x000002007E7C542E) };
1011
static  ANTLR3_BITSET_LIST FOLLOW_KEYWORD_in_setInfoInternal1603	= { FOLLOW_KEYWORD_in_setInfoInternal1603_bits, 2	};
1012
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbolicExpr_in_setInfoInternal1605  */
1013
static	ANTLR3_BITWORD FOLLOW_symbolicExpr_in_setInfoInternal1605_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1014
static  ANTLR3_BITSET_LIST FOLLOW_symbolicExpr_in_setInfoInternal1605	= { FOLLOW_symbolicExpr_in_setInfoInternal1605_bits, 1	};
1015
/** Bitset defining follow set for error recovery in rule state: FOLLOW_keyword_in_setOptionInternal1631  */
1016
static	ANTLR3_BITWORD FOLLOW_keyword_in_setOptionInternal1631_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310020), ANTLR3_UINT64_LIT(0x000002007E7C542E) };
1017
static  ANTLR3_BITSET_LIST FOLLOW_keyword_in_setOptionInternal1631	= { FOLLOW_keyword_in_setOptionInternal1631_bits, 2	};
1018
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbolicExpr_in_setOptionInternal1634  */
1019
static	ANTLR3_BITWORD FOLLOW_symbolicExpr_in_setOptionInternal1634_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1020
static  ANTLR3_BITSET_LIST FOLLOW_symbolicExpr_in_setOptionInternal1634	= { FOLLOW_symbolicExpr_in_setOptionInternal1634_bits, 1	};
1021
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_CONST_TOK_in_smt25Command1666  */
1022
static	ANTLR3_BITWORD FOLLOW_DECLARE_CONST_TOK_in_smt25Command1666_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1023
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_CONST_TOK_in_smt25Command1666	= { FOLLOW_DECLARE_CONST_TOK_in_smt25Command1666_bits, 2	};
1024
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_smt25Command1674  */
1025
static	ANTLR3_BITWORD FOLLOW_symbol_in_smt25Command1674_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1026
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_smt25Command1674	= { FOLLOW_symbol_in_smt25Command1674_bits, 2	};
1027
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_smt25Command1687  */
1028
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_smt25Command1687_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1029
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_smt25Command1687	= { FOLLOW_sortSymbol_in_smt25Command1687_bits, 1	};
1030
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_MODEL_TOK_in_smt25Command1707  */
1031
static	ANTLR3_BITWORD FOLLOW_GET_MODEL_TOK_in_smt25Command1707_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1032
static  ANTLR3_BITSET_LIST FOLLOW_GET_MODEL_TOK_in_smt25Command1707	= { FOLLOW_GET_MODEL_TOK_in_smt25Command1707_bits, 1	};
1033
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ECHO_TOK_in_smt25Command1728  */
1034
static	ANTLR3_BITWORD FOLLOW_ECHO_TOK_in_smt25Command1728_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310022), ANTLR3_UINT64_LIT(0x000002007E7C142E) };
1035
static  ANTLR3_BITSET_LIST FOLLOW_ECHO_TOK_in_smt25Command1728	= { FOLLOW_ECHO_TOK_in_smt25Command1728_bits, 2	};
1036
/** Bitset defining follow set for error recovery in rule state: FOLLOW_simpleSymbolicExpr_in_smt25Command1736  */
1037
static	ANTLR3_BITWORD FOLLOW_simpleSymbolicExpr_in_smt25Command1736_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1038
static  ANTLR3_BITSET_LIST FOLLOW_simpleSymbolicExpr_in_smt25Command1736	= { FOLLOW_simpleSymbolicExpr_in_smt25Command1736_bits, 1	};
1039
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RESET_TOK_in_smt25Command1772  */
1040
static	ANTLR3_BITWORD FOLLOW_RESET_TOK_in_smt25Command1772_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1041
static  ANTLR3_BITSET_LIST FOLLOW_RESET_TOK_in_smt25Command1772	= { FOLLOW_RESET_TOK_in_smt25Command1772_bits, 1	};
1042
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RESET_ASSERTIONS_TOK_in_smt25Command1790  */
1043
static	ANTLR3_BITWORD FOLLOW_RESET_ASSERTIONS_TOK_in_smt25Command1790_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1044
static  ANTLR3_BITSET_LIST FOLLOW_RESET_ASSERTIONS_TOK_in_smt25Command1790	= { FOLLOW_RESET_ASSERTIONS_TOK_in_smt25Command1790_bits, 1	};
1045
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DEFINE_FUN_REC_TOK_in_smt25Command1802  */
1046
static	ANTLR3_BITWORD FOLLOW_DEFINE_FUN_REC_TOK_in_smt25Command1802_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1047
static  ANTLR3_BITSET_LIST FOLLOW_DEFINE_FUN_REC_TOK_in_smt25Command1802	= { FOLLOW_DEFINE_FUN_REC_TOK_in_smt25Command1802_bits, 2	};
1048
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_smt25Command1814  */
1049
static	ANTLR3_BITWORD FOLLOW_symbol_in_smt25Command1814_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1050
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_smt25Command1814	= { FOLLOW_symbol_in_smt25Command1814_bits, 2	};
1051
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_smt25Command1827  */
1052
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_smt25Command1827_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1053
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_smt25Command1827	= { FOLLOW_LPAREN_TOK_in_smt25Command1827_bits, 2	};
1054
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortedVarList_in_smt25Command1829  */
1055
static	ANTLR3_BITWORD FOLLOW_sortedVarList_in_smt25Command1829_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1056
static  ANTLR3_BITSET_LIST FOLLOW_sortedVarList_in_smt25Command1829	= { FOLLOW_sortedVarList_in_smt25Command1829_bits, 2	};
1057
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_smt25Command1832  */
1058
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_smt25Command1832_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1059
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_smt25Command1832	= { FOLLOW_RPAREN_TOK_in_smt25Command1832_bits, 2	};
1060
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_smt25Command1838  */
1061
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_smt25Command1838_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1062
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_smt25Command1838	= { FOLLOW_sortSymbol_in_smt25Command1838_bits, 2	};
1063
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_smt25Command1851  */
1064
static	ANTLR3_BITWORD FOLLOW_term_in_smt25Command1851_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1065
static  ANTLR3_BITSET_LIST FOLLOW_term_in_smt25Command1851	= { FOLLOW_term_in_smt25Command1851_bits, 1	};
1066
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DEFINE_FUNS_REC_TOK_in_smt25Command1864  */
1067
static	ANTLR3_BITWORD FOLLOW_DEFINE_FUNS_REC_TOK_in_smt25Command1864_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1068
static  ANTLR3_BITSET_LIST FOLLOW_DEFINE_FUNS_REC_TOK_in_smt25Command1864	= { FOLLOW_DEFINE_FUNS_REC_TOK_in_smt25Command1864_bits, 2	};
1069
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_smt25Command1876  */
1070
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_smt25Command1876_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1071
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_smt25Command1876	= { FOLLOW_LPAREN_TOK_in_smt25Command1876_bits, 2	};
1072
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_smt25Command1884  */
1073
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_smt25Command1884_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1074
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_smt25Command1884	= { FOLLOW_LPAREN_TOK_in_smt25Command1884_bits, 2	};
1075
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_smt25Command1892  */
1076
static	ANTLR3_BITWORD FOLLOW_symbol_in_smt25Command1892_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1077
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_smt25Command1892	= { FOLLOW_symbol_in_smt25Command1892_bits, 2	};
1078
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_smt25Command1909  */
1079
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_smt25Command1909_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1080
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_smt25Command1909	= { FOLLOW_LPAREN_TOK_in_smt25Command1909_bits, 2	};
1081
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortedVarList_in_smt25Command1911  */
1082
static	ANTLR3_BITWORD FOLLOW_sortedVarList_in_smt25Command1911_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1083
static  ANTLR3_BITSET_LIST FOLLOW_sortedVarList_in_smt25Command1911	= { FOLLOW_sortedVarList_in_smt25Command1911_bits, 2	};
1084
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_smt25Command1914  */
1085
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_smt25Command1914_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1086
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_smt25Command1914	= { FOLLOW_RPAREN_TOK_in_smt25Command1914_bits, 2	};
1087
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_smt25Command1922  */
1088
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_smt25Command1922_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1089
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_smt25Command1922	= { FOLLOW_sortSymbol_in_smt25Command1922_bits, 2	};
1090
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_smt25Command1939  */
1091
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_smt25Command1939_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1092
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_smt25Command1939	= { FOLLOW_RPAREN_TOK_in_smt25Command1939_bits, 2	};
1093
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_smt25Command1952  */
1094
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_smt25Command1952_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1095
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_smt25Command1952	= { FOLLOW_RPAREN_TOK_in_smt25Command1952_bits, 2	};
1096
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_smt25Command1958  */
1097
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_smt25Command1958_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1098
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_smt25Command1958	= { FOLLOW_LPAREN_TOK_in_smt25Command1958_bits, 2	};
1099
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_smt25Command1976  */
1100
static	ANTLR3_BITWORD FOLLOW_term_in_smt25Command1976_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050904420) };
1101
static  ANTLR3_BITSET_LIST FOLLOW_term_in_smt25Command1976	= { FOLLOW_term_in_smt25Command1976_bits, 2	};
1102
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_smt25Command1996  */
1103
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_smt25Command1996_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1104
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_smt25Command1996	= { FOLLOW_RPAREN_TOK_in_smt25Command1996_bits, 1	};
1105
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_CODATATYPE_TOK_in_extendedCommand2027  */
1106
static	ANTLR3_BITWORD FOLLOW_DECLARE_CODATATYPE_TOK_in_extendedCommand2027_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1107
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_CODATATYPE_TOK_in_extendedCommand2027	= { FOLLOW_DECLARE_CODATATYPE_TOK_in_extendedCommand2027_bits, 2	};
1108
/** Bitset defining follow set for error recovery in rule state: FOLLOW_datatypeDefCommand_in_extendedCommand2029  */
1109
static	ANTLR3_BITWORD FOLLOW_datatypeDefCommand_in_extendedCommand2029_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1110
static  ANTLR3_BITSET_LIST FOLLOW_datatypeDefCommand_in_extendedCommand2029	= { FOLLOW_datatypeDefCommand_in_extendedCommand2029_bits, 1	};
1111
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_CODATATYPES_TOK_in_extendedCommand2036  */
1112
static	ANTLR3_BITWORD FOLLOW_DECLARE_CODATATYPES_TOK_in_extendedCommand2036_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1113
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_CODATATYPES_TOK_in_extendedCommand2036	= { FOLLOW_DECLARE_CODATATYPES_TOK_in_extendedCommand2036_bits, 2	};
1114
/** Bitset defining follow set for error recovery in rule state: FOLLOW_datatypesDefCommand_in_extendedCommand2038  */
1115
static	ANTLR3_BITWORD FOLLOW_datatypesDefCommand_in_extendedCommand2038_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1116
static  ANTLR3_BITSET_LIST FOLLOW_datatypesDefCommand_in_extendedCommand2038	= { FOLLOW_datatypesDefCommand_in_extendedCommand2038_bits, 1	};
1117
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_SORTS_TOK_in_extendedCommand2053  */
1118
static	ANTLR3_BITWORD FOLLOW_DECLARE_SORTS_TOK_in_extendedCommand2053_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1119
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_SORTS_TOK_in_extendedCommand2053	= { FOLLOW_DECLARE_SORTS_TOK_in_extendedCommand2053_bits, 2	};
1120
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2065  */
1121
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2065_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1122
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2065	= { FOLLOW_LPAREN_TOK_in_extendedCommand2065_bits, 2	};
1123
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2073  */
1124
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2073_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010900000) };
1125
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2073	= { FOLLOW_symbol_in_extendedCommand2073_bits, 2	};
1126
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2095  */
1127
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2095_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1128
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2095	= { FOLLOW_RPAREN_TOK_in_extendedCommand2095_bits, 1	};
1129
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_FUNS_TOK_in_extendedCommand2108  */
1130
static	ANTLR3_BITWORD FOLLOW_DECLARE_FUNS_TOK_in_extendedCommand2108_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1131
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_FUNS_TOK_in_extendedCommand2108	= { FOLLOW_DECLARE_FUNS_TOK_in_extendedCommand2108_bits, 2	};
1132
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2122  */
1133
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2122_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1134
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2122	= { FOLLOW_LPAREN_TOK_in_extendedCommand2122_bits, 2	};
1135
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2130  */
1136
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2130_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1137
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2130	= { FOLLOW_LPAREN_TOK_in_extendedCommand2130_bits, 2	};
1138
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2132  */
1139
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2132_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1140
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2132	= { FOLLOW_symbol_in_extendedCommand2132_bits, 2	};
1141
/** Bitset defining follow set for error recovery in rule state: FOLLOW_nonemptySortList_in_extendedCommand2149  */
1142
static	ANTLR3_BITWORD FOLLOW_nonemptySortList_in_extendedCommand2149_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1143
static  ANTLR3_BITSET_LIST FOLLOW_nonemptySortList_in_extendedCommand2149	= { FOLLOW_nonemptySortList_in_extendedCommand2149_bits, 2	};
1144
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2152  */
1145
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2152_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1146
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2152	= { FOLLOW_RPAREN_TOK_in_extendedCommand2152_bits, 2	};
1147
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2173  */
1148
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2173_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1149
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2173	= { FOLLOW_RPAREN_TOK_in_extendedCommand2173_bits, 1	};
1150
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_PREDS_TOK_in_extendedCommand2185  */
1151
static	ANTLR3_BITWORD FOLLOW_DECLARE_PREDS_TOK_in_extendedCommand2185_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1152
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_PREDS_TOK_in_extendedCommand2185	= { FOLLOW_DECLARE_PREDS_TOK_in_extendedCommand2185_bits, 2	};
1153
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2199  */
1154
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2199_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1155
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2199	= { FOLLOW_LPAREN_TOK_in_extendedCommand2199_bits, 2	};
1156
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2207  */
1157
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2207_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1158
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2207	= { FOLLOW_LPAREN_TOK_in_extendedCommand2207_bits, 2	};
1159
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2209  */
1160
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2209_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010904000) };
1161
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2209	= { FOLLOW_symbol_in_extendedCommand2209_bits, 2	};
1162
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortList_in_extendedCommand2226  */
1163
static	ANTLR3_BITWORD FOLLOW_sortList_in_extendedCommand2226_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1164
static  ANTLR3_BITSET_LIST FOLLOW_sortList_in_extendedCommand2226	= { FOLLOW_sortList_in_extendedCommand2226_bits, 2	};
1165
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2229  */
1166
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2229_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1167
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2229	= { FOLLOW_RPAREN_TOK_in_extendedCommand2229_bits, 2	};
1168
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2250  */
1169
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2250_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1170
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2250	= { FOLLOW_RPAREN_TOK_in_extendedCommand2250_bits, 1	};
1171
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DEFINE_TOK_in_extendedCommand2263  */
1172
static	ANTLR3_BITWORD FOLLOW_DEFINE_TOK_in_extendedCommand2263_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1173
static  ANTLR3_BITSET_LIST FOLLOW_DEFINE_TOK_in_extendedCommand2263	= { FOLLOW_DEFINE_TOK_in_extendedCommand2263_bits, 2	};
1174
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2280  */
1175
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2280_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1176
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2280	= { FOLLOW_symbol_in_extendedCommand2280_bits, 2	};
1177
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2297  */
1178
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2297_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1179
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2297	= { FOLLOW_term_in_extendedCommand2297_bits, 1	};
1180
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2321  */
1181
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2321_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1182
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2321	= { FOLLOW_LPAREN_TOK_in_extendedCommand2321_bits, 2	};
1183
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2329  */
1184
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2329_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1185
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2329	= { FOLLOW_symbol_in_extendedCommand2329_bits, 2	};
1186
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortedVarList_in_extendedCommand2346  */
1187
static	ANTLR3_BITWORD FOLLOW_sortedVarList_in_extendedCommand2346_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1188
static  ANTLR3_BITSET_LIST FOLLOW_sortedVarList_in_extendedCommand2346	= { FOLLOW_sortedVarList_in_extendedCommand2346_bits, 2	};
1189
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2349  */
1190
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2349_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1191
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2349	= { FOLLOW_RPAREN_TOK_in_extendedCommand2349_bits, 2	};
1192
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2365  */
1193
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2365_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1194
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2365	= { FOLLOW_term_in_extendedCommand2365_bits, 1	};
1195
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DEFINE_CONST_TOK_in_extendedCommand2391  */
1196
static	ANTLR3_BITWORD FOLLOW_DEFINE_CONST_TOK_in_extendedCommand2391_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1197
static  ANTLR3_BITSET_LIST FOLLOW_DEFINE_CONST_TOK_in_extendedCommand2391	= { FOLLOW_DEFINE_CONST_TOK_in_extendedCommand2391_bits, 2	};
1198
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2399  */
1199
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2399_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1200
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2399	= { FOLLOW_symbol_in_extendedCommand2399_bits, 2	};
1201
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_extendedCommand2412  */
1202
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_extendedCommand2412_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1203
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_extendedCommand2412	= { FOLLOW_sortSymbol_in_extendedCommand2412_bits, 2	};
1204
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2419  */
1205
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2419_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1206
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2419	= { FOLLOW_term_in_extendedCommand2419_bits, 1	};
1207
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SIMPLIFY_TOK_in_extendedCommand2433  */
1208
static	ANTLR3_BITWORD FOLLOW_SIMPLIFY_TOK_in_extendedCommand2433_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1209
static  ANTLR3_BITSET_LIST FOLLOW_SIMPLIFY_TOK_in_extendedCommand2433	= { FOLLOW_SIMPLIFY_TOK_in_extendedCommand2433_bits, 2	};
1210
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2441  */
1211
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2441_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1212
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2441	= { FOLLOW_term_in_extendedCommand2441_bits, 1	};
1213
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_QE_TOK_in_extendedCommand2454  */
1214
static	ANTLR3_BITWORD FOLLOW_GET_QE_TOK_in_extendedCommand2454_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1215
static  ANTLR3_BITSET_LIST FOLLOW_GET_QE_TOK_in_extendedCommand2454	= { FOLLOW_GET_QE_TOK_in_extendedCommand2454_bits, 2	};
1216
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2462  */
1217
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2462_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1218
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2462	= { FOLLOW_term_in_extendedCommand2462_bits, 1	};
1219
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_QE_DISJUNCT_TOK_in_extendedCommand2475  */
1220
static	ANTLR3_BITWORD FOLLOW_GET_QE_DISJUNCT_TOK_in_extendedCommand2475_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1221
static  ANTLR3_BITSET_LIST FOLLOW_GET_QE_DISJUNCT_TOK_in_extendedCommand2475	= { FOLLOW_GET_QE_DISJUNCT_TOK_in_extendedCommand2475_bits, 2	};
1222
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2483  */
1223
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2483_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1224
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2483	= { FOLLOW_term_in_extendedCommand2483_bits, 1	};
1225
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_ABDUCT_TOK_in_extendedCommand2496  */
1226
static	ANTLR3_BITWORD FOLLOW_GET_ABDUCT_TOK_in_extendedCommand2496_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1227
static  ANTLR3_BITSET_LIST FOLLOW_GET_ABDUCT_TOK_in_extendedCommand2496	= { FOLLOW_GET_ABDUCT_TOK_in_extendedCommand2496_bits, 2	};
1228
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2504  */
1229
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2504_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1230
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2504	= { FOLLOW_symbol_in_extendedCommand2504_bits, 2	};
1231
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2511  */
1232
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2511_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) };
1233
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2511	= { FOLLOW_term_in_extendedCommand2511_bits, 2	};
1234
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sygusGrammar_in_extendedCommand2526  */
1235
static	ANTLR3_BITWORD FOLLOW_sygusGrammar_in_extendedCommand2526_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1236
static  ANTLR3_BITSET_LIST FOLLOW_sygusGrammar_in_extendedCommand2526	= { FOLLOW_sygusGrammar_in_extendedCommand2526_bits, 1	};
1237
/** Bitset defining follow set for error recovery in rule state: FOLLOW_GET_INTERPOL_TOK_in_extendedCommand2546  */
1238
static	ANTLR3_BITWORD FOLLOW_GET_INTERPOL_TOK_in_extendedCommand2546_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1239
static  ANTLR3_BITSET_LIST FOLLOW_GET_INTERPOL_TOK_in_extendedCommand2546	= { FOLLOW_GET_INTERPOL_TOK_in_extendedCommand2546_bits, 2	};
1240
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2554  */
1241
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2554_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1242
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2554	= { FOLLOW_symbol_in_extendedCommand2554_bits, 2	};
1243
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2561  */
1244
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2561_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) };
1245
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2561	= { FOLLOW_term_in_extendedCommand2561_bits, 2	};
1246
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sygusGrammar_in_extendedCommand2576  */
1247
static	ANTLR3_BITWORD FOLLOW_sygusGrammar_in_extendedCommand2576_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1248
static  ANTLR3_BITSET_LIST FOLLOW_sygusGrammar_in_extendedCommand2576	= { FOLLOW_sygusGrammar_in_extendedCommand2576_bits, 1	};
1249
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_HEAP_in_extendedCommand2596  */
1250
static	ANTLR3_BITWORD FOLLOW_DECLARE_HEAP_in_extendedCommand2596_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1251
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_HEAP_in_extendedCommand2596	= { FOLLOW_DECLARE_HEAP_in_extendedCommand2596_bits, 2	};
1252
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2598  */
1253
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2598_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1254
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2598	= { FOLLOW_LPAREN_TOK_in_extendedCommand2598_bits, 2	};
1255
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_extendedCommand2604  */
1256
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_extendedCommand2604_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1257
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_extendedCommand2604	= { FOLLOW_sortSymbol_in_extendedCommand2604_bits, 2	};
1258
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_extendedCommand2611  */
1259
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_extendedCommand2611_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1260
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_extendedCommand2611	= { FOLLOW_sortSymbol_in_extendedCommand2611_bits, 2	};
1261
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2624  */
1262
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2624_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1263
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2624	= { FOLLOW_RPAREN_TOK_in_extendedCommand2624_bits, 1	};
1264
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECLARE_POOL_in_extendedCommand2630  */
1265
static	ANTLR3_BITWORD FOLLOW_DECLARE_POOL_in_extendedCommand2630_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1266
static  ANTLR3_BITSET_LIST FOLLOW_DECLARE_POOL_in_extendedCommand2630	= { FOLLOW_DECLARE_POOL_in_extendedCommand2630_bits, 2	};
1267
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_extendedCommand2638  */
1268
static	ANTLR3_BITWORD FOLLOW_symbol_in_extendedCommand2638_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1269
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_extendedCommand2638	= { FOLLOW_symbol_in_extendedCommand2638_bits, 2	};
1270
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_extendedCommand2651  */
1271
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_extendedCommand2651_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1272
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_extendedCommand2651	= { FOLLOW_sortSymbol_in_extendedCommand2651_bits, 2	};
1273
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2658  */
1274
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2658_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050904420) };
1275
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2658	= { FOLLOW_LPAREN_TOK_in_extendedCommand2658_bits, 2	};
1276
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_extendedCommand2666  */
1277
static	ANTLR3_BITWORD FOLLOW_term_in_extendedCommand2666_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050904420) };
1278
static  ANTLR3_BITSET_LIST FOLLOW_term_in_extendedCommand2666	= { FOLLOW_term_in_extendedCommand2666_bits, 2	};
1279
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2684  */
1280
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2684_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1281
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2684	= { FOLLOW_RPAREN_TOK_in_extendedCommand2684_bits, 1	};
1282
/** Bitset defining follow set for error recovery in rule state: FOLLOW_BLOCK_MODEL_TOK_in_extendedCommand2696  */
1283
static	ANTLR3_BITWORD FOLLOW_BLOCK_MODEL_TOK_in_extendedCommand2696_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1284
static  ANTLR3_BITSET_LIST FOLLOW_BLOCK_MODEL_TOK_in_extendedCommand2696	= { FOLLOW_BLOCK_MODEL_TOK_in_extendedCommand2696_bits, 1	};
1285
/** Bitset defining follow set for error recovery in rule state: FOLLOW_BLOCK_MODEL_VALUES_TOK_in_extendedCommand2711  */
1286
static	ANTLR3_BITWORD FOLLOW_BLOCK_MODEL_VALUES_TOK_in_extendedCommand2711_bits[]	= { ANTLR3_UINT64_LIT(0xFFFFFFFFFFFFFFF0), ANTLR3_UINT64_LIT(0x00001FFFFFFFFFFF) };
1287
static  ANTLR3_BITSET_LIST FOLLOW_BLOCK_MODEL_VALUES_TOK_in_extendedCommand2711	= { FOLLOW_BLOCK_MODEL_VALUES_TOK_in_extendedCommand2711_bits, 2	};
1288
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_extendedCommand2721  */
1289
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_extendedCommand2721_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1290
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_extendedCommand2721	= { FOLLOW_LPAREN_TOK_in_extendedCommand2721_bits, 2	};
1291
/** Bitset defining follow set for error recovery in rule state: FOLLOW_termList_in_extendedCommand2723  */
1292
static	ANTLR3_BITWORD FOLLOW_termList_in_extendedCommand2723_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1293
static  ANTLR3_BITSET_LIST FOLLOW_termList_in_extendedCommand2723	= { FOLLOW_termList_in_extendedCommand2723_bits, 2	};
1294
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_extendedCommand2726  */
1295
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_extendedCommand2726_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1296
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_extendedCommand2726	= { FOLLOW_RPAREN_TOK_in_extendedCommand2726_bits, 1	};
1297
/** Bitset defining follow set for error recovery in rule state: FOLLOW_set_in_extendedCommand2742  */
1298
static	ANTLR3_BITWORD FOLLOW_set_in_extendedCommand2742_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1299
static  ANTLR3_BITSET_LIST FOLLOW_set_in_extendedCommand2742	= { FOLLOW_set_in_extendedCommand2742_bits, 1	};
1300
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_datatypeDefCommand2778  */
1301
static	ANTLR3_BITWORD FOLLOW_symbol_in_datatypeDefCommand2778_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1302
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_datatypeDefCommand2778	= { FOLLOW_symbol_in_datatypeDefCommand2778_bits, 2	};
1303
/** Bitset defining follow set for error recovery in rule state: FOLLOW_datatypesDef_in_datatypeDefCommand2785  */
1304
static	ANTLR3_BITWORD FOLLOW_datatypesDef_in_datatypeDefCommand2785_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1305
static  ANTLR3_BITSET_LIST FOLLOW_datatypesDef_in_datatypeDefCommand2785	= { FOLLOW_datatypesDef_in_datatypeDefCommand2785_bits, 1	};
1306
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypesDefCommand2808  */
1307
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypesDefCommand2808_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1308
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypesDefCommand2808	= { FOLLOW_LPAREN_TOK_in_datatypesDefCommand2808_bits, 2	};
1309
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypesDefCommand2816  */
1310
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypesDefCommand2816_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1311
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypesDefCommand2816	= { FOLLOW_LPAREN_TOK_in_datatypesDefCommand2816_bits, 2	};
1312
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_datatypesDefCommand2818  */
1313
static	ANTLR3_BITWORD FOLLOW_symbol_in_datatypesDefCommand2818_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) };
1314
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_datatypesDefCommand2818	= { FOLLOW_symbol_in_datatypesDefCommand2818_bits, 2	};
1315
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_datatypesDefCommand2823  */
1316
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_datatypesDefCommand2823_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1317
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_datatypesDefCommand2823	= { FOLLOW_INTEGER_LITERAL_in_datatypesDefCommand2823_bits, 2	};
1318
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypesDefCommand2825  */
1319
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypesDefCommand2825_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1320
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypesDefCommand2825	= { FOLLOW_RPAREN_TOK_in_datatypesDefCommand2825_bits, 2	};
1321
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypesDefCommand2840  */
1322
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypesDefCommand2840_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1323
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypesDefCommand2840	= { FOLLOW_RPAREN_TOK_in_datatypesDefCommand2840_bits, 2	};
1324
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypesDefCommand2844  */
1325
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypesDefCommand2844_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1326
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypesDefCommand2844	= { FOLLOW_LPAREN_TOK_in_datatypesDefCommand2844_bits, 2	};
1327
/** Bitset defining follow set for error recovery in rule state: FOLLOW_datatypesDef_in_datatypesDefCommand2848  */
1328
static	ANTLR3_BITWORD FOLLOW_datatypesDef_in_datatypesDefCommand2848_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1329
static  ANTLR3_BITSET_LIST FOLLOW_datatypesDef_in_datatypesDefCommand2848	= { FOLLOW_datatypesDef_in_datatypesDefCommand2848_bits, 2	};
1330
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypesDefCommand2853  */
1331
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypesDefCommand2853_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1332
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypesDefCommand2853	= { FOLLOW_RPAREN_TOK_in_datatypesDefCommand2853_bits, 1	};
1333
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypesDef2882  */
1334
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypesDef2882_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000024000) };
1335
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypesDef2882	= { FOLLOW_LPAREN_TOK_in_datatypesDef2882_bits, 2	};
1336
/** Bitset defining follow set for error recovery in rule state: FOLLOW_PAR_TOK_in_datatypesDef2892  */
1337
static	ANTLR3_BITWORD FOLLOW_PAR_TOK_in_datatypesDef2892_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1338
static  ANTLR3_BITSET_LIST FOLLOW_PAR_TOK_in_datatypesDef2892	= { FOLLOW_PAR_TOK_in_datatypesDef2892_bits, 2	};
1339
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypesDef2896  */
1340
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypesDef2896_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010900000) };
1341
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypesDef2896	= { FOLLOW_LPAREN_TOK_in_datatypesDef2896_bits, 2	};
1342
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_datatypesDef2906  */
1343
static	ANTLR3_BITWORD FOLLOW_symbol_in_datatypesDef2906_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010900000) };
1344
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_datatypesDef2906	= { FOLLOW_symbol_in_datatypesDef2906_bits, 2	};
1345
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypesDef2934  */
1346
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypesDef2934_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1347
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypesDef2934	= { FOLLOW_RPAREN_TOK_in_datatypesDef2934_bits, 2	};
1348
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypesDef2944  */
1349
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypesDef2944_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1350
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypesDef2944	= { FOLLOW_LPAREN_TOK_in_datatypesDef2944_bits, 2	};
1351
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypesDef2954  */
1352
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypesDef2954_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1353
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypesDef2954	= { FOLLOW_LPAREN_TOK_in_datatypesDef2954_bits, 2	};
1354
/** Bitset defining follow set for error recovery in rule state: FOLLOW_constructorDef_in_datatypesDef2956  */
1355
static	ANTLR3_BITWORD FOLLOW_constructorDef_in_datatypesDef2956_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1356
static  ANTLR3_BITSET_LIST FOLLOW_constructorDef_in_datatypesDef2956	= { FOLLOW_constructorDef_in_datatypesDef2956_bits, 2	};
1357
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypesDef2959  */
1358
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypesDef2959_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1359
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypesDef2959	= { FOLLOW_RPAREN_TOK_in_datatypesDef2959_bits, 2	};
1360
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypesDef2970  */
1361
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypesDef2970_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1362
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypesDef2970	= { FOLLOW_RPAREN_TOK_in_datatypesDef2970_bits, 2	};
1363
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypesDef2990  */
1364
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypesDef2990_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1365
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypesDef2990	= { FOLLOW_LPAREN_TOK_in_datatypesDef2990_bits, 2	};
1366
/** Bitset defining follow set for error recovery in rule state: FOLLOW_constructorDef_in_datatypesDef2992  */
1367
static	ANTLR3_BITWORD FOLLOW_constructorDef_in_datatypesDef2992_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1368
static  ANTLR3_BITSET_LIST FOLLOW_constructorDef_in_datatypesDef2992	= { FOLLOW_constructorDef_in_datatypesDef2992_bits, 2	};
1369
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypesDef2995  */
1370
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypesDef2995_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1371
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypesDef2995	= { FOLLOW_RPAREN_TOK_in_datatypesDef2995_bits, 2	};
1372
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypesDef3010  */
1373
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypesDef3010_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) };
1374
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypesDef3010	= { FOLLOW_RPAREN_TOK_in_datatypesDef3010_bits, 2	};
1375
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_simpleSymbolicExprNoKeyword3035  */
1376
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_simpleSymbolicExprNoKeyword3035_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1377
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_simpleSymbolicExprNoKeyword3035	= { FOLLOW_INTEGER_LITERAL_in_simpleSymbolicExprNoKeyword3035_bits, 1	};
1378
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECIMAL_LITERAL_in_simpleSymbolicExprNoKeyword3047  */
1379
static	ANTLR3_BITWORD FOLLOW_DECIMAL_LITERAL_in_simpleSymbolicExprNoKeyword3047_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1380
static  ANTLR3_BITSET_LIST FOLLOW_DECIMAL_LITERAL_in_simpleSymbolicExprNoKeyword3047	= { FOLLOW_DECIMAL_LITERAL_in_simpleSymbolicExprNoKeyword3047_bits, 1	};
1381
/** Bitset defining follow set for error recovery in rule state: FOLLOW_HEX_LITERAL_in_simpleSymbolicExprNoKeyword3059  */
1382
static	ANTLR3_BITWORD FOLLOW_HEX_LITERAL_in_simpleSymbolicExprNoKeyword3059_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1383
static  ANTLR3_BITSET_LIST FOLLOW_HEX_LITERAL_in_simpleSymbolicExprNoKeyword3059	= { FOLLOW_HEX_LITERAL_in_simpleSymbolicExprNoKeyword3059_bits, 1	};
1384
/** Bitset defining follow set for error recovery in rule state: FOLLOW_BINARY_LITERAL_in_simpleSymbolicExprNoKeyword3071  */
1385
static	ANTLR3_BITWORD FOLLOW_BINARY_LITERAL_in_simpleSymbolicExprNoKeyword3071_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1386
static  ANTLR3_BITSET_LIST FOLLOW_BINARY_LITERAL_in_simpleSymbolicExprNoKeyword3071	= { FOLLOW_BINARY_LITERAL_in_simpleSymbolicExprNoKeyword3071_bits, 1	};
1387
/** Bitset defining follow set for error recovery in rule state: FOLLOW_str_in_simpleSymbolicExprNoKeyword3083  */
1388
static	ANTLR3_BITWORD FOLLOW_str_in_simpleSymbolicExprNoKeyword3083_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1389
static  ANTLR3_BITSET_LIST FOLLOW_str_in_simpleSymbolicExprNoKeyword3083	= { FOLLOW_str_in_simpleSymbolicExprNoKeyword3083_bits, 1	};
1390
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_simpleSymbolicExprNoKeyword3090  */
1391
static	ANTLR3_BITWORD FOLLOW_symbol_in_simpleSymbolicExprNoKeyword3090_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1392
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_simpleSymbolicExprNoKeyword3090	= { FOLLOW_symbol_in_simpleSymbolicExprNoKeyword3090_bits, 1	};
1393
/** Bitset defining follow set for error recovery in rule state: FOLLOW_set_in_simpleSymbolicExprNoKeyword3099  */
1394
static	ANTLR3_BITWORD FOLLOW_set_in_simpleSymbolicExprNoKeyword3099_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1395
static  ANTLR3_BITSET_LIST FOLLOW_set_in_simpleSymbolicExprNoKeyword3099	= { FOLLOW_set_in_simpleSymbolicExprNoKeyword3099_bits, 1	};
1396
/** Bitset defining follow set for error recovery in rule state: FOLLOW_KEYWORD_in_keyword3297  */
1397
static	ANTLR3_BITWORD FOLLOW_KEYWORD_in_keyword3297_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1398
static  ANTLR3_BITSET_LIST FOLLOW_KEYWORD_in_keyword3297	= { FOLLOW_KEYWORD_in_keyword3297_bits, 1	};
1399
/** Bitset defining follow set for error recovery in rule state: FOLLOW_simpleSymbolicExprNoKeyword_in_simpleSymbolicExpr3317  */
1400
static	ANTLR3_BITWORD FOLLOW_simpleSymbolicExprNoKeyword_in_simpleSymbolicExpr3317_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1401
static  ANTLR3_BITSET_LIST FOLLOW_simpleSymbolicExprNoKeyword_in_simpleSymbolicExpr3317	= { FOLLOW_simpleSymbolicExprNoKeyword_in_simpleSymbolicExpr3317_bits, 1	};
1402
/** Bitset defining follow set for error recovery in rule state: FOLLOW_KEYWORD_in_simpleSymbolicExpr3324  */
1403
static	ANTLR3_BITWORD FOLLOW_KEYWORD_in_simpleSymbolicExpr3324_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1404
static  ANTLR3_BITSET_LIST FOLLOW_KEYWORD_in_simpleSymbolicExpr3324	= { FOLLOW_KEYWORD_in_simpleSymbolicExpr3324_bits, 1	};
1405
/** Bitset defining follow set for error recovery in rule state: FOLLOW_simpleSymbolicExpr_in_symbolicExpr3345  */
1406
static	ANTLR3_BITWORD FOLLOW_simpleSymbolicExpr_in_symbolicExpr3345_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1407
static  ANTLR3_BITSET_LIST FOLLOW_simpleSymbolicExpr_in_symbolicExpr3345	= { FOLLOW_simpleSymbolicExpr_in_symbolicExpr3345_bits, 1	};
1408
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_symbolicExpr3358  */
1409
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_symbolicExpr3358_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310020), ANTLR3_UINT64_LIT(0x000002007EFC542E) };
1410
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_symbolicExpr3358	= { FOLLOW_LPAREN_TOK_in_symbolicExpr3358_bits, 2	};
1411
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbolicExpr_in_symbolicExpr3366  */
1412
static	ANTLR3_BITWORD FOLLOW_symbolicExpr_in_symbolicExpr3366_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310020), ANTLR3_UINT64_LIT(0x000002007EFC542E) };
1413
static  ANTLR3_BITSET_LIST FOLLOW_symbolicExpr_in_symbolicExpr3366	= { FOLLOW_symbolicExpr_in_symbolicExpr3366_bits, 2	};
1414
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_symbolicExpr3374  */
1415
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_symbolicExpr3374_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1416
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_symbolicExpr3374	= { FOLLOW_RPAREN_TOK_in_symbolicExpr3374_bits, 1	};
1417
/** Bitset defining follow set for error recovery in rule state: FOLLOW_termNonVariable_in_term3399  */
1418
static	ANTLR3_BITWORD FOLLOW_termNonVariable_in_term3399_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1419
static  ANTLR3_BITSET_LIST FOLLOW_termNonVariable_in_term3399	= { FOLLOW_termNonVariable_in_term3399_bits, 1	};
1420
/** Bitset defining follow set for error recovery in rule state: FOLLOW_qualIdentifier_in_term3411  */
1421
static	ANTLR3_BITWORD FOLLOW_qualIdentifier_in_term3411_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1422
static  ANTLR3_BITSET_LIST FOLLOW_qualIdentifier_in_term3411	= { FOLLOW_qualIdentifier_in_term3411_bits, 1	};
1423
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3439  */
1424
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3439_bits[]	= { ANTLR3_UINT64_LIT(0x0050000000000000) };
1425
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3439	= { FOLLOW_LPAREN_TOK_in_termNonVariable3439_bits, 1	};
1426
/** Bitset defining follow set for error recovery in rule state: FOLLOW_quantOp_in_termNonVariable3441  */
1427
static	ANTLR3_BITWORD FOLLOW_quantOp_in_termNonVariable3441_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1428
static  ANTLR3_BITSET_LIST FOLLOW_quantOp_in_termNonVariable3441	= { FOLLOW_quantOp_in_termNonVariable3441_bits, 2	};
1429
/** Bitset defining follow set for error recovery in rule state: FOLLOW_boundVarList_in_termNonVariable3454  */
1430
static	ANTLR3_BITWORD FOLLOW_boundVarList_in_termNonVariable3454_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1431
static  ANTLR3_BITSET_LIST FOLLOW_boundVarList_in_termNonVariable3454	= { FOLLOW_boundVarList_in_termNonVariable3454_bits, 2	};
1432
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3461  */
1433
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3461_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1434
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3461	= { FOLLOW_term_in_termNonVariable3461_bits, 2	};
1435
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3464  */
1436
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3464_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1437
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3464	= { FOLLOW_RPAREN_TOK_in_termNonVariable3464_bits, 1	};
1438
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3476  */
1439
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3476_bits[]	= { ANTLR3_UINT64_LIT(0x0000000001000000) };
1440
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3476	= { FOLLOW_LPAREN_TOK_in_termNonVariable3476_bits, 1	};
1441
/** Bitset defining follow set for error recovery in rule state: FOLLOW_COMPREHENSION_TOK_in_termNonVariable3478  */
1442
static	ANTLR3_BITWORD FOLLOW_COMPREHENSION_TOK_in_termNonVariable3478_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1443
static  ANTLR3_BITSET_LIST FOLLOW_COMPREHENSION_TOK_in_termNonVariable3478	= { FOLLOW_COMPREHENSION_TOK_in_termNonVariable3478_bits, 2	};
1444
/** Bitset defining follow set for error recovery in rule state: FOLLOW_boundVarList_in_termNonVariable3490  */
1445
static	ANTLR3_BITWORD FOLLOW_boundVarList_in_termNonVariable3490_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1446
static  ANTLR3_BITSET_LIST FOLLOW_boundVarList_in_termNonVariable3490	= { FOLLOW_boundVarList_in_termNonVariable3490_bits, 2	};
1447
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3503  */
1448
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3503_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1449
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3503	= { FOLLOW_term_in_termNonVariable3503_bits, 2	};
1450
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3512  */
1451
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3512_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1452
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3512	= { FOLLOW_term_in_termNonVariable3512_bits, 2	};
1453
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3521  */
1454
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3521_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1455
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3521	= { FOLLOW_RPAREN_TOK_in_termNonVariable3521_bits, 1	};
1456
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3527  */
1457
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3527_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1458
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3527	= { FOLLOW_LPAREN_TOK_in_termNonVariable3527_bits, 2	};
1459
/** Bitset defining follow set for error recovery in rule state: FOLLOW_qualIdentifier_in_termNonVariable3529  */
1460
static	ANTLR3_BITWORD FOLLOW_qualIdentifier_in_termNonVariable3529_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1461
static  ANTLR3_BITSET_LIST FOLLOW_qualIdentifier_in_termNonVariable3529	= { FOLLOW_qualIdentifier_in_termNonVariable3529_bits, 2	};
1462
/** Bitset defining follow set for error recovery in rule state: FOLLOW_termList_in_termNonVariable3536  */
1463
static	ANTLR3_BITWORD FOLLOW_termList_in_termNonVariable3536_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1464
static  ANTLR3_BITSET_LIST FOLLOW_termList_in_termNonVariable3536	= { FOLLOW_termList_in_termNonVariable3536_bits, 2	};
1465
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3539  */
1466
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3539_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1467
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3539	= { FOLLOW_RPAREN_TOK_in_termNonVariable3539_bits, 1	};
1468
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3557  */
1469
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3557_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000002000) };
1470
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3557	= { FOLLOW_LPAREN_TOK_in_termNonVariable3557_bits, 2	};
1471
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LET_TOK_in_termNonVariable3566  */
1472
static	ANTLR3_BITWORD FOLLOW_LET_TOK_in_termNonVariable3566_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1473
static  ANTLR3_BITSET_LIST FOLLOW_LET_TOK_in_termNonVariable3566	= { FOLLOW_LET_TOK_in_termNonVariable3566_bits, 2	};
1474
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3568  */
1475
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3568_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1476
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3568	= { FOLLOW_LPAREN_TOK_in_termNonVariable3568_bits, 2	};
1477
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3586  */
1478
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3586_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1479
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3586	= { FOLLOW_LPAREN_TOK_in_termNonVariable3586_bits, 2	};
1480
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_termNonVariable3588  */
1481
static	ANTLR3_BITWORD FOLLOW_symbol_in_termNonVariable3588_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1482
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_termNonVariable3588	= { FOLLOW_symbol_in_termNonVariable3588_bits, 2	};
1483
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3599  */
1484
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3599_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1485
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3599	= { FOLLOW_term_in_termNonVariable3599_bits, 2	};
1486
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3610  */
1487
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3610_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1488
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3610	= { FOLLOW_RPAREN_TOK_in_termNonVariable3610_bits, 2	};
1489
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3653  */
1490
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3653_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1491
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3653	= { FOLLOW_RPAREN_TOK_in_termNonVariable3653_bits, 2	};
1492
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3659  */
1493
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3659_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1494
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3659	= { FOLLOW_term_in_termNonVariable3659_bits, 2	};
1495
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3666  */
1496
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3666_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1497
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3666	= { FOLLOW_RPAREN_TOK_in_termNonVariable3666_bits, 1	};
1498
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3684  */
1499
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3684_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000008000) };
1500
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3684	= { FOLLOW_LPAREN_TOK_in_termNonVariable3684_bits, 2	};
1501
/** Bitset defining follow set for error recovery in rule state: FOLLOW_MATCH_TOK_in_termNonVariable3686  */
1502
static	ANTLR3_BITWORD FOLLOW_MATCH_TOK_in_termNonVariable3686_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1503
static  ANTLR3_BITSET_LIST FOLLOW_MATCH_TOK_in_termNonVariable3686	= { FOLLOW_MATCH_TOK_in_termNonVariable3686_bits, 2	};
1504
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3688  */
1505
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3688_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1506
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3688	= { FOLLOW_term_in_termNonVariable3688_bits, 2	};
1507
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3697  */
1508
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3697_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1509
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3697	= { FOLLOW_LPAREN_TOK_in_termNonVariable3697_bits, 2	};
1510
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3718  */
1511
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3718_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1512
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3718	= { FOLLOW_LPAREN_TOK_in_termNonVariable3718_bits, 2	};
1513
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3720  */
1514
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3720_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1515
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3720	= { FOLLOW_LPAREN_TOK_in_termNonVariable3720_bits, 2	};
1516
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3722  */
1517
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3722_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010900000) };
1518
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3722	= { FOLLOW_term_in_termNonVariable3722_bits, 2	};
1519
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_termNonVariable3746  */
1520
static	ANTLR3_BITWORD FOLLOW_symbol_in_termNonVariable3746_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010900000) };
1521
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_termNonVariable3746	= { FOLLOW_symbol_in_termNonVariable3746_bits, 2	};
1522
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3770  */
1523
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3770_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1524
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3770	= { FOLLOW_RPAREN_TOK_in_termNonVariable3770_bits, 2	};
1525
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3772  */
1526
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3772_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1527
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3772	= { FOLLOW_term_in_termNonVariable3772_bits, 2	};
1528
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3785  */
1529
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3785_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1530
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3785	= { FOLLOW_RPAREN_TOK_in_termNonVariable3785_bits, 2	};
1531
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3802  */
1532
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3802_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1533
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3802	= { FOLLOW_LPAREN_TOK_in_termNonVariable3802_bits, 2	};
1534
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_termNonVariable3804  */
1535
static	ANTLR3_BITWORD FOLLOW_symbol_in_termNonVariable3804_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1536
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_termNonVariable3804	= { FOLLOW_symbol_in_termNonVariable3804_bits, 2	};
1537
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3817  */
1538
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3817_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1539
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3817	= { FOLLOW_term_in_termNonVariable3817_bits, 2	};
1540
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3830  */
1541
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3830_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1542
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3830	= { FOLLOW_RPAREN_TOK_in_termNonVariable3830_bits, 2	};
1543
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3843  */
1544
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3843_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1545
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3843	= { FOLLOW_RPAREN_TOK_in_termNonVariable3843_bits, 2	};
1546
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3845  */
1547
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3845_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1548
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3845	= { FOLLOW_RPAREN_TOK_in_termNonVariable3845_bits, 1	};
1549
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3861  */
1550
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3861_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000008000) };
1551
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3861	= { FOLLOW_LPAREN_TOK_in_termNonVariable3861_bits, 1	};
1552
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_TOK_in_termNonVariable3863  */
1553
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_TOK_in_termNonVariable3863_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1554
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_TOK_in_termNonVariable3863	= { FOLLOW_ATTRIBUTE_TOK_in_termNonVariable3863_bits, 2	};
1555
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3865  */
1556
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3865_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000007F80), ANTLR3_UINT64_LIT(0x0000000000001000) };
1557
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3865	= { FOLLOW_term_in_termNonVariable3865_bits, 2	};
1558
/** Bitset defining follow set for error recovery in rule state: FOLLOW_attribute_in_termNonVariable3874  */
1559
static	ANTLR3_BITWORD FOLLOW_attribute_in_termNonVariable3874_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000007F80), ANTLR3_UINT64_LIT(0x0000000000801000) };
1560
static  ANTLR3_BITSET_LIST FOLLOW_attribute_in_termNonVariable3874	= { FOLLOW_attribute_in_termNonVariable3874_bits, 2	};
1561
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3892  */
1562
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3892_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1563
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3892	= { FOLLOW_RPAREN_TOK_in_termNonVariable3892_bits, 1	};
1564
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3910  */
1565
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3910_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000080) };
1566
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3910	= { FOLLOW_LPAREN_TOK_in_termNonVariable3910_bits, 2	};
1567
/** Bitset defining follow set for error recovery in rule state: FOLLOW_HO_LAMBDA_TOK_in_termNonVariable3912  */
1568
static	ANTLR3_BITWORD FOLLOW_HO_LAMBDA_TOK_in_termNonVariable3912_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1569
static  ANTLR3_BITSET_LIST FOLLOW_HO_LAMBDA_TOK_in_termNonVariable3912	= { FOLLOW_HO_LAMBDA_TOK_in_termNonVariable3912_bits, 2	};
1570
/** Bitset defining follow set for error recovery in rule state: FOLLOW_boundVarList_in_termNonVariable3924  */
1571
static	ANTLR3_BITWORD FOLLOW_boundVarList_in_termNonVariable3924_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1572
static  ANTLR3_BITSET_LIST FOLLOW_boundVarList_in_termNonVariable3924	= { FOLLOW_boundVarList_in_termNonVariable3924_bits, 2	};
1573
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3931  */
1574
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3931_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1575
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3931	= { FOLLOW_term_in_termNonVariable3931_bits, 2	};
1576
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3934  */
1577
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3934_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1578
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3934	= { FOLLOW_RPAREN_TOK_in_termNonVariable3934_bits, 1	};
1579
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3946  */
1580
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3946_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000004000000000) };
1581
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3946	= { FOLLOW_LPAREN_TOK_in_termNonVariable3946_bits, 2	};
1582
/** Bitset defining follow set for error recovery in rule state: FOLLOW_TUPLE_CONST_TOK_in_termNonVariable3948  */
1583
static	ANTLR3_BITWORD FOLLOW_TUPLE_CONST_TOK_in_termNonVariable3948_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1584
static  ANTLR3_BITSET_LIST FOLLOW_TUPLE_CONST_TOK_in_termNonVariable3948	= { FOLLOW_TUPLE_CONST_TOK_in_termNonVariable3948_bits, 2	};
1585
/** Bitset defining follow set for error recovery in rule state: FOLLOW_termList_in_termNonVariable3950  */
1586
static	ANTLR3_BITWORD FOLLOW_termList_in_termNonVariable3950_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1587
static  ANTLR3_BITSET_LIST FOLLOW_termList_in_termNonVariable3950	= { FOLLOW_termList_in_termNonVariable3950_bits, 2	};
1588
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3953  */
1589
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3953_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1590
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3953	= { FOLLOW_RPAREN_TOK_in_termNonVariable3953_bits, 1	};
1591
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termNonVariable3963  */
1592
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termNonVariable3963_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000008000000000) };
1593
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termNonVariable3963	= { FOLLOW_LPAREN_TOK_in_termNonVariable3963_bits, 2	};
1594
/** Bitset defining follow set for error recovery in rule state: FOLLOW_TUPLE_PROJECT_TOK_in_termNonVariable3965  */
1595
static	ANTLR3_BITWORD FOLLOW_TUPLE_PROJECT_TOK_in_termNonVariable3965_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1596
static  ANTLR3_BITSET_LIST FOLLOW_TUPLE_PROJECT_TOK_in_termNonVariable3965	= { FOLLOW_TUPLE_PROJECT_TOK_in_termNonVariable3965_bits, 2	};
1597
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termNonVariable3967  */
1598
static	ANTLR3_BITWORD FOLLOW_term_in_termNonVariable3967_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1599
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termNonVariable3967	= { FOLLOW_term_in_termNonVariable3967_bits, 2	};
1600
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termNonVariable3970  */
1601
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termNonVariable3970_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1602
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termNonVariable3970	= { FOLLOW_RPAREN_TOK_in_termNonVariable3970_bits, 1	};
1603
/** Bitset defining follow set for error recovery in rule state: FOLLOW_termAtomic_in_termNonVariable3986  */
1604
static	ANTLR3_BITWORD FOLLOW_termAtomic_in_termNonVariable3986_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1605
static  ANTLR3_BITSET_LIST FOLLOW_termAtomic_in_termNonVariable3986	= { FOLLOW_termAtomic_in_termNonVariable3986_bits, 1	};
1606
/** Bitset defining follow set for error recovery in rule state: FOLLOW_identifier_in_qualIdentifier4009  */
1607
static	ANTLR3_BITWORD FOLLOW_identifier_in_qualIdentifier4009_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1608
static  ANTLR3_BITSET_LIST FOLLOW_identifier_in_qualIdentifier4009	= { FOLLOW_identifier_in_qualIdentifier4009_bits, 1	};
1609
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_qualIdentifier4016  */
1610
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_qualIdentifier4016_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000040) };
1611
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_qualIdentifier4016	= { FOLLOW_LPAREN_TOK_in_qualIdentifier4016_bits, 1	};
1612
/** Bitset defining follow set for error recovery in rule state: FOLLOW_AS_TOK_in_qualIdentifier4018  */
1613
static	ANTLR3_BITWORD FOLLOW_AS_TOK_in_qualIdentifier4018_bits[]	= { ANTLR3_UINT64_LIT(0x0000000004000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1614
static  ANTLR3_BITSET_LIST FOLLOW_AS_TOK_in_qualIdentifier4018	= { FOLLOW_AS_TOK_in_qualIdentifier4018_bits, 2	};
1615
/** Bitset defining follow set for error recovery in rule state: FOLLOW_CONST_TOK_in_qualIdentifier4026  */
1616
static	ANTLR3_BITWORD FOLLOW_CONST_TOK_in_qualIdentifier4026_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1617
static  ANTLR3_BITSET_LIST FOLLOW_CONST_TOK_in_qualIdentifier4026	= { FOLLOW_CONST_TOK_in_qualIdentifier4026_bits, 2	};
1618
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_qualIdentifier4028  */
1619
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_qualIdentifier4028_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1620
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_qualIdentifier4028	= { FOLLOW_sortSymbol_in_qualIdentifier4028_bits, 2	};
1621
/** Bitset defining follow set for error recovery in rule state: FOLLOW_identifier_in_qualIdentifier4045  */
1622
static	ANTLR3_BITWORD FOLLOW_identifier_in_qualIdentifier4045_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1623
static  ANTLR3_BITSET_LIST FOLLOW_identifier_in_qualIdentifier4045	= { FOLLOW_identifier_in_qualIdentifier4045_bits, 2	};
1624
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_qualIdentifier4054  */
1625
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_qualIdentifier4054_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1626
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_qualIdentifier4054	= { FOLLOW_sortSymbol_in_qualIdentifier4054_bits, 2	};
1627
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_qualIdentifier4075  */
1628
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_qualIdentifier4075_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1629
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_qualIdentifier4075	= { FOLLOW_RPAREN_TOK_in_qualIdentifier4075_bits, 1	};
1630
/** Bitset defining follow set for error recovery in rule state: FOLLOW_functionName_in_identifier4094  */
1631
static	ANTLR3_BITWORD FOLLOW_functionName_in_identifier4094_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1632
static  ANTLR3_BITSET_LIST FOLLOW_functionName_in_identifier4094	= { FOLLOW_functionName_in_identifier4094_bits, 1	};
1633
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_identifier4106  */
1634
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_identifier4106_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000200) };
1635
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_identifier4106	= { FOLLOW_LPAREN_TOK_in_identifier4106_bits, 2	};
1636
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INDEX_TOK_in_identifier4108  */
1637
static	ANTLR3_BITWORD FOLLOW_INDEX_TOK_in_identifier4108_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x000005A010000000) };
1638
static  ANTLR3_BITSET_LIST FOLLOW_INDEX_TOK_in_identifier4108	= { FOLLOW_INDEX_TOK_in_identifier4108_bits, 2	};
1639
/** Bitset defining follow set for error recovery in rule state: FOLLOW_TESTER_TOK_in_identifier4116  */
1640
static	ANTLR3_BITWORD FOLLOW_TESTER_TOK_in_identifier4116_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1641
static  ANTLR3_BITSET_LIST FOLLOW_TESTER_TOK_in_identifier4116	= { FOLLOW_TESTER_TOK_in_identifier4116_bits, 2	};
1642
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_identifier4118  */
1643
static	ANTLR3_BITWORD FOLLOW_term_in_identifier4118_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1644
static  ANTLR3_BITSET_LIST FOLLOW_term_in_identifier4118	= { FOLLOW_term_in_identifier4118_bits, 2	};
1645
/** Bitset defining follow set for error recovery in rule state: FOLLOW_UPDATE_TOK_in_identifier4135  */
1646
static	ANTLR3_BITWORD FOLLOW_UPDATE_TOK_in_identifier4135_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1647
static  ANTLR3_BITSET_LIST FOLLOW_UPDATE_TOK_in_identifier4135	= { FOLLOW_UPDATE_TOK_in_identifier4135_bits, 2	};
1648
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_identifier4137  */
1649
static	ANTLR3_BITWORD FOLLOW_term_in_identifier4137_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1650
static  ANTLR3_BITSET_LIST FOLLOW_term_in_identifier4137	= { FOLLOW_term_in_identifier4137_bits, 2	};
1651
/** Bitset defining follow set for error recovery in rule state: FOLLOW_TUPLE_SEL_TOK_in_identifier4154  */
1652
static	ANTLR3_BITWORD FOLLOW_TUPLE_SEL_TOK_in_identifier4154_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) };
1653
static  ANTLR3_BITSET_LIST FOLLOW_TUPLE_SEL_TOK_in_identifier4154	= { FOLLOW_TUPLE_SEL_TOK_in_identifier4154_bits, 2	};
1654
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_identifier4158  */
1655
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_identifier4158_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1656
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_identifier4158	= { FOLLOW_INTEGER_LITERAL_in_identifier4158_bits, 2	};
1657
/** Bitset defining follow set for error recovery in rule state: FOLLOW_TUPLE_PROJECT_TOK_in_identifier4174  */
1658
static	ANTLR3_BITWORD FOLLOW_TUPLE_PROJECT_TOK_in_identifier4174_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) };
1659
static  ANTLR3_BITSET_LIST FOLLOW_TUPLE_PROJECT_TOK_in_identifier4174	= { FOLLOW_TUPLE_PROJECT_TOK_in_identifier4174_bits, 2	};
1660
/** Bitset defining follow set for error recovery in rule state: FOLLOW_nonemptyNumeralList_in_identifier4176  */
1661
static	ANTLR3_BITWORD FOLLOW_nonemptyNumeralList_in_identifier4176_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1662
static  ANTLR3_BITSET_LIST FOLLOW_nonemptyNumeralList_in_identifier4176	= { FOLLOW_nonemptyNumeralList_in_identifier4176_bits, 2	};
1663
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SIMPLE_SYMBOL_in_identifier4195  */
1664
static	ANTLR3_BITWORD FOLLOW_SIMPLE_SYMBOL_in_identifier4195_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) };
1665
static  ANTLR3_BITSET_LIST FOLLOW_SIMPLE_SYMBOL_in_identifier4195	= { FOLLOW_SIMPLE_SYMBOL_in_identifier4195_bits, 2	};
1666
/** Bitset defining follow set for error recovery in rule state: FOLLOW_nonemptyNumeralList_in_identifier4197  */
1667
static	ANTLR3_BITWORD FOLLOW_nonemptyNumeralList_in_identifier4197_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1668
static  ANTLR3_BITSET_LIST FOLLOW_nonemptyNumeralList_in_identifier4197	= { FOLLOW_nonemptyNumeralList_in_identifier4197_bits, 2	};
1669
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_identifier4218  */
1670
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_identifier4218_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1671
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_identifier4218	= { FOLLOW_RPAREN_TOK_in_identifier4218_bits, 1	};
1672
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_termAtomic4245  */
1673
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_termAtomic4245_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1674
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_termAtomic4245	= { FOLLOW_INTEGER_LITERAL_in_termAtomic4245_bits, 1	};
1675
/** Bitset defining follow set for error recovery in rule state: FOLLOW_DECIMAL_LITERAL_in_termAtomic4257  */
1676
static	ANTLR3_BITWORD FOLLOW_DECIMAL_LITERAL_in_termAtomic4257_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1677
static  ANTLR3_BITSET_LIST FOLLOW_DECIMAL_LITERAL_in_termAtomic4257	= { FOLLOW_DECIMAL_LITERAL_in_termAtomic4257_bits, 1	};
1678
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_termAtomic4276  */
1679
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_termAtomic4276_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000200) };
1680
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_termAtomic4276	= { FOLLOW_LPAREN_TOK_in_termAtomic4276_bits, 2	};
1681
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INDEX_TOK_in_termAtomic4278  */
1682
static	ANTLR3_BITWORD FOLLOW_INDEX_TOK_in_termAtomic4278_bits[]	= { ANTLR3_UINT64_LIT(0x0008000000080000), ANTLR3_UINT64_LIT(0x0000000010000000) };
1683
static  ANTLR3_BITSET_LIST FOLLOW_INDEX_TOK_in_termAtomic4278	= { FOLLOW_INDEX_TOK_in_termAtomic4278_bits, 2	};
1684
/** Bitset defining follow set for error recovery in rule state: FOLLOW_EMP_TOK_in_termAtomic4286  */
1685
static	ANTLR3_BITWORD FOLLOW_EMP_TOK_in_termAtomic4286_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1686
static  ANTLR3_BITSET_LIST FOLLOW_EMP_TOK_in_termAtomic4286	= { FOLLOW_EMP_TOK_in_termAtomic4286_bits, 2	};
1687
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_termAtomic4294  */
1688
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_termAtomic4294_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1689
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_termAtomic4294	= { FOLLOW_sortSymbol_in_termAtomic4294_bits, 2	};
1690
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_termAtomic4303  */
1691
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_termAtomic4303_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1692
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_termAtomic4303	= { FOLLOW_sortSymbol_in_termAtomic4303_bits, 2	};
1693
/** Bitset defining follow set for error recovery in rule state: FOLLOW_CHAR_TOK_in_termAtomic4320  */
1694
static	ANTLR3_BITWORD FOLLOW_CHAR_TOK_in_termAtomic4320_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000020) };
1695
static  ANTLR3_BITSET_LIST FOLLOW_CHAR_TOK_in_termAtomic4320	= { FOLLOW_CHAR_TOK_in_termAtomic4320_bits, 2	};
1696
/** Bitset defining follow set for error recovery in rule state: FOLLOW_HEX_LITERAL_in_termAtomic4322  */
1697
static	ANTLR3_BITWORD FOLLOW_HEX_LITERAL_in_termAtomic4322_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1698
static  ANTLR3_BITSET_LIST FOLLOW_HEX_LITERAL_in_termAtomic4322	= { FOLLOW_HEX_LITERAL_in_termAtomic4322_bits, 2	};
1699
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SIMPLE_SYMBOL_in_termAtomic4341  */
1700
static	ANTLR3_BITWORD FOLLOW_SIMPLE_SYMBOL_in_termAtomic4341_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) };
1701
static  ANTLR3_BITSET_LIST FOLLOW_SIMPLE_SYMBOL_in_termAtomic4341	= { FOLLOW_SIMPLE_SYMBOL_in_termAtomic4341_bits, 2	};
1702
/** Bitset defining follow set for error recovery in rule state: FOLLOW_nonemptyNumeralList_in_termAtomic4343  */
1703
static	ANTLR3_BITWORD FOLLOW_nonemptyNumeralList_in_termAtomic4343_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1704
static  ANTLR3_BITSET_LIST FOLLOW_nonemptyNumeralList_in_termAtomic4343	= { FOLLOW_nonemptyNumeralList_in_termAtomic4343_bits, 2	};
1705
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_termAtomic4364  */
1706
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_termAtomic4364_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1707
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_termAtomic4364	= { FOLLOW_RPAREN_TOK_in_termAtomic4364_bits, 1	};
1708
/** Bitset defining follow set for error recovery in rule state: FOLLOW_HEX_LITERAL_in_termAtomic4374  */
1709
static	ANTLR3_BITWORD FOLLOW_HEX_LITERAL_in_termAtomic4374_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1710
static  ANTLR3_BITSET_LIST FOLLOW_HEX_LITERAL_in_termAtomic4374	= { FOLLOW_HEX_LITERAL_in_termAtomic4374_bits, 1	};
1711
/** Bitset defining follow set for error recovery in rule state: FOLLOW_BINARY_LITERAL_in_termAtomic4386  */
1712
static	ANTLR3_BITWORD FOLLOW_BINARY_LITERAL_in_termAtomic4386_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1713
static  ANTLR3_BITSET_LIST FOLLOW_BINARY_LITERAL_in_termAtomic4386	= { FOLLOW_BINARY_LITERAL_in_termAtomic4386_bits, 1	};
1714
/** Bitset defining follow set for error recovery in rule state: FOLLOW_str_in_termAtomic4402  */
1715
static	ANTLR3_BITWORD FOLLOW_str_in_termAtomic4402_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1716
static  ANTLR3_BITSET_LIST FOLLOW_str_in_termAtomic4402	= { FOLLOW_str_in_termAtomic4402_bits, 1	};
1717
/** Bitset defining follow set for error recovery in rule state: FOLLOW_TUPLE_CONST_TOK_in_termAtomic4419  */
1718
static	ANTLR3_BITWORD FOLLOW_TUPLE_CONST_TOK_in_termAtomic4419_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1719
static  ANTLR3_BITSET_LIST FOLLOW_TUPLE_CONST_TOK_in_termAtomic4419	= { FOLLOW_TUPLE_CONST_TOK_in_termAtomic4419_bits, 1	};
1720
/** Bitset defining follow set for error recovery in rule state: FOLLOW_KEYWORD_in_attribute4446  */
1721
static	ANTLR3_BITWORD FOLLOW_KEYWORD_in_attribute4446_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310022), ANTLR3_UINT64_LIT(0x000002007E7C042E) };
1722
static  ANTLR3_BITSET_LIST FOLLOW_KEYWORD_in_attribute4446	= { FOLLOW_KEYWORD_in_attribute4446_bits, 2	};
1723
/** Bitset defining follow set for error recovery in rule state: FOLLOW_simpleSymbolicExprNoKeyword_in_attribute4450  */
1724
static	ANTLR3_BITWORD FOLLOW_simpleSymbolicExprNoKeyword_in_attribute4450_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1725
static  ANTLR3_BITSET_LIST FOLLOW_simpleSymbolicExprNoKeyword_in_attribute4450	= { FOLLOW_simpleSymbolicExprNoKeyword_in_attribute4450_bits, 1	};
1726
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_PATTERN_TOK_in_attribute4468  */
1727
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_PATTERN_TOK_in_attribute4468_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1728
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_PATTERN_TOK_in_attribute4468	= { FOLLOW_ATTRIBUTE_PATTERN_TOK_in_attribute4468_bits, 2	};
1729
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_POOL_TOK_in_attribute4480  */
1730
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_POOL_TOK_in_attribute4480_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1731
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_POOL_TOK_in_attribute4480	= { FOLLOW_ATTRIBUTE_POOL_TOK_in_attribute4480_bits, 2	};
1732
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_INST_ADD_TO_POOL_TOK_in_attribute4493  */
1733
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_INST_ADD_TO_POOL_TOK_in_attribute4493_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1734
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_INST_ADD_TO_POOL_TOK_in_attribute4493	= { FOLLOW_ATTRIBUTE_INST_ADD_TO_POOL_TOK_in_attribute4493_bits, 2	};
1735
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK_in_attribute4506  */
1736
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK_in_attribute4506_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1737
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK_in_attribute4506	= { FOLLOW_ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK_in_attribute4506_bits, 2	};
1738
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_attribute4520  */
1739
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_attribute4520_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1740
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_attribute4520	= { FOLLOW_LPAREN_TOK_in_attribute4520_bits, 2	};
1741
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_attribute4528  */
1742
static	ANTLR3_BITWORD FOLLOW_term_in_attribute4528_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050904420) };
1743
static  ANTLR3_BITSET_LIST FOLLOW_term_in_attribute4528	= { FOLLOW_term_in_attribute4528_bits, 2	};
1744
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_attribute4546  */
1745
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_attribute4546_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1746
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_attribute4546	= { FOLLOW_RPAREN_TOK_in_attribute4546_bits, 1	};
1747
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_NO_PATTERN_TOK_in_attribute4558  */
1748
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_NO_PATTERN_TOK_in_attribute4558_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010000), ANTLR3_UINT64_LIT(0x0000024050104420) };
1749
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_NO_PATTERN_TOK_in_attribute4558	= { FOLLOW_ATTRIBUTE_NO_PATTERN_TOK_in_attribute4558_bits, 2	};
1750
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_attribute4560  */
1751
static	ANTLR3_BITWORD FOLLOW_term_in_attribute4560_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1752
static  ANTLR3_BITSET_LIST FOLLOW_term_in_attribute4560	= { FOLLOW_term_in_attribute4560_bits, 1	};
1753
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_INST_LEVEL_in_attribute4577  */
1754
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_INST_LEVEL_in_attribute4577_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000400) };
1755
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_INST_LEVEL_in_attribute4577	= { FOLLOW_ATTRIBUTE_INST_LEVEL_in_attribute4577_bits, 2	};
1756
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_attribute4581  */
1757
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_attribute4581_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1758
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_attribute4581	= { FOLLOW_INTEGER_LITERAL_in_attribute4581_bits, 1	};
1759
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_QUANTIFIER_ID_TOK_in_attribute4597  */
1760
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_QUANTIFIER_ID_TOK_in_attribute4597_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310020), ANTLR3_UINT64_LIT(0x000002007E7C542E) };
1761
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_QUANTIFIER_ID_TOK_in_attribute4597	= { FOLLOW_ATTRIBUTE_QUANTIFIER_ID_TOK_in_attribute4597_bits, 2	};
1762
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbolicExpr_in_attribute4601  */
1763
static	ANTLR3_BITWORD FOLLOW_symbolicExpr_in_attribute4601_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1764
static  ANTLR3_BITSET_LIST FOLLOW_symbolicExpr_in_attribute4601	= { FOLLOW_symbolicExpr_in_attribute4601_bits, 1	};
1765
/** Bitset defining follow set for error recovery in rule state: FOLLOW_ATTRIBUTE_NAMED_TOK_in_attribute4614  */
1766
static	ANTLR3_BITWORD FOLLOW_ATTRIBUTE_NAMED_TOK_in_attribute4614_bits[]	= { ANTLR3_UINT64_LIT(0x7724F21208310020), ANTLR3_UINT64_LIT(0x000002007E7C542E) };
1767
static  ANTLR3_BITSET_LIST FOLLOW_ATTRIBUTE_NAMED_TOK_in_attribute4614	= { FOLLOW_ATTRIBUTE_NAMED_TOK_in_attribute4614_bits, 2	};
1768
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbolicExpr_in_attribute4616  */
1769
static	ANTLR3_BITWORD FOLLOW_symbolicExpr_in_attribute4616_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1770
static  ANTLR3_BITSET_LIST FOLLOW_symbolicExpr_in_attribute4616	= { FOLLOW_symbolicExpr_in_attribute4616_bits, 1	};
1771
/** Bitset defining follow set for error recovery in rule state: FOLLOW_term_in_termList4648  */
1772
static	ANTLR3_BITWORD FOLLOW_term_in_termList4648_bits[]	= { ANTLR3_UINT64_LIT(0x0000000008010002), ANTLR3_UINT64_LIT(0x0000024050104420) };
1773
static  ANTLR3_BITSET_LIST FOLLOW_term_in_termList4648	= { FOLLOW_term_in_termList4648_bits, 2	};
1774
/** Bitset defining follow set for error recovery in rule state: FOLLOW_STRING_LITERAL_in_str4670  */
1775
static	ANTLR3_BITWORD FOLLOW_STRING_LITERAL_in_str4670_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1776
static  ANTLR3_BITSET_LIST FOLLOW_STRING_LITERAL_in_str4670	= { FOLLOW_STRING_LITERAL_in_str4670_bits, 1	};
1777
/** Bitset defining follow set for error recovery in rule state: FOLLOW_EXISTS_TOK_in_quantOp4695  */
1778
static	ANTLR3_BITWORD FOLLOW_EXISTS_TOK_in_quantOp4695_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1779
static  ANTLR3_BITSET_LIST FOLLOW_EXISTS_TOK_in_quantOp4695	= { FOLLOW_EXISTS_TOK_in_quantOp4695_bits, 1	};
1780
/** Bitset defining follow set for error recovery in rule state: FOLLOW_FORALL_TOK_in_quantOp4706  */
1781
static	ANTLR3_BITWORD FOLLOW_FORALL_TOK_in_quantOp4706_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1782
static  ANTLR3_BITSET_LIST FOLLOW_FORALL_TOK_in_quantOp4706	= { FOLLOW_FORALL_TOK_in_quantOp4706_bits, 1	};
1783
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_functionName4727  */
1784
static	ANTLR3_BITWORD FOLLOW_symbol_in_functionName4727_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1785
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_functionName4727	= { FOLLOW_symbol_in_functionName4727_bits, 1	};
1786
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_sortList4751  */
1787
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_sortList4751_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000020010104000) };
1788
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_sortList4751	= { FOLLOW_sortSymbol_in_sortList4751_bits, 2	};
1789
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_nonemptySortList4778  */
1790
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_nonemptySortList4778_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000020010104000) };
1791
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_nonemptySortList4778	= { FOLLOW_sortSymbol_in_nonemptySortList4778_bits, 2	};
1792
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sortedVarList4807  */
1793
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sortedVarList4807_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1794
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sortedVarList4807	= { FOLLOW_LPAREN_TOK_in_sortedVarList4807_bits, 2	};
1795
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_sortedVarList4809  */
1796
static	ANTLR3_BITWORD FOLLOW_symbol_in_sortedVarList4809_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1797
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_sortedVarList4809	= { FOLLOW_symbol_in_sortedVarList4809_bits, 2	};
1798
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_sortedVarList4818  */
1799
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_sortedVarList4818_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1800
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_sortedVarList4818	= { FOLLOW_sortSymbol_in_sortedVarList4818_bits, 2	};
1801
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sortedVarList4821  */
1802
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sortedVarList4821_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) };
1803
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sortedVarList4821	= { FOLLOW_RPAREN_TOK_in_sortedVarList4821_bits, 2	};
1804
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_boundVarList4856  */
1805
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_boundVarList4856_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000804000) };
1806
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_boundVarList4856	= { FOLLOW_LPAREN_TOK_in_boundVarList4856_bits, 2	};
1807
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortedVarList_in_boundVarList4858  */
1808
static	ANTLR3_BITWORD FOLLOW_sortedVarList_in_boundVarList4858_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1809
static  ANTLR3_BITSET_LIST FOLLOW_sortedVarList_in_boundVarList4858	= { FOLLOW_sortedVarList_in_boundVarList4858_bits, 2	};
1810
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_boundVarList4861  */
1811
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_boundVarList4861_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1812
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_boundVarList4861	= { FOLLOW_RPAREN_TOK_in_boundVarList4861_bits, 1	};
1813
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_sortName4881  */
1814
static	ANTLR3_BITWORD FOLLOW_symbol_in_sortName4881_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1815
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_sortName4881	= { FOLLOW_symbol_in_sortName4881_bits, 1	};
1816
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortName_in_sortSymbol4901  */
1817
static	ANTLR3_BITWORD FOLLOW_sortName_in_sortSymbol4901_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1818
static  ANTLR3_BITSET_LIST FOLLOW_sortName_in_sortSymbol4901	= { FOLLOW_sortName_in_sortSymbol4901_bits, 1	};
1819
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sortSymbol4914  */
1820
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sortSymbol4914_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100200) };
1821
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sortSymbol4914	= { FOLLOW_LPAREN_TOK_in_sortSymbol4914_bits, 2	};
1822
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INDEX_TOK_in_sortSymbol4917  */
1823
static	ANTLR3_BITWORD FOLLOW_INDEX_TOK_in_sortSymbol4917_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1824
static  ANTLR3_BITSET_LIST FOLLOW_INDEX_TOK_in_sortSymbol4917	= { FOLLOW_INDEX_TOK_in_sortSymbol4917_bits, 2	};
1825
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_sortSymbol4930  */
1826
static	ANTLR3_BITWORD FOLLOW_symbol_in_sortSymbol4930_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010904400) };
1827
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_sortSymbol4930	= { FOLLOW_symbol_in_sortSymbol4930_bits, 2	};
1828
/** Bitset defining follow set for error recovery in rule state: FOLLOW_nonemptyNumeralList_in_sortSymbol4939  */
1829
static	ANTLR3_BITWORD FOLLOW_nonemptyNumeralList_in_sortSymbol4939_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1830
static  ANTLR3_BITSET_LIST FOLLOW_nonemptyNumeralList_in_sortSymbol4939	= { FOLLOW_nonemptyNumeralList_in_sortSymbol4939_bits, 2	};
1831
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortList_in_sortSymbol4956  */
1832
static	ANTLR3_BITWORD FOLLOW_sortList_in_sortSymbol4956_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1833
static  ANTLR3_BITSET_LIST FOLLOW_sortList_in_sortSymbol4956	= { FOLLOW_sortList_in_sortSymbol4956_bits, 2	};
1834
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sortSymbol4973  */
1835
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sortSymbol4973_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1836
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sortSymbol4973	= { FOLLOW_RPAREN_TOK_in_sortSymbol4973_bits, 1	};
1837
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_sortSymbol4979  */
1838
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_sortSymbol4979_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000000040) };
1839
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_sortSymbol4979	= { FOLLOW_LPAREN_TOK_in_sortSymbol4979_bits, 2	};
1840
/** Bitset defining follow set for error recovery in rule state: FOLLOW_HO_ARROW_TOK_in_sortSymbol4981  */
1841
static	ANTLR3_BITWORD FOLLOW_HO_ARROW_TOK_in_sortSymbol4981_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010904000) };
1842
static  ANTLR3_BITSET_LIST FOLLOW_HO_ARROW_TOK_in_sortSymbol4981	= { FOLLOW_HO_ARROW_TOK_in_sortSymbol4981_bits, 2	};
1843
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortList_in_sortSymbol4983  */
1844
static	ANTLR3_BITWORD FOLLOW_sortList_in_sortSymbol4983_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1845
static  ANTLR3_BITSET_LIST FOLLOW_sortList_in_sortSymbol4983	= { FOLLOW_sortList_in_sortSymbol4983_bits, 2	};
1846
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_sortSymbol4986  */
1847
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_sortSymbol4986_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1848
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_sortSymbol4986	= { FOLLOW_RPAREN_TOK_in_sortSymbol4986_bits, 1	};
1849
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_symbolList5015  */
1850
static	ANTLR3_BITWORD FOLLOW_symbol_in_symbolList5015_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000020010100000) };
1851
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_symbolList5015	= { FOLLOW_symbol_in_symbolList5015_bits, 2	};
1852
/** Bitset defining follow set for error recovery in rule state: FOLLOW_SIMPLE_SYMBOL_in_symbol5037  */
1853
static	ANTLR3_BITWORD FOLLOW_SIMPLE_SYMBOL_in_symbol5037_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1854
static  ANTLR3_BITSET_LIST FOLLOW_SIMPLE_SYMBOL_in_symbol5037	= { FOLLOW_SIMPLE_SYMBOL_in_symbol5037_bits, 1	};
1855
/** Bitset defining follow set for error recovery in rule state: FOLLOW_QUOTED_SYMBOL_in_symbol5049  */
1856
static	ANTLR3_BITWORD FOLLOW_QUOTED_SYMBOL_in_symbol5049_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1857
static  ANTLR3_BITSET_LIST FOLLOW_QUOTED_SYMBOL_in_symbol5049	= { FOLLOW_QUOTED_SYMBOL_in_symbol5049_bits, 1	};
1858
/** Bitset defining follow set for error recovery in rule state: FOLLOW_UNTERMINATED_QUOTED_SYMBOL_in_symbol5061  */
1859
static	ANTLR3_BITWORD FOLLOW_UNTERMINATED_QUOTED_SYMBOL_in_symbol5061_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000100000000000) };
1860
static  ANTLR3_BITSET_LIST FOLLOW_UNTERMINATED_QUOTED_SYMBOL_in_symbol5061	= { FOLLOW_UNTERMINATED_QUOTED_SYMBOL_in_symbol5061_bits, 2	};
1861
/** Bitset defining follow set for error recovery in rule state: FOLLOW_EOF_in_symbol5069  */
1862
static	ANTLR3_BITWORD FOLLOW_EOF_in_symbol5069_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1863
static  ANTLR3_BITSET_LIST FOLLOW_EOF_in_symbol5069	= { FOLLOW_EOF_in_symbol5069_bits, 1	};
1864
/** Bitset defining follow set for error recovery in rule state: FOLLOW_108_in_symbol5085  */
1865
static	ANTLR3_BITWORD FOLLOW_108_in_symbol5085_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1866
static  ANTLR3_BITSET_LIST FOLLOW_108_in_symbol5085	= { FOLLOW_108_in_symbol5085_bits, 1	};
1867
/** Bitset defining follow set for error recovery in rule state: FOLLOW_INTEGER_LITERAL_in_nonemptyNumeralList5117  */
1868
static	ANTLR3_BITWORD FOLLOW_INTEGER_LITERAL_in_nonemptyNumeralList5117_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000000400) };
1869
static  ANTLR3_BITSET_LIST FOLLOW_INTEGER_LITERAL_in_nonemptyNumeralList5117	= { FOLLOW_INTEGER_LITERAL_in_nonemptyNumeralList5117_bits, 2	};
1870
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_datatypeDef5159  */
1871
static	ANTLR3_BITWORD FOLLOW_symbol_in_datatypeDef5159_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000004000) };
1872
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_datatypeDef5159	= { FOLLOW_symbol_in_datatypeDef5159_bits, 2	};
1873
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_datatypeDef5176  */
1874
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_datatypeDef5176_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1875
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_datatypeDef5176	= { FOLLOW_LPAREN_TOK_in_datatypeDef5176_bits, 2	};
1876
/** Bitset defining follow set for error recovery in rule state: FOLLOW_constructorDef_in_datatypeDef5178  */
1877
static	ANTLR3_BITWORD FOLLOW_constructorDef_in_datatypeDef5178_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1878
static  ANTLR3_BITSET_LIST FOLLOW_constructorDef_in_datatypeDef5178	= { FOLLOW_constructorDef_in_datatypeDef5178_bits, 2	};
1879
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_datatypeDef5181  */
1880
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_datatypeDef5181_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) };
1881
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_datatypeDef5181	= { FOLLOW_RPAREN_TOK_in_datatypeDef5181_bits, 2	};
1882
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_constructorDef5211  */
1883
static	ANTLR3_BITWORD FOLLOW_symbol_in_constructorDef5211_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) };
1884
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_constructorDef5211	= { FOLLOW_symbol_in_constructorDef5211_bits, 2	};
1885
/** Bitset defining follow set for error recovery in rule state: FOLLOW_LPAREN_TOK_in_constructorDef5226  */
1886
static	ANTLR3_BITWORD FOLLOW_LPAREN_TOK_in_constructorDef5226_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010100000) };
1887
static  ANTLR3_BITSET_LIST FOLLOW_LPAREN_TOK_in_constructorDef5226	= { FOLLOW_LPAREN_TOK_in_constructorDef5226_bits, 2	};
1888
/** Bitset defining follow set for error recovery in rule state: FOLLOW_selector_in_constructorDef5228  */
1889
static	ANTLR3_BITWORD FOLLOW_selector_in_constructorDef5228_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000000000800000) };
1890
static  ANTLR3_BITSET_LIST FOLLOW_selector_in_constructorDef5228	= { FOLLOW_selector_in_constructorDef5228_bits, 2	};
1891
/** Bitset defining follow set for error recovery in rule state: FOLLOW_RPAREN_TOK_in_constructorDef5231  */
1892
static	ANTLR3_BITWORD FOLLOW_RPAREN_TOK_in_constructorDef5231_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002), ANTLR3_UINT64_LIT(0x0000000000004000) };
1893
static  ANTLR3_BITSET_LIST FOLLOW_RPAREN_TOK_in_constructorDef5231	= { FOLLOW_RPAREN_TOK_in_constructorDef5231_bits, 2	};
1894
/** Bitset defining follow set for error recovery in rule state: FOLLOW_symbol_in_selector5259  */
1895
static	ANTLR3_BITWORD FOLLOW_symbol_in_selector5259_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000000), ANTLR3_UINT64_LIT(0x0000020010104000) };
1896
static  ANTLR3_BITSET_LIST FOLLOW_symbol_in_selector5259	= { FOLLOW_symbol_in_selector5259_bits, 2	};
1897
/** Bitset defining follow set for error recovery in rule state: FOLLOW_sortSymbol_in_selector5262  */
1898
static	ANTLR3_BITWORD FOLLOW_sortSymbol_in_selector5262_bits[]	= { ANTLR3_UINT64_LIT(0x0000000000000002) };
1899
static  ANTLR3_BITSET_LIST FOLLOW_sortSymbol_in_selector5262	= { FOLLOW_sortSymbol_in_selector5262_bits, 1	};
1900
1901
1902
/* ==============================================
1903
 * Parsing rules
1904
 */
1905
/**
1906
 * $ANTLR start parseExpr
1907
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:138:1: parseExpr returns [cvc5::api::Term expr = cvc5::api::Term()] : ( term[expr, expr2] | EOF );
1908
 */
1909
static cvc5::api::Term
1910
116
parseExpr(pSmt2Parser ctx)
1911
{
1912
116
    cvc5::api::Term expr;
1913
1914
1915
1916
232
      cvc5::api::Term expr2;
1917
1918
    /* Initialize rule variables
1919
     */
1920
116
    expr =  cvc5::api::Term();
1921
1922
1923
    {
1924
        {
1925
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:142:3: ( term[expr, expr2] | EOF )
1926
1927
            ANTLR3_UINT32 alt1;
1928
1929
116
            alt1=2;
1930
1931
116
            switch ( LA(1) )
1932
            {
1933
69
            case BINARY_LITERAL:
1934
            case DECIMAL_LITERAL:
1935
            case HEX_LITERAL:
1936
            case INTEGER_LITERAL:
1937
            case LPAREN_TOK:
1938
            case QUOTED_SYMBOL:
1939
            case SIMPLE_SYMBOL:
1940
            case STRING_LITERAL:
1941
            case TUPLE_CONST_TOK:
1942
            case UNTERMINATED_QUOTED_SYMBOL:
1943
            	{
1944
69
            		alt1=1;
1945
            	}
1946
69
                break;
1947
37
            case EOF:
1948
            	{
1949
37
            		alt1=2;
1950
            	}
1951
37
                break;
1952
1953
            default:
1954
                CONSTRUCTEX();
1955
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
1956
                EXCEPTION->message      = (void *)"";
1957
                EXCEPTION->decisionNum  = 1;
1958
                EXCEPTION->state        = 0;
1959
1960
1961
                goto ruleparseExprEx;
1962
1963
            }
1964
1965
106
            switch (alt1)
1966
            {
1967
69
        	case 1:
1968
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:142:5: term[expr, expr2]
1969
        	    {
1970
69
        	        FOLLOWPUSH(FOLLOW_term_in_parseExpr117);
1971
69
        	        term(ctx, expr, expr2);
1972
1973
37
        	        FOLLOWPOP();
1974
37
        	        if  (HASEXCEPTION())
1975
        	        {
1976
        	            goto ruleparseExprEx;
1977
        	        }
1978
1979
1980
        	    }
1981
37
        	    break;
1982
37
        	case 2:
1983
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:143:5: EOF
1984
        	    {
1985
37
        	         MATCHT(EOF, &FOLLOW_EOF_in_parseExpr124);
1986
37
        	        if  (HASEXCEPTION())
1987
        	        {
1988
        	            goto ruleparseExprEx;
1989
        	        }
1990
1991
1992
        	    }
1993
37
        	    break;
1994
1995
            }
1996
        }
1997
    }
1998
1999
    // This is where rules clean up and exit
2000
    //
2001
74
    goto ruleparseExprEx; /* Prevent compiler warnings */
2002
74
    ruleparseExprEx: ;
2003
2004
74
            if (HASEXCEPTION())
2005
            {
2006
                PREPORTERROR();
2007
                PRECOVER();
2008
            }
2009
148
    return expr;
2010
}
2011
/* $ANTLR end parseExpr */
2012
2013
/**
2014
 * $ANTLR start parseCommand
2015
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:150:1: parseCommand returns [cvc5::Command* cmd_return = NULL] : ( LPAREN_TOK command[&cmd] RPAREN_TOK | LPAREN_TOK INCLUDE_TOK str[name,true] RPAREN_TOK | EOF );
2016
 */
2017
static cvc5::Command*
2018
275484
parseCommand(pSmt2Parser ctx)
2019
{
2020
    cvc5::Command* cmd_return;
2021
2022
2023
2024
550968
      std::unique_ptr<cvc5::Command> cmd;
2025
550968
      std::string name;
2026
2027
    /* Initialize rule variables
2028
     */
2029
275484
    cmd_return =  NULL;
2030
2031
2032
    {
2033
        {
2034
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:158:3: ( LPAREN_TOK command[&cmd] RPAREN_TOK | LPAREN_TOK INCLUDE_TOK str[name,true] RPAREN_TOK | EOF )
2035
2036
            ANTLR3_UINT32 alt2;
2037
2038
275484
            alt2=3;
2039
2040
275484
            switch ( LA(1) )
2041
            {
2042
271110
            case LPAREN_TOK:
2043
            	{
2044
271110
            		switch ( LA(2) )
2045
            		{
2046
            		case INCLUDE_TOK:
2047
            			{
2048
            				alt2=2;
2049
            			}
2050
            		    break;
2051
271110
            		case ASSERT_TOK:
2052
            		case BLOCK_MODEL_TOK:
2053
            		case BLOCK_MODEL_VALUES_TOK:
2054
            		case CHECK_SAT_ASSUMING_TOK:
2055
            		case CHECK_SAT_TOK:
2056
            		case DECLARE_CODATATYPES_TOK:
2057
            		case DECLARE_CODATATYPE_TOK:
2058
            		case DECLARE_CONST_TOK:
2059
            		case DECLARE_DATATYPES_TOK:
2060
            		case DECLARE_DATATYPE_TOK:
2061
            		case DECLARE_FUNS_TOK:
2062
            		case DECLARE_FUN_TOK:
2063
            		case DECLARE_HEAP:
2064
            		case DECLARE_POOL:
2065
            		case DECLARE_PREDS_TOK:
2066
            		case DECLARE_SORTS_TOK:
2067
            		case DECLARE_SORT_TOK:
2068
            		case DEFINE_CONST_TOK:
2069
            		case DEFINE_FUNS_REC_TOK:
2070
            		case DEFINE_FUN_REC_TOK:
2071
            		case DEFINE_FUN_TOK:
2072
            		case DEFINE_SORT_TOK:
2073
            		case DEFINE_TOK:
2074
            		case ECHO_TOK:
2075
            		case EXIT_TOK:
2076
            		case GET_ABDUCT_TOK:
2077
            		case GET_ASSERTIONS_TOK:
2078
            		case GET_ASSIGNMENT_TOK:
2079
            		case GET_INFO_TOK:
2080
            		case GET_INTERPOL_TOK:
2081
            		case GET_MODEL_TOK:
2082
            		case GET_OPTION_TOK:
2083
            		case GET_PROOF_TOK:
2084
            		case GET_QE_DISJUNCT_TOK:
2085
            		case GET_QE_TOK:
2086
            		case GET_UNSAT_ASSUMPTIONS_TOK:
2087
            		case GET_UNSAT_CORE_TOK:
2088
            		case GET_VALUE_TOK:
2089
            		case POP_TOK:
2090
            		case PUSH_TOK:
2091
            		case RESET_ASSERTIONS_TOK:
2092
            		case RESET_TOK:
2093
            		case SET_INFO_TOK:
2094
            		case SET_LOGIC_TOK:
2095
            		case SET_OPTION_TOK:
2096
            		case SIMPLE_SYMBOL:
2097
            		case SIMPLIFY_TOK:
2098
            			{
2099
271110
            				alt2=1;
2100
            			}
2101
271110
            		    break;
2102
2103
            		default:
2104
            		    CONSTRUCTEX();
2105
            		    EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
2106
            		    EXCEPTION->message      = (void *)"";
2107
            		    EXCEPTION->decisionNum  = 2;
2108
            		    EXCEPTION->state        = 1;
2109
2110
2111
            		    goto ruleparseCommandEx;
2112
2113
            		}
2114
2115
            	}
2116
271110
                break;
2117
4374
            case EOF:
2118
            	{
2119
4374
            		alt2=3;
2120
            	}
2121
4374
                break;
2122
2123
            default:
2124
                CONSTRUCTEX();
2125
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
2126
                EXCEPTION->message      = (void *)"";
2127
                EXCEPTION->decisionNum  = 2;
2128
                EXCEPTION->state        = 0;
2129
2130
2131
                goto ruleparseCommandEx;
2132
2133
            }
2134
2135
275484
            switch (alt2)
2136
            {
2137
271110
        	case 1:
2138
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:158:5: LPAREN_TOK command[&cmd] RPAREN_TOK
2139
        	    {
2140
271110
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_parseCommand153);
2141
271110
        	        if  (HASEXCEPTION())
2142
        	        {
2143
        	            goto ruleparseCommandEx;
2144
        	        }
2145
2146
2147
271110
        	        FOLLOWPUSH(FOLLOW_command_in_parseCommand155);
2148
271110
        	        command(ctx, &cmd);
2149
2150
271080
        	        FOLLOWPOP();
2151
271080
        	        if  (HASEXCEPTION())
2152
        	        {
2153
        	            goto ruleparseCommandEx;
2154
        	        }
2155
2156
2157
271080
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_parseCommand158);
2158
271080
        	        if  (HASEXCEPTION())
2159
        	        {
2160
2
        	            goto ruleparseCommandEx;
2161
        	        }
2162
2163
2164
        	    }
2165
271078
        	    break;
2166
        	case 2:
2167
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:163:5: LPAREN_TOK INCLUDE_TOK str[name,true] RPAREN_TOK
2168
        	    {
2169
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_parseCommand171);
2170
        	        if  (HASEXCEPTION())
2171
        	        {
2172
        	            goto ruleparseCommandEx;
2173
        	        }
2174
2175
2176
        	         MATCHT(INCLUDE_TOK, &FOLLOW_INCLUDE_TOK_in_parseCommand173);
2177
        	        if  (HASEXCEPTION())
2178
        	        {
2179
        	            goto ruleparseCommandEx;
2180
        	        }
2181
2182
2183
        	        FOLLOWPUSH(FOLLOW_str_in_parseCommand175);
2184
        	        str(ctx, name, true);
2185
2186
        	        FOLLOWPOP();
2187
        	        if  (HASEXCEPTION())
2188
        	        {
2189
        	            goto ruleparseCommandEx;
2190
        	        }
2191
2192
2193
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_parseCommand178);
2194
        	        if  (HASEXCEPTION())
2195
        	        {
2196
        	            goto ruleparseCommandEx;
2197
        	        }
2198
2199
2200
        	        {
2201
        	             if(!PARSER_STATE->canIncludeFile()) {
2202
        	                    PARSER_STATE->parseError("include-file feature was disabled for this "
2203
        	                                             "run.");
2204
        	                  }
2205
        	                  if(PARSER_STATE->strictModeEnabled()) {
2206
        	                    PARSER_STATE->parseError("Extended commands are not permitted while "
2207
        	                                             "operating in strict compliance mode.");
2208
        	                  }
2209
        	                  PARSER_STATE->includeFile(name);
2210
        	                  // The command of the included file will be produced at the next
2211
        	                  // parseCommand() call
2212
        	                  cmd.reset(new EmptyCommand("include::" + name));
2213
2214
        	        }
2215
2216
2217
        	    }
2218
        	    break;
2219
4374
        	case 3:
2220
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:178:5: EOF
2221
        	    {
2222
4374
        	         MATCHT(EOF, &FOLLOW_EOF_in_parseCommand191);
2223
4374
        	        if  (HASEXCEPTION())
2224
        	        {
2225
        	            goto ruleparseCommandEx;
2226
        	        }
2227
2228
2229
        	    }
2230
4374
        	    break;
2231
2232
            }
2233
        }
2234
    }
2235
2236
    // This is where rules clean up and exit
2237
    //
2238
275452
    goto ruleparseCommandEx; /* Prevent compiler warnings */
2239
275454
    ruleparseCommandEx: ;
2240
2241
275454
            if (HASEXCEPTION())
2242
            {
2243
2
                PREPORTERROR();
2244
                PRECOVER();
2245
            }
2246
            else
2247
            {
2248
                {
2249
2250
275452
                      cmd_return = cmd.release();
2251
2252
                }
2253
            }
2254
2255
2256
550904
    return cmd_return;
2257
}
2258
/* $ANTLR end parseCommand */
2259
2260
/**
2261
 * $ANTLR start parseSygus
2262
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:186:1: parseSygus returns [cvc5::Command* cmd_return = NULL] : ( LPAREN_TOK cmd= sygusCommand RPAREN_TOK | EOF );
2263
 */
2264
static cvc5::Command*
2265
2191
parseSygus(pSmt2Parser ctx)
2266
{
2267
    cvc5::Command* cmd_return;
2268
2269
2270
2271
4382
      std::string name;
2272
2273
4382
    std::unique_ptr<cvc5::Command> cmd;
2274
    #undef	RETURN_TYPE_cmd
2275
    #define	RETURN_TYPE_cmd std::unique_ptr<cvc5::Command>
2276
2277
    /* Initialize rule variables
2278
     */
2279
2191
    cmd_return =  NULL;
2280
2281
2282
    {
2283
        {
2284
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:193:3: ( LPAREN_TOK cmd= sygusCommand RPAREN_TOK | EOF )
2285
2286
            ANTLR3_UINT32 alt3;
2287
2288
2191
            alt3=2;
2289
2290
2191
            switch ( LA(1) )
2291
            {
2292
2007
            case LPAREN_TOK:
2293
            	{
2294
2007
            		alt3=1;
2295
            	}
2296
2007
                break;
2297
184
            case EOF:
2298
            	{
2299
184
            		alt3=2;
2300
            	}
2301
184
                break;
2302
2303
            default:
2304
                CONSTRUCTEX();
2305
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
2306
                EXCEPTION->message      = (void *)"";
2307
                EXCEPTION->decisionNum  = 3;
2308
                EXCEPTION->state        = 0;
2309
2310
2311
                goto ruleparseSygusEx;
2312
2313
            }
2314
2315
2191
            switch (alt3)
2316
            {
2317
2007
        	case 1:
2318
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:193:5: LPAREN_TOK cmd= sygusCommand RPAREN_TOK
2319
        	    {
2320
2007
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_parseSygus220);
2321
2007
        	        if  (HASEXCEPTION())
2322
        	        {
2323
        	            goto ruleparseSygusEx;
2324
        	        }
2325
2326
2327
2007
        	        FOLLOWPUSH(FOLLOW_sygusCommand_in_parseSygus224);
2328
2007
        	        cmd=sygusCommand(ctx);
2329
2330
2005
        	        FOLLOWPOP();
2331
2005
        	        if  (HASEXCEPTION())
2332
        	        {
2333
        	            goto ruleparseSygusEx;
2334
        	        }
2335
2336
2337
2005
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_parseSygus226);
2338
2005
        	        if  (HASEXCEPTION())
2339
        	        {
2340
        	            goto ruleparseSygusEx;
2341
        	        }
2342
2343
2344
        	    }
2345
2005
        	    break;
2346
184
        	case 2:
2347
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:194:5: EOF
2348
        	    {
2349
184
        	         MATCHT(EOF, &FOLLOW_EOF_in_parseSygus232);
2350
184
        	        if  (HASEXCEPTION())
2351
        	        {
2352
        	            goto ruleparseSygusEx;
2353
        	        }
2354
2355
2356
        	    }
2357
184
        	    break;
2358
2359
            }
2360
        }
2361
    }
2362
2363
    // This is where rules clean up and exit
2364
    //
2365
2189
    goto ruleparseSygusEx; /* Prevent compiler warnings */
2366
2189
    ruleparseSygusEx: ;
2367
2368
2189
            if (HASEXCEPTION())
2369
            {
2370
                PREPORTERROR();
2371
                PRECOVER();
2372
            }
2373
            else
2374
            {
2375
                {
2376
2377
2189
                      cmd_return = cmd.release();
2378
2379
                }
2380
            }
2381
2382
2383
4378
    return cmd_return;
2384
}
2385
/* $ANTLR end parseSygus */
2386
2387
/**
2388
 * $ANTLR start command
2389
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:201:1: command[std::unique_ptr<cvc5::Command>* cmd] : ( SET_LOGIC_TOK symbol[name,CHECK_NONE,SYM_SORT] | SET_INFO_TOK setInfoInternal[cmd] | GET_INFO_TOK KEYWORD | SET_OPTION_TOK setOptionInternal[cmd] | GET_OPTION_TOK KEYWORD | DECLARE_SORT_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] n= INTEGER_LITERAL | DEFINE_SORT_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] LPAREN_TOK symbolList[names,CHECK_NONE,SYM_SORT] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] | DECLARE_FUN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] LPAREN_TOK sortList[sorts] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] | DEFINE_FUN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] term[expr, expr2] | DECLARE_DATATYPE_TOK datatypeDefCommand[false, cmd] | DECLARE_DATATYPES_TOK datatypesDefCommand[false, cmd] | GET_VALUE_TOK ( LPAREN_TOK termList[terms,expr] RPAREN_TOK |~ LPAREN_TOK ) | GET_ASSIGNMENT_TOK | ASSERT_TOK term[expr, expr2] | CHECK_SAT_TOK ( term[expr, expr2] |) | CHECK_SAT_ASSUMING_TOK ( LPAREN_TOK termList[terms,expr] RPAREN_TOK |~ LPAREN_TOK ) | GET_ASSERTIONS_TOK | GET_PROOF_TOK | GET_UNSAT_ASSUMPTIONS_TOK | GET_UNSAT_CORE_TOK | PUSH_TOK (k= INTEGER_LITERAL |) | POP_TOK (k= INTEGER_LITERAL |) | EXIT_TOK | smt25Command[cmd] | extendedCommand[cmd] | SIMPLE_SYMBOL );
2390
 */
2391
static void
2392
271716
command(pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd)
2393
{
2394
2395
543432
      std::string name;
2396
543432
      std::vector<std::string> names;
2397
543432
      cvc5::api::Term expr, expr2;
2398
543432
      cvc5::api::Sort t;
2399
543432
      std::vector<cvc5::api::Term> terms;
2400
543432
      std::vector<api::Sort> sorts;
2401
543432
      std::vector<std::pair<std::string, cvc5::api::Sort> > sortedVarNames;
2402
543432
      std::vector<cvc5::api::Term> flattenVars;
2403
2404
    pANTLR3_COMMON_TOKEN    n;
2405
    pANTLR3_COMMON_TOKEN    k;
2406
    pANTLR3_COMMON_TOKEN    KEYWORD1;
2407
    pANTLR3_COMMON_TOKEN    KEYWORD2;
2408
    pANTLR3_COMMON_TOKEN    SIMPLE_SYMBOL3;
2409
2410
    /* Initialize rule variables
2411
     */
2412
2413
271716
    n       = NULL;
2414
271716
    k       = NULL;
2415
271716
    KEYWORD1       = NULL;
2416
271716
    KEYWORD2       = NULL;
2417
271716
    SIMPLE_SYMBOL3       = NULL;
2418
2419
    {
2420
        {
2421
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:212:3: ( SET_LOGIC_TOK symbol[name,CHECK_NONE,SYM_SORT] | SET_INFO_TOK setInfoInternal[cmd] | GET_INFO_TOK KEYWORD | SET_OPTION_TOK setOptionInternal[cmd] | GET_OPTION_TOK KEYWORD | DECLARE_SORT_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] n= INTEGER_LITERAL | DEFINE_SORT_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] LPAREN_TOK symbolList[names,CHECK_NONE,SYM_SORT] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] | DECLARE_FUN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] LPAREN_TOK sortList[sorts] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] | DEFINE_FUN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] term[expr, expr2] | DECLARE_DATATYPE_TOK datatypeDefCommand[false, cmd] | DECLARE_DATATYPES_TOK datatypesDefCommand[false, cmd] | GET_VALUE_TOK ( LPAREN_TOK termList[terms,expr] RPAREN_TOK |~ LPAREN_TOK ) | GET_ASSIGNMENT_TOK | ASSERT_TOK term[expr, expr2] | CHECK_SAT_TOK ( term[expr, expr2] |) | CHECK_SAT_ASSUMING_TOK ( LPAREN_TOK termList[terms,expr] RPAREN_TOK |~ LPAREN_TOK ) | GET_ASSERTIONS_TOK | GET_PROOF_TOK | GET_UNSAT_ASSUMPTIONS_TOK | GET_UNSAT_CORE_TOK | PUSH_TOK (k= INTEGER_LITERAL |) | POP_TOK (k= INTEGER_LITERAL |) | EXIT_TOK | smt25Command[cmd] | extendedCommand[cmd] | SIMPLE_SYMBOL )
2422
2423
            ANTLR3_UINT32 alt9;
2424
2425
271716
            alt9=26;
2426
2427
271716
            switch ( LA(1) )
2428
            {
2429
5300
            case SET_LOGIC_TOK:
2430
            	{
2431
5300
            		alt9=1;
2432
            	}
2433
5300
                break;
2434
5645
            case SET_INFO_TOK:
2435
            	{
2436
5645
            		alt9=2;
2437
            	}
2438
5645
                break;
2439
20
            case GET_INFO_TOK:
2440
            	{
2441
20
            		alt9=3;
2442
            	}
2443
20
                break;
2444
1814
            case SET_OPTION_TOK:
2445
            	{
2446
1814
            		alt9=4;
2447
            	}
2448
1814
                break;
2449
41
            case GET_OPTION_TOK:
2450
            	{
2451
41
            		alt9=5;
2452
            	}
2453
41
                break;
2454
3692
            case DECLARE_SORT_TOK:
2455
            	{
2456
3692
            		alt9=6;
2457
            	}
2458
3692
                break;
2459
206
            case DEFINE_SORT_TOK:
2460
            	{
2461
206
            		alt9=7;
2462
            	}
2463
206
                break;
2464
162910
            case DECLARE_FUN_TOK:
2465
            	{
2466
162910
            		alt9=8;
2467
            	}
2468
162910
                break;
2469
1986
            case DEFINE_FUN_TOK:
2470
            	{
2471
1986
            		alt9=9;
2472
            	}
2473
1986
                break;
2474
141
            case DECLARE_DATATYPE_TOK:
2475
            	{
2476
141
            		alt9=10;
2477
            	}
2478
141
                break;
2479
748
            case DECLARE_DATATYPES_TOK:
2480
            	{
2481
748
            		alt9=11;
2482
            	}
2483
748
                break;
2484
58
            case GET_VALUE_TOK:
2485
            	{
2486
58
            		alt9=12;
2487
            	}
2488
58
                break;
2489
10
            case GET_ASSIGNMENT_TOK:
2490
            	{
2491
10
            		alt9=13;
2492
            	}
2493
10
                break;
2494
70185
            case ASSERT_TOK:
2495
            	{
2496
70185
            		alt9=14;
2497
            	}
2498
70185
                break;
2499
8692
            case CHECK_SAT_TOK:
2500
            	{
2501
8692
            		alt9=15;
2502
            	}
2503
8692
                break;
2504
995
            case CHECK_SAT_ASSUMING_TOK:
2505
            	{
2506
995
            		alt9=16;
2507
            	}
2508
995
                break;
2509
            case GET_ASSERTIONS_TOK:
2510
            	{
2511
            		alt9=17;
2512
            	}
2513
                break;
2514
1
            case GET_PROOF_TOK:
2515
            	{
2516
1
            		alt9=18;
2517
            	}
2518
1
                break;
2519
11
            case GET_UNSAT_ASSUMPTIONS_TOK:
2520
            	{
2521
11
            		alt9=19;
2522
            	}
2523
11
                break;
2524
11
            case GET_UNSAT_CORE_TOK:
2525
            	{
2526
11
            		alt9=20;
2527
            	}
2528
11
                break;
2529
3162
            case PUSH_TOK:
2530
            	{
2531
3162
            		alt9=21;
2532
            	}
2533
3162
                break;
2534
2557
            case POP_TOK:
2535
            	{
2536
2557
            		alt9=22;
2537
            	}
2538
2557
                break;
2539
736
            case EXIT_TOK:
2540
            	{
2541
736
            		alt9=23;
2542
            	}
2543
736
                break;
2544
2612
            case DECLARE_CONST_TOK:
2545
            case DEFINE_FUNS_REC_TOK:
2546
            case DEFINE_FUN_REC_TOK:
2547
            case ECHO_TOK:
2548
            case GET_MODEL_TOK:
2549
            case RESET_ASSERTIONS_TOK:
2550
            case RESET_TOK:
2551
            	{
2552
2612
            		alt9=24;
2553
            	}
2554
2612
                break;
2555
183
            case BLOCK_MODEL_TOK:
2556
            case BLOCK_MODEL_VALUES_TOK:
2557
            case DECLARE_CODATATYPES_TOK:
2558
            case DECLARE_CODATATYPE_TOK:
2559
            case DECLARE_FUNS_TOK:
2560
            case DECLARE_HEAP:
2561
            case DECLARE_POOL:
2562
            case DECLARE_PREDS_TOK:
2563
            case DECLARE_SORTS_TOK:
2564
            case DEFINE_CONST_TOK:
2565
            case DEFINE_TOK:
2566
            case GET_ABDUCT_TOK:
2567
            case GET_INTERPOL_TOK:
2568
            case GET_QE_DISJUNCT_TOK:
2569
            case GET_QE_TOK:
2570
            case SIMPLIFY_TOK:
2571
            	{
2572
183
            		alt9=25;
2573
            	}
2574
183
                break;
2575
            case SIMPLE_SYMBOL:
2576
            	{
2577
            		alt9=26;
2578
            	}
2579
                break;
2580
2581
            default:
2582
                CONSTRUCTEX();
2583
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
2584
                EXCEPTION->message      = (void *)"";
2585
                EXCEPTION->decisionNum  = 9;
2586
                EXCEPTION->state        = 0;
2587
2588
2589
                goto rulecommandEx;
2590
2591
            }
2592
2593
271716
            switch (alt9)
2594
            {
2595
5300
        	case 1:
2596
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:213:5: SET_LOGIC_TOK symbol[name,CHECK_NONE,SYM_SORT]
2597
        	    {
2598
5300
        	         MATCHT(SET_LOGIC_TOK, &FOLLOW_SET_LOGIC_TOK_in_command260);
2599
5300
        	        if  (HASEXCEPTION())
2600
        	        {
2601
        	            goto rulecommandEx;
2602
        	        }
2603
2604
2605
5300
        	        FOLLOWPUSH(FOLLOW_symbol_in_command262);
2606
5300
        	        symbol(ctx, name, CHECK_NONE, SYM_SORT);
2607
2608
5300
        	        FOLLOWPOP();
2609
5300
        	        if  (HASEXCEPTION())
2610
        	        {
2611
        	            goto rulecommandEx;
2612
        	        }
2613
2614
2615
        	        {
2616
2617
5301
        	                  cmd->reset(PARSER_STATE->setLogic(name));
2618
2619
        	        }
2620
2621
2622
        	    }
2623
5299
        	    break;
2624
5645
        	case 2:
2625
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:218:5: SET_INFO_TOK setInfoInternal[cmd]
2626
        	    {
2627
5645
        	         MATCHT(SET_INFO_TOK, &FOLLOW_SET_INFO_TOK_in_command281);
2628
5645
        	        if  (HASEXCEPTION())
2629
        	        {
2630
        	            goto rulecommandEx;
2631
        	        }
2632
2633
2634
5645
        	        FOLLOWPUSH(FOLLOW_setInfoInternal_in_command283);
2635
5645
        	        setInfoInternal(ctx, cmd);
2636
2637
5645
        	        FOLLOWPOP();
2638
5645
        	        if  (HASEXCEPTION())
2639
        	        {
2640
        	            goto rulecommandEx;
2641
        	        }
2642
2643
2644
        	    }
2645
5645
        	    break;
2646
20
        	case 3:
2647
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:220:5: GET_INFO_TOK KEYWORD
2648
        	    {
2649
20
        	         MATCHT(GET_INFO_TOK, &FOLLOW_GET_INFO_TOK_in_command296);
2650
20
        	        if  (HASEXCEPTION())
2651
        	        {
2652
        	            goto rulecommandEx;
2653
        	        }
2654
2655
2656
20
        	        KEYWORD1 = (pANTLR3_COMMON_TOKEN) MATCHT(KEYWORD, &FOLLOW_KEYWORD_in_command298);
2657
20
        	        if  (HASEXCEPTION())
2658
        	        {
2659
        	            goto rulecommandEx;
2660
        	        }
2661
2662
2663
        	        {
2664
80
        	             cmd->reset(new GetInfoCommand(
2665
60
        	                      AntlrInput::tokenText(KEYWORD1).c_str() + 1));
2666
2667
        	        }
2668
2669
2670
        	    }
2671
20
        	    break;
2672
1814
        	case 4:
2673
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:225:5: SET_OPTION_TOK setOptionInternal[cmd]
2674
        	    {
2675
1814
        	         MATCHT(SET_OPTION_TOK, &FOLLOW_SET_OPTION_TOK_in_command316);
2676
1814
        	        if  (HASEXCEPTION())
2677
        	        {
2678
        	            goto rulecommandEx;
2679
        	        }
2680
2681
2682
1814
        	        FOLLOWPUSH(FOLLOW_setOptionInternal_in_command318);
2683
1814
        	        setOptionInternal(ctx, cmd);
2684
2685
1814
        	        FOLLOWPOP();
2686
1814
        	        if  (HASEXCEPTION())
2687
        	        {
2688
        	            goto rulecommandEx;
2689
        	        }
2690
2691
2692
        	    }
2693
1814
        	    break;
2694
41
        	case 5:
2695
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:227:5: GET_OPTION_TOK KEYWORD
2696
        	    {
2697
41
        	         MATCHT(GET_OPTION_TOK, &FOLLOW_GET_OPTION_TOK_in_command331);
2698
41
        	        if  (HASEXCEPTION())
2699
        	        {
2700
        	            goto rulecommandEx;
2701
        	        }
2702
2703
2704
41
        	        KEYWORD2 = (pANTLR3_COMMON_TOKEN) MATCHT(KEYWORD, &FOLLOW_KEYWORD_in_command333);
2705
41
        	        if  (HASEXCEPTION())
2706
        	        {
2707
        	            goto rulecommandEx;
2708
        	        }
2709
2710
2711
        	        {
2712
164
        	             cmd->reset(new GetOptionCommand(
2713
123
        	                      AntlrInput::tokenText(KEYWORD2).c_str() + 1));
2714
2715
        	        }
2716
2717
2718
        	    }
2719
41
        	    break;
2720
3692
        	case 6:
2721
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:232:5: DECLARE_SORT_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] n= INTEGER_LITERAL
2722
        	    {
2723
3692
        	         MATCHT(DECLARE_SORT_TOK, &FOLLOW_DECLARE_SORT_TOK_in_command351);
2724
3692
        	        if  (HASEXCEPTION())
2725
        	        {
2726
        	            goto rulecommandEx;
2727
        	        }
2728
2729
2730
        	        {
2731
2732
3692
        	                  PARSER_STATE->checkThatLogicIsSet();
2733
3692
        	                  PARSER_STATE->checkLogicAllowsFreeSorts();
2734
2735
        	        }
2736
2737
2738
3692
        	        FOLLOWPUSH(FOLLOW_symbol_in_command363);
2739
3692
        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_SORT);
2740
2741
3690
        	        FOLLOWPOP();
2742
3690
        	        if  (HASEXCEPTION())
2743
        	        {
2744
        	            goto rulecommandEx;
2745
        	        }
2746
2747
2748
        	        {
2749
3690
        	             PARSER_STATE->checkUserSymbol(name);
2750
        	        }
2751
2752
2753
3690
        	        n = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_command378);
2754
3690
        	        if  (HASEXCEPTION())
2755
        	        {
2756
2
        	            goto rulecommandEx;
2757
        	        }
2758
2759
2760
        	        {
2761
7376
        	             Debug("parser") << "declare sort: '" << name
2762
3688
        	                                  << "' arity=" << n << std::endl;
2763
3688
        	                  unsigned arity = AntlrInput::tokenToUnsigned(n);
2764
3688
        	                  if(arity == 0) {
2765
7330
        	                    api::Sort type = PARSER_STATE->mkSort(name);
2766
3665
        	                    cmd->reset(new DeclareSortCommand(name, 0, type));
2767
        	                  } else {
2768
46
        	                    api::Sort type = PARSER_STATE->mkSortConstructor(name, arity);
2769
23
        	                    cmd->reset(new DeclareSortCommand(name, arity, type));
2770
        	                  }
2771
2772
        	        }
2773
2774
2775
        	    }
2776
3688
        	    break;
2777
206
        	case 7:
2778
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:252:5: DEFINE_SORT_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] LPAREN_TOK symbolList[names,CHECK_NONE,SYM_SORT] RPAREN_TOK sortSymbol[t,CHECK_DECLARED]
2779
        	    {
2780
206
        	         MATCHT(DEFINE_SORT_TOK, &FOLLOW_DEFINE_SORT_TOK_in_command396);
2781
206
        	        if  (HASEXCEPTION())
2782
        	        {
2783
        	            goto rulecommandEx;
2784
        	        }
2785
2786
2787
        	        {
2788
206
        	             PARSER_STATE->checkThatLogicIsSet();
2789
        	        }
2790
2791
2792
206
        	        FOLLOWPUSH(FOLLOW_symbol_in_command404);
2793
206
        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_SORT);
2794
2795
206
        	        FOLLOWPOP();
2796
206
        	        if  (HASEXCEPTION())
2797
        	        {
2798
        	            goto rulecommandEx;
2799
        	        }
2800
2801
2802
        	        {
2803
206
        	             PARSER_STATE->checkUserSymbol(name);
2804
        	        }
2805
2806
2807
206
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_command417);
2808
206
        	        if  (HASEXCEPTION())
2809
        	        {
2810
        	            goto rulecommandEx;
2811
        	        }
2812
2813
2814
206
        	        FOLLOWPUSH(FOLLOW_symbolList_in_command419);
2815
206
        	        symbolList(ctx, names, CHECK_NONE, SYM_SORT);
2816
2817
206
        	        FOLLOWPOP();
2818
206
        	        if  (HASEXCEPTION())
2819
        	        {
2820
        	            goto rulecommandEx;
2821
        	        }
2822
2823
2824
206
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_command422);
2825
206
        	        if  (HASEXCEPTION())
2826
        	        {
2827
        	            goto rulecommandEx;
2828
        	        }
2829
2830
2831
        	        {
2832
206
        	             PARSER_STATE->pushScope();
2833
208
        	                  for(std::vector<std::string>::const_iterator i = names.begin(),
2834
206
        	                        iend = names.end();
2835
208
        	                      i != iend;
2836
        	                      ++i) {
2837
2
        	                    sorts.push_back(PARSER_STATE->mkSort(*i));
2838
        	                  }
2839
2840
        	        }
2841
2842
2843
206
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_command434);
2844
206
        	        sortSymbol(ctx, t, CHECK_DECLARED);
2845
2846
206
        	        FOLLOWPOP();
2847
206
        	        if  (HASEXCEPTION())
2848
        	        {
2849
        	            goto rulecommandEx;
2850
        	        }
2851
2852
2853
        	        {
2854
206
        	             PARSER_STATE->popScope();
2855
        	                  // Do NOT call mkSort, since that creates a new sort!
2856
        	                  // This name is not its own distinct sort, it's an alias.
2857
206
        	                  PARSER_STATE->defineParameterizedType(name, sorts, t);
2858
206
        	                  cmd->reset(new DefineSortCommand(name, sorts, t));
2859
2860
        	        }
2861
2862
2863
        	    }
2864
206
        	    break;
2865
162910
        	case 8:
2866
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:272:5: DECLARE_FUN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] LPAREN_TOK sortList[sorts] RPAREN_TOK sortSymbol[t,CHECK_DECLARED]
2867
        	    {
2868
162910
        	         MATCHT(DECLARE_FUN_TOK, &FOLLOW_DECLARE_FUN_TOK_in_command453);
2869
162910
        	        if  (HASEXCEPTION())
2870
        	        {
2871
        	            goto rulecommandEx;
2872
        	        }
2873
2874
2875
        	        {
2876
162910
        	             PARSER_STATE->checkThatLogicIsSet();
2877
        	        }
2878
2879
2880
162908
        	        FOLLOWPUSH(FOLLOW_symbol_in_command461);
2881
162908
        	        symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
2882
2883
162908
        	        FOLLOWPOP();
2884
162908
        	        if  (HASEXCEPTION())
2885
        	        {
2886
        	            goto rulecommandEx;
2887
        	        }
2888
2889
2890
        	        {
2891
162908
        	             PARSER_STATE->checkUserSymbol(name);
2892
        	        }
2893
2894
2895
162906
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_command474);
2896
162906
        	        if  (HASEXCEPTION())
2897
        	        {
2898
2
        	            goto rulecommandEx;
2899
        	        }
2900
2901
2902
162904
        	        FOLLOWPUSH(FOLLOW_sortList_in_command476);
2903
162904
        	        sortList(ctx, sorts);
2904
2905
162903
        	        FOLLOWPOP();
2906
162903
        	        if  (HASEXCEPTION())
2907
        	        {
2908
        	            goto rulecommandEx;
2909
        	        }
2910
2911
2912
162903
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_command479);
2913
162903
        	        if  (HASEXCEPTION())
2914
        	        {
2915
        	            goto rulecommandEx;
2916
        	        }
2917
2918
2919
162903
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_command485);
2920
162903
        	        sortSymbol(ctx, t, CHECK_DECLARED);
2921
2922
162902
        	        FOLLOWPOP();
2923
162902
        	        if  (HASEXCEPTION())
2924
        	        {
2925
        	            goto rulecommandEx;
2926
        	        }
2927
2928
2929
        	        {
2930
162902
        	             Debug("parser") << "declare fun: '" << name << "'" << std::endl;
2931
162902
        	                  if( !sorts.empty() ) {
2932
14393
        	                    t = PARSER_STATE->mkFlatFunctionType(sorts, t);
2933
        	                  }
2934
162902
        	                  if(t.isFunction())
2935
        	                  {
2936
14404
        	                    PARSER_STATE->checkLogicAllowsFunctions();
2937
        	                  }
2938
        	                  // we allow overloading for function declarations
2939
162902
        	                  if( PARSER_STATE->sygus() )
2940
        	                  {
2941
        	                    PARSER_STATE->parseErrorLogic("declare-fun are not allowed in sygus "
2942
        	                                                  "version 2.0");
2943
        	                  }
2944
        	                  else
2945
        	                  {
2946
        	                    api::Term func =
2947
325804
        	                        PARSER_STATE->bindVar(name, t, false, true);
2948
162902
        	                    cmd->reset(new DeclareFunctionCommand(name, func, t));
2949
        	                  }
2950
2951
        	        }
2952
2953
2954
        	    }
2955
162902
        	    break;
2956
1986
        	case 9:
2957
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:299:5: DEFINE_FUN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] term[expr, expr2]
2958
        	    {
2959
1986
        	         MATCHT(DEFINE_FUN_TOK, &FOLLOW_DEFINE_FUN_TOK_in_command504);
2960
1986
        	        if  (HASEXCEPTION())
2961
        	        {
2962
        	            goto rulecommandEx;
2963
        	        }
2964
2965
2966
        	        {
2967
1986
        	             PARSER_STATE->checkThatLogicIsSet();
2968
        	        }
2969
2970
2971
1986
        	        FOLLOWPUSH(FOLLOW_symbol_in_command512);
2972
1986
        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
2973
2974
1986
        	        FOLLOWPOP();
2975
1986
        	        if  (HASEXCEPTION())
2976
        	        {
2977
        	            goto rulecommandEx;
2978
        	        }
2979
2980
2981
        	        {
2982
1986
        	             PARSER_STATE->checkUserSymbol(name);
2983
        	        }
2984
2985
2986
1986
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_command525);
2987
1986
        	        if  (HASEXCEPTION())
2988
        	        {
2989
        	            goto rulecommandEx;
2990
        	        }
2991
2992
2993
1986
        	        FOLLOWPUSH(FOLLOW_sortedVarList_in_command527);
2994
1986
        	        sortedVarList(ctx, sortedVarNames);
2995
2996
1986
        	        FOLLOWPOP();
2997
1986
        	        if  (HASEXCEPTION())
2998
        	        {
2999
        	            goto rulecommandEx;
3000
        	        }
3001
3002
3003
1986
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_command530);
3004
1986
        	        if  (HASEXCEPTION())
3005
        	        {
3006
        	            goto rulecommandEx;
3007
        	        }
3008
3009
3010
1986
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_command536);
3011
1986
        	        sortSymbol(ctx, t, CHECK_DECLARED);
3012
3013
1986
        	        FOLLOWPOP();
3014
1986
        	        if  (HASEXCEPTION())
3015
        	        {
3016
        	            goto rulecommandEx;
3017
        	        }
3018
3019
3020
        	        {
3021
        	             /* add variables to parser state before parsing term */
3022
1986
        	                  Debug("parser") << "define fun: '" << name << "'" << std::endl;
3023
1986
        	                  if( sortedVarNames.size() > 0 ) {
3024
1190
        	                    sorts.reserve(sortedVarNames.size());
3025
2891
        	                    for(std::vector<std::pair<std::string, api::Sort> >::const_iterator i =
3026
1190
        	                          sortedVarNames.begin(), iend = sortedVarNames.end();
3027
4081
        	                        i != iend;
3028
        	                        ++i) {
3029
2891
        	                      sorts.push_back((*i).second);
3030
        	                    }
3031
        	                  }
3032
3033
1986
        	                  t = PARSER_STATE->mkFlatFunctionType(sorts, t, flattenVars);
3034
1986
        	                  if (sortedVarNames.size() > 0)
3035
        	                  {
3036
1190
        	                    PARSER_STATE->pushScope();
3037
        	                  }
3038
1986
        	                  terms = PARSER_STATE->bindBoundVars(sortedVarNames);
3039
3040
        	        }
3041
3042
3043
1986
        	        FOLLOWPUSH(FOLLOW_term_in_command549);
3044
1986
        	        term(ctx, expr, expr2);
3045
3046
1985
        	        FOLLOWPOP();
3047
1985
        	        if  (HASEXCEPTION())
3048
        	        {
3049
        	            goto rulecommandEx;
3050
        	        }
3051
3052
3053
        	        {
3054
3055
1985
        	                  if( !flattenVars.empty() ){
3056
        	                    // if this function has any implicit variables flattenVars,
3057
        	                    // we apply the body of the definition to the flatten vars
3058
3
        	                    expr = PARSER_STATE->mkHoApply(expr, flattenVars);
3059
3
        	                    terms.insert(terms.end(), flattenVars.begin(), flattenVars.end());
3060
        	                  }
3061
1985
        	                  if (sortedVarNames.size() > 0)
3062
        	                  {
3063
1189
        	                    PARSER_STATE->popScope();
3064
        	                  }
3065
        	                  // declare the name down here (while parsing term, signature
3066
        	                  // must not be extended with the name itself; no recursion
3067
        	                  // permitted)
3068
        	                  // we allow overloading for function definitions
3069
3970
        	                  api::Term func = PARSER_STATE->bindVar(name, t, false, true);
3070
3970
        	                  cmd->reset(new DefineFunctionCommand(
3071
1985
        	                      name, func, terms, expr, SYM_MAN->getGlobalDeclarations()));
3072
3073
1985
        	        }
3074
3075
3076
        	    }
3077
1985
        	    break;
3078
141
        	case 10:
3079
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:343:5: DECLARE_DATATYPE_TOK datatypeDefCommand[false, cmd]
3080
        	    {
3081
141
        	         MATCHT(DECLARE_DATATYPE_TOK, &FOLLOW_DECLARE_DATATYPE_TOK_in_command562);
3082
141
        	        if  (HASEXCEPTION())
3083
        	        {
3084
        	            goto rulecommandEx;
3085
        	        }
3086
3087
3088
141
        	        FOLLOWPUSH(FOLLOW_datatypeDefCommand_in_command564);
3089
141
        	        datatypeDefCommand(ctx, false, cmd);
3090
3091
141
        	        FOLLOWPOP();
3092
141
        	        if  (HASEXCEPTION())
3093
        	        {
3094
        	            goto rulecommandEx;
3095
        	        }
3096
3097
3098
        	    }
3099
141
        	    break;
3100
748
        	case 11:
3101
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:344:5: DECLARE_DATATYPES_TOK datatypesDefCommand[false, cmd]
3102
        	    {
3103
748
        	         MATCHT(DECLARE_DATATYPES_TOK, &FOLLOW_DECLARE_DATATYPES_TOK_in_command571);
3104
748
        	        if  (HASEXCEPTION())
3105
        	        {
3106
        	            goto rulecommandEx;
3107
        	        }
3108
3109
3110
748
        	        FOLLOWPUSH(FOLLOW_datatypesDefCommand_in_command573);
3111
748
        	        datatypesDefCommand(ctx, false, cmd);
3112
3113
748
        	        FOLLOWPOP();
3114
748
        	        if  (HASEXCEPTION())
3115
        	        {
3116
        	            goto rulecommandEx;
3117
        	        }
3118
3119
3120
        	    }
3121
748
        	    break;
3122
58
        	case 12:
3123
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:346:5: GET_VALUE_TOK ( LPAREN_TOK termList[terms,expr] RPAREN_TOK |~ LPAREN_TOK )
3124
        	    {
3125
58
        	         MATCHT(GET_VALUE_TOK, &FOLLOW_GET_VALUE_TOK_in_command586);
3126
58
        	        if  (HASEXCEPTION())
3127
        	        {
3128
        	            goto rulecommandEx;
3129
        	        }
3130
3131
3132
        	        {
3133
58
        	             PARSER_STATE->checkThatLogicIsSet();
3134
        	        }
3135
3136
3137
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:347:5: ( LPAREN_TOK termList[terms,expr] RPAREN_TOK |~ LPAREN_TOK )
3138
        	        {
3139
58
        	            int alt4=2;
3140
58
        	            switch ( LA(1) )
3141
        	            {
3142
58
        	            case LPAREN_TOK:
3143
        	            	{
3144
58
        	            		alt4=1;
3145
        	            	}
3146
58
        	                break;
3147
        	            case ALPHA:
3148
        	            case ASSERT_TOK:
3149
        	            case AS_TOK:
3150
        	            case ATTRIBUTE_INST_ADD_TO_POOL_TOK:
3151
        	            case ATTRIBUTE_INST_LEVEL:
3152
        	            case ATTRIBUTE_NAMED_TOK:
3153
        	            case ATTRIBUTE_NO_PATTERN_TOK:
3154
        	            case ATTRIBUTE_PATTERN_TOK:
3155
        	            case ATTRIBUTE_POOL_TOK:
3156
        	            case ATTRIBUTE_QUANTIFIER_ID_TOK:
3157
        	            case ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK:
3158
        	            case ATTRIBUTE_TOK:
3159
        	            case BINARY_LITERAL:
3160
        	            case BLOCK_MODEL_TOK:
3161
        	            case BLOCK_MODEL_VALUES_TOK:
3162
        	            case CHAR_TOK:
3163
        	            case CHECK_SAT_ASSUMING_TOK:
3164
        	            case CHECK_SAT_TOK:
3165
        	            case CHECK_SYNTH_TOK:
3166
        	            case COMMENT:
3167
        	            case COMPREHENSION_TOK:
3168
        	            case CONSTRAINT_TOK:
3169
        	            case CONST_TOK:
3170
        	            case DECIMAL_LITERAL:
3171
        	            case DECLARE_CODATATYPES_2_5_TOK:
3172
        	            case DECLARE_CODATATYPES_TOK:
3173
        	            case DECLARE_CODATATYPE_TOK:
3174
        	            case DECLARE_CONST_TOK:
3175
        	            case DECLARE_DATATYPES_2_5_TOK:
3176
        	            case DECLARE_DATATYPES_TOK:
3177
        	            case DECLARE_DATATYPE_TOK:
3178
        	            case DECLARE_FUNS_TOK:
3179
        	            case DECLARE_FUN_TOK:
3180
        	            case DECLARE_HEAP:
3181
        	            case DECLARE_POOL:
3182
        	            case DECLARE_PREDS_TOK:
3183
        	            case DECLARE_SORTS_TOK:
3184
        	            case DECLARE_SORT_TOK:
3185
        	            case DECLARE_VAR_TOK:
3186
        	            case DEFINE_CONST_TOK:
3187
        	            case DEFINE_FUNS_REC_TOK:
3188
        	            case DEFINE_FUN_REC_TOK:
3189
        	            case DEFINE_FUN_TOK:
3190
        	            case DEFINE_SORT_TOK:
3191
        	            case DEFINE_TOK:
3192
        	            case DIGIT:
3193
        	            case ECHO_TOK:
3194
        	            case EMP_TOK:
3195
        	            case EXISTS_TOK:
3196
        	            case EXIT_TOK:
3197
        	            case FORALL_TOK:
3198
        	            case GET_ABDUCT_TOK:
3199
        	            case GET_ASSERTIONS_TOK:
3200
        	            case GET_ASSIGNMENT_TOK:
3201
        	            case GET_INFO_TOK:
3202
        	            case GET_INTERPOL_TOK:
3203
        	            case GET_MODEL_TOK:
3204
        	            case GET_OPTION_TOK:
3205
        	            case GET_PROOF_TOK:
3206
        	            case GET_QE_DISJUNCT_TOK:
3207
        	            case GET_QE_TOK:
3208
        	            case GET_UNSAT_ASSUMPTIONS_TOK:
3209
        	            case GET_UNSAT_CORE_TOK:
3210
        	            case GET_VALUE_TOK:
3211
        	            case HEX_DIGIT:
3212
        	            case HEX_LITERAL:
3213
        	            case HO_ARROW_TOK:
3214
        	            case HO_LAMBDA_TOK:
3215
        	            case INCLUDE_TOK:
3216
        	            case INDEX_TOK:
3217
        	            case INTEGER_LITERAL:
3218
        	            case INV_CONSTRAINT_TOK:
3219
        	            case KEYWORD:
3220
        	            case LET_TOK:
3221
        	            case MATCH_TOK:
3222
        	            case NUMERAL:
3223
        	            case PAR_TOK:
3224
        	            case POP_TOK:
3225
        	            case PUSH_TOK:
3226
        	            case QUOTED_SYMBOL:
3227
        	            case RESET_ASSERTIONS_TOK:
3228
        	            case RESET_TOK:
3229
        	            case RPAREN_TOK:
3230
        	            case SET_FEATURE_TOK:
3231
        	            case SET_INFO_TOK:
3232
        	            case SET_LOGIC_TOK:
3233
        	            case SET_OPTION_TOK:
3234
        	            case SIMPLE_SYMBOL:
3235
        	            case SIMPLIFY_TOK:
3236
        	            case STRING_LITERAL:
3237
        	            case SYGUS_CONSTANT_TOK:
3238
        	            case SYGUS_VARIABLE_TOK:
3239
        	            case SYMBOL_CHAR:
3240
        	            case SYMBOL_CHAR_NOUNDERSCORE_NOATTRIBUTE:
3241
        	            case SYNTH_FUN_TOK:
3242
        	            case SYNTH_INV_TOK:
3243
        	            case TESTER_TOK:
3244
        	            case TUPLE_CONST_TOK:
3245
        	            case TUPLE_PROJECT_TOK:
3246
        	            case TUPLE_SEL_TOK:
3247
        	            case UNTERMINATED_QUOTED_SYMBOL:
3248
        	            case UPDATE_TOK:
3249
        	            case WHITESPACE:
3250
        	            case 108:
3251
        	            	{
3252
        	            		alt4=2;
3253
        	            	}
3254
        	                break;
3255
3256
        	            default:
3257
        	                CONSTRUCTEX();
3258
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
3259
        	                EXCEPTION->message      = (void *)"";
3260
        	                EXCEPTION->decisionNum  = 4;
3261
        	                EXCEPTION->state        = 0;
3262
3263
3264
        	                goto rulecommandEx;
3265
3266
        	            }
3267
3268
58
        	            switch (alt4)
3269
        	            {
3270
58
        	        	case 1:
3271
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:347:7: LPAREN_TOK termList[terms,expr] RPAREN_TOK
3272
        	        	    {
3273
58
        	        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_command596);
3274
58
        	        	        if  (HASEXCEPTION())
3275
        	        	        {
3276
        	        	            goto rulecommandEx;
3277
        	        	        }
3278
3279
3280
58
        	        	        FOLLOWPUSH(FOLLOW_termList_in_command598);
3281
58
        	        	        termList(ctx, terms, expr);
3282
3283
58
        	        	        FOLLOWPOP();
3284
58
        	        	        if  (HASEXCEPTION())
3285
        	        	        {
3286
        	        	            goto rulecommandEx;
3287
        	        	        }
3288
3289
3290
58
        	        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_command601);
3291
58
        	        	        if  (HASEXCEPTION())
3292
        	        	        {
3293
        	        	            goto rulecommandEx;
3294
        	        	        }
3295
3296
3297
        	        	        {
3298
58
        	        	             cmd->reset(new GetValueCommand(terms));
3299
        	        	        }
3300
3301
3302
        	        	    }
3303
58
        	        	    break;
3304
        	        	case 2:
3305
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:349:7: ~ LPAREN_TOK
3306
        	        	    {
3307
        	        	        if ( ((LA(1) >= ALPHA) && (LA(1) <= LET_TOK)) || ((LA(1) >= MATCH_TOK) && (LA(1) <= 108)) )
3308
        	        	        {
3309
        	        	            CONSUME();
3310
        	        	            PERRORRECOVERY=ANTLR3_FALSE;
3311
        	        	        }
3312
        	        	        else
3313
        	        	        {
3314
        	        	            CONSTRUCTEX();
3315
        	        	            EXCEPTION->type         = ANTLR3_MISMATCHED_SET_EXCEPTION;
3316
        	        	            EXCEPTION->name         = (void *)ANTLR3_MISMATCHED_SET_NAME;
3317
        	        	            EXCEPTION->expectingSet = NULL;
3318
3319
        	        	            goto rulecommandEx;
3320
        	        	        }
3321
3322
3323
        	        	        {
3324
        	        	             PARSER_STATE->parseError("The get-value command expects a list of "
3325
        	        	                                             "terms.  Perhaps you forgot a pair of "
3326
        	        	                                             "parentheses?");
3327
3328
        	        	        }
3329
3330
3331
        	        	    }
3332
        	        	    break;
3333
3334
        	            }
3335
        	        }
3336
3337
        	    }
3338
58
        	    break;
3339
10
        	case 13:
3340
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:356:5: GET_ASSIGNMENT_TOK
3341
        	    {
3342
10
        	         MATCHT(GET_ASSIGNMENT_TOK, &FOLLOW_GET_ASSIGNMENT_TOK_in_command644);
3343
10
        	        if  (HASEXCEPTION())
3344
        	        {
3345
        	            goto rulecommandEx;
3346
        	        }
3347
3348
3349
        	        {
3350
10
        	             PARSER_STATE->checkThatLogicIsSet();
3351
        	        }
3352
3353
3354
        	        {
3355
10
        	             cmd->reset(new GetAssignmentCommand());
3356
        	        }
3357
3358
3359
        	    }
3360
10
        	    break;
3361
70185
        	case 14:
3362
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:359:5: ASSERT_TOK term[expr, expr2]
3363
        	    {
3364
70185
        	         MATCHT(ASSERT_TOK, &FOLLOW_ASSERT_TOK_in_command664);
3365
70185
        	        if  (HASEXCEPTION())
3366
        	        {
3367
        	            goto rulecommandEx;
3368
        	        }
3369
3370
3371
        	        {
3372
70185
        	             PARSER_STATE->checkThatLogicIsSet();
3373
        	        }
3374
3375
3376
        	        {
3377
70183
        	             PARSER_STATE->clearLastNamedTerm();
3378
        	        }
3379
3380
3381
70183
        	        FOLLOWPUSH(FOLLOW_term_in_command678);
3382
70183
        	        term(ctx, expr, expr2);
3383
3384
70175
        	        FOLLOWPOP();
3385
70175
        	        if  (HASEXCEPTION())
3386
        	        {
3387
        	            goto rulecommandEx;
3388
        	        }
3389
3390
3391
        	        {
3392
70175
        	             cmd->reset(new AssertCommand(expr));
3393
70175
        	                  if (PARSER_STATE->lastNamedTerm().first == expr)
3394
        	                  {
3395
        	                    // set the expression name, if there was a named term
3396
        	                    std::pair<api::Term, std::string> namedTerm =
3397
9286
        	                        PARSER_STATE->lastNamedTerm();
3398
4643
        	                    SYM_MAN->setExpressionName(namedTerm.first, namedTerm.second, true);
3399
        	                  }
3400
3401
        	        }
3402
3403
3404
        	    }
3405
70175
        	    break;
3406
8692
        	case 15:
3407
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:372:5: CHECK_SAT_TOK ( term[expr, expr2] |)
3408
        	    {
3409
8692
        	         MATCHT(CHECK_SAT_TOK, &FOLLOW_CHECK_SAT_TOK_in_command697);
3410
8692
        	        if  (HASEXCEPTION())
3411
        	        {
3412
        	            goto rulecommandEx;
3413
        	        }
3414
3415
3416
        	        {
3417
8692
        	             PARSER_STATE->checkThatLogicIsSet();
3418
        	        }
3419
3420
3421
        	        {
3422
8692
        	             if( PARSER_STATE->sygus() ){
3423
        	                    PARSER_STATE->parseError("Sygus does not support check-sat command.");
3424
        	                  }
3425
3426
        	        }
3427
3428
3429
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:377:5: ( term[expr, expr2] |)
3430
        	        {
3431
8692
        	            int alt5=2;
3432
8692
        	            switch ( LA(1) )
3433
        	            {
3434
11
        	            case BINARY_LITERAL:
3435
        	            case DECIMAL_LITERAL:
3436
        	            case HEX_LITERAL:
3437
        	            case INTEGER_LITERAL:
3438
        	            case LPAREN_TOK:
3439
        	            case QUOTED_SYMBOL:
3440
        	            case SIMPLE_SYMBOL:
3441
        	            case STRING_LITERAL:
3442
        	            case TUPLE_CONST_TOK:
3443
        	            case UNTERMINATED_QUOTED_SYMBOL:
3444
        	            	{
3445
11
        	            		alt5=1;
3446
        	            	}
3447
11
        	                break;
3448
8681
        	            case RPAREN_TOK:
3449
        	            	{
3450
8681
        	            		alt5=2;
3451
        	            	}
3452
8681
        	                break;
3453
3454
        	            default:
3455
        	                CONSTRUCTEX();
3456
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
3457
        	                EXCEPTION->message      = (void *)"";
3458
        	                EXCEPTION->decisionNum  = 5;
3459
        	                EXCEPTION->state        = 0;
3460
3461
3462
        	                goto rulecommandEx;
3463
3464
        	            }
3465
3466
8692
        	            switch (alt5)
3467
        	            {
3468
11
        	        	case 1:
3469
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:377:7: term[expr, expr2]
3470
        	        	    {
3471
11
        	        	        FOLLOWPUSH(FOLLOW_term_in_command713);
3472
11
        	        	        term(ctx, expr, expr2);
3473
3474
11
        	        	        FOLLOWPOP();
3475
11
        	        	        if  (HASEXCEPTION())
3476
        	        	        {
3477
        	        	            goto rulecommandEx;
3478
        	        	        }
3479
3480
3481
        	        	        {
3482
11
        	        	             if(PARSER_STATE->strictModeEnabled()) {
3483
4
        	        	                      PARSER_STATE->parseError(
3484
        	        	                          "Extended commands (such as check-sat with an argument) are not "
3485
        	        	                          "permitted while operating in strict compliance mode.");
3486
        	        	                    }
3487
3488
        	        	        }
3489
3490
3491
        	        	    }
3492
9
        	        	    break;
3493
8681
        	        	case 2:
3494
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:384:7:
3495
        	        	    {
3496
        	        	        {
3497
8681
        	        	             expr = api::Term();
3498
        	        	        }
3499
3500
3501
        	        	    }
3502
8681
        	        	    break;
3503
3504
        	            }
3505
        	        }
3506
3507
        	        {
3508
8690
        	             cmd->reset(new CheckSatCommand(expr));
3509
        	        }
3510
3511
3512
        	    }
3513
8690
        	    break;
3514
995
        	case 16:
3515
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:388:5: CHECK_SAT_ASSUMING_TOK ( LPAREN_TOK termList[terms,expr] RPAREN_TOK |~ LPAREN_TOK )
3516
        	    {
3517
995
        	         MATCHT(CHECK_SAT_ASSUMING_TOK, &FOLLOW_CHECK_SAT_ASSUMING_TOK_in_command754);
3518
995
        	        if  (HASEXCEPTION())
3519
        	        {
3520
        	            goto rulecommandEx;
3521
        	        }
3522
3523
3524
        	        {
3525
995
        	             PARSER_STATE->checkThatLogicIsSet();
3526
        	        }
3527
3528
3529
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:389:5: ( LPAREN_TOK termList[terms,expr] RPAREN_TOK |~ LPAREN_TOK )
3530
        	        {
3531
995
        	            int alt6=2;
3532
995
        	            switch ( LA(1) )
3533
        	            {
3534
995
        	            case LPAREN_TOK:
3535
        	            	{
3536
995
        	            		alt6=1;
3537
        	            	}
3538
995
        	                break;
3539
        	            case ALPHA:
3540
        	            case ASSERT_TOK:
3541
        	            case AS_TOK:
3542
        	            case ATTRIBUTE_INST_ADD_TO_POOL_TOK:
3543
        	            case ATTRIBUTE_INST_LEVEL:
3544
        	            case ATTRIBUTE_NAMED_TOK:
3545
        	            case ATTRIBUTE_NO_PATTERN_TOK:
3546
        	            case ATTRIBUTE_PATTERN_TOK:
3547
        	            case ATTRIBUTE_POOL_TOK:
3548
        	            case ATTRIBUTE_QUANTIFIER_ID_TOK:
3549
        	            case ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK:
3550
        	            case ATTRIBUTE_TOK:
3551
        	            case BINARY_LITERAL:
3552
        	            case BLOCK_MODEL_TOK:
3553
        	            case BLOCK_MODEL_VALUES_TOK:
3554
        	            case CHAR_TOK:
3555
        	            case CHECK_SAT_ASSUMING_TOK:
3556
        	            case CHECK_SAT_TOK:
3557
        	            case CHECK_SYNTH_TOK:
3558
        	            case COMMENT:
3559
        	            case COMPREHENSION_TOK:
3560
        	            case CONSTRAINT_TOK:
3561
        	            case CONST_TOK:
3562
        	            case DECIMAL_LITERAL:
3563
        	            case DECLARE_CODATATYPES_2_5_TOK:
3564
        	            case DECLARE_CODATATYPES_TOK:
3565
        	            case DECLARE_CODATATYPE_TOK:
3566
        	            case DECLARE_CONST_TOK:
3567
        	            case DECLARE_DATATYPES_2_5_TOK:
3568
        	            case DECLARE_DATATYPES_TOK:
3569
        	            case DECLARE_DATATYPE_TOK:
3570
        	            case DECLARE_FUNS_TOK:
3571
        	            case DECLARE_FUN_TOK:
3572
        	            case DECLARE_HEAP:
3573
        	            case DECLARE_POOL:
3574
        	            case DECLARE_PREDS_TOK:
3575
        	            case DECLARE_SORTS_TOK:
3576
        	            case DECLARE_SORT_TOK:
3577
        	            case DECLARE_VAR_TOK:
3578
        	            case DEFINE_CONST_TOK:
3579
        	            case DEFINE_FUNS_REC_TOK:
3580
        	            case DEFINE_FUN_REC_TOK:
3581
        	            case DEFINE_FUN_TOK:
3582
        	            case DEFINE_SORT_TOK:
3583
        	            case DEFINE_TOK:
3584
        	            case DIGIT:
3585
        	            case ECHO_TOK:
3586
        	            case EMP_TOK:
3587
        	            case EXISTS_TOK:
3588
        	            case EXIT_TOK:
3589
        	            case FORALL_TOK:
3590
        	            case GET_ABDUCT_TOK:
3591
        	            case GET_ASSERTIONS_TOK:
3592
        	            case GET_ASSIGNMENT_TOK:
3593
        	            case GET_INFO_TOK:
3594
        	            case GET_INTERPOL_TOK:
3595
        	            case GET_MODEL_TOK:
3596
        	            case GET_OPTION_TOK:
3597
        	            case GET_PROOF_TOK:
3598
        	            case GET_QE_DISJUNCT_TOK:
3599
        	            case GET_QE_TOK:
3600
        	            case GET_UNSAT_ASSUMPTIONS_TOK:
3601
        	            case GET_UNSAT_CORE_TOK:
3602
        	            case GET_VALUE_TOK:
3603
        	            case HEX_DIGIT:
3604
        	            case HEX_LITERAL:
3605
        	            case HO_ARROW_TOK:
3606
        	            case HO_LAMBDA_TOK:
3607
        	            case INCLUDE_TOK:
3608
        	            case INDEX_TOK:
3609
        	            case INTEGER_LITERAL:
3610
        	            case INV_CONSTRAINT_TOK:
3611
        	            case KEYWORD:
3612
        	            case LET_TOK:
3613
        	            case MATCH_TOK:
3614
        	            case NUMERAL:
3615
        	            case PAR_TOK:
3616
        	            case POP_TOK:
3617
        	            case PUSH_TOK:
3618
        	            case QUOTED_SYMBOL:
3619
        	            case RESET_ASSERTIONS_TOK:
3620
        	            case RESET_TOK:
3621
        	            case RPAREN_TOK:
3622
        	            case SET_FEATURE_TOK:
3623
        	            case SET_INFO_TOK:
3624
        	            case SET_LOGIC_TOK:
3625
        	            case SET_OPTION_TOK:
3626
        	            case SIMPLE_SYMBOL:
3627
        	            case SIMPLIFY_TOK:
3628
        	            case STRING_LITERAL:
3629
        	            case SYGUS_CONSTANT_TOK:
3630
        	            case SYGUS_VARIABLE_TOK:
3631
        	            case SYMBOL_CHAR:
3632
        	            case SYMBOL_CHAR_NOUNDERSCORE_NOATTRIBUTE:
3633
        	            case SYNTH_FUN_TOK:
3634
        	            case SYNTH_INV_TOK:
3635
        	            case TESTER_TOK:
3636
        	            case TUPLE_CONST_TOK:
3637
        	            case TUPLE_PROJECT_TOK:
3638
        	            case TUPLE_SEL_TOK:
3639
        	            case UNTERMINATED_QUOTED_SYMBOL:
3640
        	            case UPDATE_TOK:
3641
        	            case WHITESPACE:
3642
        	            case 108:
3643
        	            	{
3644
        	            		alt6=2;
3645
        	            	}
3646
        	                break;
3647
3648
        	            default:
3649
        	                CONSTRUCTEX();
3650
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
3651
        	                EXCEPTION->message      = (void *)"";
3652
        	                EXCEPTION->decisionNum  = 6;
3653
        	                EXCEPTION->state        = 0;
3654
3655
3656
        	                goto rulecommandEx;
3657
3658
        	            }
3659
3660
995
        	            switch (alt6)
3661
        	            {
3662
995
        	        	case 1:
3663
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:389:7: LPAREN_TOK termList[terms,expr] RPAREN_TOK
3664
        	        	    {
3665
995
        	        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_command764);
3666
995
        	        	        if  (HASEXCEPTION())
3667
        	        	        {
3668
        	        	            goto rulecommandEx;
3669
        	        	        }
3670
3671
3672
995
        	        	        FOLLOWPUSH(FOLLOW_termList_in_command766);
3673
995
        	        	        termList(ctx, terms, expr);
3674
3675
992
        	        	        FOLLOWPOP();
3676
992
        	        	        if  (HASEXCEPTION())
3677
        	        	        {
3678
        	        	            goto rulecommandEx;
3679
        	        	        }
3680
3681
3682
992
        	        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_command769);
3683
992
        	        	        if  (HASEXCEPTION())
3684
        	        	        {
3685
        	        	            goto rulecommandEx;
3686
        	        	        }
3687
3688
3689
        	        	        {
3690
3691
992
        	        	                    cmd->reset(new CheckSatAssumingCommand(terms));
3692
3693
        	        	        }
3694
3695
3696
        	        	    }
3697
992
        	        	    break;
3698
        	        	case 2:
3699
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:393:7: ~ LPAREN_TOK
3700
        	        	    {
3701
        	        	        if ( ((LA(1) >= ALPHA) && (LA(1) <= LET_TOK)) || ((LA(1) >= MATCH_TOK) && (LA(1) <= 108)) )
3702
        	        	        {
3703
        	        	            CONSUME();
3704
        	        	            PERRORRECOVERY=ANTLR3_FALSE;
3705
        	        	        }
3706
        	        	        else
3707
        	        	        {
3708
        	        	            CONSTRUCTEX();
3709
        	        	            EXCEPTION->type         = ANTLR3_MISMATCHED_SET_EXCEPTION;
3710
        	        	            EXCEPTION->name         = (void *)ANTLR3_MISMATCHED_SET_NAME;
3711
        	        	            EXCEPTION->expectingSet = NULL;
3712
3713
        	        	            goto rulecommandEx;
3714
        	        	        }
3715
3716
3717
        	        	        {
3718
        	        	             PARSER_STATE->parseError("The check-sat-assuming command expects a "
3719
        	        	                                             "list of terms.  Perhaps you forgot a pair of "
3720
        	        	                                             "parentheses?");
3721
3722
        	        	        }
3723
3724
3725
        	        	    }
3726
        	        	    break;
3727
3728
        	            }
3729
        	        }
3730
3731
        	    }
3732
992
        	    break;
3733
        	case 17:
3734
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:400:5: GET_ASSERTIONS_TOK
3735
        	    {
3736
        	         MATCHT(GET_ASSERTIONS_TOK, &FOLLOW_GET_ASSERTIONS_TOK_in_command812);
3737
        	        if  (HASEXCEPTION())
3738
        	        {
3739
        	            goto rulecommandEx;
3740
        	        }
3741
3742
3743
        	        {
3744
        	             PARSER_STATE->checkThatLogicIsSet();
3745
        	        }
3746
3747
3748
        	        {
3749
        	             cmd->reset(new GetAssertionsCommand());
3750
        	        }
3751
3752
3753
        	    }
3754
        	    break;
3755
1
        	case 18:
3756
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:403:5: GET_PROOF_TOK
3757
        	    {
3758
1
        	         MATCHT(GET_PROOF_TOK, &FOLLOW_GET_PROOF_TOK_in_command832);
3759
1
        	        if  (HASEXCEPTION())
3760
        	        {
3761
        	            goto rulecommandEx;
3762
        	        }
3763
3764
3765
        	        {
3766
1
        	             PARSER_STATE->checkThatLogicIsSet();
3767
        	        }
3768
3769
3770
        	        {
3771
1
        	             cmd->reset(new GetProofCommand());
3772
        	        }
3773
3774
3775
        	    }
3776
1
        	    break;
3777
11
        	case 19:
3778
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:406:5: GET_UNSAT_ASSUMPTIONS_TOK
3779
        	    {
3780
11
        	         MATCHT(GET_UNSAT_ASSUMPTIONS_TOK, &FOLLOW_GET_UNSAT_ASSUMPTIONS_TOK_in_command852);
3781
11
        	        if  (HASEXCEPTION())
3782
        	        {
3783
        	            goto rulecommandEx;
3784
        	        }
3785
3786
3787
        	        {
3788
11
        	             PARSER_STATE->checkThatLogicIsSet();
3789
        	        }
3790
3791
3792
        	        {
3793
11
        	             cmd->reset(new GetUnsatAssumptionsCommand);
3794
        	        }
3795
3796
3797
        	    }
3798
11
        	    break;
3799
11
        	case 20:
3800
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:409:5: GET_UNSAT_CORE_TOK
3801
        	    {
3802
11
        	         MATCHT(GET_UNSAT_CORE_TOK, &FOLLOW_GET_UNSAT_CORE_TOK_in_command872);
3803
11
        	        if  (HASEXCEPTION())
3804
        	        {
3805
        	            goto rulecommandEx;
3806
        	        }
3807
3808
3809
        	        {
3810
11
        	             PARSER_STATE->checkThatLogicIsSet();
3811
        	        }
3812
3813
3814
        	        {
3815
11
        	             cmd->reset(new GetUnsatCoreCommand);
3816
        	        }
3817
3818
3819
        	    }
3820
11
        	    break;
3821
3162
        	case 21:
3822
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:412:5: PUSH_TOK (k= INTEGER_LITERAL |)
3823
        	    {
3824
3162
        	         MATCHT(PUSH_TOK, &FOLLOW_PUSH_TOK_in_command892);
3825
3162
        	        if  (HASEXCEPTION())
3826
        	        {
3827
        	            goto rulecommandEx;
3828
        	        }
3829
3830
3831
        	        {
3832
3162
        	             PARSER_STATE->checkThatLogicIsSet();
3833
        	        }
3834
3835
3836
        	        {
3837
3162
        	             if( PARSER_STATE->sygus() ){
3838
        	                    PARSER_STATE->parseError("Sygus does not support push command.");
3839
        	                  }
3840
3841
        	        }
3842
3843
3844
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:417:5: (k= INTEGER_LITERAL |)
3845
        	        {
3846
3162
        	            int alt7=2;
3847
3162
        	            switch ( LA(1) )
3848
        	            {
3849
2938
        	            case INTEGER_LITERAL:
3850
        	            	{
3851
2938
        	            		alt7=1;
3852
        	            	}
3853
2938
        	                break;
3854
224
        	            case RPAREN_TOK:
3855
        	            	{
3856
224
        	            		alt7=2;
3857
        	            	}
3858
224
        	                break;
3859
3860
        	            default:
3861
        	                CONSTRUCTEX();
3862
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
3863
        	                EXCEPTION->message      = (void *)"";
3864
        	                EXCEPTION->decisionNum  = 7;
3865
        	                EXCEPTION->state        = 0;
3866
3867
3868
        	                goto rulecommandEx;
3869
3870
        	            }
3871
3872
3162
        	            switch (alt7)
3873
        	            {
3874
2938
        	        	case 1:
3875
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:417:7: k= INTEGER_LITERAL
3876
        	        	    {
3877
2938
        	        	        k = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_command910);
3878
2938
        	        	        if  (HASEXCEPTION())
3879
        	        	        {
3880
        	        	            goto rulecommandEx;
3881
        	        	        }
3882
3883
3884
        	        	        {
3885
2938
        	        	             unsigned num = AntlrInput::tokenToUnsigned(k);
3886
2938
        	        	                    if(num == 0) {
3887
        	        	                      cmd->reset(new EmptyCommand());
3888
2938
        	        	                    } else if(num == 1) {
3889
2934
        	        	                      PARSER_STATE->pushScope(true);
3890
2934
        	        	                      cmd->reset(new PushCommand());
3891
        	        	                    } else {
3892
8
        	        	                      std::unique_ptr<CommandSequence> seq(new CommandSequence());
3893
10
        	        	                      do {
3894
14
        	        	                        PARSER_STATE->pushScope(true);
3895
14
        	        	                        Command* push_cmd = new PushCommand();
3896
14
        	        	                        push_cmd->setMuted(num > 1);
3897
14
        	        	                        seq->addCommand(push_cmd);
3898
14
        	        	                        --num;
3899
14
        	        	                        } while(num > 0);
3900
4
        	        	                      cmd->reset(seq.release());
3901
        	        	                    }
3902
3903
        	        	        }
3904
3905
3906
        	        	    }
3907
2938
        	        	    break;
3908
224
        	        	case 2:
3909
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:436:7:
3910
        	        	    {
3911
        	        	        {
3912
224
        	        	             if(PARSER_STATE->strictModeEnabled()) {
3913
        	        	                      PARSER_STATE->parseError(
3914
        	        	                          "Strict compliance mode demands an integer to be provided to "
3915
        	        	                          "PUSH.  Maybe you want (push 1)?");
3916
        	        	                    } else {
3917
224
        	        	                      PARSER_STATE->pushScope(true);
3918
224
        	        	                      cmd->reset(new PushCommand());
3919
        	        	                    }
3920
3921
        	        	        }
3922
3923
3924
        	        	    }
3925
224
        	        	    break;
3926
3927
        	            }
3928
        	        }
3929
3930
        	    }
3931
3162
        	    break;
3932
2557
        	case 22:
3933
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:445:5: POP_TOK (k= INTEGER_LITERAL |)
3934
        	    {
3935
2557
        	         MATCHT(POP_TOK, &FOLLOW_POP_TOK_in_command934);
3936
2557
        	        if  (HASEXCEPTION())
3937
        	        {
3938
        	            goto rulecommandEx;
3939
        	        }
3940
3941
3942
        	        {
3943
2557
        	             PARSER_STATE->checkThatLogicIsSet();
3944
        	        }
3945
3946
3947
        	        {
3948
2557
        	             if( PARSER_STATE->sygus() ){
3949
        	                    PARSER_STATE->parseError("Sygus does not support pop command.");
3950
        	                  }
3951
3952
        	        }
3953
3954
3955
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:450:5: (k= INTEGER_LITERAL |)
3956
        	        {
3957
2557
        	            int alt8=2;
3958
2557
        	            switch ( LA(1) )
3959
        	            {
3960
2355
        	            case INTEGER_LITERAL:
3961
        	            	{
3962
2355
        	            		alt8=1;
3963
        	            	}
3964
2355
        	                break;
3965
202
        	            case RPAREN_TOK:
3966
        	            	{
3967
202
        	            		alt8=2;
3968
        	            	}
3969
202
        	                break;
3970
3971
        	            default:
3972
        	                CONSTRUCTEX();
3973
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
3974
        	                EXCEPTION->message      = (void *)"";
3975
        	                EXCEPTION->decisionNum  = 8;
3976
        	                EXCEPTION->state        = 0;
3977
3978
3979
        	                goto rulecommandEx;
3980
3981
        	            }
3982
3983
2557
        	            switch (alt8)
3984
        	            {
3985
2355
        	        	case 1:
3986
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:450:7: k= INTEGER_LITERAL
3987
        	        	    {
3988
2355
        	        	        k = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_command952);
3989
2355
        	        	        if  (HASEXCEPTION())
3990
        	        	        {
3991
        	        	            goto rulecommandEx;
3992
        	        	        }
3993
3994
3995
        	        	        {
3996
2355
        	        	             unsigned num = AntlrInput::tokenToUnsigned(k);
3997
2355
        	        	                    if(num > PARSER_STATE->scopeLevel()) {
3998
        	        	                      PARSER_STATE->parseError("Attempted to pop above the top stack "
3999
        	        	                                               "frame.");
4000
        	        	                    }
4001
2355
        	        	                    if(num == 0) {
4002
64
        	        	                      cmd->reset(new EmptyCommand());
4003
2291
        	        	                    } else if(num == 1) {
4004
2199
        	        	                      PARSER_STATE->popScope();
4005
2199
        	        	                      cmd->reset(new PopCommand());
4006
        	        	                    } else {
4007
184
        	        	                      std::unique_ptr<CommandSequence> seq(new CommandSequence());
4008
156
        	        	                      do {
4009
248
        	        	                        PARSER_STATE->popScope();
4010
248
        	        	                        Command* pop_command = new PopCommand();
4011
248
        	        	                        pop_command->setMuted(num > 1);
4012
248
        	        	                        seq->addCommand(pop_command);
4013
248
        	        	                        --num;
4014
248
        	        	                      } while(num > 0);
4015
92
        	        	                      cmd->reset(seq.release());
4016
        	        	                    }
4017
4018
        	        	        }
4019
4020
4021
        	        	    }
4022
2355
        	        	    break;
4023
202
        	        	case 2:
4024
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:473:7:
4025
        	        	    {
4026
        	        	        {
4027
202
        	        	             if(PARSER_STATE->strictModeEnabled()) {
4028
        	        	                      PARSER_STATE->parseError(
4029
        	        	                          "Strict compliance mode demands an integer to be provided to POP."
4030
        	        	                          "Maybe you want (pop 1)?");
4031
        	        	                    } else {
4032
202
        	        	                      PARSER_STATE->popScope();
4033
202
        	        	                      cmd->reset(new PopCommand());
4034
        	        	                    }
4035
4036
        	        	        }
4037
4038
4039
        	        	    }
4040
202
        	        	    break;
4041
4042
        	            }
4043
        	        }
4044
4045
        	    }
4046
2557
        	    break;
4047
736
        	case 23:
4048
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:484:5: EXIT_TOK
4049
        	    {
4050
736
        	         MATCHT(EXIT_TOK, &FOLLOW_EXIT_TOK_in_command986);
4051
736
        	        if  (HASEXCEPTION())
4052
        	        {
4053
        	            goto rulecommandEx;
4054
        	        }
4055
4056
4057
        	        {
4058
736
        	             cmd->reset(new QuitCommand());
4059
        	        }
4060
4061
4062
        	    }
4063
736
        	    break;
4064
2612
        	case 24:
4065
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:488:5: smt25Command[cmd]
4066
        	    {
4067
2612
        	        FOLLOWPUSH(FOLLOW_smt25Command_in_command1005);
4068
2612
        	        smt25Command(ctx, cmd);
4069
4070
2612
        	        FOLLOWPOP();
4071
2612
        	        if  (HASEXCEPTION())
4072
        	        {
4073
        	            goto rulecommandEx;
4074
        	        }
4075
4076
4077
        	    }
4078
2612
        	    break;
4079
183
        	case 25:
4080
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:491:5: extendedCommand[cmd]
4081
        	    {
4082
183
        	        FOLLOWPUSH(FOLLOW_extendedCommand_in_command1019);
4083
183
        	        extendedCommand(ctx, cmd);
4084
4085
182
        	        FOLLOWPOP();
4086
182
        	        if  (HASEXCEPTION())
4087
        	        {
4088
        	            goto rulecommandEx;
4089
        	        }
4090
4091
4092
        	        {
4093
182
        	             if(PARSER_STATE->strictModeEnabled()) {
4094
        	                    PARSER_STATE->parseError(
4095
        	                        "Extended commands are not permitted while operating in strict "
4096
        	                        "compliance mode.");
4097
        	                  }
4098
4099
        	        }
4100
4101
4102
        	    }
4103
182
        	    break;
4104
        	case 26:
4105
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:500:5: SIMPLE_SYMBOL
4106
        	    {
4107
        	        SIMPLE_SYMBOL3 = (pANTLR3_COMMON_TOKEN) MATCHT(SIMPLE_SYMBOL, &FOLLOW_SIMPLE_SYMBOL_in_command1039);
4108
        	        if  (HASEXCEPTION())
4109
        	        {
4110
        	            goto rulecommandEx;
4111
        	        }
4112
4113
4114
        	        {
4115
        	             std::string id = AntlrInput::tokenText(SIMPLE_SYMBOL3);
4116
        	                  if(id == "benchmark") {
4117
        	                    PARSER_STATE->parseError(
4118
        	                        "In SMT-LIBv2 mode, but got something that looks like SMT-LIBv1, "
4119
        	                        "which is not supported anymore.");
4120
        	                  } else {
4121
        	                    PARSER_STATE->parseError("expected SMT-LIBv2 command, got `" + id +
4122
        	                                             "'.");
4123
        	                  }
4124
4125
        	        }
4126
4127
4128
        	    }
4129
        	    break;
4130
4131
            }
4132
        }
4133
    }
4134
4135
    // This is where rules clean up and exit
4136
    //
4137
271686
    goto rulecommandEx; /* Prevent compiler warnings */
4138
271690
    rulecommandEx: ;
4139
4140
271690
            if (HASEXCEPTION())
4141
            {
4142
4
                PREPORTERROR();
4143
                PRECOVER();
4144
            }
4145
543372
    return ;
4146
}
4147
/* $ANTLR end command */
4148
4149
/**
4150
 * $ANTLR start sygusCommand
4151
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:513:1: sygusCommand returns [std::unique_ptr<cvc5::Command> cmd] : ( DECLARE_VAR_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] | ( SYNTH_FUN_TOK | SYNTH_INV_TOK ) symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK ( sortSymbol[range,CHECK_DECLARED] )? ( sygusGrammar[grammar, sygusVars, name] )? | CONSTRAINT_TOK term[expr, expr2] | INV_CONSTRAINT_TOK ( symbol[name,CHECK_NONE,SYM_VARIABLE] )+ | CHECK_SYNTH_TOK | SET_FEATURE_TOK keyword[name] symbolicExpr[expr] | command[&cmd] );
4152
 */
4153
static std::unique_ptr<cvc5::Command>
4154
2007
sygusCommand(pSmt2Parser ctx)
4155
{
4156
2007
    std::unique_ptr<cvc5::Command> cmd;
4157
4158
4159
4160
4014
      cvc5::api::Term expr, expr2, fun;
4161
4014
      cvc5::api::Sort t, range;
4162
4014
      std::vector<std::string> names;
4163
4014
      std::vector<std::pair<std::string, cvc5::api::Sort> > sortedVarNames;
4164
4014
      std::vector<cvc5::api::Term> sygusVars;
4165
4014
      std::string name;
4166
      bool isInv;
4167
2007
      cvc5::api::Grammar* grammar = nullptr;
4168
4169
    /* Initialize rule variables
4170
     */
4171
4172
    {
4173
        {
4174
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:524:3: ( DECLARE_VAR_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] | ( SYNTH_FUN_TOK | SYNTH_INV_TOK ) symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK ( sortSymbol[range,CHECK_DECLARED] )? ( sygusGrammar[grammar, sygusVars, name] )? | CONSTRAINT_TOK term[expr, expr2] | INV_CONSTRAINT_TOK ( symbol[name,CHECK_NONE,SYM_VARIABLE] )+ | CHECK_SYNTH_TOK | SET_FEATURE_TOK keyword[name] symbolicExpr[expr] | command[&cmd] )
4175
4176
            ANTLR3_UINT32 alt14;
4177
4178
2007
            alt14=7;
4179
4180
2007
            switch ( LA(1) )
4181
            {
4182
302
            case DECLARE_VAR_TOK:
4183
            	{
4184
302
            		alt14=1;
4185
            	}
4186
302
                break;
4187
286
            case SYNTH_FUN_TOK:
4188
            case SYNTH_INV_TOK:
4189
            	{
4190
286
            		alt14=2;
4191
            	}
4192
286
                break;
4193
605
            case CONSTRAINT_TOK:
4194
            	{
4195
605
            		alt14=3;
4196
            	}
4197
605
                break;
4198
14
            case INV_CONSTRAINT_TOK:
4199
            	{
4200
14
            		alt14=4;
4201
            	}
4202
14
                break;
4203
192
            case CHECK_SYNTH_TOK:
4204
            	{
4205
192
            		alt14=5;
4206
            	}
4207
192
                break;
4208
2
            case SET_FEATURE_TOK:
4209
            	{
4210
2
            		alt14=6;
4211
            	}
4212
2
                break;
4213
606
            case ASSERT_TOK:
4214
            case BLOCK_MODEL_TOK:
4215
            case BLOCK_MODEL_VALUES_TOK:
4216
            case CHECK_SAT_ASSUMING_TOK:
4217
            case CHECK_SAT_TOK:
4218
            case DECLARE_CODATATYPES_TOK:
4219
            case DECLARE_CODATATYPE_TOK:
4220
            case DECLARE_CONST_TOK:
4221
            case DECLARE_DATATYPES_TOK:
4222
            case DECLARE_DATATYPE_TOK:
4223
            case DECLARE_FUNS_TOK:
4224
            case DECLARE_FUN_TOK:
4225
            case DECLARE_HEAP:
4226
            case DECLARE_POOL:
4227
            case DECLARE_PREDS_TOK:
4228
            case DECLARE_SORTS_TOK:
4229
            case DECLARE_SORT_TOK:
4230
            case DEFINE_CONST_TOK:
4231
            case DEFINE_FUNS_REC_TOK:
4232
            case DEFINE_FUN_REC_TOK:
4233
            case DEFINE_FUN_TOK:
4234
            case DEFINE_SORT_TOK:
4235
            case DEFINE_TOK:
4236
            case ECHO_TOK:
4237
            case EXIT_TOK:
4238
            case GET_ABDUCT_TOK:
4239
            case GET_ASSERTIONS_TOK:
4240
            case GET_ASSIGNMENT_TOK:
4241
            case GET_INFO_TOK:
4242
            case GET_INTERPOL_TOK:
4243
            case GET_MODEL_TOK:
4244
            case GET_OPTION_TOK:
4245
            case GET_PROOF_TOK:
4246
            case GET_QE_DISJUNCT_TOK:
4247
            case GET_QE_TOK:
4248
            case GET_UNSAT_ASSUMPTIONS_TOK:
4249
            case GET_UNSAT_CORE_TOK:
4250
            case GET_VALUE_TOK:
4251
            case POP_TOK:
4252
            case PUSH_TOK:
4253
            case RESET_ASSERTIONS_TOK:
4254
            case RESET_TOK:
4255
            case SET_INFO_TOK:
4256
            case SET_LOGIC_TOK:
4257
            case SET_OPTION_TOK:
4258
            case SIMPLE_SYMBOL:
4259
            case SIMPLIFY_TOK:
4260
            	{
4261
606
            		alt14=7;
4262
            	}
4263
606
                break;
4264
4265
            default:
4266
                CONSTRUCTEX();
4267
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
4268
                EXCEPTION->message      = (void *)"";
4269
                EXCEPTION->decisionNum  = 14;
4270
                EXCEPTION->state        = 0;
4271
4272
4273
                goto rulesygusCommandEx;
4274
4275
            }
4276
4277
2007
            switch (alt14)
4278
            {
4279
302
        	case 1:
4280
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:525:5: DECLARE_VAR_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED]
4281
        	    {
4282
302
        	         MATCHT(DECLARE_VAR_TOK, &FOLLOW_DECLARE_VAR_TOK_in_sygusCommand1073);
4283
302
        	        if  (HASEXCEPTION())
4284
        	        {
4285
        	            goto rulesygusCommandEx;
4286
        	        }
4287
4288
4289
        	        {
4290
302
        	             PARSER_STATE->checkThatLogicIsSet();
4291
        	        }
4292
4293
4294
302
        	        FOLLOWPUSH(FOLLOW_symbol_in_sygusCommand1081);
4295
302
        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
4296
4297
302
        	        FOLLOWPOP();
4298
302
        	        if  (HASEXCEPTION())
4299
        	        {
4300
        	            goto rulesygusCommandEx;
4301
        	        }
4302
4303
4304
        	        {
4305
302
        	             PARSER_STATE->checkUserSymbol(name);
4306
        	        }
4307
4308
4309
302
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_sygusCommand1094);
4310
302
        	        sortSymbol(ctx, t, CHECK_DECLARED);
4311
4312
302
        	        FOLLOWPOP();
4313
302
        	        if  (HASEXCEPTION())
4314
        	        {
4315
        	            goto rulesygusCommandEx;
4316
        	        }
4317
4318
4319
        	        {
4320
4321
604
        	                  api::Term var = SOLVER->mkSygusVar(t, name);
4322
302
        	                  PARSER_STATE->defineVar(name, var);
4323
302
        	                  cmd.reset(new DeclareSygusVarCommand(name, var, t));
4324
4325
302
        	        }
4326
4327
4328
        	    }
4329
302
        	    break;
4330
286
        	case 2:
4331
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:535:5: ( SYNTH_FUN_TOK | SYNTH_INV_TOK ) symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK ( sortSymbol[range,CHECK_DECLARED] )? ( sygusGrammar[grammar, sygusVars, name] )?
4332
        	    {
4333
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:535:5: ( SYNTH_FUN_TOK | SYNTH_INV_TOK )
4334
        	        {
4335
286
        	            int alt10=2;
4336
286
        	            switch ( LA(1) )
4337
        	            {
4338
272
        	            case SYNTH_FUN_TOK:
4339
        	            	{
4340
272
        	            		alt10=1;
4341
        	            	}
4342
272
        	                break;
4343
14
        	            case SYNTH_INV_TOK:
4344
        	            	{
4345
14
        	            		alt10=2;
4346
        	            	}
4347
14
        	                break;
4348
4349
        	            default:
4350
        	                CONSTRUCTEX();
4351
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
4352
        	                EXCEPTION->message      = (void *)"";
4353
        	                EXCEPTION->decisionNum  = 10;
4354
        	                EXCEPTION->state        = 0;
4355
4356
4357
        	                goto rulesygusCommandEx;
4358
4359
        	            }
4360
4361
286
        	            switch (alt10)
4362
        	            {
4363
272
        	        	case 1:
4364
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:535:7: SYNTH_FUN_TOK
4365
        	        	    {
4366
272
        	        	         MATCHT(SYNTH_FUN_TOK, &FOLLOW_SYNTH_FUN_TOK_in_sygusCommand1115);
4367
272
        	        	        if  (HASEXCEPTION())
4368
        	        	        {
4369
        	        	            goto rulesygusCommandEx;
4370
        	        	        }
4371
4372
4373
        	        	        {
4374
272
        	        	             isInv = false;
4375
        	        	        }
4376
4377
4378
        	        	    }
4379
272
        	        	    break;
4380
14
        	        	case 2:
4381
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:536:9: SYNTH_INV_TOK
4382
        	        	    {
4383
14
        	        	         MATCHT(SYNTH_INV_TOK, &FOLLOW_SYNTH_INV_TOK_in_sygusCommand1127);
4384
14
        	        	        if  (HASEXCEPTION())
4385
        	        	        {
4386
        	        	            goto rulesygusCommandEx;
4387
        	        	        }
4388
4389
4390
        	        	        {
4391
14
        	        	             isInv = true; range = SOLVER->getBooleanSort();
4392
        	        	        }
4393
4394
4395
        	        	    }
4396
14
        	        	    break;
4397
4398
        	            }
4399
        	        }
4400
4401
        	        {
4402
286
        	             PARSER_STATE->checkThatLogicIsSet();
4403
        	        }
4404
4405
4406
286
        	        FOLLOWPUSH(FOLLOW_symbol_in_sygusCommand1147);
4407
286
        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
4408
4409
286
        	        FOLLOWPOP();
4410
286
        	        if  (HASEXCEPTION())
4411
        	        {
4412
        	            goto rulesygusCommandEx;
4413
        	        }
4414
4415
4416
286
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusCommand1154);
4417
286
        	        if  (HASEXCEPTION())
4418
        	        {
4419
        	            goto rulesygusCommandEx;
4420
        	        }
4421
4422
4423
286
        	        FOLLOWPUSH(FOLLOW_sortedVarList_in_sygusCommand1156);
4424
286
        	        sortedVarList(ctx, sortedVarNames);
4425
4426
286
        	        FOLLOWPOP();
4427
286
        	        if  (HASEXCEPTION())
4428
        	        {
4429
        	            goto rulesygusCommandEx;
4430
        	        }
4431
4432
4433
286
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sygusCommand1159);
4434
286
        	        if  (HASEXCEPTION())
4435
        	        {
4436
        	            goto rulesygusCommandEx;
4437
        	        }
4438
4439
4440
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:541:5: ( sortSymbol[range,CHECK_DECLARED] )?
4441
        	        {
4442
286
        	            int alt11=2;
4443
286
        	            switch ( LA(1) )
4444
        	            {
4445
243
        	                case QUOTED_SYMBOL:
4446
        	                case SIMPLE_SYMBOL:
4447
        	                case UNTERMINATED_QUOTED_SYMBOL:
4448
        	                	{
4449
243
        	                		alt11=1;
4450
        	                	}
4451
243
        	                    break;
4452
29
        	                case LPAREN_TOK:
4453
        	                	{
4454
29
        	                		switch ( LA(2) )
4455
        	                		{
4456
29
        	                		    case HO_ARROW_TOK:
4457
        	                		    case INDEX_TOK:
4458
        	                		    case QUOTED_SYMBOL:
4459
        	                		    case SIMPLE_SYMBOL:
4460
        	                		    case UNTERMINATED_QUOTED_SYMBOL:
4461
        	                		    	{
4462
29
        	                		    		alt11=1;
4463
        	                		    	}
4464
29
        	                		        break;
4465
        	                		}
4466
4467
        	                	}
4468
29
        	                    break;
4469
        	            }
4470
4471
286
        	            switch (alt11)
4472
        	            {
4473
272
        	        	case 1:
4474
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:541:7: sortSymbol[range,CHECK_DECLARED]
4475
        	        	    {
4476
272
        	        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_sygusCommand1167);
4477
272
        	        	        sortSymbol(ctx, range, CHECK_DECLARED);
4478
4479
272
        	        	        FOLLOWPOP();
4480
272
        	        	        if  (HASEXCEPTION())
4481
        	        	        {
4482
        	        	            goto rulesygusCommandEx;
4483
        	        	        }
4484
4485
4486
        	        	    }
4487
272
        	        	    break;
4488
4489
        	            }
4490
        	        }
4491
4492
        	        {
4493
4494
286
        	                  PARSER_STATE->pushScope();
4495
286
        	                  sygusVars = PARSER_STATE->bindBoundVars(sortedVarNames);
4496
4497
        	        }
4498
4499
4500
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:546:5: ( sygusGrammar[grammar, sygusVars, name] )?
4501
        	        {
4502
286
        	            int alt12=2;
4503
286
        	            switch ( LA(1) )
4504
        	            {
4505
148
        	                case LPAREN_TOK:
4506
        	                	{
4507
148
        	                		alt12=1;
4508
        	                	}
4509
148
        	                    break;
4510
        	            }
4511
4512
286
        	            switch (alt12)
4513
        	            {
4514
148
        	        	case 1:
4515
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:551:7: sygusGrammar[grammar, sygusVars, name]
4516
        	        	    {
4517
148
        	        	        FOLLOWPUSH(FOLLOW_sygusGrammar_in_sygusCommand1219);
4518
148
        	        	        sygusGrammar(ctx, grammar, sygusVars, name);
4519
4520
147
        	        	        FOLLOWPOP();
4521
147
        	        	        if  (HASEXCEPTION())
4522
        	        	        {
4523
        	        	            goto rulesygusCommandEx;
4524
        	        	        }
4525
4526
4527
        	        	    }
4528
147
        	        	    break;
4529
4530
        	            }
4531
        	        }
4532
4533
        	        {
4534
4535
285
        	                  Debug("parser-sygus") << "Define synth fun : " << name << std::endl;
4536
4537
841
        	                  fun = isInv ? (grammar == nullptr
4538
14
        	                                     ? SOLVER->synthInv(name, sygusVars)
4539
        	                                     : SOLVER->synthInv(name, sygusVars, *grammar))
4540
271
        	                              : (grammar == nullptr
4541
124
        	                                     ? SOLVER->synthFun(name, sygusVars, range)
4542
147
        	                                     : SOLVER->synthFun(name, sygusVars, range, *grammar));
4543
4544
285
        	                  Debug("parser-sygus") << "...read synth fun " << name << std::endl;
4545
285
        	                  PARSER_STATE->popScope();
4546
        	                  // we do not allow overloading for synth fun
4547
285
        	                  PARSER_STATE->defineVar(name, fun);
4548
570
        	                  cmd = std::unique_ptr<Command>(
4549
285
        	                      new SynthFunCommand(name, fun, sygusVars, range, isInv, grammar));
4550
4551
        	        }
4552
4553
4554
        	    }
4555
285
        	    break;
4556
605
        	case 3:
4557
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:571:5: CONSTRAINT_TOK term[expr, expr2]
4558
        	    {
4559
605
        	         MATCHT(CONSTRAINT_TOK, &FOLLOW_CONSTRAINT_TOK_in_sygusCommand1245);
4560
605
        	        if  (HASEXCEPTION())
4561
        	        {
4562
        	            goto rulesygusCommandEx;
4563
        	        }
4564
4565
4566
        	        {
4567
4568
605
        	                  PARSER_STATE->checkThatLogicIsSet();
4569
605
        	                  Debug("parser-sygus") << "Sygus : define sygus funs..." << std::endl;
4570
605
        	                  Debug("parser-sygus") << "Sygus : read constraint..." << std::endl;
4571
4572
        	        }
4573
4574
4575
605
        	        FOLLOWPUSH(FOLLOW_term_in_sygusCommand1253);
4576
605
        	        term(ctx, expr, expr2);
4577
4578
604
        	        FOLLOWPOP();
4579
604
        	        if  (HASEXCEPTION())
4580
        	        {
4581
        	            goto rulesygusCommandEx;
4582
        	        }
4583
4584
4585
        	        {
4586
604
        	             Debug("parser-sygus") << "...read constraint " << expr << std::endl;
4587
604
        	                  cmd.reset(new SygusConstraintCommand(expr));
4588
4589
        	        }
4590
4591
4592
        	    }
4593
604
        	    break;
4594
14
        	case 4:
4595
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:581:5: INV_CONSTRAINT_TOK ( symbol[name,CHECK_NONE,SYM_VARIABLE] )+
4596
        	    {
4597
14
        	         MATCHT(INV_CONSTRAINT_TOK, &FOLLOW_INV_CONSTRAINT_TOK_in_sygusCommand1272);
4598
14
        	        if  (HASEXCEPTION())
4599
        	        {
4600
        	            goto rulesygusCommandEx;
4601
        	        }
4602
4603
4604
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:582:5: ( symbol[name,CHECK_NONE,SYM_VARIABLE] )+
4605
        	        {
4606
14
        	            int cnt13=0;
4607
4608
        	            for (;;)
4609
        	            {
4610
70
        	                int alt13=2;
4611
70
        	        	switch ( LA(1) )
4612
        	        	{
4613
56
        	        	case QUOTED_SYMBOL:
4614
        	        	case SIMPLE_SYMBOL:
4615
        	        	case UNTERMINATED_QUOTED_SYMBOL:
4616
        	        		{
4617
56
        	        			alt13=1;
4618
        	        		}
4619
56
        	        	    break;
4620
4621
        	        	}
4622
4623
70
        	        	switch (alt13)
4624
        	        	{
4625
56
        	        	    case 1:
4626
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:582:7: symbol[name,CHECK_NONE,SYM_VARIABLE]
4627
        	        	        {
4628
56
        	        	            FOLLOWPUSH(FOLLOW_symbol_in_sygusCommand1280);
4629
56
        	        	            symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
4630
4631
56
        	        	            FOLLOWPOP();
4632
56
        	        	            if  (HASEXCEPTION())
4633
        	        	            {
4634
        	        	                goto rulesygusCommandEx;
4635
        	        	            }
4636
4637
4638
        	        	            {
4639
56
        	        	                 names.push_back(name);
4640
        	        	            }
4641
4642
4643
        	        	        }
4644
56
        	        	        break;
4645
4646
14
        	        	    default:
4647
4648
14
        	        		if ( cnt13 >= 1 )
4649
        	        		{
4650
14
        	        		    goto loop13;
4651
        	        		}
4652
        	        		/* mismatchedSetEx()
4653
        	        		 */
4654
        	        		CONSTRUCTEX();
4655
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
4656
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
4657
4658
4659
        	        		goto rulesygusCommandEx;
4660
        	        	}
4661
56
        	        	cnt13++;
4662
56
        	            }
4663
14
        	            loop13: ;	/* Jump to here if this rule does not match */
4664
        	        }
4665
4666
        	        {
4667
4668
14
        	                  cmd = PARSER_STATE->invConstraint(names);
4669
4670
        	        }
4671
4672
4673
        	    }
4674
14
        	    break;
4675
192
        	case 5:
4676
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:587:5: CHECK_SYNTH_TOK
4677
        	    {
4678
192
        	         MATCHT(CHECK_SYNTH_TOK, &FOLLOW_CHECK_SYNTH_TOK_in_sygusCommand1304);
4679
192
        	        if  (HASEXCEPTION())
4680
        	        {
4681
        	            goto rulesygusCommandEx;
4682
        	        }
4683
4684
4685
        	        {
4686
4687
192
        	                  PARSER_STATE->checkThatLogicIsSet();
4688
192
        	                  cmd.reset(new CheckSynthCommand());
4689
4690
        	        }
4691
4692
4693
        	    }
4694
192
        	    break;
4695
2
        	case 6:
4696
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:593:5: SET_FEATURE_TOK keyword[name] symbolicExpr[expr]
4697
        	    {
4698
2
        	         MATCHT(SET_FEATURE_TOK, &FOLLOW_SET_FEATURE_TOK_in_sygusCommand1322);
4699
2
        	        if  (HASEXCEPTION())
4700
        	        {
4701
        	            goto rulesygusCommandEx;
4702
        	        }
4703
4704
4705
2
        	        FOLLOWPUSH(FOLLOW_keyword_in_sygusCommand1324);
4706
2
        	        keyword(ctx, name);
4707
4708
2
        	        FOLLOWPOP();
4709
2
        	        if  (HASEXCEPTION())
4710
        	        {
4711
        	            goto rulesygusCommandEx;
4712
        	        }
4713
4714
4715
2
        	        FOLLOWPUSH(FOLLOW_symbolicExpr_in_sygusCommand1327);
4716
2
        	        symbolicExpr(ctx, expr);
4717
4718
2
        	        FOLLOWPOP();
4719
2
        	        if  (HASEXCEPTION())
4720
        	        {
4721
        	            goto rulesygusCommandEx;
4722
        	        }
4723
4724
4725
        	        {
4726
4727
2
        	                  PARSER_STATE->checkThatLogicIsSet();
4728
        	                  // ":grammars" is defined in the SyGuS version 2.1 standard and is by
4729
        	                  // default supported, all other features are not.
4730
2
        	                  if (name != ":grammars")
4731
        	                  {
4732
2
        	                    std::stringstream ss;
4733
1
        	                    ss << "SyGuS feature " << name << " not currently supported";
4734
1
        	                    PARSER_STATE->warning(ss.str());
4735
        	                  }
4736
2
        	                  cmd.reset(new EmptyCommand());
4737
4738
        	        }
4739
4740
4741
        	    }
4742
2
        	    break;
4743
606
        	case 7:
4744
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:606:5: command[&cmd]
4745
        	    {
4746
606
        	        FOLLOWPUSH(FOLLOW_command_in_sygusCommand1340);
4747
606
        	        command(ctx, &cmd);
4748
4749
606
        	        FOLLOWPOP();
4750
606
        	        if  (HASEXCEPTION())
4751
        	        {
4752
        	            goto rulesygusCommandEx;
4753
        	        }
4754
4755
4756
        	    }
4757
606
        	    break;
4758
4759
            }
4760
        }
4761
    }
4762
4763
    // This is where rules clean up and exit
4764
    //
4765
2005
    goto rulesygusCommandEx; /* Prevent compiler warnings */
4766
2005
    rulesygusCommandEx: ;
4767
4768
2005
            if (HASEXCEPTION())
4769
            {
4770
                PREPORTERROR();
4771
                PRECOVER();
4772
            }
4773
4010
    return cmd;
4774
}
4775
/* $ANTLR end sygusCommand */
4776
4777
/**
4778
 * $ANTLR start sygusGrammar
4779
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:619:1: sygusGrammar[cvc5::api::Grammar*& ret,\n const std::vector<cvc5::api::Term>& sygusVars,\n const std::string& fun] : LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] ( LPAREN_TOK | RPAREN_TOK ) )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK symbol[name, CHECK_DECLARED, SYM_VARIABLE] sortSymbol[t, CHECK_DECLARED] LPAREN_TOK ( term[e,e2] | LPAREN_TOK SYGUS_CONSTANT_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK | LPAREN_TOK SYGUS_VARIABLE_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK )+ RPAREN_TOK RPAREN_TOK )+ RPAREN_TOK ;
4780
 */
4781
static void
4782
153
sygusGrammar(pSmt2Parser ctx, cvc5::api::Grammar*& ret, const std::vector<cvc5::api::Term>& sygusVars, const std::string& fun)
4783
{
4784
4785
      // the pre-declaration
4786
306
      std::vector<std::pair<std::string, cvc5::api::Sort>> sortedVarNames;
4787
      // non-terminal symbols of the grammar
4788
306
      std::vector<cvc5::api::Term> ntSyms;
4789
306
      cvc5::api::Sort t;
4790
306
      std::string name;
4791
306
      cvc5::api::Term e, e2;
4792
153
      unsigned dtProcessed = 0;
4793
4794
    /* Initialize rule variables
4795
     */
4796
4797
    {
4798
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:633:3: ( LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] ( LPAREN_TOK | RPAREN_TOK ) )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK symbol[name, CHECK_DECLARED, SYM_VARIABLE] sortSymbol[t, CHECK_DECLARED] LPAREN_TOK ( term[e,e2] | LPAREN_TOK SYGUS_CONSTANT_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK | LPAREN_TOK SYGUS_VARIABLE_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK )+ RPAREN_TOK RPAREN_TOK )+ RPAREN_TOK )
4799
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:635:3: LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] ( LPAREN_TOK | RPAREN_TOK ) )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK symbol[name, CHECK_DECLARED, SYM_VARIABLE] sortSymbol[t, CHECK_DECLARED] LPAREN_TOK ( term[e,e2] | LPAREN_TOK SYGUS_CONSTANT_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK | LPAREN_TOK SYGUS_VARIABLE_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK )+ RPAREN_TOK RPAREN_TOK )+ RPAREN_TOK
4800
        {
4801
153
             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusGrammar1368);
4802
153
            if  (HASEXCEPTION())
4803
            {
4804
                goto rulesygusGrammarEx;
4805
            }
4806
4807
4808
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:639:3: ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] ( LPAREN_TOK | RPAREN_TOK ) )*
4809
4810
            for (;;)
4811
            {
4812
513
                int alt16=2;
4813
513
                switch ( LA(1) )
4814
                {
4815
360
                case LPAREN_TOK:
4816
                	{
4817
360
                		alt16=1;
4818
                	}
4819
360
                    break;
4820
4821
                }
4822
4823
513
                switch (alt16)
4824
                {
4825
360
            	case 1:
4826
            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:639:5: LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] ( LPAREN_TOK | RPAREN_TOK )
4827
            	    {
4828
360
            	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusGrammar1383);
4829
360
            	        if  (HASEXCEPTION())
4830
            	        {
4831
            	            goto rulesygusGrammarEx;
4832
            	        }
4833
4834
4835
360
            	        FOLLOWPUSH(FOLLOW_symbol_in_sygusGrammar1385);
4836
360
            	        symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
4837
4838
360
            	        FOLLOWPOP();
4839
360
            	        if  (HASEXCEPTION())
4840
            	        {
4841
            	            goto rulesygusGrammarEx;
4842
            	        }
4843
4844
4845
360
            	        FOLLOWPUSH(FOLLOW_sortSymbol_in_sygusGrammar1392);
4846
360
            	        sortSymbol(ctx, t, CHECK_DECLARED);
4847
4848
360
            	        FOLLOWPOP();
4849
360
            	        if  (HASEXCEPTION())
4850
            	        {
4851
            	            goto rulesygusGrammarEx;
4852
            	        }
4853
4854
4855
            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:640:34: ( LPAREN_TOK | RPAREN_TOK )
4856
            	        {
4857
360
            	            int alt15=2;
4858
360
            	            switch ( LA(1) )
4859
            	            {
4860
            	            case LPAREN_TOK:
4861
            	            	{
4862
            	            		alt15=1;
4863
            	            	}
4864
            	                break;
4865
360
            	            case RPAREN_TOK:
4866
            	            	{
4867
360
            	            		alt15=2;
4868
            	            	}
4869
360
            	                break;
4870
4871
            	            default:
4872
            	                CONSTRUCTEX();
4873
            	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
4874
            	                EXCEPTION->message      = (void *)"";
4875
            	                EXCEPTION->decisionNum  = 15;
4876
            	                EXCEPTION->state        = 0;
4877
4878
4879
            	                goto rulesygusGrammarEx;
4880
4881
            	            }
4882
4883
360
            	            switch (alt15)
4884
            	            {
4885
            	        	case 1:
4886
            	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:643:7: LPAREN_TOK
4887
            	        	    {
4888
            	        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusGrammar1417);
4889
            	        	        if  (HASEXCEPTION())
4890
            	        	        {
4891
            	        	            goto rulesygusGrammarEx;
4892
            	        	        }
4893
4894
4895
            	        	        {
4896
4897
            	        	                    std::stringstream sse;
4898
            	        	                    if (sortedVarNames.empty())
4899
            	        	                    {
4900
            	        	                      sse << "The expected SyGuS language is version 2.0, whereas the "
4901
            	        	                          << "input appears to be SyGuS version 1.0 format. The version "
4902
            	        	                          << "2.0 format requires a predeclaration of the non-terminal "
4903
            	        	                          << "symbols of the grammar to be given prior to the definition "
4904
            	        	                          << "of the grammar. See https://sygus.org/language/ for details "
4905
            	        	                          << "and examples. cvc5 versions past 1.8 do not support SyGuS "
4906
            	        	                          << "version 1.0.";
4907
            	        	                    }
4908
            	        	                    else
4909
            	        	                    {
4910
            	        	                      // an unknown syntax error
4911
            	        	                      sse << "Unexpected syntax for SyGuS predeclaration.";
4912
            	        	                    }
4913
            	        	                    PARSER_STATE->parseError(sse.str().c_str());
4914
4915
            	        	        }
4916
4917
4918
            	        	    }
4919
            	        	    break;
4920
360
            	        	case 2:
4921
            	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:663:7: RPAREN_TOK
4922
            	        	    {
4923
360
            	        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sygusGrammar1433);
4924
360
            	        	        if  (HASEXCEPTION())
4925
            	        	        {
4926
            	        	            goto rulesygusGrammarEx;
4927
            	        	        }
4928
4929
4930
            	        	    }
4931
360
            	        	    break;
4932
4933
            	            }
4934
            	        }
4935
4936
            	        {
4937
360
            	             sortedVarNames.push_back(make_pair(name, t));
4938
            	        }
4939
4940
4941
            	    }
4942
360
            	    break;
4943
4944
153
            	default:
4945
153
            	    goto loop16;	/* break out of the loop */
4946
            	    break;
4947
                }
4948
360
            }
4949
153
            loop16: ; /* Jump out to here if this rule does not match */
4950
4951
4952
153
             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sygusGrammar1450);
4953
153
            if  (HASEXCEPTION())
4954
            {
4955
                goto rulesygusGrammarEx;
4956
            }
4957
4958
4959
            {
4960
4961
                    // non-terminal symbols in the pre-declaration are locally scoped
4962
153
                    PARSER_STATE->pushScope();
4963
513
                    for (std::pair<std::string, api::Sort>& i : sortedVarNames)
4964
                    {
4965
360
                      PARSER_STATE->checkDeclaration(name, CHECK_UNDECLARED, SYM_SORT);
4966
                      // make the non-terminal symbol, which will be parsed as an ordinary
4967
                      // free variable.
4968
720
                      api::Term nts = PARSER_STATE->bindBoundVar(i.first, i.second);
4969
360
                      ntSyms.push_back(nts);
4970
                    }
4971
153
                    ret = PARSER_STATE->mkGrammar(sygusVars, ntSyms);
4972
4973
            }
4974
4975
4976
153
             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusGrammar1461);
4977
153
            if  (HASEXCEPTION())
4978
            {
4979
                goto rulesygusGrammarEx;
4980
            }
4981
4982
4983
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:682:3: ( LPAREN_TOK symbol[name, CHECK_DECLARED, SYM_VARIABLE] sortSymbol[t, CHECK_DECLARED] LPAREN_TOK ( term[e,e2] | LPAREN_TOK SYGUS_CONSTANT_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK | LPAREN_TOK SYGUS_VARIABLE_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK )+ RPAREN_TOK RPAREN_TOK )+
4984
            {
4985
153
                int cnt18=0;
4986
4987
                for (;;)
4988
                {
4989
510
                    int alt18=2;
4990
510
            	switch ( LA(1) )
4991
            	{
4992
358
            	case LPAREN_TOK:
4993
            		{
4994
358
            			alt18=1;
4995
            		}
4996
358
            	    break;
4997
4998
            	}
4999
5000
510
            	switch (alt18)
5001
            	{
5002
358
            	    case 1:
5003
            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:683:5: LPAREN_TOK symbol[name, CHECK_DECLARED, SYM_VARIABLE] sortSymbol[t, CHECK_DECLARED] LPAREN_TOK ( term[e,e2] | LPAREN_TOK SYGUS_CONSTANT_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK | LPAREN_TOK SYGUS_VARIABLE_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK )+ RPAREN_TOK RPAREN_TOK
5004
            	        {
5005
358
            	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusGrammar1471);
5006
358
            	            if  (HASEXCEPTION())
5007
            	            {
5008
            	                goto rulesygusGrammarEx;
5009
            	            }
5010
5011
5012
358
            	            FOLLOWPUSH(FOLLOW_symbol_in_sygusGrammar1477);
5013
358
            	            symbol(ctx, name, CHECK_DECLARED, SYM_VARIABLE);
5014
5015
358
            	            FOLLOWPOP();
5016
358
            	            if  (HASEXCEPTION())
5017
            	            {
5018
            	                goto rulesygusGrammarEx;
5019
            	            }
5020
5021
5022
358
            	            FOLLOWPUSH(FOLLOW_sortSymbol_in_sygusGrammar1480);
5023
358
            	            sortSymbol(ctx, t, CHECK_DECLARED);
5024
5025
358
            	            FOLLOWPOP();
5026
358
            	            if  (HASEXCEPTION())
5027
            	            {
5028
            	                goto rulesygusGrammarEx;
5029
            	            }
5030
5031
5032
            	            {
5033
5034
            	                      // check that it matches sortedVarNames
5035
358
            	                      if (sortedVarNames[dtProcessed].first != name)
5036
            	                      {
5037
            	                        std::stringstream sse;
5038
            	                        sse << "Grouped rule listing " << name
5039
            	                            << " does not match the name (in order) from the predeclaration ("
5040
            	                            << sortedVarNames[dtProcessed].first << ")." << std::endl;
5041
            	                        PARSER_STATE->parseError(sse.str().c_str());
5042
            	                      }
5043
358
            	                      if (sortedVarNames[dtProcessed].second != t)
5044
            	                      {
5045
            	                        std::stringstream sse;
5046
            	                        sse << "Type for grouped rule listing " << name
5047
            	                            << " does not match the type (in order) from the predeclaration ("
5048
            	                            << sortedVarNames[dtProcessed].second << ")." << std::endl;
5049
            	                        PARSER_STATE->parseError(sse.str().c_str());
5050
            	                      }
5051
5052
            	            }
5053
5054
5055
358
            	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusGrammar1493);
5056
358
            	            if  (HASEXCEPTION())
5057
            	            {
5058
            	                goto rulesygusGrammarEx;
5059
            	            }
5060
5061
5062
            	            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:705:5: ( term[e,e2] | LPAREN_TOK SYGUS_CONSTANT_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK | LPAREN_TOK SYGUS_VARIABLE_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK )+
5063
            	            {
5064
358
            	                int cnt17=0;
5065
5066
            	                for (;;)
5067
            	                {
5068
1872
            	                    int alt17=4;
5069
1872
            	            	switch ( LA(1) )
5070
            	            	{
5071
878
            	            	case LPAREN_TOK:
5072
            	            		{
5073
878
            	            			switch ( LA(2) )
5074
            	            			{
5075
853
            	            			case AS_TOK:
5076
            	            			case ATTRIBUTE_TOK:
5077
            	            			case COMPREHENSION_TOK:
5078
            	            			case EXISTS_TOK:
5079
            	            			case FORALL_TOK:
5080
            	            			case HO_LAMBDA_TOK:
5081
            	            			case INDEX_TOK:
5082
            	            			case LET_TOK:
5083
            	            			case LPAREN_TOK:
5084
            	            			case MATCH_TOK:
5085
            	            			case QUOTED_SYMBOL:
5086
            	            			case SIMPLE_SYMBOL:
5087
            	            			case TUPLE_CONST_TOK:
5088
            	            			case TUPLE_PROJECT_TOK:
5089
            	            			case UNTERMINATED_QUOTED_SYMBOL:
5090
            	            				{
5091
853
            	            					alt17=1;
5092
            	            				}
5093
853
            	            			    break;
5094
15
            	            			case SYGUS_CONSTANT_TOK:
5095
            	            				{
5096
15
            	            					alt17=2;
5097
            	            				}
5098
15
            	            			    break;
5099
10
            	            			case SYGUS_VARIABLE_TOK:
5100
            	            				{
5101
10
            	            					alt17=3;
5102
            	            				}
5103
10
            	            			    break;
5104
5105
            	            			}
5106
5107
            	            		}
5108
878
            	            	    break;
5109
637
            	            	case BINARY_LITERAL:
5110
            	            	case DECIMAL_LITERAL:
5111
            	            	case HEX_LITERAL:
5112
            	            	case INTEGER_LITERAL:
5113
            	            	case QUOTED_SYMBOL:
5114
            	            	case SIMPLE_SYMBOL:
5115
            	            	case STRING_LITERAL:
5116
            	            	case TUPLE_CONST_TOK:
5117
            	            	case UNTERMINATED_QUOTED_SYMBOL:
5118
            	            		{
5119
637
            	            			alt17=1;
5120
            	            		}
5121
637
            	            	    break;
5122
5123
            	            	}
5124
5125
1872
            	            	switch (alt17)
5126
            	            	{
5127
1490
            	            	    case 1:
5128
            	            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:706:7: term[e,e2]
5129
            	            	        {
5130
1490
            	            	            FOLLOWPUSH(FOLLOW_term_in_sygusGrammar1507);
5131
1490
            	            	            term(ctx, e, e2);
5132
5133
1489
            	            	            FOLLOWPOP();
5134
1489
            	            	            if  (HASEXCEPTION())
5135
            	            	            {
5136
            	            	                goto rulesygusGrammarEx;
5137
            	            	            }
5138
5139
5140
            	            	            {
5141
5142
            	            	                        // add term as constructor to datatype
5143
1489
            	            	                        ret->addRule(ntSyms[dtProcessed], e);
5144
5145
            	            	            }
5146
5147
5148
            	            	        }
5149
1489
            	            	        break;
5150
15
            	            	    case 2:
5151
            	            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:710:9: LPAREN_TOK SYGUS_CONSTANT_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK
5152
            	            	        {
5153
15
            	            	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusGrammar1520);
5154
15
            	            	            if  (HASEXCEPTION())
5155
            	            	            {
5156
            	            	                goto rulesygusGrammarEx;
5157
            	            	            }
5158
5159
5160
15
            	            	             MATCHT(SYGUS_CONSTANT_TOK, &FOLLOW_SYGUS_CONSTANT_TOK_in_sygusGrammar1522);
5161
15
            	            	            if  (HASEXCEPTION())
5162
            	            	            {
5163
            	            	                goto rulesygusGrammarEx;
5164
            	            	            }
5165
5166
5167
15
            	            	            FOLLOWPUSH(FOLLOW_sortSymbol_in_sygusGrammar1524);
5168
15
            	            	            sortSymbol(ctx, t, CHECK_DECLARED);
5169
5170
15
            	            	            FOLLOWPOP();
5171
15
            	            	            if  (HASEXCEPTION())
5172
            	            	            {
5173
            	            	                goto rulesygusGrammarEx;
5174
            	            	            }
5175
5176
5177
15
            	            	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sygusGrammar1527);
5178
15
            	            	            if  (HASEXCEPTION())
5179
            	            	            {
5180
            	            	                goto rulesygusGrammarEx;
5181
            	            	            }
5182
5183
5184
            	            	            {
5185
5186
            	            	                        // allow constants in datatype for ntSyms[dtProcessed]
5187
15
            	            	                        ret->addAnyConstant(ntSyms[dtProcessed]);
5188
5189
            	            	            }
5190
5191
5192
            	            	        }
5193
15
            	            	        break;
5194
10
            	            	    case 3:
5195
            	            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:714:9: LPAREN_TOK SYGUS_VARIABLE_TOK sortSymbol[t, CHECK_DECLARED] RPAREN_TOK
5196
            	            	        {
5197
10
            	            	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sygusGrammar1539);
5198
10
            	            	            if  (HASEXCEPTION())
5199
            	            	            {
5200
            	            	                goto rulesygusGrammarEx;
5201
            	            	            }
5202
5203
5204
10
            	            	             MATCHT(SYGUS_VARIABLE_TOK, &FOLLOW_SYGUS_VARIABLE_TOK_in_sygusGrammar1541);
5205
10
            	            	            if  (HASEXCEPTION())
5206
            	            	            {
5207
            	            	                goto rulesygusGrammarEx;
5208
            	            	            }
5209
5210
5211
10
            	            	            FOLLOWPUSH(FOLLOW_sortSymbol_in_sygusGrammar1543);
5212
10
            	            	            sortSymbol(ctx, t, CHECK_DECLARED);
5213
5214
10
            	            	            FOLLOWPOP();
5215
10
            	            	            if  (HASEXCEPTION())
5216
            	            	            {
5217
            	            	                goto rulesygusGrammarEx;
5218
            	            	            }
5219
5220
5221
10
            	            	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sygusGrammar1546);
5222
10
            	            	            if  (HASEXCEPTION())
5223
            	            	            {
5224
            	            	                goto rulesygusGrammarEx;
5225
            	            	            }
5226
5227
5228
            	            	            {
5229
5230
            	            	                        // add variable constructors to datatype
5231
10
            	            	                        ret->addAnyVariable(ntSyms[dtProcessed]);
5232
5233
            	            	            }
5234
5235
5236
            	            	        }
5237
10
            	            	        break;
5238
5239
357
            	            	    default:
5240
5241
357
            	            		if ( cnt17 >= 1 )
5242
            	            		{
5243
357
            	            		    goto loop17;
5244
            	            		}
5245
            	            		/* mismatchedSetEx()
5246
            	            		 */
5247
            	            		CONSTRUCTEX();
5248
            	            		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
5249
            	            		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
5250
5251
5252
            	            		goto rulesygusGrammarEx;
5253
            	            	}
5254
1514
            	            	cnt17++;
5255
1514
            	                }
5256
357
            	                loop17: ;	/* Jump to here if this rule does not match */
5257
            	            }
5258
5259
357
            	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sygusGrammar1561);
5260
357
            	            if  (HASEXCEPTION())
5261
            	            {
5262
            	                goto rulesygusGrammarEx;
5263
            	            }
5264
5265
5266
357
            	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sygusGrammar1567);
5267
357
            	            if  (HASEXCEPTION())
5268
            	            {
5269
            	                goto rulesygusGrammarEx;
5270
            	            }
5271
5272
5273
            	            {
5274
5275
357
            	                      dtProcessed++;
5276
5277
            	            }
5278
5279
5280
            	        }
5281
357
            	        break;
5282
5283
152
            	    default:
5284
5285
152
            		if ( cnt18 >= 1 )
5286
            		{
5287
152
            		    goto loop18;
5288
            		}
5289
            		/* mismatchedSetEx()
5290
            		 */
5291
            		CONSTRUCTEX();
5292
            		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
5293
            		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
5294
5295
5296
            		goto rulesygusGrammarEx;
5297
            	}
5298
357
            	cnt18++;
5299
357
                }
5300
152
                loop18: ;	/* Jump to here if this rule does not match */
5301
            }
5302
5303
152
             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sygusGrammar1582);
5304
152
            if  (HASEXCEPTION())
5305
            {
5306
                goto rulesygusGrammarEx;
5307
            }
5308
5309
5310
            {
5311
5312
                    // pop scope from the pre-declaration
5313
152
                    PARSER_STATE->popScope();
5314
5315
            }
5316
5317
5318
        }
5319
5320
    }
5321
5322
    // This is where rules clean up and exit
5323
    //
5324
152
    goto rulesygusGrammarEx; /* Prevent compiler warnings */
5325
152
    rulesygusGrammarEx: ;
5326
5327
152
            if (HASEXCEPTION())
5328
            {
5329
                PREPORTERROR();
5330
                PRECOVER();
5331
            }
5332
304
    return ;
5333
}
5334
/* $ANTLR end sygusGrammar */
5335
5336
/**
5337
 * $ANTLR start setInfoInternal
5338
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:732:1: setInfoInternal[std::unique_ptr<cvc5::Command>* cmd] : KEYWORD symbolicExpr[sexpr] ;
5339
 */
5340
static void
5341
5645
setInfoInternal(pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd)
5342
{
5343
5344
11290
      std::string name;
5345
11290
      api::Term sexpr;
5346
5347
    pANTLR3_COMMON_TOKEN    KEYWORD4;
5348
5349
    /* Initialize rule variables
5350
     */
5351
5352
5645
    KEYWORD4       = NULL;
5353
5354
    {
5355
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:737:3: ( KEYWORD symbolicExpr[sexpr] )
5356
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:737:5: KEYWORD symbolicExpr[sexpr]
5357
        {
5358
5645
            KEYWORD4 = (pANTLR3_COMMON_TOKEN) MATCHT(KEYWORD, &FOLLOW_KEYWORD_in_setInfoInternal1603);
5359
5645
            if  (HASEXCEPTION())
5360
            {
5361
                goto rulesetInfoInternalEx;
5362
            }
5363
5364
5365
5645
            FOLLOWPUSH(FOLLOW_symbolicExpr_in_setInfoInternal1605);
5366
5645
            symbolicExpr(ctx, sexpr);
5367
5368
5645
            FOLLOWPOP();
5369
5645
            if  (HASEXCEPTION())
5370
            {
5371
                goto rulesetInfoInternalEx;
5372
            }
5373
5374
5375
            {
5376
5645
                 name = AntlrInput::tokenText(KEYWORD4);
5377
5645
                      cmd->reset(new SetInfoCommand(name.c_str() + 1, sexprToString(sexpr)));
5378
5379
            }
5380
5381
5382
        }
5383
5384
    }
5385
5386
    // This is where rules clean up and exit
5387
    //
5388
5645
    goto rulesetInfoInternalEx; /* Prevent compiler warnings */
5389
5645
    rulesetInfoInternalEx: ;
5390
5391
5645
            if (HASEXCEPTION())
5392
            {
5393
                PREPORTERROR();
5394
                PRECOVER();
5395
            }
5396
11290
    return ;
5397
}
5398
/* $ANTLR end setInfoInternal */
5399
5400
/**
5401
 * $ANTLR start setOptionInternal
5402
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:743:1: setOptionInternal[std::unique_ptr<cvc5::Command>* cmd] : keyword[name] symbolicExpr[sexpr] ;
5403
 */
5404
static void
5405
1814
setOptionInternal(pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd)
5406
{
5407
    /* Initialize rule variables
5408
     */
5409
5410
5411
3628
      std::string name;
5412
3628
      api::Term sexpr;
5413
5414
    {
5415
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:748:3: ( keyword[name] symbolicExpr[sexpr] )
5416
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:748:5: keyword[name] symbolicExpr[sexpr]
5417
        {
5418
1814
            FOLLOWPUSH(FOLLOW_keyword_in_setOptionInternal1631);
5419
1814
            keyword(ctx, name);
5420
5421
1814
            FOLLOWPOP();
5422
1814
            if  (HASEXCEPTION())
5423
            {
5424
                goto rulesetOptionInternalEx;
5425
            }
5426
5427
5428
1814
            FOLLOWPUSH(FOLLOW_symbolicExpr_in_setOptionInternal1634);
5429
1814
            symbolicExpr(ctx, sexpr);
5430
5431
1814
            FOLLOWPOP();
5432
1814
            if  (HASEXCEPTION())
5433
            {
5434
                goto rulesetOptionInternalEx;
5435
            }
5436
5437
5438
            {
5439
1814
                 cmd->reset(new SetOptionCommand(name.c_str() + 1, sexprToString(sexpr)));
5440
                      // Ugly that this changes the state of the parser; but
5441
                      // global-declarations affects parsing, so we can't hold off
5442
                      // on this until some SmtEngine eventually (if ever) executes it.
5443
1814
                      if(name == ":global-declarations")
5444
                      {
5445
19
                        SYM_MAN->setGlobalDeclarations(sexprToString(sexpr) == "true");
5446
                      }
5447
5448
            }
5449
5450
5451
        }
5452
5453
    }
5454
5455
    // This is where rules clean up and exit
5456
    //
5457
1814
    goto rulesetOptionInternalEx; /* Prevent compiler warnings */
5458
1814
    rulesetOptionInternalEx: ;
5459
5460
1814
            if (HASEXCEPTION())
5461
            {
5462
                PREPORTERROR();
5463
                PRECOVER();
5464
            }
5465
3628
    return ;
5466
}
5467
/* $ANTLR end setOptionInternal */
5468
5469
/**
5470
 * $ANTLR start smt25Command
5471
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:760:1: smt25Command[std::unique_ptr<cvc5::Command>* cmd] : ( DECLARE_CONST_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] | GET_MODEL_TOK | ECHO_TOK ( simpleSymbolicExpr[s] |) | RESET_TOK | RESET_ASSERTIONS_TOK | DEFINE_FUN_REC_TOK symbol[fname,CHECK_NONE,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] term[expr, expr2] | DEFINE_FUNS_REC_TOK LPAREN_TOK ( LPAREN_TOK symbol[fname,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] RPAREN_TOK )+ RPAREN_TOK LPAREN_TOK ( term[expr,expr2] )+ RPAREN_TOK );
5472
 */
5473
static void
5474
2612
smt25Command(pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd)
5475
{
5476
5477
5224
      std::string name;
5478
5224
      std::string fname;
5479
5224
      cvc5::api::Term expr, expr2;
5480
5224
      std::vector<std::pair<std::string, cvc5::api::Sort> > sortedVarNames;
5481
5224
      std::string s;
5482
5224
      cvc5::api::Sort t;
5483
5224
      cvc5::api::Term func;
5484
5224
      std::vector<cvc5::api::Term> bvs;
5485
      std::vector<std::vector<std::pair<std::string, cvc5::api::Sort>>>
5486
5224
          sortedVarNamesList;
5487
5224
      std::vector<std::vector<cvc5::api::Term>> flattenVarsList;
5488
5224
      std::vector<std::vector<cvc5::api::Term>> formals;
5489
5224
      std::vector<cvc5::api::Term> funcs;
5490
5224
      std::vector<cvc5::api::Term> func_defs;
5491
5224
      cvc5::api::Term aexpr;
5492
5224
      std::unique_ptr<cvc5::CommandSequence> seq;
5493
5224
      std::vector<api::Sort> sorts;
5494
5224
      std::vector<cvc5::api::Term> flattenVars;
5495
5496
    /* Initialize rule variables
5497
     */
5498
5499
    {
5500
        {
5501
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:782:3: ( DECLARE_CONST_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] | GET_MODEL_TOK | ECHO_TOK ( simpleSymbolicExpr[s] |) | RESET_TOK | RESET_ASSERTIONS_TOK | DEFINE_FUN_REC_TOK symbol[fname,CHECK_NONE,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] term[expr, expr2] | DEFINE_FUNS_REC_TOK LPAREN_TOK ( LPAREN_TOK symbol[fname,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] RPAREN_TOK )+ RPAREN_TOK LPAREN_TOK ( term[expr,expr2] )+ RPAREN_TOK )
5502
5503
            ANTLR3_UINT32 alt22;
5504
5505
2612
            alt22=7;
5506
5507
2612
            switch ( LA(1) )
5508
            {
5509
2405
            case DECLARE_CONST_TOK:
5510
            	{
5511
2405
            		alt22=1;
5512
            	}
5513
2405
                break;
5514
13
            case GET_MODEL_TOK:
5515
            	{
5516
13
            		alt22=2;
5517
            	}
5518
13
                break;
5519
9
            case ECHO_TOK:
5520
            	{
5521
9
            		alt22=3;
5522
            	}
5523
9
                break;
5524
41
            case RESET_TOK:
5525
            	{
5526
41
            		alt22=4;
5527
            	}
5528
41
                break;
5529
36
            case RESET_ASSERTIONS_TOK:
5530
            	{
5531
36
            		alt22=5;
5532
            	}
5533
36
                break;
5534
76
            case DEFINE_FUN_REC_TOK:
5535
            	{
5536
76
            		alt22=6;
5537
            	}
5538
76
                break;
5539
32
            case DEFINE_FUNS_REC_TOK:
5540
            	{
5541
32
            		alt22=7;
5542
            	}
5543
32
                break;
5544
5545
            default:
5546
                CONSTRUCTEX();
5547
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
5548
                EXCEPTION->message      = (void *)"";
5549
                EXCEPTION->decisionNum  = 22;
5550
                EXCEPTION->state        = 0;
5551
5552
5553
                goto rulesmt25CommandEx;
5554
5555
            }
5556
5557
2612
            switch (alt22)
5558
            {
5559
2405
        	case 1:
5560
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:782:5: DECLARE_CONST_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED]
5561
        	    {
5562
2405
        	         MATCHT(DECLARE_CONST_TOK, &FOLLOW_DECLARE_CONST_TOK_in_smt25Command1666);
5563
2405
        	        if  (HASEXCEPTION())
5564
        	        {
5565
        	            goto rulesmt25CommandEx;
5566
        	        }
5567
5568
5569
        	        {
5570
2405
        	             PARSER_STATE->checkThatLogicIsSet();
5571
        	        }
5572
5573
5574
2405
        	        FOLLOWPUSH(FOLLOW_symbol_in_smt25Command1674);
5575
2405
        	        symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
5576
5577
2405
        	        FOLLOWPOP();
5578
2405
        	        if  (HASEXCEPTION())
5579
        	        {
5580
        	            goto rulesmt25CommandEx;
5581
        	        }
5582
5583
5584
        	        {
5585
2405
        	             PARSER_STATE->checkUserSymbol(name);
5586
        	        }
5587
5588
5589
2405
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_smt25Command1687);
5590
2405
        	        sortSymbol(ctx, t, CHECK_DECLARED);
5591
5592
2405
        	        FOLLOWPOP();
5593
2405
        	        if  (HASEXCEPTION())
5594
        	        {
5595
        	            goto rulesmt25CommandEx;
5596
        	        }
5597
5598
5599
        	        {
5600
        	             // allow overloading here
5601
        	                  api::Term c =
5602
4810
        	                      PARSER_STATE->bindVar(name, t, false, true);
5603
2405
        	                  cmd->reset(new DeclareFunctionCommand(name, c, t));
5604
2405
        	        }
5605
5606
5607
        	    }
5608
2405
        	    break;
5609
13
        	case 2:
5610
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:792:5: GET_MODEL_TOK
5611
        	    {
5612
13
        	         MATCHT(GET_MODEL_TOK, &FOLLOW_GET_MODEL_TOK_in_smt25Command1707);
5613
13
        	        if  (HASEXCEPTION())
5614
        	        {
5615
        	            goto rulesmt25CommandEx;
5616
        	        }
5617
5618
5619
        	        {
5620
13
        	             PARSER_STATE->checkThatLogicIsSet();
5621
        	        }
5622
5623
5624
        	        {
5625
13
        	             cmd->reset(new GetModelCommand());
5626
        	        }
5627
5628
5629
        	    }
5630
13
        	    break;
5631
9
        	case 3:
5632
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:796:5: ECHO_TOK ( simpleSymbolicExpr[s] |)
5633
        	    {
5634
9
        	         MATCHT(ECHO_TOK, &FOLLOW_ECHO_TOK_in_smt25Command1728);
5635
9
        	        if  (HASEXCEPTION())
5636
        	        {
5637
        	            goto rulesmt25CommandEx;
5638
        	        }
5639
5640
5641
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:797:5: ( simpleSymbolicExpr[s] |)
5642
        	        {
5643
9
        	            int alt19=2;
5644
9
        	            switch ( LA(1) )
5645
        	            {
5646
9
        	            case ASSERT_TOK:
5647
        	            case BINARY_LITERAL:
5648
        	            case CHECK_SAT_ASSUMING_TOK:
5649
        	            case CHECK_SAT_TOK:
5650
        	            case DECIMAL_LITERAL:
5651
        	            case DECLARE_DATATYPES_TOK:
5652
        	            case DECLARE_FUN_TOK:
5653
        	            case DECLARE_SORT_TOK:
5654
        	            case DEFINE_FUNS_REC_TOK:
5655
        	            case DEFINE_FUN_REC_TOK:
5656
        	            case DEFINE_FUN_TOK:
5657
        	            case DEFINE_SORT_TOK:
5658
        	            case ECHO_TOK:
5659
        	            case EXIT_TOK:
5660
        	            case GET_ASSERTIONS_TOK:
5661
        	            case GET_ASSIGNMENT_TOK:
5662
        	            case GET_INFO_TOK:
5663
        	            case GET_MODEL_TOK:
5664
        	            case GET_OPTION_TOK:
5665
        	            case GET_PROOF_TOK:
5666
        	            case GET_UNSAT_ASSUMPTIONS_TOK:
5667
        	            case GET_UNSAT_CORE_TOK:
5668
        	            case GET_VALUE_TOK:
5669
        	            case HEX_LITERAL:
5670
        	            case INTEGER_LITERAL:
5671
        	            case KEYWORD:
5672
        	            case POP_TOK:
5673
        	            case PUSH_TOK:
5674
        	            case QUOTED_SYMBOL:
5675
        	            case RESET_ASSERTIONS_TOK:
5676
        	            case RESET_TOK:
5677
        	            case SET_INFO_TOK:
5678
        	            case SET_LOGIC_TOK:
5679
        	            case SET_OPTION_TOK:
5680
        	            case SIMPLE_SYMBOL:
5681
        	            case SIMPLIFY_TOK:
5682
        	            case STRING_LITERAL:
5683
        	            case UNTERMINATED_QUOTED_SYMBOL:
5684
        	            	{
5685
9
        	            		alt19=1;
5686
        	            	}
5687
9
        	                break;
5688
        	            case RPAREN_TOK:
5689
        	            	{
5690
        	            		alt19=2;
5691
        	            	}
5692
        	                break;
5693
5694
        	            default:
5695
        	                CONSTRUCTEX();
5696
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
5697
        	                EXCEPTION->message      = (void *)"";
5698
        	                EXCEPTION->decisionNum  = 19;
5699
        	                EXCEPTION->state        = 0;
5700
5701
5702
        	                goto rulesmt25CommandEx;
5703
5704
        	            }
5705
5706
9
        	            switch (alt19)
5707
        	            {
5708
9
        	        	case 1:
5709
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:797:7: simpleSymbolicExpr[s]
5710
        	        	    {
5711
9
        	        	        FOLLOWPUSH(FOLLOW_simpleSymbolicExpr_in_smt25Command1736);
5712
9
        	        	        simpleSymbolicExpr(ctx, s);
5713
5714
9
        	        	        FOLLOWPOP();
5715
9
        	        	        if  (HASEXCEPTION())
5716
        	        	        {
5717
        	        	            goto rulesmt25CommandEx;
5718
        	        	        }
5719
5720
5721
        	        	        {
5722
9
        	        	             cmd->reset(new EchoCommand(s));
5723
        	        	        }
5724
5725
5726
        	        	    }
5727
9
        	        	    break;
5728
        	        	case 2:
5729
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:799:7:
5730
        	        	    {
5731
        	        	        {
5732
        	        	             cmd->reset(new EchoCommand());
5733
        	        	        }
5734
5735
5736
        	        	    }
5737
        	        	    break;
5738
5739
        	            }
5740
        	        }
5741
5742
        	    }
5743
9
        	    break;
5744
41
        	case 4:
5745
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:804:5: RESET_TOK
5746
        	    {
5747
41
        	         MATCHT(RESET_TOK, &FOLLOW_RESET_TOK_in_smt25Command1772);
5748
41
        	        if  (HASEXCEPTION())
5749
        	        {
5750
        	            goto rulesmt25CommandEx;
5751
        	        }
5752
5753
5754
        	        {
5755
5756
41
        	                  cmd->reset(new ResetCommand());
5757
        	                  // reset the state of the parser, which is independent of the symbol
5758
        	                  // manager
5759
41
        	                  PARSER_STATE->reset();
5760
5761
        	        }
5762
5763
5764
        	    }
5765
41
        	    break;
5766
36
        	case 5:
5767
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:813:5: RESET_ASSERTIONS_TOK
5768
        	    {
5769
36
        	         MATCHT(RESET_ASSERTIONS_TOK, &FOLLOW_RESET_ASSERTIONS_TOK_in_smt25Command1790);
5770
36
        	        if  (HASEXCEPTION())
5771
        	        {
5772
        	            goto rulesmt25CommandEx;
5773
        	        }
5774
5775
5776
        	        {
5777
36
        	             cmd->reset(new ResetAssertionsCommand());
5778
5779
        	        }
5780
5781
5782
        	    }
5783
36
        	    break;
5784
76
        	case 6:
5785
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:816:5: DEFINE_FUN_REC_TOK symbol[fname,CHECK_NONE,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] term[expr, expr2]
5786
        	    {
5787
76
        	         MATCHT(DEFINE_FUN_REC_TOK, &FOLLOW_DEFINE_FUN_REC_TOK_in_smt25Command1802);
5788
76
        	        if  (HASEXCEPTION())
5789
        	        {
5790
        	            goto rulesmt25CommandEx;
5791
        	        }
5792
5793
5794
        	        {
5795
76
        	             PARSER_STATE->checkThatLogicIsSet();
5796
        	        }
5797
5798
5799
76
        	        FOLLOWPUSH(FOLLOW_symbol_in_smt25Command1814);
5800
76
        	        symbol(ctx, fname, CHECK_NONE, SYM_VARIABLE);
5801
5802
76
        	        FOLLOWPOP();
5803
76
        	        if  (HASEXCEPTION())
5804
        	        {
5805
        	            goto rulesmt25CommandEx;
5806
        	        }
5807
5808
5809
        	        {
5810
76
        	             PARSER_STATE->checkUserSymbol(fname);
5811
        	        }
5812
5813
5814
76
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_smt25Command1827);
5815
76
        	        if  (HASEXCEPTION())
5816
        	        {
5817
        	            goto rulesmt25CommandEx;
5818
        	        }
5819
5820
5821
76
        	        FOLLOWPUSH(FOLLOW_sortedVarList_in_smt25Command1829);
5822
76
        	        sortedVarList(ctx, sortedVarNames);
5823
5824
76
        	        FOLLOWPOP();
5825
76
        	        if  (HASEXCEPTION())
5826
        	        {
5827
        	            goto rulesmt25CommandEx;
5828
        	        }
5829
5830
5831
76
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_smt25Command1832);
5832
76
        	        if  (HASEXCEPTION())
5833
        	        {
5834
        	            goto rulesmt25CommandEx;
5835
        	        }
5836
5837
5838
76
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_smt25Command1838);
5839
76
        	        sortSymbol(ctx, t, CHECK_DECLARED);
5840
5841
76
        	        FOLLOWPOP();
5842
76
        	        if  (HASEXCEPTION())
5843
        	        {
5844
        	            goto rulesmt25CommandEx;
5845
        	        }
5846
5847
5848
        	        {
5849
5850
76
        	                  func =
5851
152
        	                      PARSER_STATE->bindDefineFunRec(fname, sortedVarNames, t, flattenVars);
5852
76
        	                  PARSER_STATE->pushDefineFunRecScope(
5853
        	                      sortedVarNames, func, flattenVars, bvs);
5854
5855
        	        }
5856
5857
5858
76
        	        FOLLOWPUSH(FOLLOW_term_in_smt25Command1851);
5859
76
        	        term(ctx, expr, expr2);
5860
5861
76
        	        FOLLOWPOP();
5862
76
        	        if  (HASEXCEPTION())
5863
        	        {
5864
        	            goto rulesmt25CommandEx;
5865
        	        }
5866
5867
5868
        	        {
5869
76
        	             PARSER_STATE->popScope();
5870
76
        	                  if( !flattenVars.empty() ){
5871
        	                    expr = PARSER_STATE->mkHoApply( expr, flattenVars );
5872
        	                  }
5873
152
        	                  cmd->reset(new DefineFunctionRecCommand(
5874
76
        	                      func, bvs, expr, SYM_MAN->getGlobalDeclarations()));
5875
5876
        	        }
5877
5878
5879
        	    }
5880
76
        	    break;
5881
32
        	case 7:
5882
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:836:5: DEFINE_FUNS_REC_TOK LPAREN_TOK ( LPAREN_TOK symbol[fname,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] RPAREN_TOK )+ RPAREN_TOK LPAREN_TOK ( term[expr,expr2] )+ RPAREN_TOK
5883
        	    {
5884
32
        	         MATCHT(DEFINE_FUNS_REC_TOK, &FOLLOW_DEFINE_FUNS_REC_TOK_in_smt25Command1864);
5885
32
        	        if  (HASEXCEPTION())
5886
        	        {
5887
        	            goto rulesmt25CommandEx;
5888
        	        }
5889
5890
5891
        	        {
5892
32
        	             PARSER_STATE->checkThatLogicIsSet();
5893
        	        }
5894
5895
5896
32
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_smt25Command1876);
5897
32
        	        if  (HASEXCEPTION())
5898
        	        {
5899
        	            goto rulesmt25CommandEx;
5900
        	        }
5901
5902
5903
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:839:5: ( LPAREN_TOK symbol[fname,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] RPAREN_TOK )+
5904
        	        {
5905
32
        	            int cnt20=0;
5906
5907
        	            for (;;)
5908
        	            {
5909
106
        	                int alt20=2;
5910
106
        	        	switch ( LA(1) )
5911
        	        	{
5912
74
        	        	case LPAREN_TOK:
5913
        	        		{
5914
74
        	        			alt20=1;
5915
        	        		}
5916
74
        	        	    break;
5917
5918
        	        	}
5919
5920
106
        	        	switch (alt20)
5921
        	        	{
5922
74
        	        	    case 1:
5923
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:839:7: LPAREN_TOK symbol[fname,CHECK_UNDECLARED,SYM_VARIABLE] LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK sortSymbol[t,CHECK_DECLARED] RPAREN_TOK
5924
        	        	        {
5925
74
        	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_smt25Command1884);
5926
74
        	        	            if  (HASEXCEPTION())
5927
        	        	            {
5928
        	        	                goto rulesmt25CommandEx;
5929
        	        	            }
5930
5931
5932
74
        	        	            FOLLOWPUSH(FOLLOW_symbol_in_smt25Command1892);
5933
74
        	        	            symbol(ctx, fname, CHECK_UNDECLARED, SYM_VARIABLE);
5934
5935
74
        	        	            FOLLOWPOP();
5936
74
        	        	            if  (HASEXCEPTION())
5937
        	        	            {
5938
        	        	                goto rulesmt25CommandEx;
5939
        	        	            }
5940
5941
5942
        	        	            {
5943
74
        	        	                 PARSER_STATE->checkUserSymbol(fname);
5944
        	        	            }
5945
5946
5947
74
        	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_smt25Command1909);
5948
74
        	        	            if  (HASEXCEPTION())
5949
        	        	            {
5950
        	        	                goto rulesmt25CommandEx;
5951
        	        	            }
5952
5953
5954
74
        	        	            FOLLOWPUSH(FOLLOW_sortedVarList_in_smt25Command1911);
5955
74
        	        	            sortedVarList(ctx, sortedVarNames);
5956
5957
74
        	        	            FOLLOWPOP();
5958
74
        	        	            if  (HASEXCEPTION())
5959
        	        	            {
5960
        	        	                goto rulesmt25CommandEx;
5961
        	        	            }
5962
5963
5964
74
        	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_smt25Command1914);
5965
74
        	        	            if  (HASEXCEPTION())
5966
        	        	            {
5967
        	        	                goto rulesmt25CommandEx;
5968
        	        	            }
5969
5970
5971
74
        	        	            FOLLOWPUSH(FOLLOW_sortSymbol_in_smt25Command1922);
5972
74
        	        	            sortSymbol(ctx, t, CHECK_DECLARED);
5973
5974
74
        	        	            FOLLOWPOP();
5975
74
        	        	            if  (HASEXCEPTION())
5976
        	        	            {
5977
        	        	                goto rulesmt25CommandEx;
5978
        	        	            }
5979
5980
5981
        	        	            {
5982
5983
74
        	        	                        flattenVars.clear();
5984
74
        	        	                        func = PARSER_STATE->bindDefineFunRec(
5985
        	        	                            fname, sortedVarNames, t, flattenVars);
5986
74
        	        	                        funcs.push_back( func );
5987
5988
        	        	                        // add to lists (need to remember for when parsing the bodies)
5989
74
        	        	                        sortedVarNamesList.push_back( sortedVarNames );
5990
74
        	        	                        flattenVarsList.push_back( flattenVars );
5991
5992
        	        	                        // set up parsing the next variable list block
5993
74
        	        	                        sortedVarNames.clear();
5994
74
        	        	                        flattenVars.clear();
5995
5996
        	        	            }
5997
5998
5999
74
        	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_smt25Command1939);
6000
74
        	        	            if  (HASEXCEPTION())
6001
        	        	            {
6002
        	        	                goto rulesmt25CommandEx;
6003
        	        	            }
6004
6005
6006
        	        	        }
6007
74
        	        	        break;
6008
6009
32
        	        	    default:
6010
6011
32
        	        		if ( cnt20 >= 1 )
6012
        	        		{
6013
32
        	        		    goto loop20;
6014
        	        		}
6015
        	        		/* mismatchedSetEx()
6016
        	        		 */
6017
        	        		CONSTRUCTEX();
6018
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
6019
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
6020
6021
6022
        	        		goto rulesmt25CommandEx;
6023
        	        	}
6024
74
        	        	cnt20++;
6025
74
        	            }
6026
32
        	            loop20: ;	/* Jump to here if this rule does not match */
6027
        	        }
6028
6029
32
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_smt25Command1952);
6030
32
        	        if  (HASEXCEPTION())
6031
        	        {
6032
        	            goto rulesmt25CommandEx;
6033
        	        }
6034
6035
6036
32
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_smt25Command1958);
6037
32
        	        if  (HASEXCEPTION())
6038
        	        {
6039
        	            goto rulesmt25CommandEx;
6040
        	        }
6041
6042
6043
        	        {
6044
6045
        	                  //set up the first scope
6046
32
        	                  if( sortedVarNamesList.empty() ){
6047
        	                    PARSER_STATE->parseError("Must define at least one function in "
6048
        	                                             "define-funs-rec");
6049
        	                  }
6050
32
        	                  bvs.clear();
6051
64
        	                  PARSER_STATE->pushDefineFunRecScope( sortedVarNamesList[0], funcs[0],
6052
32
        	                                                       flattenVarsList[0], bvs);
6053
6054
        	        }
6055
6056
6057
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:872:5: ( term[expr,expr2] )+
6058
        	        {
6059
32
        	            int cnt21=0;
6060
6061
        	            for (;;)
6062
        	            {
6063
106
        	                int alt21=2;
6064
106
        	        	switch ( LA(1) )
6065
        	        	{
6066
74
        	        	case BINARY_LITERAL:
6067
        	        	case DECIMAL_LITERAL:
6068
        	        	case HEX_LITERAL:
6069
        	        	case INTEGER_LITERAL:
6070
        	        	case LPAREN_TOK:
6071
        	        	case QUOTED_SYMBOL:
6072
        	        	case SIMPLE_SYMBOL:
6073
        	        	case STRING_LITERAL:
6074
        	        	case TUPLE_CONST_TOK:
6075
        	        	case UNTERMINATED_QUOTED_SYMBOL:
6076
        	        		{
6077
74
        	        			alt21=1;
6078
        	        		}
6079
74
        	        	    break;
6080
6081
        	        	}
6082
6083
106
        	        	switch (alt21)
6084
        	        	{
6085
74
        	        	    case 1:
6086
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:873:5: term[expr,expr2]
6087
        	        	        {
6088
74
        	        	            FOLLOWPUSH(FOLLOW_term_in_smt25Command1976);
6089
74
        	        	            term(ctx, expr, expr2);
6090
6091
74
        	        	            FOLLOWPOP();
6092
74
        	        	            if  (HASEXCEPTION())
6093
        	        	            {
6094
        	        	                goto rulesmt25CommandEx;
6095
        	        	            }
6096
6097
6098
        	        	            {
6099
6100
74
        	        	                      unsigned j = func_defs.size();
6101
74
        	        	                      if( !flattenVarsList[j].empty() ){
6102
        	        	                        expr = PARSER_STATE->mkHoApply( expr, flattenVarsList[j] );
6103
        	        	                      }
6104
74
        	        	                      func_defs.push_back( expr );
6105
74
        	        	                      formals.push_back(bvs);
6106
74
        	        	                      j++;
6107
        	        	                      //set up the next scope
6108
74
        	        	                      PARSER_STATE->popScope();
6109
74
        	        	                      if( func_defs.size()<funcs.size() ){
6110
42
        	        	                        bvs.clear();
6111
84
        	        	                        PARSER_STATE->pushDefineFunRecScope( sortedVarNamesList[j], funcs[j],
6112
42
        	        	                                                             flattenVarsList[j], bvs);
6113
        	        	                      }
6114
6115
        	        	            }
6116
6117
6118
        	        	        }
6119
74
        	        	        break;
6120
6121
32
        	        	    default:
6122
6123
32
        	        		if ( cnt21 >= 1 )
6124
        	        		{
6125
32
        	        		    goto loop21;
6126
        	        		}
6127
        	        		/* mismatchedSetEx()
6128
        	        		 */
6129
        	        		CONSTRUCTEX();
6130
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
6131
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
6132
6133
6134
        	        		goto rulesmt25CommandEx;
6135
        	        	}
6136
74
        	        	cnt21++;
6137
74
        	            }
6138
32
        	            loop21: ;	/* Jump to here if this rule does not match */
6139
        	        }
6140
6141
32
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_smt25Command1996);
6142
32
        	        if  (HASEXCEPTION())
6143
        	        {
6144
        	            goto rulesmt25CommandEx;
6145
        	        }
6146
6147
6148
        	        {
6149
32
        	             if( funcs.size()!=func_defs.size() ){
6150
        	                    PARSER_STATE->parseError(std::string(
6151
        	                        "Number of functions defined does not match number listed in "
6152
        	                        "define-funs-rec"));
6153
        	                  }
6154
32
        	                  cmd->reset(new DefineFunctionRecCommand(
6155
32
        	                      funcs, formals, func_defs, SYM_MAN->getGlobalDeclarations()));
6156
6157
        	        }
6158
6159
6160
        	    }
6161
32
        	    break;
6162
6163
            }
6164
        }
6165
    }
6166
6167
    // This is where rules clean up and exit
6168
    //
6169
2612
    goto rulesmt25CommandEx; /* Prevent compiler warnings */
6170
2612
    rulesmt25CommandEx: ;
6171
6172
2612
            if (HASEXCEPTION())
6173
            {
6174
                PREPORTERROR();
6175
                PRECOVER();
6176
            }
6177
5224
    return ;
6178
}
6179
/* $ANTLR end smt25Command */
6180
6181
/**
6182
 * $ANTLR start extendedCommand
6183
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:902:1: extendedCommand[std::unique_ptr<cvc5::Command>* cmd] : ( DECLARE_CODATATYPE_TOK datatypeDefCommand[true, cmd] | DECLARE_CODATATYPES_TOK datatypesDefCommand[true, cmd] | DECLARE_SORTS_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )+ RPAREN_TOK | DECLARE_FUNS_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] nonemptySortList[sorts] RPAREN_TOK )+ RPAREN_TOK | DECLARE_PREDS_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortList[sorts] RPAREN_TOK )+ RPAREN_TOK | DEFINE_TOK ( symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] | LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortedVarList[sortedVarNames] RPAREN_TOK term[e,e2] ) | DEFINE_CONST_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] term[e, e2] | SIMPLIFY_TOK term[e,e2] | GET_QE_TOK term[e,e2] | GET_QE_DISJUNCT_TOK term[e,e2] | GET_ABDUCT_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] ( sygusGrammar[g, terms, name] )? | GET_INTERPOL_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] ( sygusGrammar[g, terms, name] )? | DECLARE_HEAP LPAREN_TOK sortSymbol[t, CHECK_DECLARED] sortSymbol[s, CHECK_DECLARED] RPAREN_TOK | DECLARE_POOL symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] LPAREN_TOK ( term[e, e2] )* RPAREN_TOK | BLOCK_MODEL_TOK | BLOCK_MODEL_VALUES_TOK ( LPAREN_TOK termList[terms,e] RPAREN_TOK |~ LPAREN_TOK ) );
6184
 */
6185
static void
6186
183
extendedCommand(pSmt2Parser ctx, std::unique_ptr<cvc5::Command>* cmd)
6187
{
6188
6189
366
      std::vector<api::DatatypeDecl> dts;
6190
366
      cvc5::api::Term e, e2;
6191
366
      cvc5::api::Sort t, s;
6192
366
      std::string name;
6193
366
      std::vector<std::string> names;
6194
366
      std::vector<cvc5::api::Term> terms;
6195
366
      std::vector<api::Sort> sorts;
6196
366
      std::vector<std::pair<std::string, cvc5::api::Sort> > sortedVarNames;
6197
366
      std::unique_ptr<cvc5::CommandSequence> seq;
6198
183
      api::Grammar* g = nullptr;
6199
6200
    /* Initialize rule variables
6201
     */
6202
6203
    {
6204
        {
6205
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:917:3: ( DECLARE_CODATATYPE_TOK datatypeDefCommand[true, cmd] | DECLARE_CODATATYPES_TOK datatypesDefCommand[true, cmd] | DECLARE_SORTS_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )+ RPAREN_TOK | DECLARE_FUNS_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] nonemptySortList[sorts] RPAREN_TOK )+ RPAREN_TOK | DECLARE_PREDS_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortList[sorts] RPAREN_TOK )+ RPAREN_TOK | DEFINE_TOK ( symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] | LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortedVarList[sortedVarNames] RPAREN_TOK term[e,e2] ) | DEFINE_CONST_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] term[e, e2] | SIMPLIFY_TOK term[e,e2] | GET_QE_TOK term[e,e2] | GET_QE_DISJUNCT_TOK term[e,e2] | GET_ABDUCT_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] ( sygusGrammar[g, terms, name] )? | GET_INTERPOL_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] ( sygusGrammar[g, terms, name] )? | DECLARE_HEAP LPAREN_TOK sortSymbol[t, CHECK_DECLARED] sortSymbol[s, CHECK_DECLARED] RPAREN_TOK | DECLARE_POOL symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] LPAREN_TOK ( term[e, e2] )* RPAREN_TOK | BLOCK_MODEL_TOK | BLOCK_MODEL_VALUES_TOK ( LPAREN_TOK termList[terms,e] RPAREN_TOK |~ LPAREN_TOK ) )
6206
6207
            ANTLR3_UINT32 alt31;
6208
6209
183
            alt31=16;
6210
6211
183
            switch ( LA(1) )
6212
            {
6213
2
            case DECLARE_CODATATYPE_TOK:
6214
            	{
6215
2
            		alt31=1;
6216
            	}
6217
2
                break;
6218
22
            case DECLARE_CODATATYPES_TOK:
6219
            	{
6220
22
            		alt31=2;
6221
            	}
6222
22
                break;
6223
            case DECLARE_SORTS_TOK:
6224
            	{
6225
            		alt31=3;
6226
            	}
6227
                break;
6228
2
            case DECLARE_FUNS_TOK:
6229
            	{
6230
2
            		alt31=4;
6231
            	}
6232
2
                break;
6233
            case DECLARE_PREDS_TOK:
6234
            	{
6235
            		alt31=5;
6236
            	}
6237
                break;
6238
8
            case DEFINE_TOK:
6239
            	{
6240
8
            		alt31=6;
6241
            	}
6242
8
                break;
6243
8
            case DEFINE_CONST_TOK:
6244
            	{
6245
8
            		alt31=7;
6246
            	}
6247
8
                break;
6248
1
            case SIMPLIFY_TOK:
6249
            	{
6250
1
            		alt31=8;
6251
            	}
6252
1
                break;
6253
7
            case GET_QE_TOK:
6254
            	{
6255
7
            		alt31=9;
6256
            	}
6257
7
                break;
6258
1
            case GET_QE_DISJUNCT_TOK:
6259
            	{
6260
1
            		alt31=10;
6261
            	}
6262
1
                break;
6263
12
            case GET_ABDUCT_TOK:
6264
            	{
6265
12
            		alt31=11;
6266
            	}
6267
12
                break;
6268
8
            case GET_INTERPOL_TOK:
6269
            	{
6270
8
            		alt31=12;
6271
            	}
6272
8
                break;
6273
87
            case DECLARE_HEAP:
6274
            	{
6275
87
            		alt31=13;
6276
            	}
6277
87
                break;
6278
3
            case DECLARE_POOL:
6279
            	{
6280
3
            		alt31=14;
6281
            	}
6282
3
                break;
6283
14
            case BLOCK_MODEL_TOK:
6284
            	{
6285
14
            		alt31=15;
6286
            	}
6287
14
                break;
6288
8
            case BLOCK_MODEL_VALUES_TOK:
6289
            	{
6290
8
            		alt31=16;
6291
            	}
6292
8
                break;
6293
6294
            default:
6295
                CONSTRUCTEX();
6296
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
6297
                EXCEPTION->message      = (void *)"";
6298
                EXCEPTION->decisionNum  = 31;
6299
                EXCEPTION->state        = 0;
6300
6301
6302
                goto ruleextendedCommandEx;
6303
6304
            }
6305
6306
183
            switch (alt31)
6307
            {
6308
2
        	case 1:
6309
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:917:5: DECLARE_CODATATYPE_TOK datatypeDefCommand[true, cmd]
6310
        	    {
6311
2
        	         MATCHT(DECLARE_CODATATYPE_TOK, &FOLLOW_DECLARE_CODATATYPE_TOK_in_extendedCommand2027);
6312
2
        	        if  (HASEXCEPTION())
6313
        	        {
6314
        	            goto ruleextendedCommandEx;
6315
        	        }
6316
6317
6318
2
        	        FOLLOWPUSH(FOLLOW_datatypeDefCommand_in_extendedCommand2029);
6319
2
        	        datatypeDefCommand(ctx, true, cmd);
6320
6321
2
        	        FOLLOWPOP();
6322
2
        	        if  (HASEXCEPTION())
6323
        	        {
6324
        	            goto ruleextendedCommandEx;
6325
        	        }
6326
6327
6328
        	    }
6329
2
        	    break;
6330
22
        	case 2:
6331
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:918:5: DECLARE_CODATATYPES_TOK datatypesDefCommand[true, cmd]
6332
        	    {
6333
22
        	         MATCHT(DECLARE_CODATATYPES_TOK, &FOLLOW_DECLARE_CODATATYPES_TOK_in_extendedCommand2036);
6334
22
        	        if  (HASEXCEPTION())
6335
        	        {
6336
        	            goto ruleextendedCommandEx;
6337
        	        }
6338
6339
6340
22
        	        FOLLOWPUSH(FOLLOW_datatypesDefCommand_in_extendedCommand2038);
6341
22
        	        datatypesDefCommand(ctx, true, cmd);
6342
6343
22
        	        FOLLOWPOP();
6344
22
        	        if  (HASEXCEPTION())
6345
        	        {
6346
        	            goto ruleextendedCommandEx;
6347
        	        }
6348
6349
6350
        	    }
6351
22
        	    break;
6352
        	case 3:
6353
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:922:5: DECLARE_SORTS_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )+ RPAREN_TOK
6354
        	    {
6355
        	         MATCHT(DECLARE_SORTS_TOK, &FOLLOW_DECLARE_SORTS_TOK_in_extendedCommand2053);
6356
        	        if  (HASEXCEPTION())
6357
        	        {
6358
        	            goto ruleextendedCommandEx;
6359
        	        }
6360
6361
6362
        	        {
6363
6364
        	                  PARSER_STATE->checkThatLogicIsSet();
6365
        	                  PARSER_STATE->checkLogicAllowsFreeSorts();
6366
        	                  seq.reset(new cvc5::CommandSequence());
6367
6368
        	        }
6369
6370
6371
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2065);
6372
        	        if  (HASEXCEPTION())
6373
        	        {
6374
        	            goto ruleextendedCommandEx;
6375
        	        }
6376
6377
6378
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:929:5: ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )+
6379
        	        {
6380
        	            int cnt23=0;
6381
6382
        	            for (;;)
6383
        	            {
6384
        	                int alt23=2;
6385
        	        	switch ( LA(1) )
6386
        	        	{
6387
        	        	case QUOTED_SYMBOL:
6388
        	        	case SIMPLE_SYMBOL:
6389
        	        	case UNTERMINATED_QUOTED_SYMBOL:
6390
        	        		{
6391
        	        			alt23=1;
6392
        	        		}
6393
        	        	    break;
6394
6395
        	        	}
6396
6397
        	        	switch (alt23)
6398
        	        	{
6399
        	        	    case 1:
6400
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:929:7: symbol[name,CHECK_UNDECLARED,SYM_SORT]
6401
        	        	        {
6402
        	        	            FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2073);
6403
        	        	            symbol(ctx, name, CHECK_UNDECLARED, SYM_SORT);
6404
6405
        	        	            FOLLOWPOP();
6406
        	        	            if  (HASEXCEPTION())
6407
        	        	            {
6408
        	        	                goto ruleextendedCommandEx;
6409
        	        	            }
6410
6411
6412
        	        	            {
6413
        	        	                 PARSER_STATE->checkUserSymbol(name);
6414
        	        	                        api::Sort type = PARSER_STATE->mkSort(name);
6415
        	        	                        seq->addCommand(new DeclareSortCommand(name, 0, type));
6416
6417
        	        	            }
6418
6419
6420
        	        	        }
6421
        	        	        break;
6422
6423
        	        	    default:
6424
6425
        	        		if ( cnt23 >= 1 )
6426
        	        		{
6427
        	        		    goto loop23;
6428
        	        		}
6429
        	        		/* mismatchedSetEx()
6430
        	        		 */
6431
        	        		CONSTRUCTEX();
6432
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
6433
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
6434
6435
6436
        	        		goto ruleextendedCommandEx;
6437
        	        	}
6438
        	        	cnt23++;
6439
        	            }
6440
        	            loop23: ;	/* Jump to here if this rule does not match */
6441
        	        }
6442
6443
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2095);
6444
        	        if  (HASEXCEPTION())
6445
        	        {
6446
        	            goto ruleextendedCommandEx;
6447
        	        }
6448
6449
6450
        	        {
6451
        	             cmd->reset(seq.release());
6452
        	        }
6453
6454
6455
        	    }
6456
        	    break;
6457
2
        	case 4:
6458
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:938:5: DECLARE_FUNS_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] nonemptySortList[sorts] RPAREN_TOK )+ RPAREN_TOK
6459
        	    {
6460
2
        	         MATCHT(DECLARE_FUNS_TOK, &FOLLOW_DECLARE_FUNS_TOK_in_extendedCommand2108);
6461
2
        	        if  (HASEXCEPTION())
6462
        	        {
6463
        	            goto ruleextendedCommandEx;
6464
        	        }
6465
6466
6467
        	        {
6468
2
        	             PARSER_STATE->checkThatLogicIsSet();
6469
        	        }
6470
6471
6472
        	        {
6473
2
        	             seq.reset(new cvc5::CommandSequence());
6474
        	        }
6475
6476
6477
2
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2122);
6478
2
        	        if  (HASEXCEPTION())
6479
        	        {
6480
        	            goto ruleextendedCommandEx;
6481
        	        }
6482
6483
6484
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:941:5: ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] nonemptySortList[sorts] RPAREN_TOK )+
6485
        	        {
6486
2
        	            int cnt24=0;
6487
6488
        	            for (;;)
6489
        	            {
6490
6
        	                int alt24=2;
6491
6
        	        	switch ( LA(1) )
6492
        	        	{
6493
4
        	        	case LPAREN_TOK:
6494
        	        		{
6495
4
        	        			alt24=1;
6496
        	        		}
6497
4
        	        	    break;
6498
6499
        	        	}
6500
6501
6
        	        	switch (alt24)
6502
        	        	{
6503
4
        	        	    case 1:
6504
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:941:7: LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] nonemptySortList[sorts] RPAREN_TOK
6505
        	        	        {
6506
4
        	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2130);
6507
4
        	        	            if  (HASEXCEPTION())
6508
        	        	            {
6509
        	        	                goto ruleextendedCommandEx;
6510
        	        	            }
6511
6512
6513
4
        	        	            FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2132);
6514
4
        	        	            symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
6515
6516
4
        	        	            FOLLOWPOP();
6517
4
        	        	            if  (HASEXCEPTION())
6518
        	        	            {
6519
        	        	                goto ruleextendedCommandEx;
6520
        	        	            }
6521
6522
6523
        	        	            {
6524
4
        	        	                 PARSER_STATE->checkUserSymbol(name);
6525
        	        	            }
6526
6527
6528
4
        	        	            FOLLOWPUSH(FOLLOW_nonemptySortList_in_extendedCommand2149);
6529
4
        	        	            nonemptySortList(ctx, sorts);
6530
6531
4
        	        	            FOLLOWPOP();
6532
4
        	        	            if  (HASEXCEPTION())
6533
        	        	            {
6534
        	        	                goto ruleextendedCommandEx;
6535
        	        	            }
6536
6537
6538
4
        	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2152);
6539
4
        	        	            if  (HASEXCEPTION())
6540
        	        	            {
6541
        	        	                goto ruleextendedCommandEx;
6542
        	        	            }
6543
6544
6545
        	        	            {
6546
8
        	        	                 api::Sort tt;
6547
4
        	        	                        if(sorts.size() > 1) {
6548
        	        	                          PARSER_STATE->checkLogicAllowsFunctions();
6549
        	        	                          // must flatten
6550
        	        	                          api::Sort range = sorts.back();
6551
        	        	                          sorts.pop_back();
6552
        	        	                          tt = PARSER_STATE->mkFlatFunctionType(sorts, range);
6553
        	        	                        } else {
6554
4
        	        	                          tt = sorts[0];
6555
        	        	                        }
6556
        	        	                        // allow overloading
6557
        	        	                        api::Term func =
6558
8
        	        	                            PARSER_STATE->bindVar(name, tt, false, true);
6559
4
        	        	                        seq->addCommand(new DeclareFunctionCommand(name, func, tt));
6560
4
        	        	                        sorts.clear();
6561
6562
4
        	        	            }
6563
6564
6565
        	        	        }
6566
4
        	        	        break;
6567
6568
2
        	        	    default:
6569
6570
2
        	        		if ( cnt24 >= 1 )
6571
        	        		{
6572
2
        	        		    goto loop24;
6573
        	        		}
6574
        	        		/* mismatchedSetEx()
6575
        	        		 */
6576
        	        		CONSTRUCTEX();
6577
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
6578
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
6579
6580
6581
        	        		goto ruleextendedCommandEx;
6582
        	        	}
6583
4
        	        	cnt24++;
6584
4
        	            }
6585
2
        	            loop24: ;	/* Jump to here if this rule does not match */
6586
        	        }
6587
6588
2
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2173);
6589
2
        	        if  (HASEXCEPTION())
6590
        	        {
6591
        	            goto ruleextendedCommandEx;
6592
        	        }
6593
6594
6595
        	        {
6596
2
        	             cmd->reset(seq.release());
6597
        	        }
6598
6599
6600
        	    }
6601
2
        	    break;
6602
        	case 5:
6603
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:963:5: DECLARE_PREDS_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortList[sorts] RPAREN_TOK )+ RPAREN_TOK
6604
        	    {
6605
        	         MATCHT(DECLARE_PREDS_TOK, &FOLLOW_DECLARE_PREDS_TOK_in_extendedCommand2185);
6606
        	        if  (HASEXCEPTION())
6607
        	        {
6608
        	            goto ruleextendedCommandEx;
6609
        	        }
6610
6611
6612
        	        {
6613
        	             PARSER_STATE->checkThatLogicIsSet();
6614
        	        }
6615
6616
6617
        	        {
6618
        	             seq.reset(new cvc5::CommandSequence());
6619
        	        }
6620
6621
6622
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2199);
6623
        	        if  (HASEXCEPTION())
6624
        	        {
6625
        	            goto ruleextendedCommandEx;
6626
        	        }
6627
6628
6629
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:966:5: ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortList[sorts] RPAREN_TOK )+
6630
        	        {
6631
        	            int cnt25=0;
6632
6633
        	            for (;;)
6634
        	            {
6635
        	                int alt25=2;
6636
        	        	switch ( LA(1) )
6637
        	        	{
6638
        	        	case LPAREN_TOK:
6639
        	        		{
6640
        	        			alt25=1;
6641
        	        		}
6642
        	        	    break;
6643
6644
        	        	}
6645
6646
        	        	switch (alt25)
6647
        	        	{
6648
        	        	    case 1:
6649
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:966:7: LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortList[sorts] RPAREN_TOK
6650
        	        	        {
6651
        	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2207);
6652
        	        	            if  (HASEXCEPTION())
6653
        	        	            {
6654
        	        	                goto ruleextendedCommandEx;
6655
        	        	            }
6656
6657
6658
        	        	            FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2209);
6659
        	        	            symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
6660
6661
        	        	            FOLLOWPOP();
6662
        	        	            if  (HASEXCEPTION())
6663
        	        	            {
6664
        	        	                goto ruleextendedCommandEx;
6665
        	        	            }
6666
6667
6668
        	        	            {
6669
        	        	                 PARSER_STATE->checkUserSymbol(name);
6670
        	        	            }
6671
6672
6673
        	        	            FOLLOWPUSH(FOLLOW_sortList_in_extendedCommand2226);
6674
        	        	            sortList(ctx, sorts);
6675
6676
        	        	            FOLLOWPOP();
6677
        	        	            if  (HASEXCEPTION())
6678
        	        	            {
6679
        	        	                goto ruleextendedCommandEx;
6680
        	        	            }
6681
6682
6683
        	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2229);
6684
        	        	            if  (HASEXCEPTION())
6685
        	        	            {
6686
        	        	                goto ruleextendedCommandEx;
6687
        	        	            }
6688
6689
6690
        	        	            {
6691
        	        	                 t = SOLVER->getBooleanSort();
6692
        	        	                        if(sorts.size() > 0) {
6693
        	        	                          PARSER_STATE->checkLogicAllowsFunctions();
6694
        	        	                          t = SOLVER->mkFunctionSort(sorts, t);
6695
        	        	                        }
6696
        	        	                        // allow overloading
6697
        	        	                        api::Term func =
6698
        	        	                            PARSER_STATE->bindVar(name, t, false, true);
6699
        	        	                        seq->addCommand(new DeclareFunctionCommand(name, func, t));
6700
        	        	                        sorts.clear();
6701
6702
        	        	            }
6703
6704
6705
        	        	        }
6706
        	        	        break;
6707
6708
        	        	    default:
6709
6710
        	        		if ( cnt25 >= 1 )
6711
        	        		{
6712
        	        		    goto loop25;
6713
        	        		}
6714
        	        		/* mismatchedSetEx()
6715
        	        		 */
6716
        	        		CONSTRUCTEX();
6717
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
6718
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
6719
6720
6721
        	        		goto ruleextendedCommandEx;
6722
        	        	}
6723
        	        	cnt25++;
6724
        	            }
6725
        	            loop25: ;	/* Jump to here if this rule does not match */
6726
        	        }
6727
6728
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2250);
6729
        	        if  (HASEXCEPTION())
6730
        	        {
6731
        	            goto ruleextendedCommandEx;
6732
        	        }
6733
6734
6735
        	        {
6736
        	             cmd->reset(seq.release());
6737
        	        }
6738
6739
6740
        	    }
6741
        	    break;
6742
8
        	case 6:
6743
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:984:5: DEFINE_TOK ( symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] | LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortedVarList[sortedVarNames] RPAREN_TOK term[e,e2] )
6744
        	    {
6745
8
        	         MATCHT(DEFINE_TOK, &FOLLOW_DEFINE_TOK_in_extendedCommand2263);
6746
8
        	        if  (HASEXCEPTION())
6747
        	        {
6748
        	            goto ruleextendedCommandEx;
6749
        	        }
6750
6751
6752
        	        {
6753
8
        	             PARSER_STATE->checkThatLogicIsSet();
6754
        	        }
6755
6756
6757
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:985:5: ( symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] | LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortedVarList[sortedVarNames] RPAREN_TOK term[e,e2] )
6758
        	        {
6759
8
        	            int alt26=2;
6760
8
        	            switch ( LA(1) )
6761
        	            {
6762
5
        	            case QUOTED_SYMBOL:
6763
        	            case SIMPLE_SYMBOL:
6764
        	            case UNTERMINATED_QUOTED_SYMBOL:
6765
        	            	{
6766
5
        	            		alt26=1;
6767
        	            	}
6768
5
        	                break;
6769
3
        	            case LPAREN_TOK:
6770
        	            	{
6771
3
        	            		alt26=2;
6772
        	            	}
6773
3
        	                break;
6774
6775
        	            default:
6776
        	                CONSTRUCTEX();
6777
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
6778
        	                EXCEPTION->message      = (void *)"";
6779
        	                EXCEPTION->decisionNum  = 26;
6780
        	                EXCEPTION->state        = 0;
6781
6782
6783
        	                goto ruleextendedCommandEx;
6784
6785
        	            }
6786
6787
8
        	            switch (alt26)
6788
        	            {
6789
5
        	        	case 1:
6790
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:986:7: symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2]
6791
        	        	    {
6792
5
        	        	        FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2280);
6793
5
        	        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
6794
6795
5
        	        	        FOLLOWPOP();
6796
5
        	        	        if  (HASEXCEPTION())
6797
        	        	        {
6798
        	        	            goto ruleextendedCommandEx;
6799
        	        	        }
6800
6801
6802
        	        	        {
6803
5
        	        	             PARSER_STATE->checkUserSymbol(name);
6804
        	        	        }
6805
6806
6807
5
        	        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2297);
6808
5
        	        	        term(ctx, e, e2);
6809
6810
5
        	        	        FOLLOWPOP();
6811
5
        	        	        if  (HASEXCEPTION())
6812
        	        	        {
6813
        	        	            goto ruleextendedCommandEx;
6814
        	        	        }
6815
6816
6817
        	        	        {
6818
6819
10
        	        	                    api::Term func = PARSER_STATE->bindVar(name, e.getSort());
6820
10
        	        	                    cmd->reset(new DefineFunctionCommand(
6821
5
        	        	                        name, func, e, SYM_MAN->getGlobalDeclarations()));
6822
6823
5
        	        	        }
6824
6825
6826
        	        	    }
6827
5
        	        	    break;
6828
3
        	        	case 2:
6829
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:995:7: LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortedVarList[sortedVarNames] RPAREN_TOK term[e,e2]
6830
        	        	    {
6831
3
        	        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2321);
6832
3
        	        	        if  (HASEXCEPTION())
6833
        	        	        {
6834
        	        	            goto ruleextendedCommandEx;
6835
        	        	        }
6836
6837
6838
3
        	        	        FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2329);
6839
3
        	        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
6840
6841
3
        	        	        FOLLOWPOP();
6842
3
        	        	        if  (HASEXCEPTION())
6843
        	        	        {
6844
        	        	            goto ruleextendedCommandEx;
6845
        	        	        }
6846
6847
6848
        	        	        {
6849
3
        	        	             PARSER_STATE->checkUserSymbol(name);
6850
        	        	        }
6851
6852
6853
3
        	        	        FOLLOWPUSH(FOLLOW_sortedVarList_in_extendedCommand2346);
6854
3
        	        	        sortedVarList(ctx, sortedVarNames);
6855
6856
3
        	        	        FOLLOWPOP();
6857
3
        	        	        if  (HASEXCEPTION())
6858
        	        	        {
6859
        	        	            goto ruleextendedCommandEx;
6860
        	        	        }
6861
6862
6863
3
        	        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2349);
6864
3
        	        	        if  (HASEXCEPTION())
6865
        	        	        {
6866
        	        	            goto ruleextendedCommandEx;
6867
        	        	        }
6868
6869
6870
        	        	        {
6871
        	        	             /* add variables to parser state before parsing term */
6872
3
        	        	                    Debug("parser") << "define fun: '" << name << "'" << std::endl;
6873
3
        	        	                    PARSER_STATE->pushScope();
6874
3
        	        	                    terms = PARSER_STATE->bindBoundVars(sortedVarNames);
6875
6876
        	        	        }
6877
6878
6879
3
        	        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2365);
6880
3
        	        	        term(ctx, e, e2);
6881
6882
3
        	        	        FOLLOWPOP();
6883
3
        	        	        if  (HASEXCEPTION())
6884
        	        	        {
6885
        	        	            goto ruleextendedCommandEx;
6886
        	        	        }
6887
6888
6889
        	        	        {
6890
6891
3
        	        	                    PARSER_STATE->popScope();
6892
        	        	                    // declare the name down here (while parsing term, signature
6893
        	        	                    // must not be extended with the name itself; no recursion
6894
        	        	                    // permitted)
6895
6
        	        	                    api::Sort tt = e.getSort();
6896
3
        	        	                    if( sortedVarNames.size() > 0 ) {
6897
3
        	        	                      sorts.reserve(sortedVarNames.size());
6898
3
        	        	                      for(std::vector<std::pair<std::string, api::Sort> >::const_iterator
6899
3
        	        	                            i = sortedVarNames.begin(), iend = sortedVarNames.end();
6900
6
        	        	                          i != iend; ++i) {
6901
3
        	        	                        sorts.push_back((*i).second);
6902
        	        	                      }
6903
3
        	        	                      tt = SOLVER->mkFunctionSort(sorts, tt);
6904
        	        	                    }
6905
6
        	        	                    api::Term func = PARSER_STATE->bindVar(name, tt);
6906
6
        	        	                    cmd->reset(new DefineFunctionCommand(
6907
3
        	        	                        name, func, terms, e, SYM_MAN->getGlobalDeclarations()));
6908
6909
3
        	        	        }
6910
6911
6912
        	        	    }
6913
3
        	        	    break;
6914
6915
        	            }
6916
        	        }
6917
6918
        	    }
6919
8
        	    break;
6920
8
        	case 7:
6921
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1026:5: DEFINE_CONST_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] term[e, e2]
6922
        	    {
6923
8
        	         MATCHT(DEFINE_CONST_TOK, &FOLLOW_DEFINE_CONST_TOK_in_extendedCommand2391);
6924
8
        	        if  (HASEXCEPTION())
6925
        	        {
6926
        	            goto ruleextendedCommandEx;
6927
        	        }
6928
6929
6930
        	        {
6931
8
        	             PARSER_STATE->checkThatLogicIsSet();
6932
        	        }
6933
6934
6935
8
        	        FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2399);
6936
8
        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
6937
6938
8
        	        FOLLOWPOP();
6939
8
        	        if  (HASEXCEPTION())
6940
        	        {
6941
        	            goto ruleextendedCommandEx;
6942
        	        }
6943
6944
6945
        	        {
6946
8
        	             PARSER_STATE->checkUserSymbol(name);
6947
        	        }
6948
6949
6950
8
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_extendedCommand2412);
6951
8
        	        sortSymbol(ctx, t, CHECK_DECLARED);
6952
6953
8
        	        FOLLOWPOP();
6954
8
        	        if  (HASEXCEPTION())
6955
        	        {
6956
        	            goto ruleextendedCommandEx;
6957
        	        }
6958
6959
6960
8
        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2419);
6961
8
        	        term(ctx, e, e2);
6962
6963
8
        	        FOLLOWPOP();
6964
8
        	        if  (HASEXCEPTION())
6965
        	        {
6966
        	            goto ruleextendedCommandEx;
6967
        	        }
6968
6969
6970
        	        {
6971
6972
        	                  // declare the name down here (while parsing term, signature
6973
        	                  // must not be extended with the name itself; no recursion
6974
        	                  // permitted)
6975
16
        	                  api::Term func = PARSER_STATE->bindVar(name, t);
6976
16
        	                  cmd->reset(new DefineFunctionCommand(
6977
8
        	                      name, func, terms, e, SYM_MAN->getGlobalDeclarations()));
6978
6979
8
        	        }
6980
6981
6982
        	    }
6983
8
        	    break;
6984
1
        	case 8:
6985
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1040:5: SIMPLIFY_TOK term[e,e2]
6986
        	    {
6987
1
        	         MATCHT(SIMPLIFY_TOK, &FOLLOW_SIMPLIFY_TOK_in_extendedCommand2433);
6988
1
        	        if  (HASEXCEPTION())
6989
        	        {
6990
        	            goto ruleextendedCommandEx;
6991
        	        }
6992
6993
6994
        	        {
6995
1
        	             PARSER_STATE->checkThatLogicIsSet();
6996
        	        }
6997
6998
6999
1
        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2441);
7000
1
        	        term(ctx, e, e2);
7001
7002
        	        FOLLOWPOP();
7003
        	        if  (HASEXCEPTION())
7004
        	        {
7005
        	            goto ruleextendedCommandEx;
7006
        	        }
7007
7008
7009
        	        {
7010
        	             cmd->reset(new SimplifyCommand(e));
7011
        	        }
7012
7013
7014
        	    }
7015
        	    break;
7016
7
        	case 9:
7017
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1043:5: GET_QE_TOK term[e,e2]
7018
        	    {
7019
7
        	         MATCHT(GET_QE_TOK, &FOLLOW_GET_QE_TOK_in_extendedCommand2454);
7020
7
        	        if  (HASEXCEPTION())
7021
        	        {
7022
        	            goto ruleextendedCommandEx;
7023
        	        }
7024
7025
7026
        	        {
7027
7
        	             PARSER_STATE->checkThatLogicIsSet();
7028
        	        }
7029
7030
7031
7
        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2462);
7032
7
        	        term(ctx, e, e2);
7033
7034
7
        	        FOLLOWPOP();
7035
7
        	        if  (HASEXCEPTION())
7036
        	        {
7037
        	            goto ruleextendedCommandEx;
7038
        	        }
7039
7040
7041
        	        {
7042
7
        	             cmd->reset(new GetQuantifierEliminationCommand(e, true));
7043
        	        }
7044
7045
7046
        	    }
7047
7
        	    break;
7048
1
        	case 10:
7049
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1046:5: GET_QE_DISJUNCT_TOK term[e,e2]
7050
        	    {
7051
1
        	         MATCHT(GET_QE_DISJUNCT_TOK, &FOLLOW_GET_QE_DISJUNCT_TOK_in_extendedCommand2475);
7052
1
        	        if  (HASEXCEPTION())
7053
        	        {
7054
        	            goto ruleextendedCommandEx;
7055
        	        }
7056
7057
7058
        	        {
7059
1
        	             PARSER_STATE->checkThatLogicIsSet();
7060
        	        }
7061
7062
7063
1
        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2483);
7064
1
        	        term(ctx, e, e2);
7065
7066
1
        	        FOLLOWPOP();
7067
1
        	        if  (HASEXCEPTION())
7068
        	        {
7069
        	            goto ruleextendedCommandEx;
7070
        	        }
7071
7072
7073
        	        {
7074
1
        	             cmd->reset(new GetQuantifierEliminationCommand(e, false));
7075
        	        }
7076
7077
7078
        	    }
7079
1
        	    break;
7080
12
        	case 11:
7081
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1049:5: GET_ABDUCT_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] ( sygusGrammar[g, terms, name] )?
7082
        	    {
7083
12
        	         MATCHT(GET_ABDUCT_TOK, &FOLLOW_GET_ABDUCT_TOK_in_extendedCommand2496);
7084
12
        	        if  (HASEXCEPTION())
7085
        	        {
7086
        	            goto ruleextendedCommandEx;
7087
        	        }
7088
7089
7090
        	        {
7091
7092
12
        	                  PARSER_STATE->checkThatLogicIsSet();
7093
7094
        	        }
7095
7096
7097
12
        	        FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2504);
7098
12
        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
7099
7100
12
        	        FOLLOWPOP();
7101
12
        	        if  (HASEXCEPTION())
7102
        	        {
7103
        	            goto ruleextendedCommandEx;
7104
        	        }
7105
7106
7107
12
        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2511);
7108
12
        	        term(ctx, e, e2);
7109
7110
12
        	        FOLLOWPOP();
7111
12
        	        if  (HASEXCEPTION())
7112
        	        {
7113
        	            goto ruleextendedCommandEx;
7114
        	        }
7115
7116
7117
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1054:5: ( sygusGrammar[g, terms, name] )?
7118
        	        {
7119
12
        	            int alt27=2;
7120
12
        	            switch ( LA(1) )
7121
        	            {
7122
4
        	                case LPAREN_TOK:
7123
        	                	{
7124
4
        	                		alt27=1;
7125
        	                	}
7126
4
        	                    break;
7127
        	            }
7128
7129
12
        	            switch (alt27)
7130
        	            {
7131
4
        	        	case 1:
7132
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1055:7: sygusGrammar[g, terms, name]
7133
        	        	    {
7134
4
        	        	        FOLLOWPUSH(FOLLOW_sygusGrammar_in_extendedCommand2526);
7135
4
        	        	        sygusGrammar(ctx, g, terms, name);
7136
7137
4
        	        	        FOLLOWPOP();
7138
4
        	        	        if  (HASEXCEPTION())
7139
        	        	        {
7140
        	        	            goto ruleextendedCommandEx;
7141
        	        	        }
7142
7143
7144
        	        	    }
7145
4
        	        	    break;
7146
7147
        	            }
7148
        	        }
7149
7150
        	        {
7151
7152
12
        	                  cmd->reset(new GetAbductCommand(name, e, g));
7153
7154
        	        }
7155
7156
7157
        	    }
7158
12
        	    break;
7159
8
        	case 12:
7160
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1060:5: GET_INTERPOL_TOK symbol[name,CHECK_UNDECLARED,SYM_VARIABLE] term[e,e2] ( sygusGrammar[g, terms, name] )?
7161
        	    {
7162
8
        	         MATCHT(GET_INTERPOL_TOK, &FOLLOW_GET_INTERPOL_TOK_in_extendedCommand2546);
7163
8
        	        if  (HASEXCEPTION())
7164
        	        {
7165
        	            goto ruleextendedCommandEx;
7166
        	        }
7167
7168
7169
        	        {
7170
7171
8
        	                  PARSER_STATE->checkThatLogicIsSet();
7172
7173
        	        }
7174
7175
7176
8
        	        FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2554);
7177
8
        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_VARIABLE);
7178
7179
8
        	        FOLLOWPOP();
7180
8
        	        if  (HASEXCEPTION())
7181
        	        {
7182
        	            goto ruleextendedCommandEx;
7183
        	        }
7184
7185
7186
8
        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2561);
7187
8
        	        term(ctx, e, e2);
7188
7189
8
        	        FOLLOWPOP();
7190
8
        	        if  (HASEXCEPTION())
7191
        	        {
7192
        	            goto ruleextendedCommandEx;
7193
        	        }
7194
7195
7196
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1065:5: ( sygusGrammar[g, terms, name] )?
7197
        	        {
7198
8
        	            int alt28=2;
7199
8
        	            switch ( LA(1) )
7200
        	            {
7201
1
        	                case LPAREN_TOK:
7202
        	                	{
7203
1
        	                		alt28=1;
7204
        	                	}
7205
1
        	                    break;
7206
        	            }
7207
7208
8
        	            switch (alt28)
7209
        	            {
7210
1
        	        	case 1:
7211
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1066:7: sygusGrammar[g, terms, name]
7212
        	        	    {
7213
1
        	        	        FOLLOWPUSH(FOLLOW_sygusGrammar_in_extendedCommand2576);
7214
1
        	        	        sygusGrammar(ctx, g, terms, name);
7215
7216
1
        	        	        FOLLOWPOP();
7217
1
        	        	        if  (HASEXCEPTION())
7218
        	        	        {
7219
        	        	            goto ruleextendedCommandEx;
7220
        	        	        }
7221
7222
7223
        	        	    }
7224
1
        	        	    break;
7225
7226
        	            }
7227
        	        }
7228
7229
        	        {
7230
7231
8
        	                  cmd->reset(new GetInterpolCommand(name, e, g));
7232
7233
        	        }
7234
7235
7236
        	    }
7237
8
        	    break;
7238
87
        	case 13:
7239
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1071:5: DECLARE_HEAP LPAREN_TOK sortSymbol[t, CHECK_DECLARED] sortSymbol[s, CHECK_DECLARED] RPAREN_TOK
7240
        	    {
7241
87
        	         MATCHT(DECLARE_HEAP, &FOLLOW_DECLARE_HEAP_in_extendedCommand2596);
7242
87
        	        if  (HASEXCEPTION())
7243
        	        {
7244
        	            goto ruleextendedCommandEx;
7245
        	        }
7246
7247
7248
87
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2598);
7249
87
        	        if  (HASEXCEPTION())
7250
        	        {
7251
        	            goto ruleextendedCommandEx;
7252
        	        }
7253
7254
7255
87
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_extendedCommand2604);
7256
87
        	        sortSymbol(ctx, t, CHECK_DECLARED);
7257
7258
87
        	        FOLLOWPOP();
7259
87
        	        if  (HASEXCEPTION())
7260
        	        {
7261
        	            goto ruleextendedCommandEx;
7262
        	        }
7263
7264
7265
87
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_extendedCommand2611);
7266
87
        	        sortSymbol(ctx, s, CHECK_DECLARED);
7267
7268
87
        	        FOLLOWPOP();
7269
87
        	        if  (HASEXCEPTION())
7270
        	        {
7271
        	            goto ruleextendedCommandEx;
7272
        	        }
7273
7274
7275
        	        {
7276
87
        	             cmd->reset(new DeclareHeapCommand(t, s));
7277
        	        }
7278
7279
7280
87
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2624);
7281
87
        	        if  (HASEXCEPTION())
7282
        	        {
7283
        	            goto ruleextendedCommandEx;
7284
        	        }
7285
7286
7287
        	    }
7288
87
        	    break;
7289
3
        	case 14:
7290
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1076:5: DECLARE_POOL symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] LPAREN_TOK ( term[e, e2] )* RPAREN_TOK
7291
        	    {
7292
3
        	         MATCHT(DECLARE_POOL, &FOLLOW_DECLARE_POOL_in_extendedCommand2630);
7293
3
        	        if  (HASEXCEPTION())
7294
        	        {
7295
        	            goto ruleextendedCommandEx;
7296
        	        }
7297
7298
7299
        	        {
7300
3
        	             PARSER_STATE->checkThatLogicIsSet();
7301
        	        }
7302
7303
7304
3
        	        FOLLOWPUSH(FOLLOW_symbol_in_extendedCommand2638);
7305
3
        	        symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
7306
7307
3
        	        FOLLOWPOP();
7308
3
        	        if  (HASEXCEPTION())
7309
        	        {
7310
        	            goto ruleextendedCommandEx;
7311
        	        }
7312
7313
7314
        	        {
7315
3
        	             PARSER_STATE->checkUserSymbol(name);
7316
        	        }
7317
7318
7319
3
        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_extendedCommand2651);
7320
3
        	        sortSymbol(ctx, t, CHECK_DECLARED);
7321
7322
3
        	        FOLLOWPOP();
7323
3
        	        if  (HASEXCEPTION())
7324
        	        {
7325
        	            goto ruleextendedCommandEx;
7326
        	        }
7327
7328
7329
3
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2658);
7330
3
        	        if  (HASEXCEPTION())
7331
        	        {
7332
        	            goto ruleextendedCommandEx;
7333
        	        }
7334
7335
7336
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1081:5: ( term[e, e2] )*
7337
7338
        	        for (;;)
7339
        	        {
7340
3
        	            int alt29=2;
7341
3
        	            switch ( LA(1) )
7342
        	            {
7343
        	            case BINARY_LITERAL:
7344
        	            case DECIMAL_LITERAL:
7345
        	            case HEX_LITERAL:
7346
        	            case INTEGER_LITERAL:
7347
        	            case LPAREN_TOK:
7348
        	            case QUOTED_SYMBOL:
7349
        	            case SIMPLE_SYMBOL:
7350
        	            case STRING_LITERAL:
7351
        	            case TUPLE_CONST_TOK:
7352
        	            case UNTERMINATED_QUOTED_SYMBOL:
7353
        	            	{
7354
        	            		alt29=1;
7355
        	            	}
7356
        	                break;
7357
7358
        	            }
7359
7360
3
        	            switch (alt29)
7361
        	            {
7362
        	        	case 1:
7363
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1081:7: term[e, e2]
7364
        	        	    {
7365
        	        	        FOLLOWPUSH(FOLLOW_term_in_extendedCommand2666);
7366
        	        	        term(ctx, e, e2);
7367
7368
        	        	        FOLLOWPOP();
7369
        	        	        if  (HASEXCEPTION())
7370
        	        	        {
7371
        	        	            goto ruleextendedCommandEx;
7372
        	        	        }
7373
7374
7375
        	        	        {
7376
        	        	             terms.push_back( e );
7377
        	        	        }
7378
7379
7380
        	        	    }
7381
        	        	    break;
7382
7383
3
        	        	default:
7384
3
        	        	    goto loop29;	/* break out of the loop */
7385
        	        	    break;
7386
        	            }
7387
        	        }
7388
3
        	        loop29: ; /* Jump out to here if this rule does not match */
7389
7390
7391
3
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2684);
7392
3
        	        if  (HASEXCEPTION())
7393
        	        {
7394
        	            goto ruleextendedCommandEx;
7395
        	        }
7396
7397
7398
        	        {
7399
3
        	             Debug("parser") << "declare pool: '" << name << "'" << std::endl;
7400
6
        	                  api::Term pool = SOLVER->declarePool(name, t, terms);
7401
3
        	                  PARSER_STATE->defineVar(name, pool);
7402
3
        	                  cmd->reset(new DeclarePoolCommand(name, pool, t, terms));
7403
7404
3
        	        }
7405
7406
7407
        	    }
7408
3
        	    break;
7409
14
        	case 15:
7410
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1089:5: BLOCK_MODEL_TOK
7411
        	    {
7412
14
        	         MATCHT(BLOCK_MODEL_TOK, &FOLLOW_BLOCK_MODEL_TOK_in_extendedCommand2696);
7413
14
        	        if  (HASEXCEPTION())
7414
        	        {
7415
        	            goto ruleextendedCommandEx;
7416
        	        }
7417
7418
7419
        	        {
7420
14
        	             PARSER_STATE->checkThatLogicIsSet();
7421
        	        }
7422
7423
7424
        	        {
7425
14
        	             cmd->reset(new BlockModelCommand());
7426
        	        }
7427
7428
7429
        	    }
7430
14
        	    break;
7431
8
        	case 16:
7432
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1092:5: BLOCK_MODEL_VALUES_TOK ( LPAREN_TOK termList[terms,e] RPAREN_TOK |~ LPAREN_TOK )
7433
        	    {
7434
8
        	         MATCHT(BLOCK_MODEL_VALUES_TOK, &FOLLOW_BLOCK_MODEL_VALUES_TOK_in_extendedCommand2711);
7435
8
        	        if  (HASEXCEPTION())
7436
        	        {
7437
        	            goto ruleextendedCommandEx;
7438
        	        }
7439
7440
7441
        	        {
7442
8
        	             PARSER_STATE->checkThatLogicIsSet();
7443
        	        }
7444
7445
7446
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1093:5: ( LPAREN_TOK termList[terms,e] RPAREN_TOK |~ LPAREN_TOK )
7447
        	        {
7448
8
        	            int alt30=2;
7449
8
        	            switch ( LA(1) )
7450
        	            {
7451
8
        	            case LPAREN_TOK:
7452
        	            	{
7453
8
        	            		alt30=1;
7454
        	            	}
7455
8
        	                break;
7456
        	            case ALPHA:
7457
        	            case ASSERT_TOK:
7458
        	            case AS_TOK:
7459
        	            case ATTRIBUTE_INST_ADD_TO_POOL_TOK:
7460
        	            case ATTRIBUTE_INST_LEVEL:
7461
        	            case ATTRIBUTE_NAMED_TOK:
7462
        	            case ATTRIBUTE_NO_PATTERN_TOK:
7463
        	            case ATTRIBUTE_PATTERN_TOK:
7464
        	            case ATTRIBUTE_POOL_TOK:
7465
        	            case ATTRIBUTE_QUANTIFIER_ID_TOK:
7466
        	            case ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK:
7467
        	            case ATTRIBUTE_TOK:
7468
        	            case BINARY_LITERAL:
7469
        	            case BLOCK_MODEL_TOK:
7470
        	            case BLOCK_MODEL_VALUES_TOK:
7471
        	            case CHAR_TOK:
7472
        	            case CHECK_SAT_ASSUMING_TOK:
7473
        	            case CHECK_SAT_TOK:
7474
        	            case CHECK_SYNTH_TOK:
7475
        	            case COMMENT:
7476
        	            case COMPREHENSION_TOK:
7477
        	            case CONSTRAINT_TOK:
7478
        	            case CONST_TOK:
7479
        	            case DECIMAL_LITERAL:
7480
        	            case DECLARE_CODATATYPES_2_5_TOK:
7481
        	            case DECLARE_CODATATYPES_TOK:
7482
        	            case DECLARE_CODATATYPE_TOK:
7483
        	            case DECLARE_CONST_TOK:
7484
        	            case DECLARE_DATATYPES_2_5_TOK:
7485
        	            case DECLARE_DATATYPES_TOK:
7486
        	            case DECLARE_DATATYPE_TOK:
7487
        	            case DECLARE_FUNS_TOK:
7488
        	            case DECLARE_FUN_TOK:
7489
        	            case DECLARE_HEAP:
7490
        	            case DECLARE_POOL:
7491
        	            case DECLARE_PREDS_TOK:
7492
        	            case DECLARE_SORTS_TOK:
7493
        	            case DECLARE_SORT_TOK:
7494
        	            case DECLARE_VAR_TOK:
7495
        	            case DEFINE_CONST_TOK:
7496
        	            case DEFINE_FUNS_REC_TOK:
7497
        	            case DEFINE_FUN_REC_TOK:
7498
        	            case DEFINE_FUN_TOK:
7499
        	            case DEFINE_SORT_TOK:
7500
        	            case DEFINE_TOK:
7501
        	            case DIGIT:
7502
        	            case ECHO_TOK:
7503
        	            case EMP_TOK:
7504
        	            case EXISTS_TOK:
7505
        	            case EXIT_TOK:
7506
        	            case FORALL_TOK:
7507
        	            case GET_ABDUCT_TOK:
7508
        	            case GET_ASSERTIONS_TOK:
7509
        	            case GET_ASSIGNMENT_TOK:
7510
        	            case GET_INFO_TOK:
7511
        	            case GET_INTERPOL_TOK:
7512
        	            case GET_MODEL_TOK:
7513
        	            case GET_OPTION_TOK:
7514
        	            case GET_PROOF_TOK:
7515
        	            case GET_QE_DISJUNCT_TOK:
7516
        	            case GET_QE_TOK:
7517
        	            case GET_UNSAT_ASSUMPTIONS_TOK:
7518
        	            case GET_UNSAT_CORE_TOK:
7519
        	            case GET_VALUE_TOK:
7520
        	            case HEX_DIGIT:
7521
        	            case HEX_LITERAL:
7522
        	            case HO_ARROW_TOK:
7523
        	            case HO_LAMBDA_TOK:
7524
        	            case INCLUDE_TOK:
7525
        	            case INDEX_TOK:
7526
        	            case INTEGER_LITERAL:
7527
        	            case INV_CONSTRAINT_TOK:
7528
        	            case KEYWORD:
7529
        	            case LET_TOK:
7530
        	            case MATCH_TOK:
7531
        	            case NUMERAL:
7532
        	            case PAR_TOK:
7533
        	            case POP_TOK:
7534
        	            case PUSH_TOK:
7535
        	            case QUOTED_SYMBOL:
7536
        	            case RESET_ASSERTIONS_TOK:
7537
        	            case RESET_TOK:
7538
        	            case RPAREN_TOK:
7539
        	            case SET_FEATURE_TOK:
7540
        	            case SET_INFO_TOK:
7541
        	            case SET_LOGIC_TOK:
7542
        	            case SET_OPTION_TOK:
7543
        	            case SIMPLE_SYMBOL:
7544
        	            case SIMPLIFY_TOK:
7545
        	            case STRING_LITERAL:
7546
        	            case SYGUS_CONSTANT_TOK:
7547
        	            case SYGUS_VARIABLE_TOK:
7548
        	            case SYMBOL_CHAR:
7549
        	            case SYMBOL_CHAR_NOUNDERSCORE_NOATTRIBUTE:
7550
        	            case SYNTH_FUN_TOK:
7551
        	            case SYNTH_INV_TOK:
7552
        	            case TESTER_TOK:
7553
        	            case TUPLE_CONST_TOK:
7554
        	            case TUPLE_PROJECT_TOK:
7555
        	            case TUPLE_SEL_TOK:
7556
        	            case UNTERMINATED_QUOTED_SYMBOL:
7557
        	            case UPDATE_TOK:
7558
        	            case WHITESPACE:
7559
        	            case 108:
7560
        	            	{
7561
        	            		alt30=2;
7562
        	            	}
7563
        	                break;
7564
7565
        	            default:
7566
        	                CONSTRUCTEX();
7567
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
7568
        	                EXCEPTION->message      = (void *)"";
7569
        	                EXCEPTION->decisionNum  = 30;
7570
        	                EXCEPTION->state        = 0;
7571
7572
7573
        	                goto ruleextendedCommandEx;
7574
7575
        	            }
7576
7577
8
        	            switch (alt30)
7578
        	            {
7579
8
        	        	case 1:
7580
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1093:7: LPAREN_TOK termList[terms,e] RPAREN_TOK
7581
        	        	    {
7582
8
        	        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_extendedCommand2721);
7583
8
        	        	        if  (HASEXCEPTION())
7584
        	        	        {
7585
        	        	            goto ruleextendedCommandEx;
7586
        	        	        }
7587
7588
7589
8
        	        	        FOLLOWPUSH(FOLLOW_termList_in_extendedCommand2723);
7590
8
        	        	        termList(ctx, terms, e);
7591
7592
8
        	        	        FOLLOWPOP();
7593
8
        	        	        if  (HASEXCEPTION())
7594
        	        	        {
7595
        	        	            goto ruleextendedCommandEx;
7596
        	        	        }
7597
7598
7599
8
        	        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_extendedCommand2726);
7600
8
        	        	        if  (HASEXCEPTION())
7601
        	        	        {
7602
        	        	            goto ruleextendedCommandEx;
7603
        	        	        }
7604
7605
7606
        	        	        {
7607
8
        	        	             cmd->reset(new BlockModelValuesCommand(terms));
7608
        	        	        }
7609
7610
7611
        	        	    }
7612
8
        	        	    break;
7613
        	        	case 2:
7614
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1095:7: ~ LPAREN_TOK
7615
        	        	    {
7616
        	        	        if ( ((LA(1) >= ALPHA) && (LA(1) <= LET_TOK)) || ((LA(1) >= MATCH_TOK) && (LA(1) <= 108)) )
7617
        	        	        {
7618
        	        	            CONSUME();
7619
        	        	            PERRORRECOVERY=ANTLR3_FALSE;
7620
        	        	        }
7621
        	        	        else
7622
        	        	        {
7623
        	        	            CONSTRUCTEX();
7624
        	        	            EXCEPTION->type         = ANTLR3_MISMATCHED_SET_EXCEPTION;
7625
        	        	            EXCEPTION->name         = (void *)ANTLR3_MISMATCHED_SET_NAME;
7626
        	        	            EXCEPTION->expectingSet = NULL;
7627
7628
        	        	            goto ruleextendedCommandEx;
7629
        	        	        }
7630
7631
7632
        	        	        {
7633
        	        	             PARSER_STATE->parseError("The block-model-value command expects a list "
7634
        	        	                                             "of terms.  Perhaps you forgot a pair of "
7635
        	        	                                             "parentheses?");
7636
7637
        	        	        }
7638
7639
7640
        	        	    }
7641
        	        	    break;
7642
7643
        	            }
7644
        	        }
7645
7646
        	    }
7647
8
        	    break;
7648
7649
            }
7650
        }
7651
    }
7652
7653
    // This is where rules clean up and exit
7654
    //
7655
182
    goto ruleextendedCommandEx; /* Prevent compiler warnings */
7656
182
    ruleextendedCommandEx: ;
7657
7658
182
            if (HASEXCEPTION())
7659
            {
7660
                PREPORTERROR();
7661
                PRECOVER();
7662
            }
7663
364
    return ;
7664
}
7665
/* $ANTLR end extendedCommand */
7666
7667
/**
7668
 * $ANTLR start datatypeDefCommand
7669
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1103:1: datatypeDefCommand[bool isCo, std::unique_ptr<cvc5::Command>* cmd] : symbol[name,CHECK_UNDECLARED,SYM_SORT] datatypesDef[isCo, dnames, arities, cmd] ;
7670
 */
7671
static void
7672
143
datatypeDefCommand(pSmt2Parser ctx, bool isCo, std::unique_ptr<cvc5::Command>* cmd)
7673
{
7674
7675
286
      std::vector<api::DatatypeDecl> dts;
7676
286
      std::string name;
7677
286
      std::vector<std::string> dnames;
7678
286
      std::vector<int> arities;
7679
7680
    /* Initialize rule variables
7681
     */
7682
7683
    {
7684
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1110:2: ( symbol[name,CHECK_UNDECLARED,SYM_SORT] datatypesDef[isCo, dnames, arities, cmd] )
7685
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1110:4: symbol[name,CHECK_UNDECLARED,SYM_SORT] datatypesDef[isCo, dnames, arities, cmd]
7686
        {
7687
            {
7688
143
                 PARSER_STATE->checkThatLogicIsSet();
7689
            }
7690
7691
7692
143
            FOLLOWPUSH(FOLLOW_symbol_in_datatypeDefCommand2778);
7693
143
            symbol(ctx, name, CHECK_UNDECLARED, SYM_SORT);
7694
7695
143
            FOLLOWPOP();
7696
143
            if  (HASEXCEPTION())
7697
            {
7698
                goto ruledatatypeDefCommandEx;
7699
            }
7700
7701
7702
            {
7703
7704
143
                   dnames.push_back(name);
7705
143
                   arities.push_back(-1);
7706
7707
            }
7708
7709
7710
143
            FOLLOWPUSH(FOLLOW_datatypesDef_in_datatypeDefCommand2785);
7711
143
            datatypesDef(ctx, isCo, dnames, arities, cmd);
7712
7713
143
            FOLLOWPOP();
7714
143
            if  (HASEXCEPTION())
7715
            {
7716
                goto ruledatatypeDefCommandEx;
7717
            }
7718
7719
7720
        }
7721
7722
    }
7723
7724
    // This is where rules clean up and exit
7725
    //
7726
143
    goto ruledatatypeDefCommandEx; /* Prevent compiler warnings */
7727
143
    ruledatatypeDefCommandEx: ;
7728
7729
143
            if (HASEXCEPTION())
7730
            {
7731
                PREPORTERROR();
7732
                PRECOVER();
7733
            }
7734
286
    return ;
7735
}
7736
/* $ANTLR end datatypeDefCommand */
7737
7738
/**
7739
 * $ANTLR start datatypesDefCommand
7740
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1119:1: datatypesDefCommand[bool isCo, std::unique_ptr<cvc5::Command>* cmd] : LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] n= INTEGER_LITERAL RPAREN_TOK )* RPAREN_TOK LPAREN_TOK datatypesDef[isCo, dnames, arities, cmd] RPAREN_TOK ;
7741
 */
7742
static void
7743
770
datatypesDefCommand(pSmt2Parser ctx, bool isCo, std::unique_ptr<cvc5::Command>* cmd)
7744
{
7745
7746
1540
      std::vector<api::DatatypeDecl> dts;
7747
1540
      std::string name;
7748
1540
      std::vector<std::string> dnames;
7749
1540
      std::vector<int> arities;
7750
7751
    pANTLR3_COMMON_TOKEN    n;
7752
7753
    /* Initialize rule variables
7754
     */
7755
7756
770
    n       = NULL;
7757
7758
    {
7759
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1126:3: ( LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] n= INTEGER_LITERAL RPAREN_TOK )* RPAREN_TOK LPAREN_TOK datatypesDef[isCo, dnames, arities, cmd] RPAREN_TOK )
7760
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1126:5: LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] n= INTEGER_LITERAL RPAREN_TOK )* RPAREN_TOK LPAREN_TOK datatypesDef[isCo, dnames, arities, cmd] RPAREN_TOK
7761
        {
7762
            {
7763
770
                 PARSER_STATE->checkThatLogicIsSet();
7764
            }
7765
7766
7767
770
             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypesDefCommand2808);
7768
770
            if  (HASEXCEPTION())
7769
            {
7770
                goto ruledatatypesDefCommandEx;
7771
            }
7772
7773
7774
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1128:3: ( LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] n= INTEGER_LITERAL RPAREN_TOK )*
7775
7776
            for (;;)
7777
            {
7778
1812
                int alt32=2;
7779
1812
                switch ( LA(1) )
7780
                {
7781
1042
                case LPAREN_TOK:
7782
                	{
7783
1042
                		alt32=1;
7784
                	}
7785
1042
                    break;
7786
7787
                }
7788
7789
1812
                switch (alt32)
7790
                {
7791
1042
            	case 1:
7792
            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1128:5: LPAREN_TOK symbol[name,CHECK_UNDECLARED,SYM_SORT] n= INTEGER_LITERAL RPAREN_TOK
7793
            	    {
7794
1042
            	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypesDefCommand2816);
7795
1042
            	        if  (HASEXCEPTION())
7796
            	        {
7797
            	            goto ruledatatypesDefCommandEx;
7798
            	        }
7799
7800
7801
1042
            	        FOLLOWPUSH(FOLLOW_symbol_in_datatypesDefCommand2818);
7802
1042
            	        symbol(ctx, name, CHECK_UNDECLARED, SYM_SORT);
7803
7804
1042
            	        FOLLOWPOP();
7805
1042
            	        if  (HASEXCEPTION())
7806
            	        {
7807
            	            goto ruledatatypesDefCommandEx;
7808
            	        }
7809
7810
7811
1042
            	        n = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_datatypesDefCommand2823);
7812
1042
            	        if  (HASEXCEPTION())
7813
            	        {
7814
            	            goto ruledatatypesDefCommandEx;
7815
            	        }
7816
7817
7818
1042
            	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypesDefCommand2825);
7819
1042
            	        if  (HASEXCEPTION())
7820
            	        {
7821
            	            goto ruledatatypesDefCommandEx;
7822
            	        }
7823
7824
7825
            	        {
7826
1042
            	             unsigned arity = AntlrInput::tokenToUnsigned(n);
7827
1042
            	                  Debug("parser-dt") << "Datatype : " << name << ", arity = " << arity << std::endl;
7828
1042
            	                  dnames.push_back(name);
7829
1042
            	                  arities.push_back( static_cast<int>(arity) );
7830
7831
1042
            	        }
7832
7833
7834
            	    }
7835
1042
            	    break;
7836
7837
770
            	default:
7838
770
            	    goto loop32;	/* break out of the loop */
7839
            	    break;
7840
                }
7841
1042
            }
7842
770
            loop32: ; /* Jump out to here if this rule does not match */
7843
7844
7845
770
             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypesDefCommand2840);
7846
770
            if  (HASEXCEPTION())
7847
            {
7848
                goto ruledatatypesDefCommandEx;
7849
            }
7850
7851
7852
770
             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypesDefCommand2844);
7853
770
            if  (HASEXCEPTION())
7854
            {
7855
                goto ruledatatypesDefCommandEx;
7856
            }
7857
7858
7859
770
            FOLLOWPUSH(FOLLOW_datatypesDef_in_datatypesDefCommand2848);
7860
770
            datatypesDef(ctx, isCo, dnames, arities, cmd);
7861
7862
770
            FOLLOWPOP();
7863
770
            if  (HASEXCEPTION())
7864
            {
7865
                goto ruledatatypesDefCommandEx;
7866
            }
7867
7868
7869
770
             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypesDefCommand2853);
7870
770
            if  (HASEXCEPTION())
7871
            {
7872
                goto ruledatatypesDefCommandEx;
7873
            }
7874
7875
7876
        }
7877
7878
    }
7879
7880
    // This is where rules clean up and exit
7881
    //
7882
770
    goto ruledatatypesDefCommandEx; /* Prevent compiler warnings */
7883
770
    ruledatatypesDefCommandEx: ;
7884
7885
770
            if (HASEXCEPTION())
7886
            {
7887
                PREPORTERROR();
7888
                PRECOVER();
7889
            }
7890
1540
    return ;
7891
}
7892
/* $ANTLR end datatypesDefCommand */
7893
7894
/**
7895
 * $ANTLR start datatypesDef
7896
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1149:1: datatypesDef[bool isCo,\n const std::vector<std::string>& dnames,\n const std::vector<int>& arities,\n std::unique_ptr<cvc5::Command>* cmd] : ( LPAREN_TOK ( PAR_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ RPAREN_TOK | ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ ) RPAREN_TOK )+ ;
7897
 */
7898
static void
7899
913
datatypesDef(pSmt2Parser ctx, bool isCo, const std::vector<std::string>& dnames, const std::vector<int>& arities, std::unique_ptr<cvc5::Command>* cmd)
7900
{
7901
7902
1826
      std::vector<api::DatatypeDecl> dts;
7903
1826
      std::string name;
7904
1826
      std::vector<api::Sort> params;
7905
7906
    /* Initialize rule variables
7907
     */
7908
7909
    {
7910
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1158:3: ( ( LPAREN_TOK ( PAR_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ RPAREN_TOK | ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ ) RPAREN_TOK )+ )
7911
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1158:5: ( LPAREN_TOK ( PAR_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ RPAREN_TOK | ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ ) RPAREN_TOK )+
7912
        {
7913
            {
7914
913
                 PARSER_STATE->pushScope();
7915
                      // Declare the datatypes that are currently being defined as unresolved
7916
                      // types. If we do not know the arity of the datatype yet, we wait to
7917
                      // define it until parsing the preamble of its body, which may optionally
7918
                      // involve `par`. This is limited to the case of single datatypes defined
7919
                      // via declare-datatype, and hence no datatype body is parsed without
7920
                      // having all types declared. This ensures we can parse datatypes with
7921
                      // nested recursion, e.g. datatypes D having a subfield type
7922
                      // (Array Int D).
7923
2098
                      for (unsigned i=0, dsize=dnames.size(); i<dsize; i++)
7924
                      {
7925
1185
                        if( arities[i]<0 )
7926
                        {
7927
                          // do not know the arity yet
7928
143
                          continue;
7929
                        }
7930
1042
                        unsigned arity = static_cast<unsigned>(arities[i]);
7931
1042
                        PARSER_STATE->mkUnresolvedType(dnames[i], arity);
7932
                      }
7933
7934
            }
7935
7936
7937
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1178:5: ( LPAREN_TOK ( PAR_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ RPAREN_TOK | ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ ) RPAREN_TOK )+
7938
            {
7939
913
                int cnt37=0;
7940
7941
                for (;;)
7942
                {
7943
2098
                    int alt37=2;
7944
2098
            	switch ( LA(1) )
7945
            	{
7946
1185
            	case LPAREN_TOK:
7947
            		{
7948
1185
            			alt37=1;
7949
            		}
7950
1185
            	    break;
7951
7952
            	}
7953
7954
2098
            	switch (alt37)
7955
            	{
7956
1185
            	    case 1:
7957
            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1178:7: LPAREN_TOK ( PAR_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ RPAREN_TOK | ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ ) RPAREN_TOK
7958
            	        {
7959
1185
            	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypesDef2882);
7960
1185
            	            if  (HASEXCEPTION())
7961
            	            {
7962
            	                goto ruledatatypesDefEx;
7963
            	            }
7964
7965
7966
            	            {
7967
7968
1185
            	                      params.clear();
7969
1185
            	                      Debug("parser-dt") << "Processing datatype #" << dts.size() << std::endl;
7970
1185
            	                      if( dts.size()>=dnames.size() ){
7971
            	                        PARSER_STATE->parseError("Too many datatypes defined in this block.");
7972
            	                      }
7973
7974
            	            }
7975
7976
7977
            	            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1185:5: ( PAR_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ RPAREN_TOK | ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ )
7978
            	            {
7979
1185
            	                int alt36=2;
7980
1185
            	                switch ( LA(1) )
7981
            	                {
7982
39
            	                case PAR_TOK:
7983
            	                	{
7984
39
            	                		alt36=1;
7985
            	                	}
7986
39
            	                    break;
7987
1146
            	                case LPAREN_TOK:
7988
            	                	{
7989
1146
            	                		alt36=2;
7990
            	                	}
7991
1146
            	                    break;
7992
7993
            	                default:
7994
            	                    CONSTRUCTEX();
7995
            	                    EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
7996
            	                    EXCEPTION->message      = (void *)"";
7997
            	                    EXCEPTION->decisionNum  = 36;
7998
            	                    EXCEPTION->state        = 0;
7999
8000
8001
            	                    goto ruledatatypesDefEx;
8002
8003
            	                }
8004
8005
1185
            	                switch (alt36)
8006
            	                {
8007
39
            	            	case 1:
8008
            	            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1185:7: PAR_TOK LPAREN_TOK ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )* RPAREN_TOK LPAREN_TOK ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+ RPAREN_TOK
8009
            	            	    {
8010
39
            	            	         MATCHT(PAR_TOK, &FOLLOW_PAR_TOK_in_datatypesDef2892);
8011
39
            	            	        if  (HASEXCEPTION())
8012
            	            	        {
8013
            	            	            goto ruledatatypesDefEx;
8014
            	            	        }
8015
8016
8017
            	            	        {
8018
39
            	            	             PARSER_STATE->pushScope();
8019
            	            	        }
8020
8021
8022
39
            	            	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypesDef2896);
8023
39
            	            	        if  (HASEXCEPTION())
8024
            	            	        {
8025
            	            	            goto ruledatatypesDefEx;
8026
            	            	        }
8027
8028
8029
            	            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1186:7: ( symbol[name,CHECK_UNDECLARED,SYM_SORT] )*
8030
8031
            	            	        for (;;)
8032
            	            	        {
8033
92
            	            	            int alt33=2;
8034
92
            	            	            switch ( LA(1) )
8035
            	            	            {
8036
53
            	            	            case QUOTED_SYMBOL:
8037
            	            	            case SIMPLE_SYMBOL:
8038
            	            	            case UNTERMINATED_QUOTED_SYMBOL:
8039
            	            	            	{
8040
53
            	            	            		alt33=1;
8041
            	            	            	}
8042
53
            	            	                break;
8043
8044
            	            	            }
8045
8046
92
            	            	            switch (alt33)
8047
            	            	            {
8048
53
            	            	        	case 1:
8049
            	            	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1186:9: symbol[name,CHECK_UNDECLARED,SYM_SORT]
8050
            	            	        	    {
8051
53
            	            	        	        FOLLOWPUSH(FOLLOW_symbol_in_datatypesDef2906);
8052
53
            	            	        	        symbol(ctx, name, CHECK_UNDECLARED, SYM_SORT);
8053
8054
53
            	            	        	        FOLLOWPOP();
8055
53
            	            	        	        if  (HASEXCEPTION())
8056
            	            	        	        {
8057
            	            	        	            goto ruledatatypesDefEx;
8058
            	            	        	        }
8059
8060
8061
            	            	        	        {
8062
8063
53
            	            	        	                      params.push_back( PARSER_STATE->mkSort(name));
8064
            	            	        	        }
8065
8066
8067
            	            	        	    }
8068
53
            	            	        	    break;
8069
8070
39
            	            	        	default:
8071
39
            	            	        	    goto loop33;	/* break out of the loop */
8072
            	            	        	    break;
8073
            	            	            }
8074
53
            	            	        }
8075
39
            	            	        loop33: ; /* Jump out to here if this rule does not match */
8076
8077
8078
39
            	            	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypesDef2934);
8079
39
            	            	        if  (HASEXCEPTION())
8080
            	            	        {
8081
            	            	            goto ruledatatypesDefEx;
8082
            	            	        }
8083
8084
8085
            	            	        {
8086
8087
            	            	                    // if the arity was fixed by prelude and is not equal to the number of parameters
8088
39
            	            	                    if( arities[dts.size()]>=0 && static_cast<int>(params.size())!=arities[dts.size()] ){
8089
            	            	                      PARSER_STATE->parseError("Wrong number of parameters for datatype.");
8090
            	            	                    }
8091
39
            	            	                    if (arities[dts.size()]<0)
8092
            	            	                    {
8093
            	            	                      // now declare it as an unresolved type
8094
7
            	            	                      PARSER_STATE->mkUnresolvedType(dnames[dts.size()], params.size());
8095
            	            	                    }
8096
39
            	            	                    Debug("parser-dt") << params.size() << " parameters for " << dnames[dts.size()] << std::endl;
8097
39
            	            	                    dts.push_back(SOLVER->mkDatatypeDecl(dnames[dts.size()], params, isCo));
8098
8099
            	            	        }
8100
8101
8102
39
            	            	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypesDef2944);
8103
39
            	            	        if  (HASEXCEPTION())
8104
            	            	        {
8105
            	            	            goto ruledatatypesDefEx;
8106
            	            	        }
8107
8108
8109
            	            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1204:7: ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+
8110
            	            	        {
8111
39
            	            	            int cnt34=0;
8112
8113
            	            	            for (;;)
8114
            	            	            {
8115
96
            	            	                int alt34=2;
8116
96
            	            	        	switch ( LA(1) )
8117
            	            	        	{
8118
57
            	            	        	case LPAREN_TOK:
8119
            	            	        		{
8120
57
            	            	        			alt34=1;
8121
            	            	        		}
8122
57
            	            	        	    break;
8123
8124
            	            	        	}
8125
8126
96
            	            	        	switch (alt34)
8127
            	            	        	{
8128
57
            	            	        	    case 1:
8129
            	            	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1204:9: LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK
8130
            	            	        	        {
8131
57
            	            	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypesDef2954);
8132
57
            	            	        	            if  (HASEXCEPTION())
8133
            	            	        	            {
8134
            	            	        	                goto ruledatatypesDefEx;
8135
            	            	        	            }
8136
8137
8138
57
            	            	        	            FOLLOWPUSH(FOLLOW_constructorDef_in_datatypesDef2956);
8139
57
            	            	        	            constructorDef(ctx, dts.back());
8140
8141
57
            	            	        	            FOLLOWPOP();
8142
57
            	            	        	            if  (HASEXCEPTION())
8143
            	            	        	            {
8144
            	            	        	                goto ruledatatypesDefEx;
8145
            	            	        	            }
8146
8147
8148
57
            	            	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypesDef2959);
8149
57
            	            	        	            if  (HASEXCEPTION())
8150
            	            	        	            {
8151
            	            	        	                goto ruledatatypesDefEx;
8152
            	            	        	            }
8153
8154
8155
            	            	        	        }
8156
57
            	            	        	        break;
8157
8158
39
            	            	        	    default:
8159
8160
39
            	            	        		if ( cnt34 >= 1 )
8161
            	            	        		{
8162
39
            	            	        		    goto loop34;
8163
            	            	        		}
8164
            	            	        		/* mismatchedSetEx()
8165
            	            	        		 */
8166
            	            	        		CONSTRUCTEX();
8167
            	            	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
8168
            	            	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
8169
8170
8171
            	            	        		goto ruledatatypesDefEx;
8172
            	            	        	}
8173
57
            	            	        	cnt34++;
8174
57
            	            	            }
8175
39
            	            	            loop34: ;	/* Jump to here if this rule does not match */
8176
            	            	        }
8177
8178
39
            	            	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypesDef2970);
8179
39
            	            	        if  (HASEXCEPTION())
8180
            	            	        {
8181
            	            	            goto ruledatatypesDefEx;
8182
            	            	        }
8183
8184
8185
            	            	        {
8186
39
            	            	             PARSER_STATE->popScope();
8187
            	            	        }
8188
8189
8190
            	            	    }
8191
39
            	            	    break;
8192
1146
            	            	case 2:
8193
            	            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1206:7: ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+
8194
            	            	    {
8195
            	            	        {
8196
            	            	             // if the arity was fixed by prelude and is not equal to 0
8197
1146
            	            	                    if( arities[dts.size()]>0 ){
8198
            	            	                      PARSER_STATE->parseError("No parameters given for datatype.");
8199
            	            	                    }
8200
1146
            	            	                    else if (arities[dts.size()]<0)
8201
            	            	                    {
8202
            	            	                      // now declare it as an unresolved type
8203
136
            	            	                      PARSER_STATE->mkUnresolvedType(dnames[dts.size()], 0);
8204
            	            	                    }
8205
1146
            	            	                    Debug("parser-dt") << params.size() << " parameters for " << dnames[dts.size()] << std::endl;
8206
1146
            	            	                    dts.push_back(SOLVER->mkDatatypeDecl(dnames[dts.size()],
8207
            	            	                                                         params,
8208
            	            	                                                         isCo));
8209
8210
            	            	        }
8211
8212
8213
            	            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1220:7: ( LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK )+
8214
            	            	        {
8215
1146
            	            	            int cnt35=0;
8216
8217
            	            	            for (;;)
8218
            	            	            {
8219
3258
            	            	                int alt35=2;
8220
3258
            	            	        	switch ( LA(1) )
8221
            	            	        	{
8222
2112
            	            	        	case LPAREN_TOK:
8223
            	            	        		{
8224
2112
            	            	        			alt35=1;
8225
            	            	        		}
8226
2112
            	            	        	    break;
8227
8228
            	            	        	}
8229
8230
3258
            	            	        	switch (alt35)
8231
            	            	        	{
8232
2112
            	            	        	    case 1:
8233
            	            	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1220:9: LPAREN_TOK constructorDef[dts.back()] RPAREN_TOK
8234
            	            	        	        {
8235
2112
            	            	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypesDef2990);
8236
2112
            	            	        	            if  (HASEXCEPTION())
8237
            	            	        	            {
8238
            	            	        	                goto ruledatatypesDefEx;
8239
            	            	        	            }
8240
8241
8242
2112
            	            	        	            FOLLOWPUSH(FOLLOW_constructorDef_in_datatypesDef2992);
8243
2112
            	            	        	            constructorDef(ctx, dts.back());
8244
8245
2112
            	            	        	            FOLLOWPOP();
8246
2112
            	            	        	            if  (HASEXCEPTION())
8247
            	            	        	            {
8248
            	            	        	                goto ruledatatypesDefEx;
8249
            	            	        	            }
8250
8251
8252
2112
            	            	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypesDef2995);
8253
2112
            	            	        	            if  (HASEXCEPTION())
8254
            	            	        	            {
8255
            	            	        	                goto ruledatatypesDefEx;
8256
            	            	        	            }
8257
8258
8259
            	            	        	        }
8260
2112
            	            	        	        break;
8261
8262
1146
            	            	        	    default:
8263
8264
1146
            	            	        		if ( cnt35 >= 1 )
8265
            	            	        		{
8266
1146
            	            	        		    goto loop35;
8267
            	            	        		}
8268
            	            	        		/* mismatchedSetEx()
8269
            	            	        		 */
8270
            	            	        		CONSTRUCTEX();
8271
            	            	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
8272
            	            	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
8273
8274
8275
            	            	        		goto ruledatatypesDefEx;
8276
            	            	        	}
8277
2112
            	            	        	cnt35++;
8278
2112
            	            	            }
8279
1146
            	            	            loop35: ;	/* Jump to here if this rule does not match */
8280
            	            	        }
8281
8282
            	            	    }
8283
1146
            	            	    break;
8284
8285
            	                }
8286
            	            }
8287
8288
1185
            	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypesDef3010);
8289
1185
            	            if  (HASEXCEPTION())
8290
            	            {
8291
            	                goto ruledatatypesDefEx;
8292
1185
            	            }
8293
8294
8295
            	        }
8296
1185
            	        break;
8297
8298
913
            	    default:
8299
8300
913
            		if ( cnt37 >= 1 )
8301
            		{
8302
913
            		    goto loop37;
8303
            		}
8304
            		/* mismatchedSetEx()
8305
            		 */
8306
            		CONSTRUCTEX();
8307
            		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
8308
            		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
8309
8310
8311
            		goto ruledatatypesDefEx;
8312
            	}
8313
1185
            	cnt37++;
8314
1185
                }
8315
913
                loop37: ;	/* Jump to here if this rule does not match */
8316
            }
8317
8318
            {
8319
8320
913
                    if (dts.size() != dnames.size())
8321
                    {
8322
                      PARSER_STATE->parseError("Wrong number of datatypes provided.");
8323
                    }
8324
913
                    PARSER_STATE->popScope();
8325
1826
                    cmd->reset(new DatatypeDeclarationCommand(
8326
2739
                        PARSER_STATE->bindMutualDatatypeTypes(dts, true)));
8327
8328
            }
8329
8330
8331
        }
8332
8333
    }
8334
8335
    // This is where rules clean up and exit
8336
    //
8337
913
    goto ruledatatypesDefEx; /* Prevent compiler warnings */
8338
913
    ruledatatypesDefEx: ;
8339
8340
913
            if (HASEXCEPTION())
8341
            {
8342
                PREPORTERROR();
8343
                PRECOVER();
8344
            }
8345
1826
    return ;
8346
}
8347
/* $ANTLR end datatypesDef */
8348
8349
/**
8350
 * $ANTLR start simpleSymbolicExprNoKeyword
8351
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1235:1: simpleSymbolicExprNoKeyword[std::string& s] : ( INTEGER_LITERAL | DECIMAL_LITERAL | HEX_LITERAL | BINARY_LITERAL | str[s,false] | symbol[s,CHECK_NONE,SYM_SORT] |tok= ( ASSERT_TOK | CHECK_SAT_TOK | CHECK_SAT_ASSUMING_TOK | DECLARE_FUN_TOK | DECLARE_SORT_TOK | DEFINE_FUN_TOK | DEFINE_FUN_REC_TOK | DEFINE_FUNS_REC_TOK | DEFINE_SORT_TOK | GET_VALUE_TOK | GET_ASSIGNMENT_TOK | GET_ASSERTIONS_TOK | GET_PROOF_TOK | GET_UNSAT_ASSUMPTIONS_TOK | GET_UNSAT_CORE_TOK | EXIT_TOK | RESET_TOK | RESET_ASSERTIONS_TOK | SET_LOGIC_TOK | SET_INFO_TOK | GET_INFO_TOK | SET_OPTION_TOK | GET_OPTION_TOK | PUSH_TOK | POP_TOK | DECLARE_DATATYPES_TOK | GET_MODEL_TOK | ECHO_TOK | SIMPLIFY_TOK ) );
8352
 */
8353
static void
8354
12518
simpleSymbolicExprNoKeyword(pSmt2Parser ctx, std::string& s)
8355
{
8356
    pANTLR3_COMMON_TOKEN    tok;
8357
    pANTLR3_COMMON_TOKEN    INTEGER_LITERAL5;
8358
    pANTLR3_COMMON_TOKEN    DECIMAL_LITERAL6;
8359
    pANTLR3_COMMON_TOKEN    HEX_LITERAL7;
8360
    pANTLR3_COMMON_TOKEN    BINARY_LITERAL8;
8361
8362
    /* Initialize rule variables
8363
     */
8364
8365
12518
    tok       = NULL;
8366
12518
    INTEGER_LITERAL5       = NULL;
8367
12518
    DECIMAL_LITERAL6       = NULL;
8368
12518
    HEX_LITERAL7       = NULL;
8369
12518
    BINARY_LITERAL8       = NULL;
8370
8371
    {
8372
        {
8373
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1236:3: ( INTEGER_LITERAL | DECIMAL_LITERAL | HEX_LITERAL | BINARY_LITERAL | str[s,false] | symbol[s,CHECK_NONE,SYM_SORT] |tok= ( ASSERT_TOK | CHECK_SAT_TOK | CHECK_SAT_ASSUMING_TOK | DECLARE_FUN_TOK | DECLARE_SORT_TOK | DEFINE_FUN_TOK | DEFINE_FUN_REC_TOK | DEFINE_FUNS_REC_TOK | DEFINE_SORT_TOK | GET_VALUE_TOK | GET_ASSIGNMENT_TOK | GET_ASSERTIONS_TOK | GET_PROOF_TOK | GET_UNSAT_ASSUMPTIONS_TOK | GET_UNSAT_CORE_TOK | EXIT_TOK | RESET_TOK | RESET_ASSERTIONS_TOK | SET_LOGIC_TOK | SET_INFO_TOK | GET_INFO_TOK | SET_OPTION_TOK | GET_OPTION_TOK | PUSH_TOK | POP_TOK | DECLARE_DATATYPES_TOK | GET_MODEL_TOK | ECHO_TOK | SIMPLIFY_TOK ) )
8374
8375
            ANTLR3_UINT32 alt38;
8376
8377
12518
            alt38=7;
8378
8379
12518
            switch ( LA(1) )
8380
            {
8381
29
            case INTEGER_LITERAL:
8382
            	{
8383
29
            		alt38=1;
8384
            	}
8385
29
                break;
8386
691
            case DECIMAL_LITERAL:
8387
            	{
8388
691
            		alt38=2;
8389
            	}
8390
691
                break;
8391
            case HEX_LITERAL:
8392
            	{
8393
            		alt38=3;
8394
            	}
8395
                break;
8396
            case BINARY_LITERAL:
8397
            	{
8398
            		alt38=4;
8399
            	}
8400
                break;
8401
1021
            case STRING_LITERAL:
8402
            	{
8403
1021
            		alt38=5;
8404
            	}
8405
1021
                break;
8406
10775
            case QUOTED_SYMBOL:
8407
            case SIMPLE_SYMBOL:
8408
            case UNTERMINATED_QUOTED_SYMBOL:
8409
            	{
8410
10775
            		alt38=6;
8411
            	}
8412
10775
                break;
8413
2
            case ASSERT_TOK:
8414
            case CHECK_SAT_ASSUMING_TOK:
8415
            case CHECK_SAT_TOK:
8416
            case DECLARE_DATATYPES_TOK:
8417
            case DECLARE_FUN_TOK:
8418
            case DECLARE_SORT_TOK:
8419
            case DEFINE_FUNS_REC_TOK:
8420
            case DEFINE_FUN_REC_TOK:
8421
            case DEFINE_FUN_TOK:
8422
            case DEFINE_SORT_TOK:
8423
            case ECHO_TOK:
8424
            case EXIT_TOK:
8425
            case GET_ASSERTIONS_TOK:
8426
            case GET_ASSIGNMENT_TOK:
8427
            case GET_INFO_TOK:
8428
            case GET_MODEL_TOK:
8429
            case GET_OPTION_TOK:
8430
            case GET_PROOF_TOK:
8431
            case GET_UNSAT_ASSUMPTIONS_TOK:
8432
            case GET_UNSAT_CORE_TOK:
8433
            case GET_VALUE_TOK:
8434
            case POP_TOK:
8435
            case PUSH_TOK:
8436
            case RESET_ASSERTIONS_TOK:
8437
            case RESET_TOK:
8438
            case SET_INFO_TOK:
8439
            case SET_LOGIC_TOK:
8440
            case SET_OPTION_TOK:
8441
            case SIMPLIFY_TOK:
8442
            	{
8443
2
            		alt38=7;
8444
            	}
8445
2
                break;
8446
8447
            default:
8448
                CONSTRUCTEX();
8449
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
8450
                EXCEPTION->message      = (void *)"";
8451
                EXCEPTION->decisionNum  = 38;
8452
                EXCEPTION->state        = 0;
8453
8454
8455
                goto rulesimpleSymbolicExprNoKeywordEx;
8456
8457
            }
8458
8459
12518
            switch (alt38)
8460
            {
8461
29
        	case 1:
8462
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1236:5: INTEGER_LITERAL
8463
        	    {
8464
29
        	        INTEGER_LITERAL5 = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_simpleSymbolicExprNoKeyword3035);
8465
29
        	        if  (HASEXCEPTION())
8466
        	        {
8467
        	            goto rulesimpleSymbolicExprNoKeywordEx;
8468
        	        }
8469
8470
8471
        	        {
8472
29
        	             s = AntlrInput::tokenText(INTEGER_LITERAL5);
8473
        	        }
8474
8475
8476
        	    }
8477
29
        	    break;
8478
691
        	case 2:
8479
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1238:5: DECIMAL_LITERAL
8480
        	    {
8481
691
        	        DECIMAL_LITERAL6 = (pANTLR3_COMMON_TOKEN) MATCHT(DECIMAL_LITERAL, &FOLLOW_DECIMAL_LITERAL_in_simpleSymbolicExprNoKeyword3047);
8482
691
        	        if  (HASEXCEPTION())
8483
        	        {
8484
        	            goto rulesimpleSymbolicExprNoKeywordEx;
8485
        	        }
8486
8487
8488
        	        {
8489
691
        	             s = AntlrInput::tokenText(DECIMAL_LITERAL6);
8490
        	        }
8491
8492
8493
        	    }
8494
691
        	    break;
8495
        	case 3:
8496
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1240:5: HEX_LITERAL
8497
        	    {
8498
        	        HEX_LITERAL7 = (pANTLR3_COMMON_TOKEN) MATCHT(HEX_LITERAL, &FOLLOW_HEX_LITERAL_in_simpleSymbolicExprNoKeyword3059);
8499
        	        if  (HASEXCEPTION())
8500
        	        {
8501
        	            goto rulesimpleSymbolicExprNoKeywordEx;
8502
        	        }
8503
8504
8505
        	        {
8506
        	             s = AntlrInput::tokenText(HEX_LITERAL7);
8507
        	        }
8508
8509
8510
        	    }
8511
        	    break;
8512
        	case 4:
8513
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1242:5: BINARY_LITERAL
8514
        	    {
8515
        	        BINARY_LITERAL8 = (pANTLR3_COMMON_TOKEN) MATCHT(BINARY_LITERAL, &FOLLOW_BINARY_LITERAL_in_simpleSymbolicExprNoKeyword3071);
8516
        	        if  (HASEXCEPTION())
8517
        	        {
8518
        	            goto rulesimpleSymbolicExprNoKeywordEx;
8519
        	        }
8520
8521
8522
        	        {
8523
        	             s = AntlrInput::tokenText(BINARY_LITERAL8);
8524
        	        }
8525
8526
8527
        	    }
8528
        	    break;
8529
1021
        	case 5:
8530
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1244:5: str[s,false]
8531
        	    {
8532
1021
        	        FOLLOWPUSH(FOLLOW_str_in_simpleSymbolicExprNoKeyword3083);
8533
1021
        	        str(ctx, s, false);
8534
8535
1021
        	        FOLLOWPOP();
8536
1021
        	        if  (HASEXCEPTION())
8537
        	        {
8538
        	            goto rulesimpleSymbolicExprNoKeywordEx;
8539
        	        }
8540
8541
8542
        	    }
8543
1021
        	    break;
8544
10775
        	case 6:
8545
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1245:5: symbol[s,CHECK_NONE,SYM_SORT]
8546
        	    {
8547
10775
        	        FOLLOWPUSH(FOLLOW_symbol_in_simpleSymbolicExprNoKeyword3090);
8548
10775
        	        symbol(ctx, s, CHECK_NONE, SYM_SORT);
8549
8550
10775
        	        FOLLOWPOP();
8551
10775
        	        if  (HASEXCEPTION())
8552
        	        {
8553
        	            goto rulesimpleSymbolicExprNoKeywordEx;
8554
        	        }
8555
8556
8557
        	    }
8558
10775
        	    break;
8559
2
        	case 7:
8560
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1246:5: tok= ( ASSERT_TOK | CHECK_SAT_TOK | CHECK_SAT_ASSUMING_TOK | DECLARE_FUN_TOK | DECLARE_SORT_TOK | DEFINE_FUN_TOK | DEFINE_FUN_REC_TOK | DEFINE_FUNS_REC_TOK | DEFINE_SORT_TOK | GET_VALUE_TOK | GET_ASSIGNMENT_TOK | GET_ASSERTIONS_TOK | GET_PROOF_TOK | GET_UNSAT_ASSUMPTIONS_TOK | GET_UNSAT_CORE_TOK | EXIT_TOK | RESET_TOK | RESET_ASSERTIONS_TOK | SET_LOGIC_TOK | SET_INFO_TOK | GET_INFO_TOK | SET_OPTION_TOK | GET_OPTION_TOK | PUSH_TOK | POP_TOK | DECLARE_DATATYPES_TOK | GET_MODEL_TOK | ECHO_TOK | SIMPLIFY_TOK )
8561
        	    {
8562
2
        	        tok=(pANTLR3_COMMON_TOKEN)LT(1);
8563
8564
2
        	        if ( LA(1) == ASSERT_TOK || ((LA(1) >= CHECK_SAT_ASSUMING_TOK) && (LA(1) <= CHECK_SAT_TOK)) || LA(1) == DECLARE_DATATYPES_TOK || LA(1) == DECLARE_FUN_TOK || LA(1) == DECLARE_SORT_TOK || ((LA(1) >= DEFINE_FUNS_REC_TOK) && (LA(1) <= DEFINE_SORT_TOK)) || LA(1) == ECHO_TOK || LA(1) == EXIT_TOK || ((LA(1) >= GET_ASSERTIONS_TOK) && (LA(1) <= GET_INFO_TOK)) || ((LA(1) >= GET_MODEL_TOK) && (LA(1) <= GET_PROOF_TOK)) || ((LA(1) >= GET_UNSAT_ASSUMPTIONS_TOK) && (LA(1) <= GET_VALUE_TOK)) || ((LA(1) >= POP_TOK) && (LA(1) <= PUSH_TOK)) || ((LA(1) >= RESET_ASSERTIONS_TOK) && (LA(1) <= RESET_TOK)) || ((LA(1) >= SET_INFO_TOK) && (LA(1) <= SET_OPTION_TOK)) || LA(1) == SIMPLIFY_TOK )
8565
        	        {
8566
2
        	            CONSUME();
8567
2
        	            PERRORRECOVERY=ANTLR3_FALSE;
8568
        	        }
8569
        	        else
8570
        	        {
8571
        	            CONSTRUCTEX();
8572
        	            EXCEPTION->type         = ANTLR3_MISMATCHED_SET_EXCEPTION;
8573
        	            EXCEPTION->name         = (void *)ANTLR3_MISMATCHED_SET_NAME;
8574
        	            EXCEPTION->expectingSet = NULL;
8575
8576
        	            goto rulesimpleSymbolicExprNoKeywordEx;
8577
        	        }
8578
8579
8580
        	        {
8581
2
        	             s = AntlrInput::tokenText(tok);
8582
        	        }
8583
8584
8585
        	    }
8586
2
        	    break;
8587
8588
            }
8589
        }
8590
    }
8591
8592
    // This is where rules clean up and exit
8593
    //
8594
12518
    goto rulesimpleSymbolicExprNoKeywordEx; /* Prevent compiler warnings */
8595
12518
    rulesimpleSymbolicExprNoKeywordEx: ;
8596
8597
12518
            if (HASEXCEPTION())
8598
            {
8599
                PREPORTERROR();
8600
                PRECOVER();
8601
            }
8602
12518
    return ;
8603
}
8604
/* $ANTLR end simpleSymbolicExprNoKeyword */
8605
8606
/**
8607
 * $ANTLR start keyword
8608
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1258:1: keyword[std::string& s] : KEYWORD ;
8609
 */
8610
static void
8611
1816
keyword(pSmt2Parser ctx, std::string& s)
8612
{
8613
    pANTLR3_COMMON_TOKEN    KEYWORD9;
8614
8615
    /* Initialize rule variables
8616
     */
8617
8618
1816
    KEYWORD9       = NULL;
8619
8620
    {
8621
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1259:3: ( KEYWORD )
8622
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1259:5: KEYWORD
8623
        {
8624
1816
            KEYWORD9 = (pANTLR3_COMMON_TOKEN) MATCHT(KEYWORD, &FOLLOW_KEYWORD_in_keyword3297);
8625
1816
            if  (HASEXCEPTION())
8626
            {
8627
                goto rulekeywordEx;
8628
            }
8629
8630
8631
            {
8632
1816
                 s = AntlrInput::tokenText(KEYWORD9);
8633
            }
8634
8635
8636
        }
8637
8638
    }
8639
8640
    // This is where rules clean up and exit
8641
    //
8642
1816
    goto rulekeywordEx; /* Prevent compiler warnings */
8643
1816
    rulekeywordEx: ;
8644
8645
1816
            if (HASEXCEPTION())
8646
            {
8647
                PREPORTERROR();
8648
                PRECOVER();
8649
            }
8650
1816
    return ;
8651
}
8652
/* $ANTLR end keyword */
8653
8654
/**
8655
 * $ANTLR start simpleSymbolicExpr
8656
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1263:1: simpleSymbolicExpr[std::string& s] : ( simpleSymbolicExprNoKeyword[s] | KEYWORD );
8657
 */
8658
static void
8659
12363
simpleSymbolicExpr(pSmt2Parser ctx, std::string& s)
8660
{
8661
    pANTLR3_COMMON_TOKEN    KEYWORD10;
8662
8663
    /* Initialize rule variables
8664
     */
8665
8666
12363
    KEYWORD10       = NULL;
8667
8668
    {
8669
        {
8670
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1264:3: ( simpleSymbolicExprNoKeyword[s] | KEYWORD )
8671
8672
            ANTLR3_UINT32 alt39;
8673
8674
12363
            alt39=2;
8675
8676
12363
            switch ( LA(1) )
8677
            {
8678
12357
            case ASSERT_TOK:
8679
            case BINARY_LITERAL:
8680
            case CHECK_SAT_ASSUMING_TOK:
8681
            case CHECK_SAT_TOK:
8682
            case DECIMAL_LITERAL:
8683
            case DECLARE_DATATYPES_TOK:
8684
            case DECLARE_FUN_TOK:
8685
            case DECLARE_SORT_TOK:
8686
            case DEFINE_FUNS_REC_TOK:
8687
            case DEFINE_FUN_REC_TOK:
8688
            case DEFINE_FUN_TOK:
8689
            case DEFINE_SORT_TOK:
8690
            case ECHO_TOK:
8691
            case EXIT_TOK:
8692
            case GET_ASSERTIONS_TOK:
8693
            case GET_ASSIGNMENT_TOK:
8694
            case GET_INFO_TOK:
8695
            case GET_MODEL_TOK:
8696
            case GET_OPTION_TOK:
8697
            case GET_PROOF_TOK:
8698
            case GET_UNSAT_ASSUMPTIONS_TOK:
8699
            case GET_UNSAT_CORE_TOK:
8700
            case GET_VALUE_TOK:
8701
            case HEX_LITERAL:
8702
            case INTEGER_LITERAL:
8703
            case POP_TOK:
8704
            case PUSH_TOK:
8705
            case QUOTED_SYMBOL:
8706
            case RESET_ASSERTIONS_TOK:
8707
            case RESET_TOK:
8708
            case SET_INFO_TOK:
8709
            case SET_LOGIC_TOK:
8710
            case SET_OPTION_TOK:
8711
            case SIMPLE_SYMBOL:
8712
            case SIMPLIFY_TOK:
8713
            case STRING_LITERAL:
8714
            case UNTERMINATED_QUOTED_SYMBOL:
8715
            	{
8716
12357
            		alt39=1;
8717
            	}
8718
12357
                break;
8719
6
            case KEYWORD:
8720
            	{
8721
6
            		alt39=2;
8722
            	}
8723
6
                break;
8724
8725
            default:
8726
                CONSTRUCTEX();
8727
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
8728
                EXCEPTION->message      = (void *)"";
8729
                EXCEPTION->decisionNum  = 39;
8730
                EXCEPTION->state        = 0;
8731
8732
8733
                goto rulesimpleSymbolicExprEx;
8734
8735
            }
8736
8737
12363
            switch (alt39)
8738
            {
8739
12357
        	case 1:
8740
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1264:5: simpleSymbolicExprNoKeyword[s]
8741
        	    {
8742
12357
        	        FOLLOWPUSH(FOLLOW_simpleSymbolicExprNoKeyword_in_simpleSymbolicExpr3317);
8743
12357
        	        simpleSymbolicExprNoKeyword(ctx, s);
8744
8745
12357
        	        FOLLOWPOP();
8746
12357
        	        if  (HASEXCEPTION())
8747
        	        {
8748
        	            goto rulesimpleSymbolicExprEx;
8749
        	        }
8750
8751
8752
        	    }
8753
12357
        	    break;
8754
6
        	case 2:
8755
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1265:5: KEYWORD
8756
        	    {
8757
6
        	        KEYWORD10 = (pANTLR3_COMMON_TOKEN) MATCHT(KEYWORD, &FOLLOW_KEYWORD_in_simpleSymbolicExpr3324);
8758
6
        	        if  (HASEXCEPTION())
8759
        	        {
8760
        	            goto rulesimpleSymbolicExprEx;
8761
        	        }
8762
8763
8764
        	        {
8765
6
        	             s = AntlrInput::tokenText(KEYWORD10);
8766
        	        }
8767
8768
8769
        	    }
8770
6
        	    break;
8771
8772
            }
8773
        }
8774
    }
8775
8776
    // This is where rules clean up and exit
8777
    //
8778
12363
    goto rulesimpleSymbolicExprEx; /* Prevent compiler warnings */
8779
12363
    rulesimpleSymbolicExprEx: ;
8780
8781
12363
            if (HASEXCEPTION())
8782
            {
8783
                PREPORTERROR();
8784
                PRECOVER();
8785
            }
8786
12363
    return ;
8787
}
8788
/* $ANTLR end simpleSymbolicExpr */
8789
8790
/**
8791
 * $ANTLR start symbolicExpr
8792
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1268:1: symbolicExpr[cvc5::api::Term& sexpr] : ( simpleSymbolicExpr[s] | LPAREN_TOK ( symbolicExpr[sexpr] )* RPAREN_TOK );
8793
 */
8794
static void
8795
12359
symbolicExpr(pSmt2Parser ctx, cvc5::api::Term& sexpr)
8796
{
8797
8798
24718
      std::string s;
8799
24718
      std::vector<api::Term> children;
8800
8801
    /* Initialize rule variables
8802
     */
8803
8804
    {
8805
        {
8806
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1273:3: ( simpleSymbolicExpr[s] | LPAREN_TOK ( symbolicExpr[sexpr] )* RPAREN_TOK )
8807
8808
            ANTLR3_UINT32 alt41;
8809
8810
12359
            alt41=2;
8811
8812
12359
            switch ( LA(1) )
8813
            {
8814
12354
            case ASSERT_TOK:
8815
            case BINARY_LITERAL:
8816
            case CHECK_SAT_ASSUMING_TOK:
8817
            case CHECK_SAT_TOK:
8818
            case DECIMAL_LITERAL:
8819
            case DECLARE_DATATYPES_TOK:
8820
            case DECLARE_FUN_TOK:
8821
            case DECLARE_SORT_TOK:
8822
            case DEFINE_FUNS_REC_TOK:
8823
            case DEFINE_FUN_REC_TOK:
8824
            case DEFINE_FUN_TOK:
8825
            case DEFINE_SORT_TOK:
8826
            case ECHO_TOK:
8827
            case EXIT_TOK:
8828
            case GET_ASSERTIONS_TOK:
8829
            case GET_ASSIGNMENT_TOK:
8830
            case GET_INFO_TOK:
8831
            case GET_MODEL_TOK:
8832
            case GET_OPTION_TOK:
8833
            case GET_PROOF_TOK:
8834
            case GET_UNSAT_ASSUMPTIONS_TOK:
8835
            case GET_UNSAT_CORE_TOK:
8836
            case GET_VALUE_TOK:
8837
            case HEX_LITERAL:
8838
            case INTEGER_LITERAL:
8839
            case KEYWORD:
8840
            case POP_TOK:
8841
            case PUSH_TOK:
8842
            case QUOTED_SYMBOL:
8843
            case RESET_ASSERTIONS_TOK:
8844
            case RESET_TOK:
8845
            case SET_INFO_TOK:
8846
            case SET_LOGIC_TOK:
8847
            case SET_OPTION_TOK:
8848
            case SIMPLE_SYMBOL:
8849
            case SIMPLIFY_TOK:
8850
            case STRING_LITERAL:
8851
            case UNTERMINATED_QUOTED_SYMBOL:
8852
            	{
8853
12354
            		alt41=1;
8854
            	}
8855
12354
                break;
8856
5
            case LPAREN_TOK:
8857
            	{
8858
5
            		alt41=2;
8859
            	}
8860
5
                break;
8861
8862
            default:
8863
                CONSTRUCTEX();
8864
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
8865
                EXCEPTION->message      = (void *)"";
8866
                EXCEPTION->decisionNum  = 41;
8867
                EXCEPTION->state        = 0;
8868
8869
8870
                goto rulesymbolicExprEx;
8871
8872
            }
8873
8874
12359
            switch (alt41)
8875
            {
8876
12354
        	case 1:
8877
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1273:5: simpleSymbolicExpr[s]
8878
        	    {
8879
12354
        	        FOLLOWPUSH(FOLLOW_simpleSymbolicExpr_in_symbolicExpr3345);
8880
12354
        	        simpleSymbolicExpr(ctx, s);
8881
8882
12354
        	        FOLLOWPOP();
8883
12354
        	        if  (HASEXCEPTION())
8884
        	        {
8885
        	            goto rulesymbolicExprEx;
8886
        	        }
8887
8888
8889
        	        {
8890
12354
        	             sexpr = SOLVER->mkString(PARSER_STATE->processAdHocStringEsc(s));
8891
        	        }
8892
8893
8894
        	    }
8895
12354
        	    break;
8896
5
        	case 2:
8897
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1275:5: LPAREN_TOK ( symbolicExpr[sexpr] )* RPAREN_TOK
8898
        	    {
8899
5
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_symbolicExpr3358);
8900
5
        	        if  (HASEXCEPTION())
8901
        	        {
8902
        	            goto rulesymbolicExprEx;
8903
        	        }
8904
8905
8906
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1276:5: ( symbolicExpr[sexpr] )*
8907
8908
        	        for (;;)
8909
        	        {
8910
19
        	            int alt40=2;
8911
19
        	            switch ( LA(1) )
8912
        	            {
8913
14
        	            case ASSERT_TOK:
8914
        	            case BINARY_LITERAL:
8915
        	            case CHECK_SAT_ASSUMING_TOK:
8916
        	            case CHECK_SAT_TOK:
8917
        	            case DECIMAL_LITERAL:
8918
        	            case DECLARE_DATATYPES_TOK:
8919
        	            case DECLARE_FUN_TOK:
8920
        	            case DECLARE_SORT_TOK:
8921
        	            case DEFINE_FUNS_REC_TOK:
8922
        	            case DEFINE_FUN_REC_TOK:
8923
        	            case DEFINE_FUN_TOK:
8924
        	            case DEFINE_SORT_TOK:
8925
        	            case ECHO_TOK:
8926
        	            case EXIT_TOK:
8927
        	            case GET_ASSERTIONS_TOK:
8928
        	            case GET_ASSIGNMENT_TOK:
8929
        	            case GET_INFO_TOK:
8930
        	            case GET_MODEL_TOK:
8931
        	            case GET_OPTION_TOK:
8932
        	            case GET_PROOF_TOK:
8933
        	            case GET_UNSAT_ASSUMPTIONS_TOK:
8934
        	            case GET_UNSAT_CORE_TOK:
8935
        	            case GET_VALUE_TOK:
8936
        	            case HEX_LITERAL:
8937
        	            case INTEGER_LITERAL:
8938
        	            case KEYWORD:
8939
        	            case LPAREN_TOK:
8940
        	            case POP_TOK:
8941
        	            case PUSH_TOK:
8942
        	            case QUOTED_SYMBOL:
8943
        	            case RESET_ASSERTIONS_TOK:
8944
        	            case RESET_TOK:
8945
        	            case SET_INFO_TOK:
8946
        	            case SET_LOGIC_TOK:
8947
        	            case SET_OPTION_TOK:
8948
        	            case SIMPLE_SYMBOL:
8949
        	            case SIMPLIFY_TOK:
8950
        	            case STRING_LITERAL:
8951
        	            case UNTERMINATED_QUOTED_SYMBOL:
8952
        	            	{
8953
14
        	            		alt40=1;
8954
        	            	}
8955
14
        	                break;
8956
8957
        	            }
8958
8959
19
        	            switch (alt40)
8960
        	            {
8961
14
        	        	case 1:
8962
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1276:7: symbolicExpr[sexpr]
8963
        	        	    {
8964
14
        	        	        FOLLOWPUSH(FOLLOW_symbolicExpr_in_symbolicExpr3366);
8965
14
        	        	        symbolicExpr(ctx, sexpr);
8966
8967
14
        	        	        FOLLOWPOP();
8968
14
        	        	        if  (HASEXCEPTION())
8969
        	        	        {
8970
        	        	            goto rulesymbolicExprEx;
8971
        	        	        }
8972
8973
8974
        	        	        {
8975
14
        	        	             children.push_back(sexpr);
8976
        	        	        }
8977
8978
8979
        	        	    }
8980
14
        	        	    break;
8981
8982
5
        	        	default:
8983
5
        	        	    goto loop40;	/* break out of the loop */
8984
        	        	    break;
8985
        	            }
8986
14
        	        }
8987
5
        	        loop40: ; /* Jump out to here if this rule does not match */
8988
8989
8990
5
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_symbolicExpr3374);
8991
5
        	        if  (HASEXCEPTION())
8992
        	        {
8993
        	            goto rulesymbolicExprEx;
8994
        	        }
8995
8996
8997
        	        {
8998
5
        	             sexpr = SOLVER->mkTerm(cvc5::api::SEXPR, children);
8999
        	        }
9000
9001
9002
        	    }
9003
5
        	    break;
9004
9005
            }
9006
        }
9007
    }
9008
9009
    // This is where rules clean up and exit
9010
    //
9011
12359
    goto rulesymbolicExprEx; /* Prevent compiler warnings */
9012
12359
    rulesymbolicExprEx: ;
9013
9014
12359
            if (HASEXCEPTION())
9015
            {
9016
                PREPORTERROR();
9017
                PRECOVER();
9018
            }
9019
24718
    return ;
9020
}
9021
/* $ANTLR end symbolicExpr */
9022
9023
/**
9024
 * $ANTLR start term
9025
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1284:1: term[cvc5::api::Term& expr, cvc5::api::Term& expr2] : ( termNonVariable[expr, expr2] | qualIdentifier[p] );
9026
 */
9027
static void
9028
7390775
term(pSmt2Parser ctx, cvc5::api::Term& expr, cvc5::api::Term& expr2)
9029
{
9030
    /* Initialize rule variables
9031
     */
9032
9033
9034
7390775
      api::Kind kind = api::NULL_EXPR;
9035
14781550
      cvc5::api::Term f;
9036
14781550
      std::string name;
9037
14781550
      cvc5::api::Sort type;
9038
14781550
      ParseOp p;
9039
9040
    {
9041
        {
9042
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1292:3: ( termNonVariable[expr, expr2] | qualIdentifier[p] )
9043
9044
            ANTLR3_UINT32 alt42;
9045
9046
7390775
            alt42=2;
9047
9048
7390775
            switch ( LA(1) )
9049
            {
9050
3498734
            case LPAREN_TOK:
9051
            	{
9052
3498734
            		switch ( LA(2) )
9053
            		{
9054
3409316
            		case ATTRIBUTE_TOK:
9055
            		case COMPREHENSION_TOK:
9056
            		case EXISTS_TOK:
9057
            		case FORALL_TOK:
9058
            		case HO_LAMBDA_TOK:
9059
            		case LET_TOK:
9060
            		case LPAREN_TOK:
9061
            		case MATCH_TOK:
9062
            		case QUOTED_SYMBOL:
9063
            		case SIMPLE_SYMBOL:
9064
            		case TUPLE_CONST_TOK:
9065
            		case TUPLE_PROJECT_TOK:
9066
            		case UNTERMINATED_QUOTED_SYMBOL:
9067
            			{
9068
3409316
            				alt42=1;
9069
            			}
9070
3409316
            		    break;
9071
89130
            		case INDEX_TOK:
9072
            			{
9073
89130
            				alt42=1;
9074
            			}
9075
89130
            		    break;
9076
288
            		case AS_TOK:
9077
            			{
9078
288
            				alt42=2;
9079
            			}
9080
288
            		    break;
9081
9082
            		default:
9083
            		    CONSTRUCTEX();
9084
            		    EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
9085
            		    EXCEPTION->message      = (void *)"";
9086
            		    EXCEPTION->decisionNum  = 42;
9087
            		    EXCEPTION->state        = 1;
9088
9089
9090
            		    goto ruletermEx;
9091
9092
            		}
9093
9094
            	}
9095
3498734
                break;
9096
395820
            case BINARY_LITERAL:
9097
            case DECIMAL_LITERAL:
9098
            case HEX_LITERAL:
9099
            case INTEGER_LITERAL:
9100
            case STRING_LITERAL:
9101
            case TUPLE_CONST_TOK:
9102
            	{
9103
395820
            		alt42=1;
9104
            	}
9105
395820
                break;
9106
3496219
            case QUOTED_SYMBOL:
9107
            case SIMPLE_SYMBOL:
9108
            case UNTERMINATED_QUOTED_SYMBOL:
9109
            	{
9110
3496219
            		alt42=2;
9111
            	}
9112
3496219
                break;
9113
9114
2
            default:
9115
2
                CONSTRUCTEX();
9116
2
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
9117
2
                EXCEPTION->message      = (void *)"";
9118
2
                EXCEPTION->decisionNum  = 42;
9119
2
                EXCEPTION->state        = 0;
9120
9121
9122
2
                goto ruletermEx;
9123
9124
            }
9125
9126
7390773
            switch (alt42)
9127
            {
9128
3894266
        	case 1:
9129
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1292:3: termNonVariable[expr, expr2]
9130
        	    {
9131
3894266
        	        FOLLOWPUSH(FOLLOW_termNonVariable_in_term3399);
9132
3894266
        	        termNonVariable(ctx, expr, expr2);
9133
9134
3894206
        	        FOLLOWPOP();
9135
3894206
        	        if  (HASEXCEPTION())
9136
        	        {
9137
        	            goto ruletermEx;
9138
        	        }
9139
9140
9141
        	    }
9142
3894206
        	    break;
9143
3496507
        	case 2:
9144
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1296:5: qualIdentifier[p]
9145
        	    {
9146
3496507
        	        FOLLOWPUSH(FOLLOW_qualIdentifier_in_term3411);
9147
3496507
        	        qualIdentifier(ctx, p);
9148
9149
3496507
        	        FOLLOWPOP();
9150
3496507
        	        if  (HASEXCEPTION())
9151
        	        {
9152
        	            goto ruletermEx;
9153
        	        }
9154
9155
9156
        	        {
9157
9158
3496507
        	                  expr = PARSER_STATE->parseOpToExpr(p);
9159
9160
        	        }
9161
9162
9163
        	    }
9164
3496498
        	    break;
9165
9166
            }
9167
        }
9168
    }
9169
9170
    // This is where rules clean up and exit
9171
    //
9172
7390704
    goto ruletermEx; /* Prevent compiler warnings */
9173
7390706
    ruletermEx: ;
9174
9175
7390706
            if (HASEXCEPTION())
9176
            {
9177
2
                PREPORTERROR();
9178
                PRECOVER();
9179
            }
9180
14781408
    return ;
9181
}
9182
/* $ANTLR end term */
9183
9184
/**
9185
 * $ANTLR start termNonVariable
9186
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1307:1: termNonVariable[cvc5::api::Term& expr, cvc5::api::Term& expr2] : ( LPAREN_TOK quantOp[kind] boundVarList[bvl] term[f, f2] RPAREN_TOK | LPAREN_TOK COMPREHENSION_TOK boundVarList[bvl] term[f, f2] term[f, f2] RPAREN_TOK | LPAREN_TOK qualIdentifier[p] termList[args,expr] RPAREN_TOK | LPAREN_TOK LET_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[expr, f2] RPAREN_TOK )+ RPAREN_TOK term[expr, f2] RPAREN_TOK | LPAREN_TOK MATCH_TOK term[expr, f2] LPAREN_TOK ( LPAREN_TOK LPAREN_TOK term[f, f2] ( symbol[name,CHECK_NONE,SYM_VARIABLE] )* RPAREN_TOK term[f3, f2] RPAREN_TOK | LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[f3, f2] RPAREN_TOK )+ RPAREN_TOK RPAREN_TOK | LPAREN_TOK ATTRIBUTE_TOK term[expr, f2] ( attribute[expr, attexpr] )+ RPAREN_TOK | LPAREN_TOK HO_LAMBDA_TOK boundVarList[bvl] term[f, f2] RPAREN_TOK | LPAREN_TOK TUPLE_CONST_TOK termList[args,expr] RPAREN_TOK | LPAREN_TOK TUPLE_PROJECT_TOK term[expr,expr2] RPAREN_TOK | termAtomic[atomTerm] );
9187
 */
9188
static void
9189
3894266
termNonVariable(pSmt2Parser ctx, cvc5::api::Term& expr, cvc5::api::Term& expr2)
9190
{
9191
    /* Initialize rule variables
9192
     */
9193
9194
9195
3894266
      Debug("parser") << "term: " << AntlrInput::tokenText(LT(1)) << std::endl;
9196
3894266
      api::Kind kind = api::NULL_EXPR;
9197
7788532
      std::string name;
9198
7788532
      std::vector<cvc5::api::Term> args;
9199
7788532
      std::vector< std::pair<std::string, cvc5::api::Sort> > sortedVarNames;
9200
7788532
      cvc5::api::Term bvl;
9201
7788532
      cvc5::api::Term f, f2, f3;
9202
7788532
      std::string attr;
9203
7788532
      cvc5::api::Term attexpr;
9204
7788532
      std::vector<cvc5::api::Term> patexprs;
9205
7788532
      std::vector<cvc5::api::Term> matchcases;
9206
7788532
      std::unordered_set<std::string> names;
9207
7788532
      std::vector< std::pair<std::string, cvc5::api::Term> > binders;
9208
7788532
      cvc5::api::Sort type;
9209
7788532
      cvc5::api::Sort type2;
9210
7788532
      api::Term atomTerm;
9211
7788532
      ParseOp p;
9212
7788532
      std::vector<api::Sort> argTypes;
9213
9214
    {
9215
        {
9216
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1328:3: ( LPAREN_TOK quantOp[kind] boundVarList[bvl] term[f, f2] RPAREN_TOK | LPAREN_TOK COMPREHENSION_TOK boundVarList[bvl] term[f, f2] term[f, f2] RPAREN_TOK | LPAREN_TOK qualIdentifier[p] termList[args,expr] RPAREN_TOK | LPAREN_TOK LET_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[expr, f2] RPAREN_TOK )+ RPAREN_TOK term[expr, f2] RPAREN_TOK | LPAREN_TOK MATCH_TOK term[expr, f2] LPAREN_TOK ( LPAREN_TOK LPAREN_TOK term[f, f2] ( symbol[name,CHECK_NONE,SYM_VARIABLE] )* RPAREN_TOK term[f3, f2] RPAREN_TOK | LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[f3, f2] RPAREN_TOK )+ RPAREN_TOK RPAREN_TOK | LPAREN_TOK ATTRIBUTE_TOK term[expr, f2] ( attribute[expr, attexpr] )+ RPAREN_TOK | LPAREN_TOK HO_LAMBDA_TOK boundVarList[bvl] term[f, f2] RPAREN_TOK | LPAREN_TOK TUPLE_CONST_TOK termList[args,expr] RPAREN_TOK | LPAREN_TOK TUPLE_PROJECT_TOK term[expr,expr2] RPAREN_TOK | termAtomic[atomTerm] )
9217
9218
            ANTLR3_UINT32 alt47;
9219
9220
3894266
            alt47=10;
9221
9222
3894266
            switch ( LA(1) )
9223
            {
9224
3498446
            case LPAREN_TOK:
9225
            	{
9226
3498446
            		switch ( LA(2) )
9227
            		{
9228
18
            		case COMPREHENSION_TOK:
9229
            			{
9230
18
            				alt47=2;
9231
            			}
9232
18
            		    break;
9233
67420
            		case LET_TOK:
9234
            			{
9235
67420
            				alt47=4;
9236
            			}
9237
67420
            		    break;
9238
13
            		case MATCH_TOK:
9239
            			{
9240
13
            				alt47=5;
9241
            			}
9242
13
            		    break;
9243
8168
            		case ATTRIBUTE_TOK:
9244
            			{
9245
8168
            				alt47=6;
9246
            			}
9247
8168
            		    break;
9248
30
            		case HO_LAMBDA_TOK:
9249
            			{
9250
30
            				alt47=7;
9251
            			}
9252
30
            		    break;
9253
50
            		case TUPLE_CONST_TOK:
9254
            			{
9255
50
            				alt47=8;
9256
            			}
9257
50
            		    break;
9258
2
            		case TUPLE_PROJECT_TOK:
9259
            			{
9260
2
            				alt47=9;
9261
            			}
9262
2
            		    break;
9263
89130
            		case INDEX_TOK:
9264
            			{
9265
89130
            				alt47=10;
9266
            			}
9267
89130
            		    break;
9268
27921
            		case EXISTS_TOK:
9269
            		case FORALL_TOK:
9270
            			{
9271
27921
            				alt47=1;
9272
            			}
9273
27921
            		    break;
9274
3305694
            		case LPAREN_TOK:
9275
            		case QUOTED_SYMBOL:
9276
            		case SIMPLE_SYMBOL:
9277
            		case UNTERMINATED_QUOTED_SYMBOL:
9278
            			{
9279
3305694
            				alt47=3;
9280
            			}
9281
3305694
            		    break;
9282
9283
            		default:
9284
            		    CONSTRUCTEX();
9285
            		    EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
9286
            		    EXCEPTION->message      = (void *)"";
9287
            		    EXCEPTION->decisionNum  = 47;
9288
            		    EXCEPTION->state        = 1;
9289
9290
9291
            		    goto ruletermNonVariableEx;
9292
9293
            		}
9294
9295
            	}
9296
3498446
                break;
9297
395820
            case BINARY_LITERAL:
9298
            case DECIMAL_LITERAL:
9299
            case HEX_LITERAL:
9300
            case INTEGER_LITERAL:
9301
            case STRING_LITERAL:
9302
            case TUPLE_CONST_TOK:
9303
            	{
9304
395820
            		alt47=10;
9305
            	}
9306
395820
                break;
9307
9308
            default:
9309
                CONSTRUCTEX();
9310
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
9311
                EXCEPTION->message      = (void *)"";
9312
                EXCEPTION->decisionNum  = 47;
9313
                EXCEPTION->state        = 0;
9314
9315
9316
                goto ruletermNonVariableEx;
9317
9318
            }
9319
9320
3894266
            switch (alt47)
9321
            {
9322
27921
        	case 1:
9323
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1328:5: LPAREN_TOK quantOp[kind] boundVarList[bvl] term[f, f2] RPAREN_TOK
9324
        	    {
9325
27921
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3439);
9326
27921
        	        if  (HASEXCEPTION())
9327
        	        {
9328
        	            goto ruletermNonVariableEx;
9329
        	        }
9330
9331
9332
27921
        	        FOLLOWPUSH(FOLLOW_quantOp_in_termNonVariable3441);
9333
27921
        	        quantOp(ctx, kind);
9334
9335
27921
        	        FOLLOWPOP();
9336
27921
        	        if  (HASEXCEPTION())
9337
        	        {
9338
        	            goto ruletermNonVariableEx;
9339
        	        }
9340
9341
9342
        	        {
9343
9344
27921
        	                  if (!PARSER_STATE->isTheoryEnabled(theory::THEORY_QUANTIFIERS))
9345
        	                  {
9346
2
        	                    PARSER_STATE->parseError("Quantifier used in non-quantified logic.");
9347
        	                  }
9348
27920
        	                  PARSER_STATE->pushScope();
9349
9350
        	        }
9351
9352
9353
27920
        	        FOLLOWPUSH(FOLLOW_boundVarList_in_termNonVariable3454);
9354
27920
        	        boundVarList(ctx, bvl);
9355
9356
27919
        	        FOLLOWPOP();
9357
27919
        	        if  (HASEXCEPTION())
9358
        	        {
9359
        	            goto ruletermNonVariableEx;
9360
        	        }
9361
9362
9363
27919
        	        FOLLOWPUSH(FOLLOW_term_in_termNonVariable3461);
9364
27919
        	        term(ctx, f, f2);
9365
9366
27919
        	        FOLLOWPOP();
9367
27919
        	        if  (HASEXCEPTION())
9368
        	        {
9369
        	            goto ruletermNonVariableEx;
9370
        	        }
9371
9372
9373
27919
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3464);
9374
27919
        	        if  (HASEXCEPTION())
9375
        	        {
9376
        	            goto ruletermNonVariableEx;
9377
        	        }
9378
9379
9380
        	        {
9381
9382
27919
        	                  args.push_back(bvl);
9383
9384
27919
        	                  PARSER_STATE->popScope();
9385
27919
        	                  args.push_back(f);
9386
27919
        	                  if(! f2.isNull()){
9387
3448
        	                    args.push_back(f2);
9388
        	                  }
9389
27919
        	                  expr = MK_TERM(kind, args);
9390
9391
        	        }
9392
9393
9394
        	    }
9395
27919
        	    break;
9396
18
        	case 2:
9397
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1348:5: LPAREN_TOK COMPREHENSION_TOK boundVarList[bvl] term[f, f2] term[f, f2] RPAREN_TOK
9398
        	    {
9399
18
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3476);
9400
18
        	        if  (HASEXCEPTION())
9401
        	        {
9402
        	            goto ruletermNonVariableEx;
9403
        	        }
9404
9405
9406
18
        	         MATCHT(COMPREHENSION_TOK, &FOLLOW_COMPREHENSION_TOK_in_termNonVariable3478);
9407
18
        	        if  (HASEXCEPTION())
9408
        	        {
9409
        	            goto ruletermNonVariableEx;
9410
        	        }
9411
9412
9413
        	        {
9414
18
        	             PARSER_STATE->pushScope();
9415
        	        }
9416
9417
9418
18
        	        FOLLOWPUSH(FOLLOW_boundVarList_in_termNonVariable3490);
9419
18
        	        boundVarList(ctx, bvl);
9420
9421
18
        	        FOLLOWPOP();
9422
18
        	        if  (HASEXCEPTION())
9423
        	        {
9424
        	            goto ruletermNonVariableEx;
9425
        	        }
9426
9427
9428
        	        {
9429
9430
18
        	                  args.push_back(bvl);
9431
9432
        	        }
9433
9434
9435
18
        	        FOLLOWPUSH(FOLLOW_term_in_termNonVariable3503);
9436
18
        	        term(ctx, f, f2);
9437
9438
18
        	        FOLLOWPOP();
9439
18
        	        if  (HASEXCEPTION())
9440
        	        {
9441
        	            goto ruletermNonVariableEx;
9442
        	        }
9443
9444
9445
        	        {
9446
18
        	             args.push_back(f);
9447
        	        }
9448
9449
9450
18
        	        FOLLOWPUSH(FOLLOW_term_in_termNonVariable3512);
9451
18
        	        term(ctx, f, f2);
9452
9453
18
        	        FOLLOWPOP();
9454
18
        	        if  (HASEXCEPTION())
9455
        	        {
9456
        	            goto ruletermNonVariableEx;
9457
        	        }
9458
9459
9460
        	        {
9461
9462
18
        	                  args.push_back(f);
9463
18
        	                  expr = MK_TERM(api::COMPREHENSION, args);
9464
9465
        	        }
9466
9467
9468
18
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3521);
9469
18
        	        if  (HASEXCEPTION())
9470
        	        {
9471
        	            goto ruletermNonVariableEx;
9472
        	        }
9473
9474
9475
        	    }
9476
18
        	    break;
9477
3305694
        	case 3:
9478
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1360:5: LPAREN_TOK qualIdentifier[p] termList[args,expr] RPAREN_TOK
9479
        	    {
9480
3305694
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3527);
9481
3305694
        	        if  (HASEXCEPTION())
9482
        	        {
9483
        	            goto ruletermNonVariableEx;
9484
        	        }
9485
9486
9487
3305694
        	        FOLLOWPUSH(FOLLOW_qualIdentifier_in_termNonVariable3529);
9488
3305694
        	        qualIdentifier(ctx, p);
9489
9490
3305693
        	        FOLLOWPOP();
9491
3305693
        	        if  (HASEXCEPTION())
9492
        	        {
9493
        	            goto ruletermNonVariableEx;
9494
        	        }
9495
9496
9497
3305693
        	        FOLLOWPUSH(FOLLOW_termList_in_termNonVariable3536);
9498
3305693
        	        termList(ctx, args, expr);
9499
9500
3305665
        	        FOLLOWPOP();
9501
3305665
        	        if  (HASEXCEPTION())
9502
        	        {
9503
        	            goto ruletermNonVariableEx;
9504
        	        }
9505
9506
9507
3305665
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3539);
9508
3305665
        	        if  (HASEXCEPTION())
9509
        	        {
9510
2
        	            goto ruletermNonVariableEx;
9511
        	        }
9512
9513
9514
        	        {
9515
9516
3305663
        	                  expr = PARSER_STATE->applyParseOp(p, args);
9517
9518
        	        }
9519
9520
9521
        	    }
9522
3305637
        	    break;
9523
67420
        	case 4:
9524
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1366:5: LPAREN_TOK LET_TOK LPAREN_TOK ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[expr, f2] RPAREN_TOK )+ RPAREN_TOK term[expr, f2] RPAREN_TOK
9525
        	    {
9526
67420
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3557);
9527
67420
        	        if  (HASEXCEPTION())
9528
        	        {
9529
        	            goto ruletermNonVariableEx;
9530
        	        }
9531
9532
9533
67420
        	         MATCHT(LET_TOK, &FOLLOW_LET_TOK_in_termNonVariable3566);
9534
67420
        	        if  (HASEXCEPTION())
9535
        	        {
9536
        	            goto ruletermNonVariableEx;
9537
        	        }
9538
9539
9540
67420
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3568);
9541
67420
        	        if  (HASEXCEPTION())
9542
        	        {
9543
        	            goto ruletermNonVariableEx;
9544
        	        }
9545
9546
9547
        	        {
9548
67420
        	             PARSER_STATE->pushScope();
9549
        	        }
9550
9551
9552
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1369:7: ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[expr, f2] RPAREN_TOK )+
9553
        	        {
9554
67420
        	            int cnt43=0;
9555
9556
        	            for (;;)
9557
        	            {
9558
153435
        	                int alt43=2;
9559
153435
        	        	switch ( LA(1) )
9560
        	        	{
9561
86015
        	        	case LPAREN_TOK:
9562
        	        		{
9563
86015
        	        			alt43=1;
9564
        	        		}
9565
86015
        	        	    break;
9566
9567
        	        	}
9568
9569
153435
        	        	switch (alt43)
9570
        	        	{
9571
86015
        	        	    case 1:
9572
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1369:9: LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[expr, f2] RPAREN_TOK
9573
        	        	        {
9574
86015
        	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3586);
9575
86015
        	        	            if  (HASEXCEPTION())
9576
        	        	            {
9577
        	        	                goto ruletermNonVariableEx;
9578
        	        	            }
9579
9580
9581
86015
        	        	            FOLLOWPUSH(FOLLOW_symbol_in_termNonVariable3588);
9582
86015
        	        	            symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
9583
9584
86015
        	        	            FOLLOWPOP();
9585
86015
        	        	            if  (HASEXCEPTION())
9586
        	        	            {
9587
        	        	                goto ruletermNonVariableEx;
9588
        	        	            }
9589
9590
9591
86015
        	        	            FOLLOWPUSH(FOLLOW_term_in_termNonVariable3599);
9592
86015
        	        	            term(ctx, expr, f2);
9593
9594
86015
        	        	            FOLLOWPOP();
9595
86015
        	        	            if  (HASEXCEPTION())
9596
        	        	            {
9597
        	        	                goto ruletermNonVariableEx;
9598
        	        	            }
9599
9600
9601
86015
        	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3610);
9602
86015
        	        	            if  (HASEXCEPTION())
9603
        	        	            {
9604
        	        	                goto ruletermNonVariableEx;
9605
        	        	            }
9606
9607
9608
        	        	            {
9609
86015
        	        	                 if(names.count(name) == 1) {
9610
        	        	                            std::stringstream ss;
9611
        	        	                            ss << "warning: symbol `" << name << "' bound multiple times by let;"
9612
        	        	                               << " the last binding will be used, shadowing earlier ones";
9613
        	        	                            PARSER_STATE->warning(ss.str());
9614
        	        	                          } else {
9615
86015
        	        	                            names.insert(name);
9616
        	        	                          }
9617
86015
        	        	                          binders.push_back(std::make_pair(name, expr));
9618
        	        	            }
9619
9620
9621
        	        	        }
9622
86015
        	        	        break;
9623
9624
67420
        	        	    default:
9625
9626
67420
        	        		if ( cnt43 >= 1 )
9627
        	        		{
9628
67420
        	        		    goto loop43;
9629
        	        		}
9630
        	        		/* mismatchedSetEx()
9631
        	        		 */
9632
        	        		CONSTRUCTEX();
9633
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
9634
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
9635
9636
9637
        	        		goto ruletermNonVariableEx;
9638
        	        	}
9639
86015
        	        	cnt43++;
9640
86015
        	            }
9641
67420
        	            loop43: ;	/* Jump to here if this rule does not match */
9642
        	        }
9643
9644
        	        {
9645
        	             // now implement these bindings
9646
153435
        	                  for (const std::pair<std::string, api::Term>& binder : binders)
9647
        	                  {
9648
        	                    {
9649
86015
        	                      PARSER_STATE->defineVar(binder.first, binder.second);
9650
        	                    }
9651
        	                  }
9652
9653
        	        }
9654
9655
9656
67420
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3653);
9657
67420
        	        if  (HASEXCEPTION())
9658
        	        {
9659
        	            goto ruletermNonVariableEx;
9660
        	        }
9661
9662
9663
67420
        	        FOLLOWPUSH(FOLLOW_term_in_termNonVariable3659);
9664
67420
        	        term(ctx, expr, f2);
9665
9666
67420
        	        FOLLOWPOP();
9667
67420
        	        if  (HASEXCEPTION())
9668
        	        {
9669
        	            goto ruletermNonVariableEx;
9670
        	        }
9671
9672
9673
67420
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3666);
9674
67420
        	        if  (HASEXCEPTION())
9675
        	        {
9676
        	            goto ruletermNonVariableEx;
9677
        	        }
9678
9679
9680
        	        {
9681
67420
        	             PARSER_STATE->popScope();
9682
        	        }
9683
9684
9685
        	    }
9686
67420
        	    break;
9687
13
        	case 5:
9688
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1396:5: LPAREN_TOK MATCH_TOK term[expr, f2] LPAREN_TOK ( LPAREN_TOK LPAREN_TOK term[f, f2] ( symbol[name,CHECK_NONE,SYM_VARIABLE] )* RPAREN_TOK term[f3, f2] RPAREN_TOK | LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[f3, f2] RPAREN_TOK )+ RPAREN_TOK RPAREN_TOK
9689
        	    {
9690
13
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3684);
9691
13
        	        if  (HASEXCEPTION())
9692
        	        {
9693
        	            goto ruletermNonVariableEx;
9694
        	        }
9695
9696
9697
13
        	         MATCHT(MATCH_TOK, &FOLLOW_MATCH_TOK_in_termNonVariable3686);
9698
13
        	        if  (HASEXCEPTION())
9699
        	        {
9700
        	            goto ruletermNonVariableEx;
9701
        	        }
9702
9703
9704
13
        	        FOLLOWPUSH(FOLLOW_term_in_termNonVariable3688);
9705
13
        	        term(ctx, expr, f2);
9706
9707
13
        	        FOLLOWPOP();
9708
13
        	        if  (HASEXCEPTION())
9709
        	        {
9710
        	            goto ruletermNonVariableEx;
9711
        	        }
9712
9713
9714
        	        {
9715
9716
13
        	                  if( !expr.getSort().isDatatype() ){
9717
        	                    PARSER_STATE->parseError("Cannot match on non-datatype term.");
9718
        	                  }
9719
9720
        	        }
9721
9722
9723
13
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3697);
9724
13
        	        if  (HASEXCEPTION())
9725
        	        {
9726
        	            goto ruletermNonVariableEx;
9727
        	        }
9728
9729
9730
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1402:5: ( LPAREN_TOK LPAREN_TOK term[f, f2] ( symbol[name,CHECK_NONE,SYM_VARIABLE] )* RPAREN_TOK term[f3, f2] RPAREN_TOK | LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[f3, f2] RPAREN_TOK )+
9731
        	        {
9732
13
        	            int cnt45=0;
9733
9734
        	            for (;;)
9735
        	            {
9736
46
        	                int alt45=3;
9737
46
        	        	switch ( LA(1) )
9738
        	        	{
9739
33
        	        	case LPAREN_TOK:
9740
        	        		{
9741
33
        	        			switch ( LA(2) )
9742
        	        			{
9743
7
        	        			case LPAREN_TOK:
9744
        	        				{
9745
7
        	        					alt45=1;
9746
        	        				}
9747
7
        	        			    break;
9748
26
        	        			case QUOTED_SYMBOL:
9749
        	        			case SIMPLE_SYMBOL:
9750
        	        			case UNTERMINATED_QUOTED_SYMBOL:
9751
        	        				{
9752
26
        	        					alt45=2;
9753
        	        				}
9754
26
        	        			    break;
9755
9756
        	        			}
9757
9758
        	        		}
9759
33
        	        	    break;
9760
9761
        	        	}
9762
9763
46
        	        	switch (alt45)
9764
        	        	{
9765
7
        	        	    case 1:
9766
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1404:7: LPAREN_TOK LPAREN_TOK term[f, f2] ( symbol[name,CHECK_NONE,SYM_VARIABLE] )* RPAREN_TOK term[f3, f2] RPAREN_TOK
9767
        	        	        {
9768
7
        	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3718);
9769
7
        	        	            if  (HASEXCEPTION())
9770
        	        	            {
9771
        	        	                goto ruletermNonVariableEx;
9772
        	        	            }
9773
9774
9775
7
        	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3720);
9776
7
        	        	            if  (HASEXCEPTION())
9777
        	        	            {
9778
        	        	                goto ruletermNonVariableEx;
9779
        	        	            }
9780
9781
9782
7
        	        	            FOLLOWPUSH(FOLLOW_term_in_termNonVariable3722);
9783
7
        	        	            term(ctx, f, f2);
9784
9785
7
        	        	            FOLLOWPOP();
9786
7
        	        	            if  (HASEXCEPTION())
9787
        	        	            {
9788
        	        	                goto ruletermNonVariableEx;
9789
        	        	            }
9790
9791
9792
        	        	            {
9793
9794
7
        	        	                          args.clear();
9795
7
        	        	                          PARSER_STATE->pushScope();
9796
        	        	                          // f should be a constructor
9797
7
        	        	                          type = f.getSort();
9798
7
        	        	                          Debug("parser-dt") << "Pattern head : " << f << " " << type << std::endl;
9799
7
        	        	                          if (!type.isConstructor())
9800
        	        	                          {
9801
        	        	                            PARSER_STATE->parseError("Pattern must be application of a constructor or a variable.");
9802
        	        	                          }
9803
14
        	        	                          api::Datatype dt = type.getConstructorCodomainSort().getDatatype();
9804
7
        	        	                          if (dt.isParametric())
9805
        	        	                          {
9806
        	        	                            // lookup constructor by name
9807
4
        	        	                            api::DatatypeConstructor dc = dt.getConstructor(f.toString());
9808
4
        	        	                            api::Term scons = dc.getSpecializedConstructorTerm(expr.getSort());
9809
        	        	                            // take the type of the specialized constructor instead
9810
2
        	        	                            type = scons.getSort();
9811
        	        	                          }
9812
7
        	        	                          argTypes = type.getConstructorDomainSorts();
9813
9814
        	        	            }
9815
9816
9817
        	        	            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1426:9: ( symbol[name,CHECK_NONE,SYM_VARIABLE] )*
9818
9819
        	        	            for (;;)
9820
        	        	            {
9821
21
        	        	                int alt44=2;
9822
21
        	        	                switch ( LA(1) )
9823
        	        	                {
9824
14
        	        	                case QUOTED_SYMBOL:
9825
        	        	                case SIMPLE_SYMBOL:
9826
        	        	                case UNTERMINATED_QUOTED_SYMBOL:
9827
        	        	                	{
9828
14
        	        	                		alt44=1;
9829
        	        	                	}
9830
14
        	        	                    break;
9831
9832
        	        	                }
9833
9834
21
        	        	                switch (alt44)
9835
        	        	                {
9836
14
        	        	            	case 1:
9837
        	        	            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1426:11: symbol[name,CHECK_NONE,SYM_VARIABLE]
9838
        	        	            	    {
9839
14
        	        	            	        FOLLOWPUSH(FOLLOW_symbol_in_termNonVariable3746);
9840
14
        	        	            	        symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
9841
9842
14
        	        	            	        FOLLOWPOP();
9843
14
        	        	            	        if  (HASEXCEPTION())
9844
        	        	            	        {
9845
        	        	            	            goto ruletermNonVariableEx;
9846
        	        	            	        }
9847
9848
9849
        	        	            	        {
9850
9851
14
        	        	            	                        if (args.size() >= argTypes.size())
9852
        	        	            	                        {
9853
        	        	            	                          PARSER_STATE->parseError("Too many arguments for pattern.");
9854
        	        	            	                        }
9855
        	        	            	                        //make of proper type
9856
28
        	        	            	                        api::Term arg = PARSER_STATE->bindBoundVar(name, argTypes[args.size()]);
9857
14
        	        	            	                        args.push_back( arg );
9858
9859
14
        	        	            	        }
9860
9861
9862
        	        	            	    }
9863
14
        	        	            	    break;
9864
9865
7
        	        	            	default:
9866
7
        	        	            	    goto loop44;	/* break out of the loop */
9867
        	        	            	    break;
9868
        	        	                }
9869
14
        	        	            }
9870
7
        	        	            loop44: ; /* Jump out to here if this rule does not match */
9871
9872
9873
7
        	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3770);
9874
7
        	        	            if  (HASEXCEPTION())
9875
        	        	            {
9876
        	        	                goto ruletermNonVariableEx;
9877
        	        	            }
9878
9879
9880
7
        	        	            FOLLOWPUSH(FOLLOW_term_in_termNonVariable3772);
9881
7
        	        	            term(ctx, f3, f2);
9882
9883
7
        	        	            FOLLOWPOP();
9884
7
        	        	            if  (HASEXCEPTION())
9885
        	        	            {
9886
        	        	                goto ruletermNonVariableEx;
9887
        	        	            }
9888
9889
9890
        	        	            {
9891
9892
        	        	                          // make the match case
9893
14
        	        	                          std::vector<cvc5::api::Term> cargs;
9894
7
        	        	                          cargs.push_back(f);
9895
7
        	        	                          cargs.insert(cargs.end(),args.begin(),args.end());
9896
14
        	        	                          api::Term c = MK_TERM(api::APPLY_CONSTRUCTOR,cargs);
9897
14
        	        	                          api::Term bvla = MK_TERM(api::BOUND_VAR_LIST,args);
9898
14
        	        	                          api::Term mc = MK_TERM(api::MATCH_BIND_CASE, bvla, c, f3);
9899
7
        	        	                          matchcases.push_back(mc);
9900
        	        	                          // now, pop the scope
9901
7
        	        	                          PARSER_STATE->popScope();
9902
9903
        	        	            }
9904
9905
9906
7
        	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3785);
9907
7
        	        	            if  (HASEXCEPTION())
9908
        	        	            {
9909
        	        	                goto ruletermNonVariableEx;
9910
7
        	        	            }
9911
9912
9913
        	        	        }
9914
7
        	        	        break;
9915
26
        	        	    case 2:
9916
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1450:9: LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] term[f3, f2] RPAREN_TOK
9917
        	        	        {
9918
26
        	        	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3802);
9919
26
        	        	            if  (HASEXCEPTION())
9920
        	        	            {
9921
        	        	                goto ruletermNonVariableEx;
9922
        	        	            }
9923
9924
9925
26
        	        	            FOLLOWPUSH(FOLLOW_symbol_in_termNonVariable3804);
9926
26
        	        	            symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
9927
9928
26
        	        	            FOLLOWPOP();
9929
26
        	        	            if  (HASEXCEPTION())
9930
        	        	            {
9931
        	        	                goto ruletermNonVariableEx;
9932
        	        	            }
9933
9934
9935
        	        	            {
9936
9937
26
        	        	                          if (PARSER_STATE->isDeclared(name,SYM_VARIABLE))
9938
        	        	                          {
9939
23
        	        	                            f = PARSER_STATE->getVariable(name);
9940
23
        	        	                            type = f.getSort();
9941
92
        	        	                            if (!type.isConstructor() ||
9942
69
        	        	                                !type.getConstructorDomainSorts().empty())
9943
        	        	                            {
9944
        	        	                              PARSER_STATE->parseError("Must apply constructors of arity greater than 0 to arguments in pattern.");
9945
        	        	                            }
9946
        	        	                            // make nullary constructor application
9947
23
        	        	                            f = MK_TERM(api::APPLY_CONSTRUCTOR, f);
9948
        	        	                          }
9949
        	        	                          else
9950
        	        	                          {
9951
        	        	                            // it has the type of the head expr
9952
3
        	        	                            f = PARSER_STATE->bindBoundVar(name, expr.getSort());
9953
        	        	                          }
9954
9955
        	        	            }
9956
9957
9958
26
        	        	            FOLLOWPUSH(FOLLOW_term_in_termNonVariable3817);
9959
26
        	        	            term(ctx, f3, f2);
9960
9961
26
        	        	            FOLLOWPOP();
9962
26
        	        	            if  (HASEXCEPTION())
9963
        	        	            {
9964
        	        	                goto ruletermNonVariableEx;
9965
        	        	            }
9966
9967
9968
        	        	            {
9969
9970
52
        	        	                          api::Term mc;
9971
26
        	        	                          if (f.getKind() == api::VARIABLE)
9972
        	        	                          {
9973
6
        	        	                            api::Term bvlf = MK_TERM(api::BOUND_VAR_LIST, f);
9974
3
        	        	                            mc = MK_TERM(api::MATCH_BIND_CASE, bvlf, f, f3);
9975
        	        	                          }
9976
        	        	                          else
9977
        	        	                          {
9978
23
        	        	                            mc = MK_TERM(api::MATCH_CASE, f, f3);
9979
        	        	                          }
9980
26
        	        	                          matchcases.push_back(mc);
9981
9982
        	        	            }
9983
9984
9985
26
        	        	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3830);
9986
26
        	        	            if  (HASEXCEPTION())
9987
        	        	            {
9988
        	        	                goto ruletermNonVariableEx;
9989
26
        	        	            }
9990
9991
9992
        	        	        }
9993
26
        	        	        break;
9994
9995
13
        	        	    default:
9996
9997
13
        	        		if ( cnt45 >= 1 )
9998
        	        		{
9999
13
        	        		    goto loop45;
10000
        	        		}
10001
        	        		/* mismatchedSetEx()
10002
        	        		 */
10003
        	        		CONSTRUCTEX();
10004
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
10005
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
10006
10007
10008
        	        		goto ruletermNonVariableEx;
10009
        	        	}
10010
33
        	        	cnt45++;
10011
33
        	            }
10012
13
        	            loop45: ;	/* Jump to here if this rule does not match */
10013
        	        }
10014
10015
13
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3843);
10016
13
        	        if  (HASEXCEPTION())
10017
        	        {
10018
        	            goto ruletermNonVariableEx;
10019
        	        }
10020
10021
10022
13
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3845);
10023
13
        	        if  (HASEXCEPTION())
10024
        	        {
10025
        	            goto ruletermNonVariableEx;
10026
        	        }
10027
10028
10029
        	        {
10030
10031
        	                  //now, make the match
10032
13
        	                  if (matchcases.empty())
10033
        	                  {
10034
        	                    PARSER_STATE->parseError("Must have at least one case in match.");
10035
        	                  }
10036
26
        	                  std::vector<api::Term> mchildren;
10037
13
        	                  mchildren.push_back(expr);
10038
13
        	                  mchildren.insert(mchildren.end(), matchcases.begin(), matchcases.end());
10039
13
        	                  expr = MK_TERM(api::MATCH, mchildren);
10040
10041
13
        	        }
10042
10043
10044
        	    }
10045
13
        	    break;
10046
8168
        	case 6:
10047
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1497:5: LPAREN_TOK ATTRIBUTE_TOK term[expr, f2] ( attribute[expr, attexpr] )+ RPAREN_TOK
10048
        	    {
10049
8168
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3861);
10050
8168
        	        if  (HASEXCEPTION())
10051
        	        {
10052
        	            goto ruletermNonVariableEx;
10053
        	        }
10054
10055
10056
8168
        	         MATCHT(ATTRIBUTE_TOK, &FOLLOW_ATTRIBUTE_TOK_in_termNonVariable3863);
10057
8168
        	        if  (HASEXCEPTION())
10058
        	        {
10059
        	            goto ruletermNonVariableEx;
10060
        	        }
10061
10062
10063
8168
        	        FOLLOWPUSH(FOLLOW_term_in_termNonVariable3865);
10064
8168
        	        term(ctx, expr, f2);
10065
10066
8168
        	        FOLLOWPOP();
10067
8168
        	        if  (HASEXCEPTION())
10068
        	        {
10069
        	            goto ruletermNonVariableEx;
10070
        	        }
10071
10072
10073
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1498:5: ( attribute[expr, attexpr] )+
10074
        	        {
10075
8168
        	            int cnt46=0;
10076
10077
        	            for (;;)
10078
        	            {
10079
16699
        	                int alt46=2;
10080
16699
        	        	switch ( LA(1) )
10081
        	        	{
10082
8532
        	        	case ATTRIBUTE_INST_ADD_TO_POOL_TOK:
10083
        	        	case ATTRIBUTE_INST_LEVEL:
10084
        	        	case ATTRIBUTE_NAMED_TOK:
10085
        	        	case ATTRIBUTE_NO_PATTERN_TOK:
10086
        	        	case ATTRIBUTE_PATTERN_TOK:
10087
        	        	case ATTRIBUTE_POOL_TOK:
10088
        	        	case ATTRIBUTE_QUANTIFIER_ID_TOK:
10089
        	        	case ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK:
10090
        	        	case KEYWORD:
10091
        	        		{
10092
8532
        	        			alt46=1;
10093
        	        		}
10094
8532
        	        	    break;
10095
10096
        	        	}
10097
10098
16699
        	        	switch (alt46)
10099
        	        	{
10100
8532
        	        	    case 1:
10101
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1498:7: attribute[expr, attexpr]
10102
        	        	        {
10103
8532
        	        	            FOLLOWPUSH(FOLLOW_attribute_in_termNonVariable3874);
10104
8532
        	        	            attribute(ctx, expr, attexpr);
10105
10106
8531
        	        	            FOLLOWPOP();
10107
8531
        	        	            if  (HASEXCEPTION())
10108
        	        	            {
10109
        	        	                goto ruletermNonVariableEx;
10110
        	        	            }
10111
10112
10113
        	        	            {
10114
8531
        	        	                 if( ! attexpr.isNull()) {
10115
3821
        	        	                          patexprs.push_back( attexpr );
10116
        	        	                        }
10117
10118
        	        	            }
10119
10120
10121
        	        	        }
10122
8531
        	        	        break;
10123
10124
8167
        	        	    default:
10125
10126
8167
        	        		if ( cnt46 >= 1 )
10127
        	        		{
10128
8167
        	        		    goto loop46;
10129
        	        		}
10130
        	        		/* mismatchedSetEx()
10131
        	        		 */
10132
        	        		CONSTRUCTEX();
10133
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
10134
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
10135
10136
10137
        	        		goto ruletermNonVariableEx;
10138
        	        	}
10139
8531
        	        	cnt46++;
10140
8531
        	            }
10141
8167
        	            loop46: ;	/* Jump to here if this rule does not match */
10142
        	        }
10143
10144
8167
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3892);
10145
8167
        	        if  (HASEXCEPTION())
10146
        	        {
10147
        	            goto ruletermNonVariableEx;
10148
        	        }
10149
10150
10151
        	        {
10152
10153
8167
        	                  if(! patexprs.empty()) {
10154
3457
        	                    if( !f2.isNull() && f2.getKind()==api::INST_PATTERN_LIST ){
10155
18
        	                      for( size_t i=0; i<f2.getNumChildren(); i++ ){
10156
9
        	                        patexprs.push_back( f2[i] );
10157
        	                      }
10158
        	                    }
10159
3457
        	                    expr2 = MK_TERM(api::INST_PATTERN_LIST, patexprs);
10160
        	                  } else {
10161
4710
        	                    expr2 = f2;
10162
        	                  }
10163
10164
        	        }
10165
10166
10167
        	    }
10168
8167
        	    break;
10169
30
        	case 7:
10170
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1517:5: LPAREN_TOK HO_LAMBDA_TOK boundVarList[bvl] term[f, f2] RPAREN_TOK
10171
        	    {
10172
30
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3910);
10173
30
        	        if  (HASEXCEPTION())
10174
        	        {
10175
        	            goto ruletermNonVariableEx;
10176
        	        }
10177
10178
10179
30
        	         MATCHT(HO_LAMBDA_TOK, &FOLLOW_HO_LAMBDA_TOK_in_termNonVariable3912);
10180
30
        	        if  (HASEXCEPTION())
10181
        	        {
10182
        	            goto ruletermNonVariableEx;
10183
        	        }
10184
10185
10186
        	        {
10187
30
        	             PARSER_STATE->pushScope();
10188
        	        }
10189
10190
10191
30
        	        FOLLOWPUSH(FOLLOW_boundVarList_in_termNonVariable3924);
10192
30
        	        boundVarList(ctx, bvl);
10193
10194
30
        	        FOLLOWPOP();
10195
30
        	        if  (HASEXCEPTION())
10196
        	        {
10197
        	            goto ruletermNonVariableEx;
10198
        	        }
10199
10200
10201
30
        	        FOLLOWPUSH(FOLLOW_term_in_termNonVariable3931);
10202
30
        	        term(ctx, f, f2);
10203
10204
30
        	        FOLLOWPOP();
10205
30
        	        if  (HASEXCEPTION())
10206
        	        {
10207
        	            goto ruletermNonVariableEx;
10208
        	        }
10209
10210
10211
30
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3934);
10212
30
        	        if  (HASEXCEPTION())
10213
        	        {
10214
        	            goto ruletermNonVariableEx;
10215
        	        }
10216
10217
10218
        	        {
10219
10220
30
        	                  args.push_back(bvl);
10221
30
        	                  args.push_back(f);
10222
30
        	                  PARSER_STATE->popScope();
10223
30
        	                  expr = MK_TERM(api::LAMBDA, args);
10224
10225
        	        }
10226
10227
10228
        	    }
10229
30
        	    break;
10230
50
        	case 8:
10231
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1527:5: LPAREN_TOK TUPLE_CONST_TOK termList[args,expr] RPAREN_TOK
10232
        	    {
10233
50
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3946);
10234
50
        	        if  (HASEXCEPTION())
10235
        	        {
10236
        	            goto ruletermNonVariableEx;
10237
        	        }
10238
10239
10240
50
        	         MATCHT(TUPLE_CONST_TOK, &FOLLOW_TUPLE_CONST_TOK_in_termNonVariable3948);
10241
50
        	        if  (HASEXCEPTION())
10242
        	        {
10243
        	            goto ruletermNonVariableEx;
10244
        	        }
10245
10246
10247
50
        	        FOLLOWPUSH(FOLLOW_termList_in_termNonVariable3950);
10248
50
        	        termList(ctx, args, expr);
10249
10250
50
        	        FOLLOWPOP();
10251
50
        	        if  (HASEXCEPTION())
10252
        	        {
10253
        	            goto ruletermNonVariableEx;
10254
        	        }
10255
10256
10257
50
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3953);
10258
50
        	        if  (HASEXCEPTION())
10259
        	        {
10260
        	            goto ruletermNonVariableEx;
10261
        	        }
10262
10263
10264
        	        {
10265
10266
100
        	                std::vector<api::Sort> sorts;
10267
100
        	                std::vector<api::Term> terms;
10268
156
        	                for (const api::Term& arg : args)
10269
        	                {
10270
106
        	                  sorts.emplace_back(arg.getSort());
10271
106
        	                  terms.emplace_back(arg);
10272
        	                }
10273
50
        	                expr = SOLVER->mkTuple(sorts, terms);
10274
10275
50
        	        }
10276
10277
10278
        	    }
10279
50
        	    break;
10280
2
        	case 9:
10281
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1538:5: LPAREN_TOK TUPLE_PROJECT_TOK term[expr,expr2] RPAREN_TOK
10282
        	    {
10283
2
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termNonVariable3963);
10284
2
        	        if  (HASEXCEPTION())
10285
        	        {
10286
        	            goto ruletermNonVariableEx;
10287
        	        }
10288
10289
10290
2
        	         MATCHT(TUPLE_PROJECT_TOK, &FOLLOW_TUPLE_PROJECT_TOK_in_termNonVariable3965);
10291
2
        	        if  (HASEXCEPTION())
10292
        	        {
10293
        	            goto ruletermNonVariableEx;
10294
        	        }
10295
10296
10297
2
        	        FOLLOWPUSH(FOLLOW_term_in_termNonVariable3967);
10298
2
        	        term(ctx, expr, expr2);
10299
10300
2
        	        FOLLOWPOP();
10301
2
        	        if  (HASEXCEPTION())
10302
        	        {
10303
        	            goto ruletermNonVariableEx;
10304
        	        }
10305
10306
10307
2
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termNonVariable3970);
10308
2
        	        if  (HASEXCEPTION())
10309
        	        {
10310
        	            goto ruletermNonVariableEx;
10311
        	        }
10312
10313
10314
        	        {
10315
10316
4
        	                std::vector<uint32_t> indices;
10317
4
        	                api::Op op = SOLVER->mkOp(api::TUPLE_PROJECT, indices);
10318
2
        	                expr = SOLVER->mkTerm(op, expr);
10319
10320
2
        	        }
10321
10322
10323
        	    }
10324
2
        	    break;
10325
484950
        	case 10:
10326
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1545:5: termAtomic[atomTerm]
10327
        	    {
10328
484950
        	        FOLLOWPUSH(FOLLOW_termAtomic_in_termNonVariable3986);
10329
484950
        	        termAtomic(ctx, atomTerm);
10330
10331
484950
        	        FOLLOWPOP();
10332
484950
        	        if  (HASEXCEPTION())
10333
        	        {
10334
        	            goto ruletermNonVariableEx;
10335
        	        }
10336
10337
10338
        	        {
10339
484950
        	             expr = atomTerm;
10340
        	        }
10341
10342
10343
        	    }
10344
484950
        	    break;
10345
10346
            }
10347
        }
10348
    }
10349
10350
    // This is where rules clean up and exit
10351
    //
10352
3894206
    goto ruletermNonVariableEx; /* Prevent compiler warnings */
10353
3894208
    ruletermNonVariableEx: ;
10354
10355
3894208
            if (HASEXCEPTION())
10356
            {
10357
2
                PREPORTERROR();
10358
                PRECOVER();
10359
            }
10360
7788412
    return ;
10361
}
10362
/* $ANTLR end termNonVariable */
10363
10364
/**
10365
 * $ANTLR start qualIdentifier
10366
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1599:1: qualIdentifier[cvc5::ParseOp& p] : ( identifier[p] | LPAREN_TOK AS_TOK ( CONST_TOK sortSymbol[type, CHECK_DECLARED] | identifier[p] sortSymbol[type, CHECK_DECLARED] ) RPAREN_TOK );
10367
 */
10368
static void
10369
6802201
qualIdentifier(pSmt2Parser ctx, cvc5::ParseOp& p)
10370
{
10371
    /* Initialize rule variables
10372
     */
10373
10374
10375
      api::Kind k;
10376
13604402
      std::string baseName;
10377
13604402
      cvc5::api::Term f;
10378
13604402
      cvc5::api::Sort type;
10379
10380
    {
10381
        {
10382
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1606:3: ( identifier[p] | LPAREN_TOK AS_TOK ( CONST_TOK sortSymbol[type, CHECK_DECLARED] | identifier[p] sortSymbol[type, CHECK_DECLARED] ) RPAREN_TOK )
10383
10384
            ANTLR3_UINT32 alt49;
10385
10386
6802201
            alt49=2;
10387
10388
6802201
            switch ( LA(1) )
10389
            {
10390
6723996
            case QUOTED_SYMBOL:
10391
            case SIMPLE_SYMBOL:
10392
            case UNTERMINATED_QUOTED_SYMBOL:
10393
            	{
10394
6723996
            		alt49=1;
10395
            	}
10396
6723996
                break;
10397
78205
            case LPAREN_TOK:
10398
            	{
10399
78205
            		switch ( LA(2) )
10400
            		{
10401
77850
            		case INDEX_TOK:
10402
            			{
10403
77850
            				alt49=1;
10404
            			}
10405
77850
            		    break;
10406
355
            		case AS_TOK:
10407
            			{
10408
355
            				alt49=2;
10409
            			}
10410
355
            		    break;
10411
10412
            		default:
10413
            		    CONSTRUCTEX();
10414
            		    EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
10415
            		    EXCEPTION->message      = (void *)"";
10416
            		    EXCEPTION->decisionNum  = 49;
10417
            		    EXCEPTION->state        = 4;
10418
10419
10420
            		    goto rulequalIdentifierEx;
10421
10422
            		}
10423
10424
            	}
10425
78205
                break;
10426
10427
            default:
10428
                CONSTRUCTEX();
10429
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
10430
                EXCEPTION->message      = (void *)"";
10431
                EXCEPTION->decisionNum  = 49;
10432
                EXCEPTION->state        = 0;
10433
10434
10435
                goto rulequalIdentifierEx;
10436
10437
            }
10438
10439
6802201
            switch (alt49)
10440
            {
10441
6801846
        	case 1:
10442
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1606:3: identifier[p]
10443
        	    {
10444
6801846
        	        FOLLOWPUSH(FOLLOW_identifier_in_qualIdentifier4009);
10445
6801846
        	        identifier(ctx, p);
10446
10447
6801845
        	        FOLLOWPOP();
10448
6801845
        	        if  (HASEXCEPTION())
10449
        	        {
10450
        	            goto rulequalIdentifierEx;
10451
        	        }
10452
10453
10454
        	    }
10455
6801845
        	    break;
10456
355
        	case 2:
10457
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1607:5: LPAREN_TOK AS_TOK ( CONST_TOK sortSymbol[type, CHECK_DECLARED] | identifier[p] sortSymbol[type, CHECK_DECLARED] ) RPAREN_TOK
10458
        	    {
10459
355
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_qualIdentifier4016);
10460
355
        	        if  (HASEXCEPTION())
10461
        	        {
10462
        	            goto rulequalIdentifierEx;
10463
        	        }
10464
10465
10466
355
        	         MATCHT(AS_TOK, &FOLLOW_AS_TOK_in_qualIdentifier4018);
10467
355
        	        if  (HASEXCEPTION())
10468
        	        {
10469
        	            goto rulequalIdentifierEx;
10470
        	        }
10471
10472
10473
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1608:5: ( CONST_TOK sortSymbol[type, CHECK_DECLARED] | identifier[p] sortSymbol[type, CHECK_DECLARED] )
10474
        	        {
10475
355
        	            int alt48=2;
10476
355
        	            switch ( LA(1) )
10477
        	            {
10478
65
        	            case CONST_TOK:
10479
        	            	{
10480
65
        	            		alt48=1;
10481
        	            	}
10482
65
        	                break;
10483
290
        	            case LPAREN_TOK:
10484
        	            case QUOTED_SYMBOL:
10485
        	            case SIMPLE_SYMBOL:
10486
        	            case UNTERMINATED_QUOTED_SYMBOL:
10487
        	            	{
10488
290
        	            		alt48=2;
10489
        	            	}
10490
290
        	                break;
10491
10492
        	            default:
10493
        	                CONSTRUCTEX();
10494
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
10495
        	                EXCEPTION->message      = (void *)"";
10496
        	                EXCEPTION->decisionNum  = 48;
10497
        	                EXCEPTION->state        = 0;
10498
10499
10500
        	                goto rulequalIdentifierEx;
10501
10502
        	            }
10503
10504
355
        	            switch (alt48)
10505
        	            {
10506
65
        	        	case 1:
10507
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1608:7: CONST_TOK sortSymbol[type, CHECK_DECLARED]
10508
        	        	    {
10509
65
        	        	         MATCHT(CONST_TOK, &FOLLOW_CONST_TOK_in_qualIdentifier4026);
10510
65
        	        	        if  (HASEXCEPTION())
10511
        	        	        {
10512
        	        	            goto rulequalIdentifierEx;
10513
        	        	        }
10514
10515
10516
65
        	        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_qualIdentifier4028);
10517
65
        	        	        sortSymbol(ctx, type, CHECK_DECLARED);
10518
10519
65
        	        	        FOLLOWPOP();
10520
65
        	        	        if  (HASEXCEPTION())
10521
        	        	        {
10522
        	        	            goto rulequalIdentifierEx;
10523
        	        	        }
10524
10525
10526
        	        	        {
10527
10528
65
        	        	                    p.d_kind = api::CONST_ARRAY;
10529
65
        	        	                    PARSER_STATE->parseOpApplyTypeAscription(p, type);
10530
10531
        	        	        }
10532
10533
10534
        	        	    }
10535
65
        	        	    break;
10536
290
        	        	case 2:
10537
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1613:7: identifier[p] sortSymbol[type, CHECK_DECLARED]
10538
        	        	    {
10539
290
        	        	        FOLLOWPUSH(FOLLOW_identifier_in_qualIdentifier4045);
10540
290
        	        	        identifier(ctx, p);
10541
10542
290
        	        	        FOLLOWPOP();
10543
290
        	        	        if  (HASEXCEPTION())
10544
        	        	        {
10545
        	        	            goto rulequalIdentifierEx;
10546
        	        	        }
10547
10548
10549
290
        	        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_qualIdentifier4054);
10550
290
        	        	        sortSymbol(ctx, type, CHECK_DECLARED);
10551
10552
290
        	        	        FOLLOWPOP();
10553
290
        	        	        if  (HASEXCEPTION())
10554
        	        	        {
10555
        	        	            goto rulequalIdentifierEx;
10556
        	        	        }
10557
10558
10559
        	        	        {
10560
10561
290
        	        	                    PARSER_STATE->parseOpApplyTypeAscription(p, type);
10562
10563
        	        	        }
10564
10565
10566
        	        	    }
10567
290
        	        	    break;
10568
10569
        	            }
10570
        	        }
10571
10572
355
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_qualIdentifier4075);
10573
355
        	        if  (HASEXCEPTION())
10574
        	        {
10575
        	            goto rulequalIdentifierEx;
10576
355
        	        }
10577
10578
10579
        	    }
10580
355
        	    break;
10581
10582
            }
10583
        }
10584
    }
10585
10586
    // This is where rules clean up and exit
10587
    //
10588
6802200
    goto rulequalIdentifierEx; /* Prevent compiler warnings */
10589
6802200
    rulequalIdentifierEx: ;
10590
10591
6802200
            if (HASEXCEPTION())
10592
            {
10593
                PREPORTERROR();
10594
                PRECOVER();
10595
            }
10596
13604400
    return ;
10597
}
10598
/* $ANTLR end qualIdentifier */
10599
10600
/**
10601
 * $ANTLR start identifier
10602
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1630:1: identifier[cvc5::ParseOp& p] : ( functionName[p.d_name, CHECK_NONE] | LPAREN_TOK INDEX_TOK ( TESTER_TOK term[f, f2] | UPDATE_TOK term[f, f2] | TUPLE_SEL_TOK m= INTEGER_LITERAL | TUPLE_PROJECT_TOK nonemptyNumeralList[numerals] |sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals] ) RPAREN_TOK );
10603
 */
10604
static void
10605
6802136
identifier(pSmt2Parser ctx, cvc5::ParseOp& p)
10606
{
10607
    pANTLR3_COMMON_TOKEN    m;
10608
    pANTLR3_COMMON_TOKEN    sym;
10609
10610
    /* Initialize rule variables
10611
     */
10612
10613
10614
13604272
      cvc5::api::Term f;
10615
13604272
      cvc5::api::Term f2;
10616
13604272
      std::vector<uint64_t> numerals;
10617
10618
6802136
    m       = NULL;
10619
6802136
    sym       = NULL;
10620
10621
    {
10622
        {
10623
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1636:3: ( functionName[p.d_name, CHECK_NONE] | LPAREN_TOK INDEX_TOK ( TESTER_TOK term[f, f2] | UPDATE_TOK term[f, f2] | TUPLE_SEL_TOK m= INTEGER_LITERAL | TUPLE_PROJECT_TOK nonemptyNumeralList[numerals] |sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals] ) RPAREN_TOK )
10624
10625
            ANTLR3_UINT32 alt51;
10626
10627
6802136
            alt51=2;
10628
10629
6802136
            switch ( LA(1) )
10630
            {
10631
6724286
            case QUOTED_SYMBOL:
10632
            case SIMPLE_SYMBOL:
10633
            case UNTERMINATED_QUOTED_SYMBOL:
10634
            	{
10635
6724286
            		alt51=1;
10636
            	}
10637
6724286
                break;
10638
77850
            case LPAREN_TOK:
10639
            	{
10640
77850
            		alt51=2;
10641
            	}
10642
77850
                break;
10643
10644
            default:
10645
                CONSTRUCTEX();
10646
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
10647
                EXCEPTION->message      = (void *)"";
10648
                EXCEPTION->decisionNum  = 51;
10649
                EXCEPTION->state        = 0;
10650
10651
10652
                goto ruleidentifierEx;
10653
10654
            }
10655
10656
6802136
            switch (alt51)
10657
            {
10658
6724286
        	case 1:
10659
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1636:3: functionName[p.d_name, CHECK_NONE]
10660
        	    {
10661
6724286
        	        FOLLOWPUSH(FOLLOW_functionName_in_identifier4094);
10662
6724286
        	        functionName(ctx, p.d_name, CHECK_NONE);
10663
10664
6724286
        	        FOLLOWPOP();
10665
6724286
        	        if  (HASEXCEPTION())
10666
        	        {
10667
        	            goto ruleidentifierEx;
10668
        	        }
10669
10670
10671
        	    }
10672
6724286
        	    break;
10673
77850
        	case 2:
10674
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1640:5: LPAREN_TOK INDEX_TOK ( TESTER_TOK term[f, f2] | UPDATE_TOK term[f, f2] | TUPLE_SEL_TOK m= INTEGER_LITERAL | TUPLE_PROJECT_TOK nonemptyNumeralList[numerals] |sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals] ) RPAREN_TOK
10675
        	    {
10676
77850
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_identifier4106);
10677
77850
        	        if  (HASEXCEPTION())
10678
        	        {
10679
        	            goto ruleidentifierEx;
10680
        	        }
10681
10682
10683
77850
        	         MATCHT(INDEX_TOK, &FOLLOW_INDEX_TOK_in_identifier4108);
10684
77850
        	        if  (HASEXCEPTION())
10685
        	        {
10686
        	            goto ruleidentifierEx;
10687
        	        }
10688
10689
10690
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1641:5: ( TESTER_TOK term[f, f2] | UPDATE_TOK term[f, f2] | TUPLE_SEL_TOK m= INTEGER_LITERAL | TUPLE_PROJECT_TOK nonemptyNumeralList[numerals] |sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals] )
10691
        	        {
10692
77850
        	            int alt50=5;
10693
77850
        	            switch ( LA(1) )
10694
        	            {
10695
1414
        	            case TESTER_TOK:
10696
        	            	{
10697
1414
        	            		alt50=1;
10698
        	            	}
10699
1414
        	                break;
10700
8
        	            case UPDATE_TOK:
10701
        	            	{
10702
8
        	            		alt50=2;
10703
        	            	}
10704
8
        	                break;
10705
4
        	            case TUPLE_SEL_TOK:
10706
        	            	{
10707
4
        	            		alt50=3;
10708
        	            	}
10709
4
        	                break;
10710
2
        	            case TUPLE_PROJECT_TOK:
10711
        	            	{
10712
2
        	            		alt50=4;
10713
        	            	}
10714
2
        	                break;
10715
76422
        	            case SIMPLE_SYMBOL:
10716
        	            	{
10717
76422
        	            		alt50=5;
10718
        	            	}
10719
76422
        	                break;
10720
10721
        	            default:
10722
        	                CONSTRUCTEX();
10723
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
10724
        	                EXCEPTION->message      = (void *)"";
10725
        	                EXCEPTION->decisionNum  = 50;
10726
        	                EXCEPTION->state        = 0;
10727
10728
10729
        	                goto ruleidentifierEx;
10730
10731
        	            }
10732
10733
77850
        	            switch (alt50)
10734
        	            {
10735
1414
        	        	case 1:
10736
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1641:7: TESTER_TOK term[f, f2]
10737
        	        	    {
10738
1414
        	        	         MATCHT(TESTER_TOK, &FOLLOW_TESTER_TOK_in_identifier4116);
10739
1414
        	        	        if  (HASEXCEPTION())
10740
        	        	        {
10741
        	        	            goto ruleidentifierEx;
10742
        	        	        }
10743
10744
10745
1414
        	        	        FOLLOWPUSH(FOLLOW_term_in_identifier4118);
10746
1414
        	        	        term(ctx, f, f2);
10747
10748
1414
        	        	        FOLLOWPOP();
10749
1414
        	        	        if  (HASEXCEPTION())
10750
        	        	        {
10751
        	        	            goto ruleidentifierEx;
10752
        	        	        }
10753
10754
10755
        	        	        {
10756
10757
1414
        	        	                    if (f.getKind() == api::APPLY_CONSTRUCTOR && f.getNumChildren() == 1)
10758
        	        	                    {
10759
        	        	                      // for nullary constructors, must get the operator
10760
396
        	        	                      f = f[0];
10761
        	        	                    }
10762
1414
        	        	                    if (!f.getSort().isConstructor())
10763
        	        	                    {
10764
        	        	                      PARSER_STATE->parseError(
10765
        	        	                          "Bad syntax for test (_ is X), X must be a constructor.");
10766
        	        	                    }
10767
        	        	                    // get the datatype that f belongs to
10768
2828
        	        	                    api::Sort sf = f.getSort().getConstructorCodomainSort();
10769
2828
        	        	                    api::Datatype d = sf.getDatatype();
10770
        	        	                    // lookup by name
10771
2828
        	        	                    api::DatatypeConstructor dc = d.getConstructor(f.toString());
10772
1414
        	        	                    p.d_expr = dc.getTesterTerm();
10773
10774
1414
        	        	        }
10775
10776
10777
        	        	    }
10778
1414
        	        	    break;
10779
8
        	        	case 2:
10780
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1660:7: UPDATE_TOK term[f, f2]
10781
        	        	    {
10782
8
        	        	         MATCHT(UPDATE_TOK, &FOLLOW_UPDATE_TOK_in_identifier4135);
10783
8
        	        	        if  (HASEXCEPTION())
10784
        	        	        {
10785
        	        	            goto ruleidentifierEx;
10786
        	        	        }
10787
10788
10789
8
        	        	        FOLLOWPUSH(FOLLOW_term_in_identifier4137);
10790
8
        	        	        term(ctx, f, f2);
10791
10792
8
        	        	        FOLLOWPOP();
10793
8
        	        	        if  (HASEXCEPTION())
10794
        	        	        {
10795
        	        	            goto ruleidentifierEx;
10796
        	        	        }
10797
10798
10799
        	        	        {
10800
10801
8
        	        	                    if (!f.getSort().isSelector())
10802
        	        	                    {
10803
        	        	                      PARSER_STATE->parseError(
10804
        	        	                          "Bad syntax for test (_ update X), X must be a selector.");
10805
        	        	                    }
10806
16
        	        	                    std::string sname = f.toString();
10807
        	        	                    // get the datatype that f belongs to
10808
16
        	        	                    api::Sort sf = f.getSort().getSelectorDomainSort();
10809
16
        	        	                    api::Datatype d = sf.getDatatype();
10810
        	        	                    // find the selector
10811
16
        	        	                    api::DatatypeSelector ds = d.getSelector(f.toString());
10812
        	        	                    // get the updater term
10813
8
        	        	                    p.d_expr = ds.getUpdaterTerm();
10814
10815
8
        	        	        }
10816
10817
10818
        	        	    }
10819
8
        	        	    break;
10820
4
        	        	case 3:
10821
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1676:7: TUPLE_SEL_TOK m= INTEGER_LITERAL
10822
        	        	    {
10823
4
        	        	         MATCHT(TUPLE_SEL_TOK, &FOLLOW_TUPLE_SEL_TOK_in_identifier4154);
10824
4
        	        	        if  (HASEXCEPTION())
10825
        	        	        {
10826
        	        	            goto ruleidentifierEx;
10827
        	        	        }
10828
10829
10830
4
        	        	        m = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_identifier4158);
10831
4
        	        	        if  (HASEXCEPTION())
10832
        	        	        {
10833
        	        	            goto ruleidentifierEx;
10834
        	        	        }
10835
10836
10837
        	        	        {
10838
10839
        	        	                    // we adopt a special syntax (_ tupSel n)
10840
4
        	        	                    p.d_kind = api::APPLY_SELECTOR;
10841
        	        	                    // put m in expr so that the caller can deal with this case
10842
4
        	        	                    p.d_expr = SOLVER->mkInteger(AntlrInput::tokenToUnsigned(m));
10843
10844
        	        	        }
10845
10846
10847
        	        	    }
10848
4
        	        	    break;
10849
2
        	        	case 4:
10850
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1683:7: TUPLE_PROJECT_TOK nonemptyNumeralList[numerals]
10851
        	        	    {
10852
2
        	        	         MATCHT(TUPLE_PROJECT_TOK, &FOLLOW_TUPLE_PROJECT_TOK_in_identifier4174);
10853
2
        	        	        if  (HASEXCEPTION())
10854
        	        	        {
10855
        	        	            goto ruleidentifierEx;
10856
        	        	        }
10857
10858
10859
2
        	        	        FOLLOWPUSH(FOLLOW_nonemptyNumeralList_in_identifier4176);
10860
2
        	        	        nonemptyNumeralList(ctx, numerals);
10861
10862
2
        	        	        FOLLOWPOP();
10863
2
        	        	        if  (HASEXCEPTION())
10864
        	        	        {
10865
        	        	            goto ruleidentifierEx;
10866
        	        	        }
10867
10868
10869
        	        	        {
10870
10871
        	        	                    // we adopt a special syntax (_ tuple_project i_1 ... i_n) where
10872
        	        	                    // i_1, ..., i_n are numerals
10873
2
        	        	                    p.d_kind = api::TUPLE_PROJECT;
10874
4
        	        	                    std::vector<uint32_t> indices(numerals.size());
10875
6
        	        	                    for(size_t i = 0; i < numerals.size(); ++i)
10876
        	        	                    {
10877
        	        	                      // convert uint64_t to uint32_t
10878
4
        	        	                      indices[i] = numerals[i];
10879
        	        	                    }
10880
2
        	        	                    p.d_op = SOLVER->mkOp(api::TUPLE_PROJECT, indices);
10881
10882
2
        	        	        }
10883
10884
10885
        	        	    }
10886
2
        	        	    break;
10887
76422
        	        	case 5:
10888
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1696:7: sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals]
10889
        	        	    {
10890
76422
        	        	        sym = (pANTLR3_COMMON_TOKEN) MATCHT(SIMPLE_SYMBOL, &FOLLOW_SIMPLE_SYMBOL_in_identifier4195);
10891
76422
        	        	        if  (HASEXCEPTION())
10892
        	        	        {
10893
        	        	            goto ruleidentifierEx;
10894
        	        	        }
10895
10896
10897
76422
        	        	        FOLLOWPUSH(FOLLOW_nonemptyNumeralList_in_identifier4197);
10898
76422
        	        	        nonemptyNumeralList(ctx, numerals);
10899
10900
76422
        	        	        FOLLOWPOP();
10901
76422
        	        	        if  (HASEXCEPTION())
10902
        	        	        {
10903
        	        	            goto ruleidentifierEx;
10904
        	        	        }
10905
10906
10907
        	        	        {
10908
10909
76423
        	        	                    p.d_op = PARSER_STATE->mkIndexedOp(AntlrInput::tokenText(sym), numerals);
10910
10911
        	        	        }
10912
10913
10914
        	        	    }
10915
76421
        	        	    break;
10916
10917
        	            }
10918
        	        }
10919
10920
77849
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_identifier4218);
10921
77849
        	        if  (HASEXCEPTION())
10922
        	        {
10923
        	            goto ruleidentifierEx;
10924
77849
        	        }
10925
10926
10927
        	    }
10928
77849
        	    break;
10929
10930
            }
10931
        }
10932
    }
10933
10934
    // This is where rules clean up and exit
10935
    //
10936
6802135
    goto ruleidentifierEx; /* Prevent compiler warnings */
10937
6802135
    ruleidentifierEx: ;
10938
10939
6802135
            if (HASEXCEPTION())
10940
            {
10941
                PREPORTERROR();
10942
                PRECOVER();
10943
            }
10944
13604270
    return ;
10945
}
10946
/* $ANTLR end identifier */
10947
10948
/**
10949
 * $ANTLR start termAtomic
10950
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1708:1: termAtomic[cvc5::api::Term& atomTerm] : ( INTEGER_LITERAL | DECIMAL_LITERAL | LPAREN_TOK INDEX_TOK ( EMP_TOK sortSymbol[type,CHECK_DECLARED] sortSymbol[type2,CHECK_DECLARED] | CHAR_TOK HEX_LITERAL |sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals] ) RPAREN_TOK | HEX_LITERAL | BINARY_LITERAL | str[s,false] | TUPLE_CONST_TOK );
10951
 */
10952
static void
10953
484950
termAtomic(pSmt2Parser ctx, cvc5::api::Term& atomTerm)
10954
{
10955
    pANTLR3_COMMON_TOKEN    sym;
10956
    pANTLR3_COMMON_TOKEN    INTEGER_LITERAL11;
10957
    pANTLR3_COMMON_TOKEN    DECIMAL_LITERAL12;
10958
    pANTLR3_COMMON_TOKEN    HEX_LITERAL13;
10959
    pANTLR3_COMMON_TOKEN    HEX_LITERAL14;
10960
    pANTLR3_COMMON_TOKEN    BINARY_LITERAL15;
10961
10962
    /* Initialize rule variables
10963
     */
10964
10965
10966
969900
      cvc5::api::Sort type;
10967
969900
      cvc5::api::Sort type2;
10968
969900
      std::string s;
10969
969900
      std::vector<uint64_t> numerals;
10970
10971
484950
    sym       = NULL;
10972
484950
    INTEGER_LITERAL11       = NULL;
10973
484950
    DECIMAL_LITERAL12       = NULL;
10974
484950
    HEX_LITERAL13       = NULL;
10975
484950
    HEX_LITERAL14       = NULL;
10976
484950
    BINARY_LITERAL15       = NULL;
10977
10978
    {
10979
        {
10980
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1716:3: ( INTEGER_LITERAL | DECIMAL_LITERAL | LPAREN_TOK INDEX_TOK ( EMP_TOK sortSymbol[type,CHECK_DECLARED] sortSymbol[type2,CHECK_DECLARED] | CHAR_TOK HEX_LITERAL |sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals] ) RPAREN_TOK | HEX_LITERAL | BINARY_LITERAL | str[s,false] | TUPLE_CONST_TOK )
10981
10982
            ANTLR3_UINT32 alt53;
10983
10984
484950
            alt53=7;
10985
10986
484950
            switch ( LA(1) )
10987
            {
10988
359260
            case INTEGER_LITERAL:
10989
            	{
10990
359260
            		alt53=1;
10991
            	}
10992
359260
                break;
10993
22222
            case DECIMAL_LITERAL:
10994
            	{
10995
22222
            		alt53=2;
10996
            	}
10997
22222
                break;
10998
89130
            case LPAREN_TOK:
10999
            	{
11000
89130
            		alt53=3;
11001
            	}
11002
89130
                break;
11003
4358
            case HEX_LITERAL:
11004
            	{
11005
4358
            		alt53=4;
11006
            	}
11007
4358
                break;
11008
961
            case BINARY_LITERAL:
11009
            	{
11010
961
            		alt53=5;
11011
            	}
11012
961
                break;
11013
9014
            case STRING_LITERAL:
11014
            	{
11015
9014
            		alt53=6;
11016
            	}
11017
9014
                break;
11018
5
            case TUPLE_CONST_TOK:
11019
            	{
11020
5
            		alt53=7;
11021
            	}
11022
5
                break;
11023
11024
            default:
11025
                CONSTRUCTEX();
11026
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
11027
                EXCEPTION->message      = (void *)"";
11028
                EXCEPTION->decisionNum  = 53;
11029
                EXCEPTION->state        = 0;
11030
11031
11032
                goto ruletermAtomicEx;
11033
11034
            }
11035
11036
484950
            switch (alt53)
11037
            {
11038
359260
        	case 1:
11039
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1716:5: INTEGER_LITERAL
11040
        	    {
11041
359260
        	        INTEGER_LITERAL11 = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_termAtomic4245);
11042
359260
        	        if  (HASEXCEPTION())
11043
        	        {
11044
        	            goto ruletermAtomicEx;
11045
        	        }
11046
11047
11048
        	        {
11049
11050
718520
        	                  std::string intStr = AntlrInput::tokenText(INTEGER_LITERAL11);
11051
359260
        	                  atomTerm = SOLVER->mkInteger(intStr);
11052
11053
359260
        	        }
11054
11055
11056
        	    }
11057
359260
        	    break;
11058
22222
        	case 2:
11059
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1721:5: DECIMAL_LITERAL
11060
        	    {
11061
22222
        	        DECIMAL_LITERAL12 = (pANTLR3_COMMON_TOKEN) MATCHT(DECIMAL_LITERAL, &FOLLOW_DECIMAL_LITERAL_in_termAtomic4257);
11062
22222
        	        if  (HASEXCEPTION())
11063
        	        {
11064
        	            goto ruletermAtomicEx;
11065
        	        }
11066
11067
11068
        	        {
11069
11070
44444
        	                  std::string realStr = AntlrInput::tokenText(DECIMAL_LITERAL12);
11071
44444
        	                  atomTerm = SOLVER->ensureTermSort(SOLVER->mkReal(realStr),
11072
44444
        	                                                    SOLVER->getRealSort());
11073
11074
22222
        	        }
11075
11076
11077
        	    }
11078
22222
        	    break;
11079
89130
        	case 3:
11080
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1730:5: LPAREN_TOK INDEX_TOK ( EMP_TOK sortSymbol[type,CHECK_DECLARED] sortSymbol[type2,CHECK_DECLARED] | CHAR_TOK HEX_LITERAL |sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals] ) RPAREN_TOK
11081
        	    {
11082
89130
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_termAtomic4276);
11083
89130
        	        if  (HASEXCEPTION())
11084
        	        {
11085
        	            goto ruletermAtomicEx;
11086
        	        }
11087
11088
11089
89130
        	         MATCHT(INDEX_TOK, &FOLLOW_INDEX_TOK_in_termAtomic4278);
11090
89130
        	        if  (HASEXCEPTION())
11091
        	        {
11092
        	            goto ruletermAtomicEx;
11093
        	        }
11094
11095
11096
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1731:5: ( EMP_TOK sortSymbol[type,CHECK_DECLARED] sortSymbol[type2,CHECK_DECLARED] | CHAR_TOK HEX_LITERAL |sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals] )
11097
        	        {
11098
89130
        	            int alt52=3;
11099
89130
        	            switch ( LA(1) )
11100
        	            {
11101
49
        	            case EMP_TOK:
11102
        	            	{
11103
49
        	            		alt52=1;
11104
        	            	}
11105
49
        	                break;
11106
8
        	            case CHAR_TOK:
11107
        	            	{
11108
8
        	            		alt52=2;
11109
        	            	}
11110
8
        	                break;
11111
89073
        	            case SIMPLE_SYMBOL:
11112
        	            	{
11113
89073
        	            		alt52=3;
11114
        	            	}
11115
89073
        	                break;
11116
11117
        	            default:
11118
        	                CONSTRUCTEX();
11119
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
11120
        	                EXCEPTION->message      = (void *)"";
11121
        	                EXCEPTION->decisionNum  = 52;
11122
        	                EXCEPTION->state        = 0;
11123
11124
11125
        	                goto ruletermAtomicEx;
11126
11127
        	            }
11128
11129
89130
        	            switch (alt52)
11130
        	            {
11131
49
        	        	case 1:
11132
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1731:7: EMP_TOK sortSymbol[type,CHECK_DECLARED] sortSymbol[type2,CHECK_DECLARED]
11133
        	        	    {
11134
49
        	        	         MATCHT(EMP_TOK, &FOLLOW_EMP_TOK_in_termAtomic4286);
11135
49
        	        	        if  (HASEXCEPTION())
11136
        	        	        {
11137
        	        	            goto ruletermAtomicEx;
11138
        	        	        }
11139
11140
11141
49
        	        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_termAtomic4294);
11142
49
        	        	        sortSymbol(ctx, type, CHECK_DECLARED);
11143
11144
49
        	        	        FOLLOWPOP();
11145
49
        	        	        if  (HASEXCEPTION())
11146
        	        	        {
11147
        	        	            goto ruletermAtomicEx;
11148
        	        	        }
11149
11150
11151
49
        	        	        FOLLOWPUSH(FOLLOW_sortSymbol_in_termAtomic4303);
11152
49
        	        	        sortSymbol(ctx, type2, CHECK_DECLARED);
11153
11154
49
        	        	        FOLLOWPOP();
11155
49
        	        	        if  (HASEXCEPTION())
11156
        	        	        {
11157
        	        	            goto ruletermAtomicEx;
11158
        	        	        }
11159
11160
11161
        	        	        {
11162
11163
        	        	                    // Empty heap constant in seperation logic
11164
98
        	        	                    api::Term v1 = SOLVER->mkConst(api::Sort(type), "_emp1");
11165
98
        	        	                    api::Term v2 = SOLVER->mkConst(api::Sort(type2), "_emp2");
11166
49
        	        	                    atomTerm = SOLVER->mkTerm(api::SEP_EMP, v1, v2);
11167
11168
49
        	        	        }
11169
11170
11171
        	        	    }
11172
49
        	        	    break;
11173
8
        	        	case 2:
11174
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1740:7: CHAR_TOK HEX_LITERAL
11175
        	        	    {
11176
8
        	        	         MATCHT(CHAR_TOK, &FOLLOW_CHAR_TOK_in_termAtomic4320);
11177
8
        	        	        if  (HASEXCEPTION())
11178
        	        	        {
11179
        	        	            goto ruletermAtomicEx;
11180
        	        	        }
11181
11182
11183
8
        	        	        HEX_LITERAL13 = (pANTLR3_COMMON_TOKEN) MATCHT(HEX_LITERAL, &FOLLOW_HEX_LITERAL_in_termAtomic4322);
11184
8
        	        	        if  (HASEXCEPTION())
11185
        	        	        {
11186
        	        	            goto ruletermAtomicEx;
11187
        	        	        }
11188
11189
11190
        	        	        {
11191
11192
16
        	        	                    std::string hexStr = AntlrInput::tokenTextSubstr(HEX_LITERAL13, 2);
11193
8
        	        	                    atomTerm = PARSER_STATE->mkCharConstant(hexStr);
11194
11195
8
        	        	        }
11196
11197
11198
        	        	    }
11199
8
        	        	    break;
11200
89073
        	        	case 3:
11201
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1745:7: sym= SIMPLE_SYMBOL nonemptyNumeralList[numerals]
11202
        	        	    {
11203
89073
        	        	        sym = (pANTLR3_COMMON_TOKEN) MATCHT(SIMPLE_SYMBOL, &FOLLOW_SIMPLE_SYMBOL_in_termAtomic4341);
11204
89073
        	        	        if  (HASEXCEPTION())
11205
        	        	        {
11206
        	        	            goto ruletermAtomicEx;
11207
        	        	        }
11208
11209
11210
89073
        	        	        FOLLOWPUSH(FOLLOW_nonemptyNumeralList_in_termAtomic4343);
11211
89073
        	        	        nonemptyNumeralList(ctx, numerals);
11212
11213
89073
        	        	        FOLLOWPOP();
11214
89073
        	        	        if  (HASEXCEPTION())
11215
        	        	        {
11216
        	        	            goto ruletermAtomicEx;
11217
        	        	        }
11218
11219
11220
        	        	        {
11221
11222
89073
        	        	                    atomTerm =
11223
178146
        	        	                      PARSER_STATE->mkIndexedConstant(AntlrInput::tokenText(sym),
11224
        	        	                                                      numerals);
11225
11226
        	        	        }
11227
11228
11229
        	        	    }
11230
89073
        	        	    break;
11231
11232
        	            }
11233
        	        }
11234
11235
89130
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_termAtomic4364);
11236
89130
        	        if  (HASEXCEPTION())
11237
        	        {
11238
        	            goto ruletermAtomicEx;
11239
89130
        	        }
11240
11241
11242
        	    }
11243
89130
        	    break;
11244
4358
        	case 4:
11245
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1755:5: HEX_LITERAL
11246
        	    {
11247
4358
        	        HEX_LITERAL14 = (pANTLR3_COMMON_TOKEN) MATCHT(HEX_LITERAL, &FOLLOW_HEX_LITERAL_in_termAtomic4374);
11248
4358
        	        if  (HASEXCEPTION())
11249
        	        {
11250
        	            goto ruletermAtomicEx;
11251
        	        }
11252
11253
11254
        	        {
11255
11256
4358
        	                  Assert(AntlrInput::tokenText(HEX_LITERAL14).find("#x") == 0);
11257
8716
        	                  std::string hexStr = AntlrInput::tokenTextSubstr(HEX_LITERAL14, 2);
11258
4358
        	                  atomTerm = SOLVER->mkBitVector(hexStr, 16);
11259
11260
4358
        	        }
11261
11262
11263
        	    }
11264
4358
        	    break;
11265
961
        	case 5:
11266
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1761:5: BINARY_LITERAL
11267
        	    {
11268
961
        	        BINARY_LITERAL15 = (pANTLR3_COMMON_TOKEN) MATCHT(BINARY_LITERAL, &FOLLOW_BINARY_LITERAL_in_termAtomic4386);
11269
961
        	        if  (HASEXCEPTION())
11270
        	        {
11271
        	            goto ruletermAtomicEx;
11272
        	        }
11273
11274
11275
        	        {
11276
11277
961
        	                  Assert(AntlrInput::tokenText(BINARY_LITERAL15).find("#b") == 0);
11278
1922
        	                  std::string binStr = AntlrInput::tokenTextSubstr(BINARY_LITERAL15, 2);
11279
961
        	                  atomTerm = SOLVER->mkBitVector(binStr, 2);
11280
11281
961
        	        }
11282
11283
11284
        	    }
11285
961
        	    break;
11286
9014
        	case 6:
11287
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1769:5: str[s,false]
11288
        	    {
11289
9014
        	        FOLLOWPUSH(FOLLOW_str_in_termAtomic4402);
11290
9014
        	        str(ctx, s, false);
11291
11292
9014
        	        FOLLOWPOP();
11293
9014
        	        if  (HASEXCEPTION())
11294
        	        {
11295
        	            goto ruletermAtomicEx;
11296
        	        }
11297
11298
11299
        	        {
11300
9014
        	             atomTerm = PARSER_STATE->mkStringConstant(s);
11301
        	        }
11302
11303
11304
        	    }
11305
9014
        	    break;
11306
5
        	case 7:
11307
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1774:5: TUPLE_CONST_TOK
11308
        	    {
11309
5
        	         MATCHT(TUPLE_CONST_TOK, &FOLLOW_TUPLE_CONST_TOK_in_termAtomic4419);
11310
5
        	        if  (HASEXCEPTION())
11311
        	        {
11312
        	            goto ruletermAtomicEx;
11313
        	        }
11314
11315
11316
        	        {
11317
11318
10
        	                  atomTerm = SOLVER->mkTuple(std::vector<api::Sort>(),
11319
10
        	                                             std::vector<api::Term>());
11320
11321
        	        }
11322
11323
11324
        	    }
11325
5
        	    break;
11326
11327
            }
11328
        }
11329
    }
11330
11331
    // This is where rules clean up and exit
11332
    //
11333
484950
    goto ruletermAtomicEx; /* Prevent compiler warnings */
11334
484950
    ruletermAtomicEx: ;
11335
11336
484950
            if (HASEXCEPTION())
11337
            {
11338
                PREPORTERROR();
11339
                PRECOVER();
11340
            }
11341
969900
    return ;
11342
}
11343
/* $ANTLR end termAtomic */
11344
11345
/**
11346
 * $ANTLR start attribute
11347
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1784:1: attribute[cvc5::api::Term& expr, cvc5::api::Term& retExpr] : ( KEYWORD ( simpleSymbolicExprNoKeyword[s] )? | ( ATTRIBUTE_PATTERN_TOK | ATTRIBUTE_POOL_TOK | ATTRIBUTE_INST_ADD_TO_POOL_TOK | ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK ) LPAREN_TOK ( term[patexpr, e2] )+ RPAREN_TOK | ATTRIBUTE_NO_PATTERN_TOK term[patexpr, e2] |tok= ( ATTRIBUTE_INST_LEVEL ) INTEGER_LITERAL |tok= ( ATTRIBUTE_QUANTIFIER_ID_TOK ) symbolicExpr[sexpr] | ATTRIBUTE_NAMED_TOK symbolicExpr[sexpr] );
11348
 */
11349
static void
11350
8532
attribute(pSmt2Parser ctx, cvc5::api::Term& expr, cvc5::api::Term& retExpr)
11351
{
11352
    pANTLR3_COMMON_TOKEN    tok;
11353
    pANTLR3_COMMON_TOKEN    KEYWORD16;
11354
    pANTLR3_COMMON_TOKEN    INTEGER_LITERAL17;
11355
11356
    /* Initialize rule variables
11357
     */
11358
11359
11360
17064
      api::Term sexpr;
11361
17064
      std::string s;
11362
17064
      cvc5::api::Term patexpr;
11363
17064
      std::vector<cvc5::api::Term> patexprs;
11364
17064
      cvc5::api::Term e2;
11365
8532
      bool hasValue = false;
11366
      api::Kind k;
11367
11368
8532
    tok       = NULL;
11369
8532
    KEYWORD16       = NULL;
11370
8532
    INTEGER_LITERAL17       = NULL;
11371
11372
    {
11373
        {
11374
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1794:3: ( KEYWORD ( simpleSymbolicExprNoKeyword[s] )? | ( ATTRIBUTE_PATTERN_TOK | ATTRIBUTE_POOL_TOK | ATTRIBUTE_INST_ADD_TO_POOL_TOK | ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK ) LPAREN_TOK ( term[patexpr, e2] )+ RPAREN_TOK | ATTRIBUTE_NO_PATTERN_TOK term[patexpr, e2] |tok= ( ATTRIBUTE_INST_LEVEL ) INTEGER_LITERAL |tok= ( ATTRIBUTE_QUANTIFIER_ID_TOK ) symbolicExpr[sexpr] | ATTRIBUTE_NAMED_TOK symbolicExpr[sexpr] )
11375
11376
            ANTLR3_UINT32 alt57;
11377
11378
8532
            alt57=6;
11379
11380
8532
            switch ( LA(1) )
11381
            {
11382
161
            case KEYWORD:
11383
            	{
11384
161
            		alt57=1;
11385
            	}
11386
161
                break;
11387
3479
            case ATTRIBUTE_INST_ADD_TO_POOL_TOK:
11388
            case ATTRIBUTE_PATTERN_TOK:
11389
            case ATTRIBUTE_POOL_TOK:
11390
            case ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK:
11391
            	{
11392
3479
            		alt57=2;
11393
            	}
11394
3479
                break;
11395
8
            case ATTRIBUTE_NO_PATTERN_TOK:
11396
            	{
11397
8
            		alt57=3;
11398
            	}
11399
8
                break;
11400
            case ATTRIBUTE_INST_LEVEL:
11401
            	{
11402
            		alt57=4;
11403
            	}
11404
                break;
11405
211
            case ATTRIBUTE_QUANTIFIER_ID_TOK:
11406
            	{
11407
211
            		alt57=5;
11408
            	}
11409
211
                break;
11410
4673
            case ATTRIBUTE_NAMED_TOK:
11411
            	{
11412
4673
            		alt57=6;
11413
            	}
11414
4673
                break;
11415
11416
            default:
11417
                CONSTRUCTEX();
11418
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
11419
                EXCEPTION->message      = (void *)"";
11420
                EXCEPTION->decisionNum  = 57;
11421
                EXCEPTION->state        = 0;
11422
11423
11424
                goto ruleattributeEx;
11425
11426
            }
11427
11428
8532
            switch (alt57)
11429
            {
11430
161
        	case 1:
11431
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1794:5: KEYWORD ( simpleSymbolicExprNoKeyword[s] )?
11432
        	    {
11433
161
        	        KEYWORD16 = (pANTLR3_COMMON_TOKEN) MATCHT(KEYWORD, &FOLLOW_KEYWORD_in_attribute4446);
11434
161
        	        if  (HASEXCEPTION())
11435
        	        {
11436
        	            goto ruleattributeEx;
11437
        	        }
11438
11439
11440
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1794:13: ( simpleSymbolicExprNoKeyword[s] )?
11441
        	        {
11442
161
        	            int alt54=2;
11443
161
        	            switch ( LA(1) )
11444
        	            {
11445
161
        	                case ASSERT_TOK:
11446
        	                case BINARY_LITERAL:
11447
        	                case CHECK_SAT_ASSUMING_TOK:
11448
        	                case CHECK_SAT_TOK:
11449
        	                case DECIMAL_LITERAL:
11450
        	                case DECLARE_DATATYPES_TOK:
11451
        	                case DECLARE_FUN_TOK:
11452
        	                case DECLARE_SORT_TOK:
11453
        	                case DEFINE_FUNS_REC_TOK:
11454
        	                case DEFINE_FUN_REC_TOK:
11455
        	                case DEFINE_FUN_TOK:
11456
        	                case DEFINE_SORT_TOK:
11457
        	                case ECHO_TOK:
11458
        	                case EXIT_TOK:
11459
        	                case GET_ASSERTIONS_TOK:
11460
        	                case GET_ASSIGNMENT_TOK:
11461
        	                case GET_INFO_TOK:
11462
        	                case GET_MODEL_TOK:
11463
        	                case GET_OPTION_TOK:
11464
        	                case GET_PROOF_TOK:
11465
        	                case GET_UNSAT_ASSUMPTIONS_TOK:
11466
        	                case GET_UNSAT_CORE_TOK:
11467
        	                case GET_VALUE_TOK:
11468
        	                case HEX_LITERAL:
11469
        	                case INTEGER_LITERAL:
11470
        	                case POP_TOK:
11471
        	                case PUSH_TOK:
11472
        	                case QUOTED_SYMBOL:
11473
        	                case RESET_ASSERTIONS_TOK:
11474
        	                case RESET_TOK:
11475
        	                case SET_INFO_TOK:
11476
        	                case SET_LOGIC_TOK:
11477
        	                case SET_OPTION_TOK:
11478
        	                case SIMPLE_SYMBOL:
11479
        	                case SIMPLIFY_TOK:
11480
        	                case STRING_LITERAL:
11481
        	                case UNTERMINATED_QUOTED_SYMBOL:
11482
        	                	{
11483
161
        	                		alt54=1;
11484
        	                	}
11485
161
        	                    break;
11486
        	            }
11487
11488
161
        	            switch (alt54)
11489
        	            {
11490
161
        	        	case 1:
11491
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1794:15: simpleSymbolicExprNoKeyword[s]
11492
        	        	    {
11493
161
        	        	        FOLLOWPUSH(FOLLOW_simpleSymbolicExprNoKeyword_in_attribute4450);
11494
161
        	        	        simpleSymbolicExprNoKeyword(ctx, s);
11495
11496
161
        	        	        FOLLOWPOP();
11497
161
        	        	        if  (HASEXCEPTION())
11498
        	        	        {
11499
        	        	            goto ruleattributeEx;
11500
        	        	        }
11501
11502
11503
        	        	        {
11504
161
        	        	             hasValue = true;
11505
        	        	        }
11506
11507
11508
        	        	    }
11509
161
        	        	    break;
11510
11511
        	            }
11512
        	        }
11513
11514
        	        {
11515
11516
161
        	                PARSER_STATE->attributeNotSupported(AntlrInput::tokenText(KEYWORD16));
11517
11518
        	        }
11519
11520
11521
        	    }
11522
161
        	    break;
11523
3479
        	case 2:
11524
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1798:5: ( ATTRIBUTE_PATTERN_TOK | ATTRIBUTE_POOL_TOK | ATTRIBUTE_INST_ADD_TO_POOL_TOK | ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK ) LPAREN_TOK ( term[patexpr, e2] )+ RPAREN_TOK
11525
        	    {
11526
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1798:5: ( ATTRIBUTE_PATTERN_TOK | ATTRIBUTE_POOL_TOK | ATTRIBUTE_INST_ADD_TO_POOL_TOK | ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK )
11527
        	        {
11528
3479
        	            int alt55=4;
11529
3479
        	            switch ( LA(1) )
11530
        	            {
11531
3467
        	            case ATTRIBUTE_PATTERN_TOK:
11532
        	            	{
11533
3467
        	            		alt55=1;
11534
        	            	}
11535
3467
        	                break;
11536
6
        	            case ATTRIBUTE_POOL_TOK:
11537
        	            	{
11538
6
        	            		alt55=2;
11539
        	            	}
11540
6
        	                break;
11541
        	            case ATTRIBUTE_INST_ADD_TO_POOL_TOK:
11542
        	            	{
11543
        	            		alt55=3;
11544
        	            	}
11545
        	                break;
11546
6
        	            case ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK:
11547
        	            	{
11548
6
        	            		alt55=4;
11549
        	            	}
11550
6
        	                break;
11551
11552
        	            default:
11553
        	                CONSTRUCTEX();
11554
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
11555
        	                EXCEPTION->message      = (void *)"";
11556
        	                EXCEPTION->decisionNum  = 55;
11557
        	                EXCEPTION->state        = 0;
11558
11559
11560
        	                goto ruleattributeEx;
11561
11562
        	            }
11563
11564
3479
        	            switch (alt55)
11565
        	            {
11566
3467
        	        	case 1:
11567
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1798:7: ATTRIBUTE_PATTERN_TOK
11568
        	        	    {
11569
3467
        	        	         MATCHT(ATTRIBUTE_PATTERN_TOK, &FOLLOW_ATTRIBUTE_PATTERN_TOK_in_attribute4468);
11570
3467
        	        	        if  (HASEXCEPTION())
11571
        	        	        {
11572
        	        	            goto ruleattributeEx;
11573
        	        	        }
11574
11575
11576
        	        	        {
11577
3467
        	        	             k = api::INST_PATTERN;
11578
        	        	        }
11579
11580
11581
        	        	    }
11582
3467
        	        	    break;
11583
6
        	        	case 2:
11584
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1799:7: ATTRIBUTE_POOL_TOK
11585
        	        	    {
11586
6
        	        	         MATCHT(ATTRIBUTE_POOL_TOK, &FOLLOW_ATTRIBUTE_POOL_TOK_in_attribute4480);
11587
6
        	        	        if  (HASEXCEPTION())
11588
        	        	        {
11589
        	        	            goto ruleattributeEx;
11590
        	        	        }
11591
11592
11593
        	        	        {
11594
6
        	        	             k = api::INST_POOL;
11595
        	        	        }
11596
11597
11598
        	        	    }
11599
6
        	        	    break;
11600
        	        	case 3:
11601
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1800:7: ATTRIBUTE_INST_ADD_TO_POOL_TOK
11602
        	        	    {
11603
        	        	         MATCHT(ATTRIBUTE_INST_ADD_TO_POOL_TOK, &FOLLOW_ATTRIBUTE_INST_ADD_TO_POOL_TOK_in_attribute4493);
11604
        	        	        if  (HASEXCEPTION())
11605
        	        	        {
11606
        	        	            goto ruleattributeEx;
11607
        	        	        }
11608
11609
11610
        	        	        {
11611
        	        	             k = api::INST_ADD_TO_POOL;
11612
        	        	        }
11613
11614
11615
        	        	    }
11616
        	        	    break;
11617
6
        	        	case 4:
11618
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1801:7: ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK
11619
        	        	    {
11620
6
        	        	         MATCHT(ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK, &FOLLOW_ATTRIBUTE_SKOLEM_ADD_TO_POOL_TOK_in_attribute4506);
11621
6
        	        	        if  (HASEXCEPTION())
11622
        	        	        {
11623
        	        	            goto ruleattributeEx;
11624
        	        	        }
11625
11626
11627
        	        	        {
11628
6
        	        	             k = api::SKOLEM_ADD_TO_POOL;
11629
        	        	        }
11630
11631
11632
        	        	    }
11633
6
        	        	    break;
11634
11635
        	            }
11636
        	        }
11637
11638
3479
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_attribute4520);
11639
3479
        	        if  (HASEXCEPTION())
11640
        	        {
11641
        	            goto ruleattributeEx;
11642
        	        }
11643
11644
11645
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1804:5: ( term[patexpr, e2] )+
11646
        	        {
11647
3479
        	            int cnt56=0;
11648
11649
        	            for (;;)
11650
        	            {
11651
7174
        	                int alt56=2;
11652
7174
        	        	switch ( LA(1) )
11653
        	        	{
11654
3695
        	        	case BINARY_LITERAL:
11655
        	        	case DECIMAL_LITERAL:
11656
        	        	case HEX_LITERAL:
11657
        	        	case INTEGER_LITERAL:
11658
        	        	case LPAREN_TOK:
11659
        	        	case QUOTED_SYMBOL:
11660
        	        	case SIMPLE_SYMBOL:
11661
        	        	case STRING_LITERAL:
11662
        	        	case TUPLE_CONST_TOK:
11663
        	        	case UNTERMINATED_QUOTED_SYMBOL:
11664
        	        		{
11665
3695
        	        			alt56=1;
11666
        	        		}
11667
3695
        	        	    break;
11668
11669
        	        	}
11670
11671
7174
        	        	switch (alt56)
11672
        	        	{
11673
3695
        	        	    case 1:
11674
        	        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1804:7: term[patexpr, e2]
11675
        	        	        {
11676
3695
        	        	            FOLLOWPUSH(FOLLOW_term_in_attribute4528);
11677
3695
        	        	            term(ctx, patexpr, e2);
11678
11679
3695
        	        	            FOLLOWPOP();
11680
3695
        	        	            if  (HASEXCEPTION())
11681
        	        	            {
11682
        	        	                goto ruleattributeEx;
11683
        	        	            }
11684
11685
11686
        	        	            {
11687
3695
        	        	                 patexprs.push_back( patexpr );
11688
        	        	            }
11689
11690
11691
        	        	        }
11692
3695
        	        	        break;
11693
11694
3479
        	        	    default:
11695
11696
3479
        	        		if ( cnt56 >= 1 )
11697
        	        		{
11698
3479
        	        		    goto loop56;
11699
        	        		}
11700
        	        		/* mismatchedSetEx()
11701
        	        		 */
11702
        	        		CONSTRUCTEX();
11703
        	        		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
11704
        	        		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
11705
11706
11707
        	        		goto ruleattributeEx;
11708
        	        	}
11709
3695
        	        	cnt56++;
11710
3695
        	            }
11711
3479
        	            loop56: ;	/* Jump to here if this rule does not match */
11712
        	        }
11713
11714
3479
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_attribute4546);
11715
3479
        	        if  (HASEXCEPTION())
11716
        	        {
11717
        	            goto ruleattributeEx;
11718
        	        }
11719
11720
11721
        	        {
11722
11723
3479
        	                  retExpr = MK_TERM(k, patexprs);
11724
11725
        	        }
11726
11727
11728
        	    }
11729
3479
        	    break;
11730
8
        	case 3:
11731
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1810:5: ATTRIBUTE_NO_PATTERN_TOK term[patexpr, e2]
11732
        	    {
11733
8
        	         MATCHT(ATTRIBUTE_NO_PATTERN_TOK, &FOLLOW_ATTRIBUTE_NO_PATTERN_TOK_in_attribute4558);
11734
8
        	        if  (HASEXCEPTION())
11735
        	        {
11736
        	            goto ruleattributeEx;
11737
        	        }
11738
11739
11740
8
        	        FOLLOWPUSH(FOLLOW_term_in_attribute4560);
11741
8
        	        term(ctx, patexpr, e2);
11742
11743
8
        	        FOLLOWPOP();
11744
8
        	        if  (HASEXCEPTION())
11745
        	        {
11746
        	            goto ruleattributeEx;
11747
        	        }
11748
11749
11750
        	        {
11751
11752
8
        	                  retExpr = MK_TERM(api::INST_NO_PATTERN, patexpr);
11753
11754
        	        }
11755
11756
11757
        	    }
11758
8
        	    break;
11759
        	case 4:
11760
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1814:5: tok= ( ATTRIBUTE_INST_LEVEL ) INTEGER_LITERAL
11761
        	    {
11762
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1814:9: ( ATTRIBUTE_INST_LEVEL )
11763
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1814:11: ATTRIBUTE_INST_LEVEL
11764
        	        {
11765
        	             MATCHT(ATTRIBUTE_INST_LEVEL, &FOLLOW_ATTRIBUTE_INST_LEVEL_in_attribute4577);
11766
        	            if  (HASEXCEPTION())
11767
        	            {
11768
        	                goto ruleattributeEx;
11769
        	            }
11770
11771
11772
        	        }
11773
11774
11775
        	        INTEGER_LITERAL17 = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_attribute4581);
11776
        	        if  (HASEXCEPTION())
11777
        	        {
11778
        	            goto ruleattributeEx;
11779
        	        }
11780
11781
11782
        	        {
11783
11784
        	                  std::stringstream sIntLit;
11785
        	                  sIntLit << INTEGER_LITERAL17;
11786
        	                  api::Term n = SOLVER->mkInteger(sIntLit.str());
11787
        	                  std::vector<api::Term> values;
11788
        	                  values.push_back( n );
11789
        	                  std::string attr_name(AntlrInput::tokenText(tok));
11790
        	                  attr_name.erase( attr_name.begin() );
11791
        	                  api::Sort boolType = SOLVER->getBooleanSort();
11792
        	                  api::Term avar = PARSER_STATE->bindVar(attr_name, boolType);
11793
        	                  retExpr = MK_TERM(api::INST_ATTRIBUTE, avar);
11794
        	                  Command* c = new SetUserAttributeCommand(attr_name, avar, values);
11795
        	                  c->setMuted(true);
11796
        	                  PARSER_STATE->preemptCommand(c);
11797
11798
        	        }
11799
11800
11801
        	    }
11802
        	    break;
11803
211
        	case 5:
11804
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1830:5: tok= ( ATTRIBUTE_QUANTIFIER_ID_TOK ) symbolicExpr[sexpr]
11805
        	    {
11806
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1830:9: ( ATTRIBUTE_QUANTIFIER_ID_TOK )
11807
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1830:11: ATTRIBUTE_QUANTIFIER_ID_TOK
11808
        	        {
11809
211
        	             MATCHT(ATTRIBUTE_QUANTIFIER_ID_TOK, &FOLLOW_ATTRIBUTE_QUANTIFIER_ID_TOK_in_attribute4597);
11810
211
        	            if  (HASEXCEPTION())
11811
        	            {
11812
        	                goto ruleattributeEx;
11813
        	            }
11814
11815
11816
        	        }
11817
11818
11819
211
        	        FOLLOWPUSH(FOLLOW_symbolicExpr_in_attribute4601);
11820
211
        	        symbolicExpr(ctx, sexpr);
11821
11822
211
        	        FOLLOWPOP();
11823
211
        	        if  (HASEXCEPTION())
11824
        	        {
11825
        	            goto ruleattributeEx;
11826
        	        }
11827
11828
11829
        	        {
11830
11831
422
        	                  api::Sort boolType = SOLVER->getBooleanSort();
11832
422
        	                  api::Term avar = SOLVER->mkConst(boolType, sexprToString(sexpr));
11833
211
        	                  retExpr = MK_TERM(api::INST_ATTRIBUTE, avar);
11834
211
        	                  Command* c = new SetUserAttributeCommand("qid", avar);
11835
211
        	                  c->setMuted(true);
11836
211
        	                  PARSER_STATE->preemptCommand(c);
11837
11838
211
        	        }
11839
11840
11841
        	    }
11842
211
        	    break;
11843
4673
        	case 6:
11844
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1839:5: ATTRIBUTE_NAMED_TOK symbolicExpr[sexpr]
11845
        	    {
11846
4673
        	         MATCHT(ATTRIBUTE_NAMED_TOK, &FOLLOW_ATTRIBUTE_NAMED_TOK_in_attribute4614);
11847
4673
        	        if  (HASEXCEPTION())
11848
        	        {
11849
        	            goto ruleattributeEx;
11850
        	        }
11851
11852
11853
4673
        	        FOLLOWPUSH(FOLLOW_symbolicExpr_in_attribute4616);
11854
4673
        	        symbolicExpr(ctx, sexpr);
11855
11856
4673
        	        FOLLOWPOP();
11857
4673
        	        if  (HASEXCEPTION())
11858
        	        {
11859
        	            goto ruleattributeEx;
11860
        	        }
11861
11862
11863
        	        {
11864
11865
        	                  // notify that expression was given a name
11866
4674
        	                  PARSER_STATE->notifyNamedExpression(expr, sexprToString(sexpr));
11867
11868
        	        }
11869
11870
11871
        	    }
11872
4672
        	    break;
11873
11874
            }
11875
        }
11876
    }
11877
11878
    // This is where rules clean up and exit
11879
    //
11880
8531
    goto ruleattributeEx; /* Prevent compiler warnings */
11881
8531
    ruleattributeEx: ;
11882
11883
8531
            if (HASEXCEPTION())
11884
            {
11885
                PREPORTERROR();
11886
                PRECOVER();
11887
            }
11888
17062
    return ;
11889
}
11890
/* $ANTLR end attribute */
11891
11892
/**
11893
 * $ANTLR start termList
11894
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1854:1: termList[std::vector<cvc5::api::Term>& formulas, cvc5::api::Term& expr] : ( term[expr, expr2] )+ ;
11895
 */
11896
static void
11897
3306804
termList(pSmt2Parser ctx, std::vector<cvc5::api::Term>& formulas, cvc5::api::Term& expr)
11898
{
11899
11900
6613608
      cvc5::api::Term expr2;
11901
11902
    /* Initialize rule variables
11903
     */
11904
11905
    {
11906
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1858:3: ( ( term[expr, expr2] )+ )
11907
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1858:5: ( term[expr, expr2] )+
11908
        {
11909
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1858:5: ( term[expr, expr2] )+
11910
            {
11911
3306804
                int cnt58=0;
11912
11913
                for (;;)
11914
                {
11915
10428245
                    int alt58=2;
11916
10428245
            	switch ( LA(1) )
11917
            	{
11918
7121468
            	case BINARY_LITERAL:
11919
            	case DECIMAL_LITERAL:
11920
            	case HEX_LITERAL:
11921
            	case INTEGER_LITERAL:
11922
            	case LPAREN_TOK:
11923
            	case QUOTED_SYMBOL:
11924
            	case SIMPLE_SYMBOL:
11925
            	case STRING_LITERAL:
11926
            	case TUPLE_CONST_TOK:
11927
            	case UNTERMINATED_QUOTED_SYMBOL:
11928
            		{
11929
7121468
            			alt58=1;
11930
            		}
11931
7121468
            	    break;
11932
11933
            	}
11934
11935
10428243
            	switch (alt58)
11936
            	{
11937
7121468
            	    case 1:
11938
            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1858:7: term[expr, expr2]
11939
            	        {
11940
7121468
            	            FOLLOWPUSH(FOLLOW_term_in_termList4648);
11941
7121468
            	            term(ctx, expr, expr2);
11942
11943
7121441
            	            FOLLOWPOP();
11944
7121441
            	            if  (HASEXCEPTION())
11945
            	            {
11946
            	                goto ruletermListEx;
11947
            	            }
11948
11949
11950
            	            {
11951
7121441
            	                 formulas.push_back(expr);
11952
            	            }
11953
11954
11955
            	        }
11956
7121441
            	        break;
11957
11958
3306775
            	    default:
11959
11960
3306775
            		if ( cnt58 >= 1 )
11961
            		{
11962
3306773
            		    goto loop58;
11963
            		}
11964
            		/* mismatchedSetEx()
11965
            		 */
11966
2
            		CONSTRUCTEX();
11967
2
            		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
11968
2
            		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
11969
11970
11971
2
            		goto ruletermListEx;
11972
            	}
11973
7121441
            	cnt58++;
11974
7121441
                }
11975
3306773
                loop58: ;	/* Jump to here if this rule does not match */
11976
            }
11977
11978
        }
11979
11980
    }
11981
11982
    // This is where rules clean up and exit
11983
    //
11984
3306773
    goto ruletermListEx; /* Prevent compiler warnings */
11985
3306775
    ruletermListEx: ;
11986
11987
3306775
            if (HASEXCEPTION())
11988
            {
11989
2
                PREPORTERROR();
11990
                PRECOVER();
11991
            }
11992
6613546
    return ;
11993
}
11994
/* $ANTLR end termList */
11995
11996
/**
11997
 * $ANTLR start str
11998
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1864:1: str[std::string& s, bool fsmtlib] : STRING_LITERAL ;
11999
 */
12000
static void
12001
10035
str(pSmt2Parser ctx, std::string& s, bool fsmtlib)
12002
{
12003
    pANTLR3_COMMON_TOKEN    STRING_LITERAL18;
12004
12005
    /* Initialize rule variables
12006
     */
12007
12008
10035
    STRING_LITERAL18       = NULL;
12009
12010
    {
12011
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1865:3: ( STRING_LITERAL )
12012
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1865:5: STRING_LITERAL
12013
        {
12014
10035
            STRING_LITERAL18 = (pANTLR3_COMMON_TOKEN) MATCHT(STRING_LITERAL, &FOLLOW_STRING_LITERAL_in_str4670);
12015
10035
            if  (HASEXCEPTION())
12016
            {
12017
                goto rulestrEx;
12018
            }
12019
12020
12021
            {
12022
12023
10035
                      s = AntlrInput::tokenText(STRING_LITERAL18);
12024
                      /* strip off the quotes */
12025
10035
                      s = s.substr(1, s.size() - 2);
12026
62259
                      for (size_t i = 0; i < s.size(); i++)
12027
                      {
12028
52224
                        if ((unsigned)s[i] > 127 && !isprint(s[i]))
12029
                        {
12030
                          PARSER_STATE->parseError(
12031
                              "Extended/unprintable characters are not "
12032
                              "part of SMT-LIB, and they must be encoded "
12033
                              "as escape sequences");
12034
                        }
12035
                      }
12036
10035
                      if (fsmtlib || PARSER_STATE->escapeDupDblQuote())
12037
                      {
12038
10035
                        char* p_orig = strdup(s.c_str());
12039
10035
                        char *p = p_orig, *q = p_orig;
12040
114447
                        while (*q != '\0')
12041
                        {
12042
52206
                          if (PARSER_STATE->escapeDupDblQuote() && *q == '"')
12043
                          {
12044
                            // Handle SMT-LIB >=2.5 standard escape '""'.
12045
18
                            ++q;
12046
18
                            Assert(*q == '"');
12047
                          }
12048
52188
                          else if (!PARSER_STATE->escapeDupDblQuote() && *q == '\\')
12049
                          {
12050
                            ++q;
12051
                            // Handle SMT-LIB 2.0 standard escapes '\\' and '\"'.
12052
                            if (*q != '\\' && *q != '"')
12053
                            {
12054
                              Assert(*q != '\0');
12055
                              *p++ = '\\';
12056
                            }
12057
                          }
12058
52206
                          *p++ = *q++;
12059
                        }
12060
10035
                        *p = '\0';
12061
10035
                        s = p_orig;
12062
10035
                        free(p_orig);
12063
                      }
12064
12065
            }
12066
12067
12068
        }
12069
12070
    }
12071
12072
    // This is where rules clean up and exit
12073
    //
12074
10035
    goto rulestrEx; /* Prevent compiler warnings */
12075
10035
    rulestrEx: ;
12076
12077
10035
            if (HASEXCEPTION())
12078
            {
12079
                PREPORTERROR();
12080
                PRECOVER();
12081
            }
12082
10035
    return ;
12083
}
12084
/* $ANTLR end str */
12085
12086
/**
12087
 * $ANTLR start quantOp
12088
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1911:1: quantOp[cvc5::api::Kind& kind] : ( EXISTS_TOK | FORALL_TOK );
12089
 */
12090
static void
12091
27921
quantOp(pSmt2Parser ctx, cvc5::api::Kind& kind)
12092
{
12093
    /* Initialize rule variables
12094
     */
12095
12096
12097
27921
      Debug("parser") << "quant: " << AntlrInput::tokenText(LT(1)) << std::endl;
12098
12099
    {
12100
        {
12101
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1915:3: ( EXISTS_TOK | FORALL_TOK )
12102
12103
            ANTLR3_UINT32 alt59;
12104
12105
27921
            alt59=2;
12106
12107
27921
            switch ( LA(1) )
12108
            {
12109
2035
            case EXISTS_TOK:
12110
            	{
12111
2035
            		alt59=1;
12112
            	}
12113
2035
                break;
12114
25886
            case FORALL_TOK:
12115
            	{
12116
25886
            		alt59=2;
12117
            	}
12118
25886
                break;
12119
12120
            default:
12121
                CONSTRUCTEX();
12122
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
12123
                EXCEPTION->message      = (void *)"";
12124
                EXCEPTION->decisionNum  = 59;
12125
                EXCEPTION->state        = 0;
12126
12127
12128
                goto rulequantOpEx;
12129
12130
            }
12131
12132
27921
            switch (alt59)
12133
            {
12134
2035
        	case 1:
12135
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1915:5: EXISTS_TOK
12136
        	    {
12137
2035
        	         MATCHT(EXISTS_TOK, &FOLLOW_EXISTS_TOK_in_quantOp4695);
12138
2035
        	        if  (HASEXCEPTION())
12139
        	        {
12140
        	            goto rulequantOpEx;
12141
        	        }
12142
12143
12144
        	        {
12145
2035
        	             kind= api::EXISTS;
12146
        	        }
12147
12148
12149
        	    }
12150
2035
        	    break;
12151
25886
        	case 2:
12152
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1916:5: FORALL_TOK
12153
        	    {
12154
25886
        	         MATCHT(FORALL_TOK, &FOLLOW_FORALL_TOK_in_quantOp4706);
12155
25886
        	        if  (HASEXCEPTION())
12156
        	        {
12157
        	            goto rulequantOpEx;
12158
        	        }
12159
12160
12161
        	        {
12162
25886
        	             kind= api::FORALL;
12163
        	        }
12164
12165
12166
        	    }
12167
25886
        	    break;
12168
12169
            }
12170
        }
12171
    }
12172
12173
    // This is where rules clean up and exit
12174
    //
12175
27921
    goto rulequantOpEx; /* Prevent compiler warnings */
12176
27921
    rulequantOpEx: ;
12177
12178
27921
            if (HASEXCEPTION())
12179
            {
12180
                PREPORTERROR();
12181
                PRECOVER();
12182
            }
12183
27921
    return ;
12184
}
12185
/* $ANTLR end quantOp */
12186
12187
/**
12188
 * $ANTLR start functionName
12189
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1923:1: functionName[std::string& name, cvc5::parser::DeclarationCheck check] : symbol[name,check,SYM_VARIABLE] ;
12190
 */
12191
static void
12192
6724286
functionName(pSmt2Parser ctx, std::string& name, cvc5::parser::DeclarationCheck check)
12193
{
12194
    /* Initialize rule variables
12195
     */
12196
12197
    {
12198
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1924:3: ( symbol[name,check,SYM_VARIABLE] )
12199
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1924:5: symbol[name,check,SYM_VARIABLE]
12200
        {
12201
6724286
            FOLLOWPUSH(FOLLOW_symbol_in_functionName4727);
12202
6724286
            symbol(ctx, name, check, SYM_VARIABLE);
12203
12204
6724286
            FOLLOWPOP();
12205
6724286
            if  (HASEXCEPTION())
12206
            {
12207
                goto rulefunctionNameEx;
12208
            }
12209
12210
12211
        }
12212
12213
    }
12214
12215
    // This is where rules clean up and exit
12216
    //
12217
6724286
    goto rulefunctionNameEx; /* Prevent compiler warnings */
12218
6724286
    rulefunctionNameEx: ;
12219
12220
6724286
            if (HASEXCEPTION())
12221
            {
12222
                PREPORTERROR();
12223
                PRECOVER();
12224
            }
12225
6724286
    return ;
12226
}
12227
/* $ANTLR end functionName */
12228
12229
/**
12230
 * $ANTLR start sortList
12231
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1931:1: sortList[std::vector<cvc5::api::Sort>& sorts] : ( sortSymbol[t,CHECK_DECLARED] )* ;
12232
 */
12233
static void
12234
167907
sortList(pSmt2Parser ctx, std::vector<cvc5::api::Sort>& sorts)
12235
{
12236
12237
335814
      cvc5::api::Sort t;
12238
12239
    /* Initialize rule variables
12240
     */
12241
12242
    {
12243
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1935:3: ( ( sortSymbol[t,CHECK_DECLARED] )* )
12244
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1935:5: ( sortSymbol[t,CHECK_DECLARED] )*
12245
        {
12246
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1935:5: ( sortSymbol[t,CHECK_DECLARED] )*
12247
12248
            for (;;)
12249
            {
12250
232001
                int alt60=2;
12251
232001
                switch ( LA(1) )
12252
                {
12253
64095
                case LPAREN_TOK:
12254
                case QUOTED_SYMBOL:
12255
                case SIMPLE_SYMBOL:
12256
                case UNTERMINATED_QUOTED_SYMBOL:
12257
                	{
12258
64095
                		alt60=1;
12259
                	}
12260
64095
                    break;
12261
12262
                }
12263
12264
232001
                switch (alt60)
12265
                {
12266
64095
            	case 1:
12267
            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1935:7: sortSymbol[t,CHECK_DECLARED]
12268
            	    {
12269
64095
            	        FOLLOWPUSH(FOLLOW_sortSymbol_in_sortList4751);
12270
64095
            	        sortSymbol(ctx, t, CHECK_DECLARED);
12271
12272
64094
            	        FOLLOWPOP();
12273
64094
            	        if  (HASEXCEPTION())
12274
            	        {
12275
            	            goto rulesortListEx;
12276
            	        }
12277
12278
12279
            	        {
12280
64094
            	             sorts.push_back(t);
12281
            	        }
12282
12283
12284
            	    }
12285
64094
            	    break;
12286
12287
167906
            	default:
12288
167906
            	    goto loop60;	/* break out of the loop */
12289
            	    break;
12290
                }
12291
64094
            }
12292
167906
            loop60: ; /* Jump out to here if this rule does not match */
12293
12294
12295
        }
12296
12297
    }
12298
12299
    // This is where rules clean up and exit
12300
    //
12301
167906
    goto rulesortListEx; /* Prevent compiler warnings */
12302
167906
    rulesortListEx: ;
12303
12304
167906
            if (HASEXCEPTION())
12305
            {
12306
                PREPORTERROR();
12307
                PRECOVER();
12308
            }
12309
335812
    return ;
12310
}
12311
/* $ANTLR end sortList */
12312
12313
/**
12314
 * $ANTLR start nonemptySortList
12315
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1938:1: nonemptySortList[std::vector<cvc5::api::Sort>& sorts] : ( sortSymbol[t,CHECK_DECLARED] )+ ;
12316
 */
12317
static void
12318
4
nonemptySortList(pSmt2Parser ctx, std::vector<cvc5::api::Sort>& sorts)
12319
{
12320
12321
8
      cvc5::api::Sort t;
12322
12323
    /* Initialize rule variables
12324
     */
12325
12326
    {
12327
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1942:3: ( ( sortSymbol[t,CHECK_DECLARED] )+ )
12328
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1942:5: ( sortSymbol[t,CHECK_DECLARED] )+
12329
        {
12330
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1942:5: ( sortSymbol[t,CHECK_DECLARED] )+
12331
            {
12332
4
                int cnt61=0;
12333
12334
                for (;;)
12335
                {
12336
8
                    int alt61=2;
12337
8
            	switch ( LA(1) )
12338
            	{
12339
4
            	case LPAREN_TOK:
12340
            	case QUOTED_SYMBOL:
12341
            	case SIMPLE_SYMBOL:
12342
            	case UNTERMINATED_QUOTED_SYMBOL:
12343
            		{
12344
4
            			alt61=1;
12345
            		}
12346
4
            	    break;
12347
12348
            	}
12349
12350
8
            	switch (alt61)
12351
            	{
12352
4
            	    case 1:
12353
            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1942:7: sortSymbol[t,CHECK_DECLARED]
12354
            	        {
12355
4
            	            FOLLOWPUSH(FOLLOW_sortSymbol_in_nonemptySortList4778);
12356
4
            	            sortSymbol(ctx, t, CHECK_DECLARED);
12357
12358
4
            	            FOLLOWPOP();
12359
4
            	            if  (HASEXCEPTION())
12360
            	            {
12361
            	                goto rulenonemptySortListEx;
12362
            	            }
12363
12364
12365
            	            {
12366
4
            	                 sorts.push_back(t);
12367
            	            }
12368
12369
12370
            	        }
12371
4
            	        break;
12372
12373
4
            	    default:
12374
12375
4
            		if ( cnt61 >= 1 )
12376
            		{
12377
4
            		    goto loop61;
12378
            		}
12379
            		/* mismatchedSetEx()
12380
            		 */
12381
            		CONSTRUCTEX();
12382
            		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
12383
            		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
12384
12385
12386
            		goto rulenonemptySortListEx;
12387
            	}
12388
4
            	cnt61++;
12389
4
                }
12390
4
                loop61: ;	/* Jump to here if this rule does not match */
12391
            }
12392
12393
        }
12394
12395
    }
12396
12397
    // This is where rules clean up and exit
12398
    //
12399
4
    goto rulenonemptySortListEx; /* Prevent compiler warnings */
12400
4
    rulenonemptySortListEx: ;
12401
12402
4
            if (HASEXCEPTION())
12403
            {
12404
                PREPORTERROR();
12405
                PRECOVER();
12406
            }
12407
8
    return ;
12408
}
12409
/* $ANTLR end nonemptySortList */
12410
12411
/**
12412
 * $ANTLR start sortedVarList
12413
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1949:1: sortedVarList[std::vector<std::pair<std::string, cvc5::api::Sort> >& sortedVars] : ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] RPAREN_TOK )* ;
12414
 */
12415
static void
12416
30393
sortedVarList(pSmt2Parser ctx, std::vector<std::pair<std::string, cvc5::api::Sort> >& sortedVars)
12417
{
12418
12419
60786
      std::string name;
12420
60786
      cvc5::api::Sort t;
12421
12422
    /* Initialize rule variables
12423
     */
12424
12425
    {
12426
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1954:3: ( ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] RPAREN_TOK )* )
12427
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1954:5: ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] RPAREN_TOK )*
12428
        {
12429
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1954:5: ( LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] RPAREN_TOK )*
12430
12431
            for (;;)
12432
            {
12433
84078
                int alt62=2;
12434
84078
                switch ( LA(1) )
12435
                {
12436
53686
                case LPAREN_TOK:
12437
                	{
12438
53686
                		alt62=1;
12439
                	}
12440
53686
                    break;
12441
12442
                }
12443
12444
84078
                switch (alt62)
12445
                {
12446
53686
            	case 1:
12447
            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1954:7: LPAREN_TOK symbol[name,CHECK_NONE,SYM_VARIABLE] sortSymbol[t,CHECK_DECLARED] RPAREN_TOK
12448
            	    {
12449
53686
            	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sortedVarList4807);
12450
53686
            	        if  (HASEXCEPTION())
12451
            	        {
12452
            	            goto rulesortedVarListEx;
12453
            	        }
12454
12455
12456
53686
            	        FOLLOWPUSH(FOLLOW_symbol_in_sortedVarList4809);
12457
53686
            	        symbol(ctx, name, CHECK_NONE, SYM_VARIABLE);
12458
12459
53686
            	        FOLLOWPOP();
12460
53686
            	        if  (HASEXCEPTION())
12461
            	        {
12462
            	            goto rulesortedVarListEx;
12463
            	        }
12464
12465
12466
53686
            	        FOLLOWPUSH(FOLLOW_sortSymbol_in_sortedVarList4818);
12467
53686
            	        sortSymbol(ctx, t, CHECK_DECLARED);
12468
12469
53685
            	        FOLLOWPOP();
12470
53685
            	        if  (HASEXCEPTION())
12471
            	        {
12472
            	            goto rulesortedVarListEx;
12473
            	        }
12474
12475
12476
53685
            	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sortedVarList4821);
12477
53685
            	        if  (HASEXCEPTION())
12478
            	        {
12479
            	            goto rulesortedVarListEx;
12480
            	        }
12481
12482
12483
            	        {
12484
53685
            	             sortedVars.push_back(make_pair(name, t));
12485
            	        }
12486
12487
12488
            	    }
12489
53685
            	    break;
12490
12491
30392
            	default:
12492
30392
            	    goto loop62;	/* break out of the loop */
12493
            	    break;
12494
                }
12495
53685
            }
12496
30392
            loop62: ; /* Jump out to here if this rule does not match */
12497
12498
12499
        }
12500
12501
    }
12502
12503
    // This is where rules clean up and exit
12504
    //
12505
30392
    goto rulesortedVarListEx; /* Prevent compiler warnings */
12506
30392
    rulesortedVarListEx: ;
12507
12508
30392
            if (HASEXCEPTION())
12509
            {
12510
                PREPORTERROR();
12511
                PRECOVER();
12512
            }
12513
60784
    return ;
12514
}
12515
/* $ANTLR end sortedVarList */
12516
12517
/**
12518
 * $ANTLR start boundVarList
12519
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1964:1: boundVarList[cvc5::api::Term& expr] : LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK ;
12520
 */
12521
static void
12522
27968
boundVarList(pSmt2Parser ctx, cvc5::api::Term& expr)
12523
{
12524
12525
55936
      std::vector<std::pair<std::string, cvc5::api::Sort>> sortedVarNames;
12526
12527
    /* Initialize rule variables
12528
     */
12529
12530
    {
12531
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1968:2: ( LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK )
12532
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1968:4: LPAREN_TOK sortedVarList[sortedVarNames] RPAREN_TOK
12533
        {
12534
27968
             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_boundVarList4856);
12535
27968
            if  (HASEXCEPTION())
12536
            {
12537
                goto ruleboundVarListEx;
12538
            }
12539
12540
12541
27968
            FOLLOWPUSH(FOLLOW_sortedVarList_in_boundVarList4858);
12542
27968
            sortedVarList(ctx, sortedVarNames);
12543
12544
27967
            FOLLOWPOP();
12545
27967
            if  (HASEXCEPTION())
12546
            {
12547
                goto ruleboundVarListEx;
12548
            }
12549
12550
12551
27967
             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_boundVarList4861);
12552
27967
            if  (HASEXCEPTION())
12553
            {
12554
                goto ruleboundVarListEx;
12555
            }
12556
12557
12558
            {
12559
12560
                     std::vector<cvc5::api::Term> args =
12561
55934
                         PARSER_STATE->bindBoundVars(sortedVarNames);
12562
27967
                     expr = MK_TERM(api::BOUND_VAR_LIST, args);
12563
12564
            }
12565
12566
12567
        }
12568
12569
    }
12570
12571
    // This is where rules clean up and exit
12572
    //
12573
27967
    goto ruleboundVarListEx; /* Prevent compiler warnings */
12574
27967
    ruleboundVarListEx: ;
12575
12576
27967
            if (HASEXCEPTION())
12577
            {
12578
                PREPORTERROR();
12579
                PRECOVER();
12580
            }
12581
55934
    return ;
12582
}
12583
/* $ANTLR end boundVarList */
12584
12585
/**
12586
 * $ANTLR start sortName
12587
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1980:1: sortName[std::string& name, cvc5::parser::DeclarationCheck check] : symbol[name,check,SYM_SORT] ;
12588
 */
12589
static void
12590
268231
sortName(pSmt2Parser ctx, std::string& name, cvc5::parser::DeclarationCheck check)
12591
{
12592
    /* Initialize rule variables
12593
     */
12594
12595
    {
12596
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1981:3: ( symbol[name,check,SYM_SORT] )
12597
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1981:5: symbol[name,check,SYM_SORT]
12598
        {
12599
268231
            FOLLOWPUSH(FOLLOW_symbol_in_sortName4881);
12600
268231
            symbol(ctx, name, check, SYM_SORT);
12601
12602
268231
            FOLLOWPOP();
12603
268231
            if  (HASEXCEPTION())
12604
            {
12605
                goto rulesortNameEx;
12606
            }
12607
12608
12609
        }
12610
12611
    }
12612
12613
    // This is where rules clean up and exit
12614
    //
12615
268231
    goto rulesortNameEx; /* Prevent compiler warnings */
12616
268231
    rulesortNameEx: ;
12617
12618
268231
            if (HASEXCEPTION())
12619
            {
12620
                PREPORTERROR();
12621
                PRECOVER();
12622
            }
12623
268231
    return ;
12624
}
12625
/* $ANTLR end sortName */
12626
12627
/**
12628
 * $ANTLR start sortSymbol
12629
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1984:1: sortSymbol[cvc5::api::Sort& t, cvc5::parser::DeclarationCheck check] : ( sortName[name,CHECK_NONE] | LPAREN_TOK ( INDEX_TOK |) symbol[name,CHECK_NONE,SYM_SORT] ( nonemptyNumeralList[numerals] | sortList[args] ) RPAREN_TOK | LPAREN_TOK HO_ARROW_TOK sortList[args] RPAREN_TOK );
12630
 */
12631
static void
12632
289759
sortSymbol(pSmt2Parser ctx, cvc5::api::Sort& t, cvc5::parser::DeclarationCheck check)
12633
{
12634
12635
579518
      std::string name;
12636
579518
      std::vector<cvc5::api::Sort> args;
12637
579518
      std::vector<uint64_t> numerals;
12638
289759
      bool indexed = false;
12639
12640
    /* Initialize rule variables
12641
     */
12642
12643
    {
12644
        {
12645
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1991:3: ( sortName[name,CHECK_NONE] | LPAREN_TOK ( INDEX_TOK |) symbol[name,CHECK_NONE,SYM_SORT] ( nonemptyNumeralList[numerals] | sortList[args] ) RPAREN_TOK | LPAREN_TOK HO_ARROW_TOK sortList[args] RPAREN_TOK )
12646
12647
            ANTLR3_UINT32 alt65;
12648
12649
289759
            alt65=3;
12650
12651
289759
            switch ( LA(1) )
12652
            {
12653
268231
            case QUOTED_SYMBOL:
12654
            case SIMPLE_SYMBOL:
12655
            case UNTERMINATED_QUOTED_SYMBOL:
12656
            	{
12657
268231
            		alt65=1;
12658
            	}
12659
268231
                break;
12660
21528
            case LPAREN_TOK:
12661
            	{
12662
21528
            		switch ( LA(2) )
12663
            		{
12664
941
            		case HO_ARROW_TOK:
12665
            			{
12666
941
            				alt65=3;
12667
            			}
12668
941
            		    break;
12669
20587
            		case INDEX_TOK:
12670
            		case QUOTED_SYMBOL:
12671
            		case SIMPLE_SYMBOL:
12672
            		case UNTERMINATED_QUOTED_SYMBOL:
12673
            			{
12674
20587
            				alt65=2;
12675
            			}
12676
20587
            		    break;
12677
12678
            		default:
12679
            		    CONSTRUCTEX();
12680
            		    EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
12681
            		    EXCEPTION->message      = (void *)"";
12682
            		    EXCEPTION->decisionNum  = 65;
12683
            		    EXCEPTION->state        = 4;
12684
12685
12686
            		    goto rulesortSymbolEx;
12687
12688
            		}
12689
12690
            	}
12691
21528
                break;
12692
12693
            default:
12694
                CONSTRUCTEX();
12695
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
12696
                EXCEPTION->message      = (void *)"";
12697
                EXCEPTION->decisionNum  = 65;
12698
                EXCEPTION->state        = 0;
12699
12700
12701
                goto rulesortSymbolEx;
12702
12703
            }
12704
12705
289759
            switch (alt65)
12706
            {
12707
268231
        	case 1:
12708
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1991:5: sortName[name,CHECK_NONE]
12709
        	    {
12710
268231
        	        FOLLOWPUSH(FOLLOW_sortName_in_sortSymbol4901);
12711
268231
        	        sortName(ctx, name, CHECK_NONE);
12712
12713
268231
        	        FOLLOWPOP();
12714
268231
        	        if  (HASEXCEPTION())
12715
        	        {
12716
        	            goto rulesortSymbolEx;
12717
        	        }
12718
12719
12720
        	        {
12721
12722
268231
        	                  if(check == CHECK_DECLARED || PARSER_STATE->isDeclared(name, SYM_SORT)) {
12723
268231
        	                    t = PARSER_STATE->getSort(name);
12724
        	                  } else {
12725
        	                    t = PARSER_STATE->mkUnresolvedType(name);
12726
        	                  }
12727
12728
        	        }
12729
12730
12731
        	    }
12732
268230
        	    break;
12733
20587
        	case 2:
12734
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1999:5: LPAREN_TOK ( INDEX_TOK |) symbol[name,CHECK_NONE,SYM_SORT] ( nonemptyNumeralList[numerals] | sortList[args] ) RPAREN_TOK
12735
        	    {
12736
20587
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sortSymbol4914);
12737
20587
        	        if  (HASEXCEPTION())
12738
        	        {
12739
        	            goto rulesortSymbolEx;
12740
        	        }
12741
12742
12743
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1999:16: ( INDEX_TOK |)
12744
        	        {
12745
20587
        	            int alt63=2;
12746
20587
        	            switch ( LA(1) )
12747
        	            {
12748
16525
        	            case INDEX_TOK:
12749
        	            	{
12750
16525
        	            		alt63=1;
12751
        	            	}
12752
16525
        	                break;
12753
4062
        	            case QUOTED_SYMBOL:
12754
        	            case SIMPLE_SYMBOL:
12755
        	            case UNTERMINATED_QUOTED_SYMBOL:
12756
        	            	{
12757
4062
        	            		alt63=2;
12758
        	            	}
12759
4062
        	                break;
12760
12761
        	            default:
12762
        	                CONSTRUCTEX();
12763
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
12764
        	                EXCEPTION->message      = (void *)"";
12765
        	                EXCEPTION->decisionNum  = 63;
12766
        	                EXCEPTION->state        = 0;
12767
12768
12769
        	                goto rulesortSymbolEx;
12770
12771
        	            }
12772
12773
20587
        	            switch (alt63)
12774
        	            {
12775
16525
        	        	case 1:
12776
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1999:17: INDEX_TOK
12777
        	        	    {
12778
16525
        	        	         MATCHT(INDEX_TOK, &FOLLOW_INDEX_TOK_in_sortSymbol4917);
12779
16525
        	        	        if  (HASEXCEPTION())
12780
        	        	        {
12781
        	        	            goto rulesortSymbolEx;
12782
        	        	        }
12783
12784
12785
        	        	        {
12786
16525
        	        	            indexed = true;
12787
        	        	        }
12788
12789
12790
        	        	    }
12791
16525
        	        	    break;
12792
4062
        	        	case 2:
12793
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:1999:47:
12794
        	        	    {
12795
        	        	        {
12796
4062
        	        	            indexed = false;
12797
        	        	        }
12798
12799
12800
        	        	    }
12801
4062
        	        	    break;
12802
12803
        	            }
12804
        	        }
12805
12806
20587
        	        FOLLOWPUSH(FOLLOW_symbol_in_sortSymbol4930);
12807
20587
        	        symbol(ctx, name, CHECK_NONE, SYM_SORT);
12808
12809
20587
        	        FOLLOWPOP();
12810
20587
        	        if  (HASEXCEPTION())
12811
        	        {
12812
        	            goto rulesortSymbolEx;
12813
        	        }
12814
12815
12816
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2001:5: ( nonemptyNumeralList[numerals] | sortList[args] )
12817
        	        {
12818
20587
        	            int alt64=2;
12819
20587
        	            switch ( LA(1) )
12820
        	            {
12821
16525
        	            case INTEGER_LITERAL:
12822
        	            	{
12823
16525
        	            		alt64=1;
12824
        	            	}
12825
16525
        	                break;
12826
4062
        	            case LPAREN_TOK:
12827
        	            case QUOTED_SYMBOL:
12828
        	            case RPAREN_TOK:
12829
        	            case SIMPLE_SYMBOL:
12830
        	            case UNTERMINATED_QUOTED_SYMBOL:
12831
        	            	{
12832
4062
        	            		alt64=2;
12833
        	            	}
12834
4062
        	                break;
12835
12836
        	            default:
12837
        	                CONSTRUCTEX();
12838
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
12839
        	                EXCEPTION->message      = (void *)"";
12840
        	                EXCEPTION->decisionNum  = 64;
12841
        	                EXCEPTION->state        = 0;
12842
12843
12844
        	                goto rulesortSymbolEx;
12845
12846
        	            }
12847
12848
20587
        	            switch (alt64)
12849
        	            {
12850
16525
        	        	case 1:
12851
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2001:7: nonemptyNumeralList[numerals]
12852
        	        	    {
12853
16525
        	        	        FOLLOWPUSH(FOLLOW_nonemptyNumeralList_in_sortSymbol4939);
12854
16525
        	        	        nonemptyNumeralList(ctx, numerals);
12855
12856
16525
        	        	        FOLLOWPOP();
12857
16525
        	        	        if  (HASEXCEPTION())
12858
        	        	        {
12859
        	        	            goto rulesortSymbolEx;
12860
        	        	        }
12861
12862
12863
        	        	        {
12864
12865
16525
        	        	                    if (!indexed)
12866
        	        	                    {
12867
        	        	                      std::stringstream ss;
12868
        	        	                      ss << "SMT-LIB requires use of an indexed sort here, e.g. (_ " << name
12869
        	        	                         << " ...)";
12870
        	        	                      PARSER_STATE->parseError(ss.str());
12871
        	        	                    }
12872
16525
        	        	                    if( name == "BitVec" ) {
12873
16382
        	        	                      if( numerals.size() != 1 ) {
12874
        	        	                        PARSER_STATE->parseError("Illegal bitvector type.");
12875
        	        	                      }
12876
16382
        	        	                      if(numerals.front() == 0) {
12877
        	        	                        PARSER_STATE->parseError("Illegal bitvector size: 0");
12878
        	        	                      }
12879
16382
        	        	                      t = SOLVER->mkBitVectorSort(numerals.front());
12880
143
        	        	                    } else if ( name == "FloatingPoint" ) {
12881
143
        	        	                      if( numerals.size() != 2 ) {
12882
        	        	                        PARSER_STATE->parseError("Illegal floating-point type.");
12883
        	        	                      }
12884
143
        	        	                      if(!validExponentSize(numerals[0])) {
12885
        	        	                        PARSER_STATE->parseError("Illegal floating-point exponent size");
12886
        	        	                      }
12887
143
        	        	                      if(!validSignificandSize(numerals[1])) {
12888
        	        	                        PARSER_STATE->parseError("Illegal floating-point significand size");
12889
        	        	                      }
12890
143
        	        	                      t = SOLVER->mkFloatingPointSort(numerals[0],numerals[1]);
12891
        	        	                    } else {
12892
        	        	                      std::stringstream ss;
12893
        	        	                      ss << "unknown indexed sort symbol `" << name << "'";
12894
        	        	                      PARSER_STATE->parseError(ss.str());
12895
        	        	                    }
12896
12897
        	        	        }
12898
12899
12900
        	        	    }
12901
16525
        	        	    break;
12902
4062
        	        	case 2:
12903
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2035:7: sortList[args]
12904
        	        	    {
12905
4062
        	        	        FOLLOWPUSH(FOLLOW_sortList_in_sortSymbol4956);
12906
4062
        	        	        sortList(ctx, args);
12907
12908
4062
        	        	        FOLLOWPOP();
12909
4062
        	        	        if  (HASEXCEPTION())
12910
        	        	        {
12911
        	        	            goto rulesortSymbolEx;
12912
        	        	        }
12913
12914
12915
        	        	        {
12916
4062
        	        	             if( indexed ) {
12917
        	        	                      std::stringstream ss;
12918
        	        	                      ss << "Unexpected use of indexing operator `_' before `" << name
12919
        	        	                         << "', try leaving it out";
12920
        	        	                      PARSER_STATE->parseError(ss.str());
12921
        	        	                    }
12922
4062
        	        	                    if(args.empty()) {
12923
        	        	                      PARSER_STATE->parseError("Extra parentheses around sort name not "
12924
        	        	                                               "permitted in SMT-LIB");
12925
6264
        	        	                    } else if(name == "Array" &&
12926
2202
        	        	                       PARSER_STATE->isTheoryEnabled(theory::THEORY_ARRAYS) ) {
12927
2200
        	        	                      if(args.size() != 2) {
12928
        	        	                        PARSER_STATE->parseError("Illegal array type.");
12929
        	        	                      }
12930
2200
        	        	                      t = SOLVER->mkArraySort( args[0], args[1] );
12931
2913
        	        	                    } else if(name == "Set" &&
12932
1051
        	        	                              PARSER_STATE->isTheoryEnabled(theory::THEORY_SETS) ) {
12933
979
        	        	                      if(args.size() != 1) {
12934
        	        	                        PARSER_STATE->parseError("Illegal set type.");
12935
        	        	                      }
12936
979
        	        	                      t = SOLVER->mkSetSort( args[0] );
12937
        	        	                    }
12938
965
        	        	                    else if(name == "Bag" &&
12939
82
        	        	                              PARSER_STATE->isTheoryEnabled(theory::THEORY_BAGS) ) {
12940
82
        	        	                      if(args.size() != 1) {
12941
        	        	                        PARSER_STATE->parseError("Illegal bag type.");
12942
        	        	                      }
12943
82
        	        	                      t = SOLVER->mkBagSort( args[0] );
12944
        	        	                    }
12945
1017
        	        	                    else if(name == "Seq" && !PARSER_STATE->strictModeEnabled() &&
12946
216
        	        	                              PARSER_STATE->isTheoryEnabled(theory::THEORY_STRINGS) ) {
12947
216
        	        	                      if(args.size() != 1) {
12948
        	        	                        PARSER_STATE->parseError("Illegal sequence type.");
12949
        	        	                      }
12950
216
        	        	                      t = SOLVER->mkSequenceSort( args[0] );
12951
585
        	        	                    } else if (name == "Tuple" && !PARSER_STATE->strictModeEnabled()) {
12952
36
        	        	                      t = SOLVER->mkTupleSort(args);
12953
571
        	        	                    } else if(check == CHECK_DECLARED ||
12954
22
        	        	                              PARSER_STATE->isDeclared(name, SYM_SORT)) {
12955
549
        	        	                      t = PARSER_STATE->getSort(name, args);
12956
        	        	                    } else {
12957
        	        	                      // make unresolved type
12958
        	        	                      if(args.empty()) {
12959
        	        	                        t = PARSER_STATE->mkUnresolvedType(name);
12960
        	        	                        Debug("parser-param") << "param: make unres type " << name
12961
        	        	                                              << std::endl;
12962
        	        	                      } else {
12963
        	        	                        t = PARSER_STATE->mkUnresolvedTypeConstructor(name,args);
12964
        	        	                        t = t.instantiate( args );
12965
        	        	                        Debug("parser-param")
12966
        	        	                            << "param: make unres param type " << name << " " << args.size()
12967
        	        	                            << " " << PARSER_STATE->getArity( name ) << std::endl;
12968
        	        	                      }
12969
        	        	                    }
12970
12971
        	        	        }
12972
12973
12974
        	        	    }
12975
4060
        	        	    break;
12976
12977
        	            }
12978
        	        }
12979
12980
20585
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sortSymbol4973);
12981
20585
        	        if  (HASEXCEPTION())
12982
        	        {
12983
        	            goto rulesortSymbolEx;
12984
20585
        	        }
12985
12986
12987
        	    }
12988
20585
        	    break;
12989
941
        	case 3:
12990
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2092:5: LPAREN_TOK HO_ARROW_TOK sortList[args] RPAREN_TOK
12991
        	    {
12992
941
        	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_sortSymbol4979);
12993
941
        	        if  (HASEXCEPTION())
12994
        	        {
12995
        	            goto rulesortSymbolEx;
12996
        	        }
12997
12998
12999
941
        	         MATCHT(HO_ARROW_TOK, &FOLLOW_HO_ARROW_TOK_in_sortSymbol4981);
13000
941
        	        if  (HASEXCEPTION())
13001
        	        {
13002
        	            goto rulesortSymbolEx;
13003
        	        }
13004
13005
13006
941
        	        FOLLOWPUSH(FOLLOW_sortList_in_sortSymbol4983);
13007
941
        	        sortList(ctx, args);
13008
13009
941
        	        FOLLOWPOP();
13010
941
        	        if  (HASEXCEPTION())
13011
        	        {
13012
        	            goto rulesortSymbolEx;
13013
        	        }
13014
13015
13016
941
        	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_sortSymbol4986);
13017
941
        	        if  (HASEXCEPTION())
13018
        	        {
13019
        	            goto rulesortSymbolEx;
13020
        	        }
13021
13022
13023
        	        {
13024
13025
941
        	                  if(args.size()<2) {
13026
        	                    PARSER_STATE->parseError("Arrow types must have at least 2 arguments");
13027
        	                  }
13028
        	                  //flatten the type
13029
1882
        	                  api::Sort rangeType = args.back();
13030
941
        	                  args.pop_back();
13031
941
        	                  t = PARSER_STATE->mkFlatFunctionType( args, rangeType );
13032
13033
941
        	        }
13034
13035
13036
        	    }
13037
941
        	    break;
13038
13039
            }
13040
        }
13041
    }
13042
13043
    // This is where rules clean up and exit
13044
    //
13045
289756
    goto rulesortSymbolEx; /* Prevent compiler warnings */
13046
289756
    rulesortSymbolEx: ;
13047
13048
289756
            if (HASEXCEPTION())
13049
            {
13050
                PREPORTERROR();
13051
                PRECOVER();
13052
            }
13053
579512
    return ;
13054
}
13055
/* $ANTLR end sortSymbol */
13056
13057
/**
13058
 * $ANTLR start symbolList
13059
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2108:1: symbolList[std::vector<std::string>& names,\n cvc5::parser::DeclarationCheck check,\n cvc5::parser::SymbolType type] : ( symbol[id,check,type] )* ;
13060
 */
13061
static void
13062
206
symbolList(pSmt2Parser ctx, std::vector<std::string>& names, cvc5::parser::DeclarationCheck check, cvc5::parser::SymbolType type)
13063
{
13064
13065
412
      std::string id;
13066
13067
    /* Initialize rule variables
13068
     */
13069
13070
    {
13071
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2114:3: ( ( symbol[id,check,type] )* )
13072
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2114:5: ( symbol[id,check,type] )*
13073
        {
13074
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2114:5: ( symbol[id,check,type] )*
13075
13076
            for (;;)
13077
            {
13078
208
                int alt66=2;
13079
208
                switch ( LA(1) )
13080
                {
13081
2
                case QUOTED_SYMBOL:
13082
                case SIMPLE_SYMBOL:
13083
                case UNTERMINATED_QUOTED_SYMBOL:
13084
                	{
13085
2
                		alt66=1;
13086
                	}
13087
2
                    break;
13088
13089
                }
13090
13091
208
                switch (alt66)
13092
                {
13093
2
            	case 1:
13094
            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2114:7: symbol[id,check,type]
13095
            	    {
13096
2
            	        FOLLOWPUSH(FOLLOW_symbol_in_symbolList5015);
13097
2
            	        symbol(ctx, id, check, type);
13098
13099
2
            	        FOLLOWPOP();
13100
2
            	        if  (HASEXCEPTION())
13101
            	        {
13102
            	            goto rulesymbolListEx;
13103
            	        }
13104
13105
13106
            	        {
13107
2
            	             names.push_back(id);
13108
            	        }
13109
13110
13111
            	    }
13112
2
            	    break;
13113
13114
206
            	default:
13115
206
            	    goto loop66;	/* break out of the loop */
13116
            	    break;
13117
                }
13118
2
            }
13119
206
            loop66: ; /* Jump out to here if this rule does not match */
13120
13121
13122
        }
13123
13124
    }
13125
13126
    // This is where rules clean up and exit
13127
    //
13128
206
    goto rulesymbolListEx; /* Prevent compiler warnings */
13129
206
    rulesymbolListEx: ;
13130
13131
206
            if (HASEXCEPTION())
13132
            {
13133
                PREPORTERROR();
13134
                PRECOVER();
13135
            }
13136
412
    return ;
13137
}
13138
/* $ANTLR end symbolList */
13139
13140
/**
13141
 * $ANTLR start symbol
13142
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2123:1: symbol[std::string& id,\n cvc5::parser::DeclarationCheck check,\n cvc5::parser::SymbolType type] : ( SIMPLE_SYMBOL | QUOTED_SYMBOL | UNTERMINATED_QUOTED_SYMBOL ( EOF | '\\\\' ) );
13143
 */
13144
static void
13145
7347450
symbol(pSmt2Parser ctx, std::string& id, cvc5::parser::DeclarationCheck check, cvc5::parser::SymbolType type)
13146
{
13147
    pANTLR3_COMMON_TOKEN    SIMPLE_SYMBOL19;
13148
    pANTLR3_COMMON_TOKEN    QUOTED_SYMBOL20;
13149
13150
    /* Initialize rule variables
13151
     */
13152
13153
7347450
    SIMPLE_SYMBOL19       = NULL;
13154
7347450
    QUOTED_SYMBOL20       = NULL;
13155
13156
    {
13157
        {
13158
            //  /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2126:3: ( SIMPLE_SYMBOL | QUOTED_SYMBOL | UNTERMINATED_QUOTED_SYMBOL ( EOF | '\\\\' ) )
13159
13160
            ANTLR3_UINT32 alt68;
13161
13162
7347450
            alt68=3;
13163
13164
7347450
            switch ( LA(1) )
13165
            {
13166
7344041
            case SIMPLE_SYMBOL:
13167
            	{
13168
7344041
            		alt68=1;
13169
            	}
13170
7344041
                break;
13171
3409
            case QUOTED_SYMBOL:
13172
            	{
13173
3409
            		alt68=2;
13174
            	}
13175
3409
                break;
13176
            case UNTERMINATED_QUOTED_SYMBOL:
13177
            	{
13178
            		alt68=3;
13179
            	}
13180
                break;
13181
13182
            default:
13183
                CONSTRUCTEX();
13184
                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
13185
                EXCEPTION->message      = (void *)"";
13186
                EXCEPTION->decisionNum  = 68;
13187
                EXCEPTION->state        = 0;
13188
13189
13190
                goto rulesymbolEx;
13191
13192
            }
13193
13194
7347450
            switch (alt68)
13195
            {
13196
7344041
        	case 1:
13197
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2126:5: SIMPLE_SYMBOL
13198
        	    {
13199
7344041
        	        SIMPLE_SYMBOL19 = (pANTLR3_COMMON_TOKEN) MATCHT(SIMPLE_SYMBOL, &FOLLOW_SIMPLE_SYMBOL_in_symbol5037);
13200
7344041
        	        if  (HASEXCEPTION())
13201
        	        {
13202
        	            goto rulesymbolEx;
13203
        	        }
13204
13205
13206
        	        {
13207
7344041
        	             id = AntlrInput::tokenText(SIMPLE_SYMBOL19);
13208
7344041
        	                  if(!PARSER_STATE->isAbstractValue(id)) {
13209
        	                    // if an abstract value, SmtEngine handles declaration
13210
7344031
        	                    PARSER_STATE->checkDeclaration(id, check, type);
13211
        	                  }
13212
13213
        	        }
13214
13215
13216
        	    }
13217
7344039
        	    break;
13218
3409
        	case 2:
13219
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2133:5: QUOTED_SYMBOL
13220
        	    {
13221
3409
        	        QUOTED_SYMBOL20 = (pANTLR3_COMMON_TOKEN) MATCHT(QUOTED_SYMBOL, &FOLLOW_QUOTED_SYMBOL_in_symbol5049);
13222
3409
        	        if  (HASEXCEPTION())
13223
        	        {
13224
        	            goto rulesymbolEx;
13225
        	        }
13226
13227
13228
        	        {
13229
3409
        	             id = AntlrInput::tokenText(QUOTED_SYMBOL20);
13230
        	                  /* strip off the quotes */
13231
3409
        	                  id = id.substr(1, id.size() - 2);
13232
3409
        	                  if(!PARSER_STATE->isAbstractValue(id)) {
13233
        	                    // if an abstract value, SmtEngine handles declaration
13234
3409
        	                    PARSER_STATE->checkDeclaration(id, check, type);
13235
        	                  }
13236
13237
        	        }
13238
13239
13240
        	    }
13241
3409
        	    break;
13242
        	case 3:
13243
        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2142:5: UNTERMINATED_QUOTED_SYMBOL ( EOF | '\\\\' )
13244
        	    {
13245
        	         MATCHT(UNTERMINATED_QUOTED_SYMBOL, &FOLLOW_UNTERMINATED_QUOTED_SYMBOL_in_symbol5061);
13246
        	        if  (HASEXCEPTION())
13247
        	        {
13248
        	            goto rulesymbolEx;
13249
        	        }
13250
13251
13252
        	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2143:5: ( EOF | '\\\\' )
13253
        	        {
13254
        	            int alt67=2;
13255
        	            switch ( LA(1) )
13256
        	            {
13257
        	            case EOF:
13258
        	            	{
13259
        	            		alt67=1;
13260
        	            	}
13261
        	                break;
13262
        	            case 108:
13263
        	            	{
13264
        	            		alt67=2;
13265
        	            	}
13266
        	                break;
13267
13268
        	            default:
13269
        	                CONSTRUCTEX();
13270
        	                EXCEPTION->type         = ANTLR3_NO_VIABLE_ALT_EXCEPTION;
13271
        	                EXCEPTION->message      = (void *)"";
13272
        	                EXCEPTION->decisionNum  = 67;
13273
        	                EXCEPTION->state        = 0;
13274
13275
13276
        	                goto rulesymbolEx;
13277
13278
        	            }
13279
13280
        	            switch (alt67)
13281
        	            {
13282
        	        	case 1:
13283
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2143:7: EOF
13284
        	        	    {
13285
        	        	         MATCHT(EOF, &FOLLOW_EOF_in_symbol5069);
13286
        	        	        if  (HASEXCEPTION())
13287
        	        	        {
13288
        	        	            goto rulesymbolEx;
13289
        	        	        }
13290
13291
13292
        	        	        {
13293
        	        	             PARSER_STATE->unexpectedEOF("unterminated |quoted| symbol");
13294
        	        	        }
13295
13296
13297
        	        	    }
13298
        	        	    break;
13299
        	        	case 2:
13300
        	        	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2145:7: '\\\\'
13301
        	        	    {
13302
        	        	         MATCHT(108, &FOLLOW_108_in_symbol5085);
13303
        	        	        if  (HASEXCEPTION())
13304
        	        	        {
13305
        	        	            goto rulesymbolEx;
13306
        	        	        }
13307
13308
13309
        	        	        {
13310
        	        	             PARSER_STATE->unexpectedEOF("backslash not permitted in |quoted| "
13311
        	        	                                                "symbol");
13312
        	        	        }
13313
13314
13315
        	        	    }
13316
        	        	    break;
13317
13318
        	            }
13319
        	        }
13320
13321
        	    }
13322
        	    break;
13323
13324
            }
13325
        }
13326
    }
13327
13328
    // This is where rules clean up and exit
13329
    //
13330
7347448
    goto rulesymbolEx; /* Prevent compiler warnings */
13331
7347448
    rulesymbolEx: ;
13332
13333
7347448
            if (HASEXCEPTION())
13334
            {
13335
                PREPORTERROR();
13336
                PRECOVER();
13337
            }
13338
7347448
    return ;
13339
}
13340
/* $ANTLR end symbol */
13341
13342
/**
13343
 * $ANTLR start nonemptyNumeralList
13344
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2155:1: nonemptyNumeralList[std::vector<uint64_t>& numerals] : ( INTEGER_LITERAL )+ ;
13345
 */
13346
static void
13347
182022
nonemptyNumeralList(pSmt2Parser ctx, std::vector<uint64_t>& numerals)
13348
{
13349
    pANTLR3_COMMON_TOKEN    INTEGER_LITERAL21;
13350
13351
    /* Initialize rule variables
13352
     */
13353
13354
182022
    INTEGER_LITERAL21       = NULL;
13355
13356
    {
13357
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2156:3: ( ( INTEGER_LITERAL )+ )
13358
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2156:5: ( INTEGER_LITERAL )+
13359
        {
13360
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2156:5: ( INTEGER_LITERAL )+
13361
            {
13362
182022
                int cnt69=0;
13363
13364
                for (;;)
13365
                {
13366
376454
                    int alt69=2;
13367
376454
            	switch ( LA(1) )
13368
            	{
13369
194432
            	case INTEGER_LITERAL:
13370
            		{
13371
194432
            			alt69=1;
13372
            		}
13373
194432
            	    break;
13374
13375
            	}
13376
13377
376454
            	switch (alt69)
13378
            	{
13379
194432
            	    case 1:
13380
            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2156:7: INTEGER_LITERAL
13381
            	        {
13382
194432
            	            INTEGER_LITERAL21 = (pANTLR3_COMMON_TOKEN) MATCHT(INTEGER_LITERAL, &FOLLOW_INTEGER_LITERAL_in_nonemptyNumeralList5117);
13383
194432
            	            if  (HASEXCEPTION())
13384
            	            {
13385
            	                goto rulenonemptyNumeralListEx;
13386
            	            }
13387
13388
13389
            	            {
13390
194432
            	                 numerals.push_back(AntlrInput::tokenToUnsigned(INTEGER_LITERAL21));
13391
            	            }
13392
13393
13394
            	        }
13395
194432
            	        break;
13396
13397
182022
            	    default:
13398
13399
182022
            		if ( cnt69 >= 1 )
13400
            		{
13401
182022
            		    goto loop69;
13402
            		}
13403
            		/* mismatchedSetEx()
13404
            		 */
13405
            		CONSTRUCTEX();
13406
            		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
13407
            		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
13408
13409
13410
            		goto rulenonemptyNumeralListEx;
13411
            	}
13412
194432
            	cnt69++;
13413
194432
                }
13414
182022
                loop69: ;	/* Jump to here if this rule does not match */
13415
            }
13416
13417
        }
13418
13419
    }
13420
13421
    // This is where rules clean up and exit
13422
    //
13423
182022
    goto rulenonemptyNumeralListEx; /* Prevent compiler warnings */
13424
182022
    rulenonemptyNumeralListEx: ;
13425
13426
182022
            if (HASEXCEPTION())
13427
            {
13428
                PREPORTERROR();
13429
                PRECOVER();
13430
            }
13431
182022
    return ;
13432
}
13433
/* $ANTLR end nonemptyNumeralList */
13434
13435
/**
13436
 * $ANTLR start datatypeDef
13437
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2164:1: datatypeDef[bool isCo, std::vector<cvc5::api::DatatypeDecl>& datatypes,\n std::vector< cvc5::api::Sort >& params] : symbol[id,CHECK_NONE,SYM_SORT] ( LPAREN_TOK constructorDef[datatypes.back()] RPAREN_TOK )+ ;
13438
 */
13439
static void
13440
datatypeDef(pSmt2Parser ctx, bool isCo, std::vector<cvc5::api::DatatypeDecl>& datatypes, std::vector< cvc5::api::Sort >& params)
13441
{
13442
    /* Initialize rule variables
13443
     */
13444
13445
13446
      std::string id;
13447
13448
    {
13449
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2173:3: ( symbol[id,CHECK_NONE,SYM_SORT] ( LPAREN_TOK constructorDef[datatypes.back()] RPAREN_TOK )+ )
13450
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2173:5: symbol[id,CHECK_NONE,SYM_SORT] ( LPAREN_TOK constructorDef[datatypes.back()] RPAREN_TOK )+
13451
        {
13452
            FOLLOWPUSH(FOLLOW_symbol_in_datatypeDef5159);
13453
            symbol(ctx, id, CHECK_NONE, SYM_SORT);
13454
13455
            FOLLOWPOP();
13456
            if  (HASEXCEPTION())
13457
            {
13458
                goto ruledatatypeDefEx;
13459
            }
13460
13461
13462
            {
13463
                 PARSER_STATE->pushScope();
13464
            }
13465
13466
13467
            {
13468
13469
                      datatypes.push_back(SOLVER->mkDatatypeDecl(id, params, isCo));
13470
13471
            }
13472
13473
13474
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2177:5: ( LPAREN_TOK constructorDef[datatypes.back()] RPAREN_TOK )+
13475
            {
13476
                int cnt70=0;
13477
13478
                for (;;)
13479
                {
13480
                    int alt70=2;
13481
            	switch ( LA(1) )
13482
            	{
13483
            	case LPAREN_TOK:
13484
            		{
13485
            			alt70=1;
13486
            		}
13487
            	    break;
13488
13489
            	}
13490
13491
            	switch (alt70)
13492
            	{
13493
            	    case 1:
13494
            	        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2177:7: LPAREN_TOK constructorDef[datatypes.back()] RPAREN_TOK
13495
            	        {
13496
            	             MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_datatypeDef5176);
13497
            	            if  (HASEXCEPTION())
13498
            	            {
13499
            	                goto ruledatatypeDefEx;
13500
            	            }
13501
13502
13503
            	            FOLLOWPUSH(FOLLOW_constructorDef_in_datatypeDef5178);
13504
            	            constructorDef(ctx, datatypes.back());
13505
13506
            	            FOLLOWPOP();
13507
            	            if  (HASEXCEPTION())
13508
            	            {
13509
            	                goto ruledatatypeDefEx;
13510
            	            }
13511
13512
13513
            	             MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_datatypeDef5181);
13514
            	            if  (HASEXCEPTION())
13515
            	            {
13516
            	                goto ruledatatypeDefEx;
13517
            	            }
13518
13519
13520
            	        }
13521
            	        break;
13522
13523
            	    default:
13524
13525
            		if ( cnt70 >= 1 )
13526
            		{
13527
            		    goto loop70;
13528
            		}
13529
            		/* mismatchedSetEx()
13530
            		 */
13531
            		CONSTRUCTEX();
13532
            		EXCEPTION->type = ANTLR3_EARLY_EXIT_EXCEPTION;
13533
            		EXCEPTION->name = (void *)ANTLR3_EARLY_EXIT_NAME;
13534
13535
13536
            		goto ruledatatypeDefEx;
13537
            	}
13538
            	cnt70++;
13539
                }
13540
                loop70: ;	/* Jump to here if this rule does not match */
13541
            }
13542
13543
            {
13544
                 PARSER_STATE->popScope();
13545
            }
13546
13547
13548
        }
13549
13550
    }
13551
13552
    // This is where rules clean up and exit
13553
    //
13554
    goto ruledatatypeDefEx; /* Prevent compiler warnings */
13555
    ruledatatypeDefEx: ;
13556
13557
            if (HASEXCEPTION())
13558
            {
13559
                PREPORTERROR();
13560
                PRECOVER();
13561
            }
13562
    return ;
13563
}
13564
/* $ANTLR end datatypeDef */
13565
13566
/**
13567
 * $ANTLR start constructorDef
13568
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2184:1: constructorDef[cvc5::api::DatatypeDecl& type] : symbol[id,CHECK_NONE,SYM_VARIABLE] ( LPAREN_TOK selector[*ctor] RPAREN_TOK )* ;
13569
 */
13570
static void
13571
2169
constructorDef(pSmt2Parser ctx, cvc5::api::DatatypeDecl& type)
13572
{
13573
    /* Initialize rule variables
13574
     */
13575
13576
13577
4338
      std::string id;
13578
2169
      cvc5::api::DatatypeConstructorDecl* ctor = NULL;
13579
13580
    {
13581
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2189:3: ( symbol[id,CHECK_NONE,SYM_VARIABLE] ( LPAREN_TOK selector[*ctor] RPAREN_TOK )* )
13582
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2189:5: symbol[id,CHECK_NONE,SYM_VARIABLE] ( LPAREN_TOK selector[*ctor] RPAREN_TOK )*
13583
        {
13584
2169
            FOLLOWPUSH(FOLLOW_symbol_in_constructorDef5211);
13585
2169
            symbol(ctx, id, CHECK_NONE, SYM_VARIABLE);
13586
13587
2169
            FOLLOWPOP();
13588
2169
            if  (HASEXCEPTION())
13589
            {
13590
                goto ruleconstructorDefEx;
13591
            }
13592
13593
13594
            {
13595
13596
2169
                      ctor = new api::DatatypeConstructorDecl(
13597
2169
                          SOLVER->mkDatatypeConstructorDecl(id));
13598
13599
            }
13600
13601
13602
            // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2194:5: ( LPAREN_TOK selector[*ctor] RPAREN_TOK )*
13603
13604
            for (;;)
13605
            {
13606
4538
                int alt71=2;
13607
4538
                switch ( LA(1) )
13608
                {
13609
2369
                case LPAREN_TOK:
13610
                	{
13611
2369
                		alt71=1;
13612
                	}
13613
2369
                    break;
13614
13615
                }
13616
13617
4538
                switch (alt71)
13618
                {
13619
2369
            	case 1:
13620
            	    // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2194:7: LPAREN_TOK selector[*ctor] RPAREN_TOK
13621
            	    {
13622
2369
            	         MATCHT(LPAREN_TOK, &FOLLOW_LPAREN_TOK_in_constructorDef5226);
13623
2369
            	        if  (HASEXCEPTION())
13624
            	        {
13625
            	            goto ruleconstructorDefEx;
13626
            	        }
13627
13628
13629
2369
            	        FOLLOWPUSH(FOLLOW_selector_in_constructorDef5228);
13630
2369
            	        selector(ctx, *ctor);
13631
13632
2369
            	        FOLLOWPOP();
13633
2369
            	        if  (HASEXCEPTION())
13634
            	        {
13635
            	            goto ruleconstructorDefEx;
13636
            	        }
13637
13638
13639
2369
            	         MATCHT(RPAREN_TOK, &FOLLOW_RPAREN_TOK_in_constructorDef5231);
13640
2369
            	        if  (HASEXCEPTION())
13641
            	        {
13642
            	            goto ruleconstructorDefEx;
13643
            	        }
13644
13645
13646
            	    }
13647
2369
            	    break;
13648
13649
2169
            	default:
13650
2169
            	    goto loop71;	/* break out of the loop */
13651
            	    break;
13652
                }
13653
2369
            }
13654
2169
            loop71: ; /* Jump out to here if this rule does not match */
13655
13656
13657
            {
13658
                 // make the constructor
13659
2169
                      type.addConstructor(*ctor);
13660
2169
                      Debug("parser-idt") << "constructor: " << id.c_str() << std::endl;
13661
2169
                      delete ctor;
13662
13663
            }
13664
13665
13666
        }
13667
13668
    }
13669
13670
    // This is where rules clean up and exit
13671
    //
13672
2169
    goto ruleconstructorDefEx; /* Prevent compiler warnings */
13673
2169
    ruleconstructorDefEx: ;
13674
13675
2169
            if (HASEXCEPTION())
13676
            {
13677
                PREPORTERROR();
13678
                PRECOVER();
13679
            }
13680
4338
    return ;
13681
}
13682
/* $ANTLR end constructorDef */
13683
13684
/**
13685
 * $ANTLR start selector
13686
 * /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2202:1: selector[cvc5::api::DatatypeConstructorDecl& ctor] : symbol[id,CHECK_NONE,SYM_SORT] sortSymbol[t,CHECK_NONE] ;
13687
 */
13688
static void
13689
2369
selector(pSmt2Parser ctx, cvc5::api::DatatypeConstructorDecl& ctor)
13690
{
13691
    /* Initialize rule variables
13692
     */
13693
13694
13695
4738
      std::string id;
13696
4738
      cvc5::api::Sort t, t2;
13697
13698
    {
13699
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2207:3: ( symbol[id,CHECK_NONE,SYM_SORT] sortSymbol[t,CHECK_NONE] )
13700
        // /barrett/scratch/cvc4-nightly/src/cvc5-2021-08-20/src/parser/smt2/Smt2.g:2207:5: symbol[id,CHECK_NONE,SYM_SORT] sortSymbol[t,CHECK_NONE]
13701
        {
13702
2369
            FOLLOWPUSH(FOLLOW_symbol_in_selector5259);
13703
2369
            symbol(ctx, id, CHECK_NONE, SYM_SORT);
13704
13705
2369
            FOLLOWPOP();
13706
2369
            if  (HASEXCEPTION())
13707
            {
13708
                goto ruleselectorEx;
13709
            }
13710
13711
13712
2369
            FOLLOWPUSH(FOLLOW_sortSymbol_in_selector5262);
13713
2369
            sortSymbol(ctx, t, CHECK_NONE);
13714
13715
2369
            FOLLOWPOP();
13716
2369
            if  (HASEXCEPTION())
13717
            {
13718
                goto ruleselectorEx;
13719
            }
13720
13721
13722
            {
13723
13724
2369
                      ctor.addSelector(id, t);
13725
4738
                      Debug("parser-idt") << "selector: " << id.c_str()
13726
2369
                                          << " of type " << t << std::endl;
13727
13728
            }
13729
13730
13731
        }
13732
13733
    }
13734
13735
    // This is where rules clean up and exit
13736
    //
13737
2369
    goto ruleselectorEx; /* Prevent compiler warnings */
13738
2369
    ruleselectorEx: ;
13739
13740
2369
            if (HASEXCEPTION())
13741
            {
13742
                PREPORTERROR();
13743
                PRECOVER();
13744
            }
13745
4738
    return ;
13746
29343
}
13747
/* $ANTLR end selector */
13748
/* End of parsing rules
13749
 * ==============================================
13750
 */
13751
13752
/* ==============================================
13753
 * Syntactic predicates
13754
 */
13755
/* End of syntactic predicates
13756
 * ==============================================
13757
 */
13758
13759
13760
13761
13762
13763
13764
/* End of code
13765
 * =============================================================================
13766
 */