summaryrefslogtreecommitdiffstats
path: root/languages/ada/AdaParser.h
blob: 9ceb8811995ca3b754e8730cf3d5192758ea1154 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
#ifndef INC_AdaParser_h_
#define INC_AdaParser_h_

#line 29 "ada.g"

#include <antlr/SemanticException.h>  // antlr wants this
#include "AdaAST.h"
#include "preambles.h"

#line 11 "AdaParser.h"
#include <antlr/config.h>
/* $ANTLR 2.7.7 (20070609): "ada.g" -> "AdaParser.h"$ */
#include <antlr/TokenStream.h>
#include <antlr/TokenBuffer.h>
#include "AdaTokenTypes.h"
#include <antlr/LLkParser.h>

class CUSTOM_API AdaParser : public ANTLR_USE_NAMESPACE(antlr)LLkParser, public AdaTokenTypes
{
#line 53 "ada.g"

  ANTLR_PARSER_PREAMBLE

public:
  // Ada support stuff
  void push_def_id (const RefAdaAST& defid);
  const RefAdaAST& pop_def_id ();
  bool end_id_matches_def_id (const RefAdaAST& endid);
  bool definable_operator (const char *string);  // operator_symbol sans "/="
  bool is_operator_symbol (const char *string);
#line 22 "AdaParser.h"
public:
	void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory );
protected:
	AdaParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf, int k);
public:
	AdaParser(ANTLR_USE_NAMESPACE(antlr)TokenBuffer& tokenBuf);
protected:
	AdaParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer, int k);
public:
	AdaParser(ANTLR_USE_NAMESPACE(antlr)TokenStream& lexer);
	AdaParser(const ANTLR_USE_NAMESPACE(antlr)ParserSharedInputState& state);
	int getNumTokens() const
	{
		return AdaParser::NUM_TOKENS;
	}
	const char* getTokenName( int type ) const
	{
		if( type > getNumTokens() ) return 0;
		return AdaParser::tokenNames[type];
	}
	const char* const* getTokenNames() const
	{
		return AdaParser::tokenNames;
	}
	public: void compilation_unit();
	public: void context_items_opt();
	public: void library_item();
	public: void subunit();
	public: void pragma();
	public: void pragma_args_opt();
	public: void pragma_arg();
	public: void expression();
	public: void with_clause();
	public: void use_clause();
	public: void c_name_list();
	public: void compound_name();
	public: void subtype_mark();
	public: void attribute_id();
	public: void private_opt();
	public: void lib_pkg_spec_or_body();
	public: void subprog_decl_or_rename_or_inst_or_body(
		boolean lib_level
	);
	public: void generic_decl(
		boolean lib_level
	);
	public: void def_id(
		boolean lib_level
	);
	public: void pkg_body_part();
	public: void spec_decl_part(
		RefAdaAST pkg
	);
	public: void subprog_decl(
		boolean lib_level
	);
	public: void generic_subp_inst();
	public: void formal_part_opt();
	public: void renames();
	public: void is_separate_or_abstract_or_decl(
		RefAdaAST t
	);
	public: void def_designator(
		boolean lib_level
	);
	public: void function_tail();
	public: void generic_inst();
	public: void value_s();
	public: void parenth_values();
	public: void value();
	public: void ranged_expr_s();
	public: void ranged_expr();
	public: void simple_expression();
	public: void range();
	public: void range_constraint();
	public: void range_dots();
	public: void range_attrib_ref();
	public: void prefix();
	public: void parameter_specification();
	public: void def_ids_colon();
	public: void mode_opt();
	public: void init_opt();
	public: void defining_identifier_list();
	public: void name();
	public: RefAdaAST  definable_operator_symbol();
	public: RefAdaAST  is_operator();
	public: void parenthesized_primary();
	public: void extension_opt();
	public: void separate_or_abstract(
		RefAdaAST t
	);
	public: RefAdaAST  designator();
	public: void func_formal_part_opt();
	public: void func_param();
	public: void in_access_opt();
	public: void pkg_spec_part();
	public: void basic_declarative_items_opt();
	public: void private_declarative_items_opt();
	public: void end_id_opt();
	public: void basic_decl_item();
	public: void basic_declarative_items();
	public: void task_type_or_single_decl(
		RefAdaAST tsk
	);
	public: void prot_type_or_single_decl(
		RefAdaAST pro
	);
	public: void decl_common();
	public: void discrim_part_opt();
	public: void task_definition_opt();
	public: void task_items_opt();
	public: void private_task_items_opt();
	public: void discrim_part_text();
	public: void discriminant_specifications();
	public: void known_discrim_part();
	public: void empty_discrim_opt();
	public: void discrim_part();
	public: void discriminant_specification();
	public: void access_opt();
	public: void entrydecls_repspecs_opt();
	public: void entry_declaration();
	public: void rep_spec();
	public: void discrete_subtype_def_opt();
	public: void discrete_subtype_definition();
	public: void subtype_ind();
	public: void rep_spec_part(
		RefAdaAST t
	);
	public: void align_opt();
	public: void comp_loc_s();
	public: void protected_definition();
	public: void prot_private_opt();
	public: void prot_op_decl();
	public: void comp_decl();
	public: void prot_op_decl_s();
	public: void prot_member_decl_s();
	public: void component_subtype_def();
	public: void type_def(
		RefAdaAST t
	);
	public: void derived_or_private_or_record(
		RefAdaAST t, boolean has_discrim
	);
	public: void local_enum_name();
	public: void enumeration_aggregate();
	public: void aliased_constant_opt();
	public: void array_type_definition(
		RefAdaAST t
	);
	public: void enum_id_s();
	public: void range_constraint_opt();
	public: void access_type_definition(
		RefAdaAST t
	);
	public: void enumeration_literal_specification();
	public: void index_or_discrete_range_s();
	public: void index_or_discrete_range();
	public: void aliased_opt();
	public: void constraint_opt();
	public: void digits_constraint();
	public: void delta_constraint();
	public: void index_constraint();
	public: void discriminant_constraint();
	public: void discrete_range();
	public: void discriminant_association();
	public: void selector_names_opt();
	public: void association_head();
	public: void selector_name();
	public: void protected_opt();
	public: void constant_all_opt();
	public: void abstract_opt();
	public: void record_definition(
		boolean has_discrim
	);
	public: void abstract_tagged_limited_opt();
	public: void component_list(
		boolean has_discrim
	);
	public: void component_items();
	public: void variant_part();
	public: void empty_component_items();
	public: void discriminant_direct_name();
	public: void variant_s();
	public: void variant();
	public: void choice_s();
	public: void choice();
	public: void discrete_with_range();
	public: void mark_with_constraint();
	public: void generic_formal_part_opt();
	public: void generic_formal_parameter();
	public: void discriminable_type_definition(
		RefAdaAST t
	);
	public: void subprogram_default_opt();
	public: void formal_package_actual_part_opt();
	public: void body_part();
	public: void declarative_part();
	public: void block_body();
	public: void declarative_item();
	public: void body_is();
	public: void separate();
	public: void prot_op_bodies_opt();
	public: void block_body_opt();
	public: void handled_stmt_s();
	public: void entry_body();
	public: void subprog_decl_or_body();
	public: void statements();
	public: void except_handler_part_opt();
	public: void handled_stmts_opt();
	public: void statement();
	public: void def_label_opt();
	public: void null_stmt();
	public: void exit_stmt();
	public: void return_stmt();
	public: void goto_stmt();
	public: void delay_stmt();
	public: void abort_stmt();
	public: void raise_stmt();
	public: void requeue_stmt();
	public: void accept_stmt();
	public: void select_stmt();
	public: void if_stmt();
	public: void case_stmt();
	public: void loop_stmt();
	public: void block();
	public: void statement_identifier();
	public: void id_opt();
	public: void call_or_assignment();
	public: void cond_clause();
	public: void elsifs_opt();
	public: void else_opt();
	public: void condition();
	public: void alternative_s();
	public: void case_statement_alternative();
	public: void iteration_scheme_opt();
	public: void reverse_opt();
	public: void id_opt_aux();
	public: void declare_opt();
	public: void label_name();
	public: void entry_body_formal_part();
	public: void entry_barrier();
	public: void entry_index_spec_opt();
	public: void entry_call_stmt();
	public: void entry_index_opt();
	public: void until_opt();
	public: void triggering_alternative();
	public: void abortable_part();
	public: void selective_accept();
	public: void entry_call_alternative();
	public: void delay_alternative();
	public: void stmts_opt();
	public: void guard_opt();
	public: void select_alternative();
	public: void or_select_opt();
	public: void accept_alternative();
	public: void exception_handler();
	public: void identifier_colon_opt();
	public: void except_choice_s();
	public: void exception_choice();
	public: void operator_call();
	public: void operator_call_tail(
		RefAdaAST opstr
	);
	public: void relation();
	public: void range_or_mark();
	public: void signed_term();
	public: void term();
	public: void factor();
	public: void primary();
	public: void name_or_qualified();
	public: void allocator();
	public: void subprogram_body();
	public: void package_body();
	public: void task_body();
	public: void protected_body();
public:
	ANTLR_USE_NAMESPACE(antlr)RefAST getAST()
	{
		return ANTLR_USE_NAMESPACE(antlr)RefAST(returnAST);
	}
	
protected:
	RefAdaAST returnAST;
private:
	static const char* tokenNames[];
#ifndef NO_STATIC_CONSTS
	static const int NUM_TOKENS = 290;
#else
	enum {
		NUM_TOKENS = 290
	};
#endif
	
	static const unsigned long _tokenSet_0_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0;
	static const unsigned long _tokenSet_1_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1;
	static const unsigned long _tokenSet_2_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_2;
	static const unsigned long _tokenSet_3_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_3;
	static const unsigned long _tokenSet_4_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_4;
	static const unsigned long _tokenSet_5_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_5;
	static const unsigned long _tokenSet_6_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_6;
	static const unsigned long _tokenSet_7_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_7;
	static const unsigned long _tokenSet_8_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_8;
	static const unsigned long _tokenSet_9_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_9;
	static const unsigned long _tokenSet_10_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_10;
	static const unsigned long _tokenSet_11_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_11;
	static const unsigned long _tokenSet_12_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_12;
	static const unsigned long _tokenSet_13_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_13;
	static const unsigned long _tokenSet_14_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_14;
	static const unsigned long _tokenSet_15_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_15;
	static const unsigned long _tokenSet_16_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_16;
	static const unsigned long _tokenSet_17_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_17;
	static const unsigned long _tokenSet_18_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_18;
	static const unsigned long _tokenSet_19_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_19;
	static const unsigned long _tokenSet_20_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_20;
	static const unsigned long _tokenSet_21_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_21;
	static const unsigned long _tokenSet_22_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_22;
	static const unsigned long _tokenSet_23_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_23;
	static const unsigned long _tokenSet_24_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_24;
	static const unsigned long _tokenSet_25_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_25;
	static const unsigned long _tokenSet_26_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_26;
	static const unsigned long _tokenSet_27_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_27;
	static const unsigned long _tokenSet_28_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_28;
	static const unsigned long _tokenSet_29_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_29;
	static const unsigned long _tokenSet_30_data_[];
	static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_30;
};

#endif /*INC_AdaParser_h_*/