1 /* syntactical analysis of VHDL
2
3 Copyright (C) 1994-1999 University of Dortmund
4 Department of Electrical Engineering, AG SIV
5
6 VAUL is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Library General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 License, or (at your option) any later version.
10
11 VAUL is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General
14 Public License for more details.
15
16 You should have received a copy of the GNU Library General Public
17 License along with VAUL; see the file COPYING.LIB. If not, write
18 to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 Boston, MA 02111-1307 USA.
20
21 */
22
23 #ifndef FREEHDL_PARSER_H
24 #define FREEHDL_PARSER_H
25
26 #include <freehdl/vaul-chunk.h>
27 #include <freehdl/vaul-errors.h>
28 #include <freehdl/vaul-lexer.h>
29 #include <freehdl/vaul-printer.h>
30 #include <freehdl/vaul-dynarray.h>
31 #include <freehdl/vaul-pool.h>
32
33 VAUL_ObjectClass vaul_get_class (tree_base_node *);
34 pIIR_Type vaul_get_type (tree_base_node *);
35 pIIR_Type vaul_get_base (tree_base_node *);
36 IR_Mode vaul_get_mode (tree_base_node *);
37
38 struct vaul_design_unit;
39
40 struct vaul_error_printer : vaul_printer {
41
42 vaul_error_printer ();
~vaul_error_printervaul_error_printer43 virtual ~vaul_error_printer () {};
44
45 void info (const char *fmt, ...);
46 void error(const char *fmt, ...);
47 // %n: nNode
48 // %C: vaul_lexer *, lexer Kontext
49 // %:: nPosNode, Node Position
50 // %*: vaul_lexer *, lexer Position
51 // rest wie printf
52
53 virtual void vinfo (const char *fmt, va_list ap);
54 int n_errors;
55 FILE *log;
56 };
57
58 struct vaul_parser;
59
60 struct vaul_decl_set {
61
62 vaul_decl_set (vaul_parser *);
63 ~vaul_decl_set ();
64
65 void reset();
66 void copy_from (vaul_decl_set *);
67
68 pIIR_Declaration single_decl (bool print = true);
69 bool multi_decls (bool print = true);
70 bool found_none ();
71
72 void show (bool only_valids=false);
73
74 pVAUL_Name name;
75
76 void add (pIIR_Declaration);
77 void begin_indirects ();
78 void end_indirects ();
79 bool finish_scope (pIIR_DeclarativeRegion);
80
81 void refresh ();
82 void invalidate_pot_invalids ();
83
84 void iterate (void (*f) (pIIR_Declaration, void *cl), void *cl);
85 void filter (int (*f) (pIIR_Declaration, void *cl), void *cl);
86 int retain_lowcost ();
87
88 void set_filter (bool (*func)(pIIR_Declaration, void*), void *data);
89 bool has_filter ();
90
91 bool use_cache ();
92
93 private:
94 vaul_parser *pr;
95 enum state_code { invalid, pot_invalid, pot_valid, valid };
96 struct item {
97 pIIR_Declaration d;
98 state_code state;
99 int cost;
100 } *decls;
101 int n_decls;
102 bool doing_indirects;
103 bool not_overloadable;
104 bool (*filter_func)(pIIR_Declaration, void*);
105 void *filter_data;
106 };
107
108 // Interleaving code generation with parsing.
109
110 struct vaul_parser;
111
112 struct vaul_consumer {
113 vaul_consumer ();
114 virtual ~vaul_consumer ();
115
116 // the parser that feeds this consumer
117
118 vaul_parser *parser;
119
120 // For concurrent statements. Returning FALSE from
121 // CONSUME_CONC_STAT means that you don't care that statement any
122 // longer and that VAUL can throw it away.
123
124 virtual void push_conc_context (pIIR_DeclarativeRegion context);
125 virtual bool consume_conc_stat (pIIR_ConcurrentStatement stat);
126 virtual void pop_conc_context (pIIR_DeclarativeRegion context);
127
128 // For declarations in a package body. Returning FALSE means that
129 // VAUL can throw as much of the declaration away as it wants to.
130
131 virtual bool consume_pbody_decl (pIIR_Declaration);
132 };
133
134 typedef my_dynarray<pIIR_Type> pIIR_Type_vector;
135
136 inline bool
is_constant(pIIR_ObjectReference r)137 is_constant (pIIR_ObjectReference r)
138 {
139 return vaul_get_class (r) == VAUL_ObjClass_Constant;
140 }
141
142 inline bool
is_variable(pIIR_ObjectReference r)143 is_variable (pIIR_ObjectReference r)
144 {
145 return vaul_get_class (r) == VAUL_ObjClass_Variable;
146 }
147
148 inline bool
is_signal(pIIR_ObjectReference r)149 is_signal (pIIR_ObjectReference r)
150 {
151 return vaul_get_class (r) == VAUL_ObjClass_Signal;
152 }
153
154 inline bool
is_file(pIIR_ObjectReference r)155 is_file (pIIR_ObjectReference r)
156 {
157 return vaul_get_class (r) == VAUL_ObjClass_File;
158 }
159
160 pIIR_DeclarationList next (pIIR_DeclarationList);
161 pIIR_DeclarationList first (pIIR_DeclarativeRegion);
162
163 void vaul_add_incomplete_type_use (pVAUL_IncompleteType it, pIIR_Type &ref);
164 void vaul_complete_incomplete_type (pVAUL_IncompleteType, pIIR_Type t);
165
166 typedef IIR_DeclarativeRegion IIR_Component;
167 typedef pIIR_DeclarativeRegion pIIR_Component;
168
169 // Option flags
170
171 struct vaul_parser_options {
172
173 vaul_parser_options ();
174
175 bool fullnames; // Print fully qualified names in messages.
176 bool debug; // Print debugging messages.
177
178 bool allow_invisible_default_bindings_from_work;
179 // When looking for default bindings,
180 // consider also units from the WORK library
181 // that are not visible.
182
183 bool nocache; // Do not use the cache.
184 bool skip_bodies; // Do only analyze entities and package headers.
185
186
set_fullnamesvaul_parser_options187 void set_fullnames (bool val)
188 {
189 fullnames = val;
190 }
191
set_debugvaul_parser_options192 void set_debug (bool val)
193 {
194 debug = val;
195 }
196
set_allow_invisible_default_bindings_from_workvaul_parser_options197 void set_allow_invisible_default_bindings_from_work (bool val)
198 {
199 allow_invisible_default_bindings_from_work = val;
200 }
201
set_nocachevaul_parser_options202 void set_nocache (bool val)
203 {
204 nocache = val;
205 }
206
set_skip_bodiesvaul_parser_options207 void set_skip_bodies (bool val)
208 {
209 skip_bodies = val;
210 }
211 };
212
213 // vaul_parser enth�lt den von Bison erzeugten Parser
214 //
215 struct vaul_parser : vaul_error_source, vaul_error_printer, vaul_node_creator {
216
217 vaul_parser(vaul_lexer *l);
218 ~vaul_parser();
219
220 vaul_design_unit *parse(vaul_pool *p);
221
222 void clear_errors();
was_eofvaul_parser223 bool was_eof() { return eof; }
224
225 vaul_parser_options options;
226
227 static vaul_parser_options default_options;
228
229 vaul_consumer *consumer;
230
231 private:
232
233 vaul_lexer *lex;
234 int bison_parse (void *dummy = NULL);
235 //int bison_parse (void *dummy);
236 //int bison_parse () { bison_parse(NULL); }
237
238 void BisonError (const char *msg);
239
240 void vinfo (const char *fmt, va_list ap);
241 void print_node (FILE *, tree_base_node *);
242
243 bool XXX_seen;
244 pIIR_DeclarativeRegion announced_scope;
245
246 bool eof;
247
248 vaul_pool *pool;
249 pIIR_SubprogramDeclaration cur_body;
250
251 void init();
252 void start (pIIR_LibraryUnit u);
253 vaul_design_unit *finish();
254
255 // decls.cc
256
257 int next_decl_seqno;
258
259 pIIR_Identifier make_id (const char *id);
260 pIIR_StringLiteral make_strlit (const char *str);
261 pIIR_StringLiteral make_opid (const char *op);
262 char *id_to_chars (pIIR_TextLiteral id);
263
264 void add_libs (pIIR_IdentifierList);
265 void use (pVAUL_SelNameList);
266
267 void visit_decls (void f (pIIR_Declaration, void *), void *);
268
269 pIIR_EntityDeclaration get_entity (pIIR_Identifier id);
270 pIIR_PackageDeclaration get_package (pIIR_Identifier id);
271 pIIR_ConfigurationDeclaration get_configuration (pVAUL_Name);
272
273 pIIR_DeclarativeRegion cur_scope, selected_scope;
274 void push_scope (pIIR_DeclarativeRegion);
275 void pop_scope (pIIR_DeclarativeRegion);
276
277 pIIR_Declaration add_decl (pIIR_DeclarativeRegion,
278 pIIR_Declaration,
279 pIIR_TextLiteral = NULL);
280 void rem_decl (pIIR_DeclarativeRegion, pIIR_Declaration);
281
add_declvaul_parser282 pIIR_Declaration add_decl (pIIR_Declaration d)
283 {
284 return add_decl (cur_scope, d, NULL);
285 }
286
287 pIIR_TypeDeclaration add_type_decl (pIIR_DeclarativeRegion,
288 pIIR_Type,
289 pIIR_TextLiteral);
290
291 void add_decl_plain (pIIR_DeclarativeRegion, pIIR_Declaration);
292
293 void find_decls (vaul_decl_set &, pVAUL_Name);
294 pIIR_Declaration find_single_decl (pVAUL_Name,
295 IR_Kind exp_k,
296 const char *kind_name = NULL);
297 pIIR_Declaration find_single_decl (pIIR_TextLiteral,
298 IR_Kind exp_k,
299 const char *kind_name = NULL);
300
301 void find_decls (vaul_decl_set &, pIIR_TextLiteral, pIIR_Declaration,
302 bool by_selection);
303 void find_decls (vaul_decl_set &, pVAUL_Name, pIIR_Declaration,
304 bool by_selection);
305
306 void start_decl (pIIR_TextLiteral id);
307
308 void select_scope (pIIR_DeclarativeRegion);
309 void unselect_scope ();
310
311 pIIR_Declaration add_Alias (pIIR_Identifier id,
312 pIIR_Type alias_type,
313 pVAUL_Name aliased_thing);
314 pIIR_FileDeclaration add_File (pIIR_Identifier id,
315 pIIR_Type file_type,
316 pIIR_Expression mode,
317 pVAUL_FilenameAndMode name_and_mode);
318
319 pVAUL_StandardPackage std;
320
321 void use_unit (vaul_design_unit *du);
322
323 // types.cc
324
325 pIIR_FunctionDeclaration find_resolution_function (pVAUL_Name res_name,
326 pIIR_Type type);
327
328 pIIR_Type build_ArraySubtype (pVAUL_Name resol,
329 pVAUL_Name mark,
330 pIIR_TypeList);
331
332 pIIR_Type build_ScalarSubtype (pVAUL_Name resol,
333 pVAUL_Name mark,
334 pIIR_Range);
335
336 pIIR_Type build_Subtype (pVAUL_Name resol,
337 pVAUL_Name mark,
338 pIIR_TypeList);
339
340 pIIR_Type build_EnumerationType (int pos, pIIR_EnumerationLiteralList lits);
341
342 pIIR_FileType build_FileType (pVAUL_Name type_mark);
343
344 pIIR_ScalarSubtype
345 build_SubType_def (int lno,
346 pIIR_Range,
347 pIIR_Type base = NULL);
348
349 pIIR_Range get_scalar_type_range (pIIR_Type t);
350
351 pIIR_Type get_type(pVAUL_Name);
352 void add_PredefOp(pIIR_PosInfo pos, pIIR_Type ret, pIIR_TextLiteral,
353 pIIR_Type l, pIIR_Type r = NULL);
354 void add_predefined_ops(pIIR_Type);
355
356 pIIR_TypeList build_PreIndexConstraint (pVAUL_GenAssocElem);
357 pIIR_TypeList build_IndexConstraint (pIIR_TypeList,
358 pIIR_Type base);
359 pIIR_Type find_index_range_type (pIIR_ExplicitRange);
360
361 pIIR_ScalarSubtype make_scalar_subtype (pIIR_PosInfo pos,
362 pIIR_Type base,
363 int left, int right);
364 pIIR_Type adapt_object_type(VAUL_ObjectClass, pIIR_Type,
365 pIIR_Expression initial_value);
366 pIIR_ArraySubtype build_constrained_array_type(pIIR_TypeList,
367 pIIR_Type elt);
368
369 // expr.cc
370
371 bool try_overload_resolution(pIIR_Expression, pIIR_Type, IR_Kind = IR_INVALID);
372 void overload_resolution(pIIR_Expression &, pIIR_Type, IR_Kind,
373 bool procs_allowed, bool for_read);
overload_resolutionvaul_parser374 void overload_resolution(pIIR_Expression &e, pIIR_Type t)
375 { overload_resolution(e, t, IR_INVALID, false, true); }
overload_resolutionvaul_parser376 void overload_resolution(pIIR_Expression &e, IR_Kind k)
377 { overload_resolution(e, NULL, k, false, true); }
overload_resolution_not_for_readvaul_parser378 void overload_resolution_not_for_read(pIIR_Expression &e, pIIR_Type t)
379 { overload_resolution(e, t, IR_INVALID, false, false); }
380
381 void report_type_mismatch (pIIR_Expression e, pIIR_Type r, IR_Kind);
382
383 void check_static_level (pIIR_Expression e, IR_StaticLevel l);
384
385 bool prepare_named_assocs(pVAUL_GenAssocElem);
386 void validate_gen_assocs(pVAUL_GenAssocElem);
387
388 pIIR_AssociationList associate (pVAUL_NamedAssocElem, pIIR_InterfaceList,
389 bool complete = true,
390 bool need_overload_resolution = true);
391
392 pIIR_AssociationList associate_ports (pVAUL_NamedAssocElem,
393 pIIR_InterfaceList);
394
395 void check_for_read (pIIR_Expression e);
396 void check_for_update (pIIR_Expression e);
397
398 pIIR_Expression build_Expr (pVAUL_Name);
399 pIIR_Expression build_Expr (pVAUL_Name, vaul_decl_set *set, IR_Kind basic_k);
400 pIIR_Expression build_formal_Expr (pIIR_InterfaceDeclaration formal,
401 pVAUL_Name name);
402
403 pIIR build_Expr_or_Attr (pVAUL_Name);
404 pIIR build_Expr_or_Attr (pVAUL_Name, vaul_decl_set *set, IR_Kind basic_k);
405 pIIR_Expression validate_Expr (pIIR expr_or_attr);
406
407 pIIR_ArrayReference build_ArrayReference (pIIR_Expression prefix,
408 pVAUL_GenAssocElem indices);
409 pIIR_SliceReference build_SliceReference (pIIR_Expression prefix,
410 pVAUL_GenAssocElem slice);
411 pIIR_PhysicalLiteral build_PhysicalLiteral (pIIR_AbstractLiteral lit,
412 pIIR_Identifier unit);
413 pIIR_AbstractLiteralExpression
414 build_LiteralExpression (int lineno,
415 pIIR_AbstractLiteral lit);
416 pIIR_AbstractLiteralExpression
417 build_LiteralExpression (pIIR_PosInfo pos,
418 pIIR_AbstractLiteral lit);
419
420 pIIR_Aggregate build_Aggregate(pVAUL_AmbgAggregate, pIIR_Type);
421
422 pIIR_Expression build_bcall(pIIR_Expression l, const char *op, pIIR_Expression r);
423 pIIR_Expression build_QualifiedExpr(pVAUL_Name mark, pIIR_Expression);
424 pIIR_Expression build_TypeConversion(pIIR_PosInfo pos, pIIR_Type,
425 pIIR_Expression);
426
427 pIIR_Type expr_type(pIIR_Expression);
428
429 pIIR_Type_vector *ambg_expr_types (pIIR_Expression);
430
431 // attr.cc
432
433 pIIR_Expression build_AttrExpr(pVAUL_AttributeName, vaul_decl_set *set,
434 IR_Kind basic_k);
435
436 pIIR build_AttrNode (pVAUL_Name, vaul_decl_set *set, IR_Kind basic_k);
437 pIIR build_AttrNode (pVAUL_AttributeName, vaul_decl_set *set, IR_Kind basic_k);
438
439 void bind_attrspec (pVAUL_AttributeSpec);
440
441 // subprogs.cc
442
443 VAUL_ObjectClass cur_default_obj_class;
444
445 pIIR_InterfaceDeclaration build_Interface (pIIR_TextLiteral declarator,
446 pIIR_Type subtype,
447 pIIR_Expression value,
448 VAUL_ObjectClass obj_class,
449 IR_Mode mode,
450 bool bus);
451
452 void validate_interface (pIIR_SubprogramDeclaration,
453 pIIR_InterfaceDeclaration);
454 void validate_port (pIIR_InterfaceDeclaration);
455 void validate_generic (pIIR_InterfaceDeclaration);
456
457 // stats.cc
458
459 pIIR_ProcedureCallStatement build_ProcedureCallStat (int lineno, pVAUL_Name name);
460
461 pIIR_LoopStatement
462 push_loop (int lineno, pIIR_Label, pVAUL_IterationScheme scheme);
463 pIIR_LoopStatement
464 pop_loop (pIIR_SequentialStatementList loop_stats, pIIR_Identifier loop_id);
465
466 pIIR_ProcessStatement build_condal_Process (pIIR_Identifier label,
467 bool pp,
468 pVAUL_CondalSignalAssign);
469 pIIR_ProcessStatement build_sel_Process (pIIR_Identifier label,
470 bool pp,
471 pVAUL_SelSignalAssign);
472 pIIR_ConcurrentGenerateStatement push_GenerateStat (int lineno,
473 pVAUL_IterationScheme);
474 pIIR_LoopControlStatement build_LoopControlStat(int lineno, IR_Kind stat,
475 pIIR_Identifier loop_label,
476 pIIR_Expression when);
477 pIIR_VariableAssignmentStatement
478 build_VarAssignment(int lineno, pIIR_Expression target,
479 pIIR_Expression value);
480
481 pIIR_SignalAssignmentStatement
482 build_SignalAssignment(pIIR_PosInfo pos,
483 pIIR_Expression target,
484 pVAUL_DelayMechanism delay,
485 pIIR_WaveformList wave);
486 pIIR_CaseStatement
487 build_CaseStat (pIIR_PosInfo pos,
488 pIIR_Expression switch_expr,
489 pIIR_CaseStatementAlternativeList alternatives);
490 pIIR_ProcessStatement build_conc_AssertStat (int lineno,
491 pIIR_Identifier label,
492 bool pp,
493 pIIR_AssertionStatement);
494 pIIR_ConcurrentStatement
495 build_conc_ProcedureCall_or_ComponentInst (int lno,
496 pIIR_Identifier label,
497 pVAUL_Name mark);
498 pIIR_ProcessStatement build_conc_ProcedureCall (int lineno,
499 pIIR_Identifier label,
500 bool pp,
501 pIIR_ProcedureCallStatement);
502
503 static pIIR_ExpressionList no_sens_list;
504 pIIR_ProcessStatement build_Process (int lineno,
505 pIIR_ExpressionList sensitivities,
506 bool pp);
507
508 void get_implicit_signals (pIIR_ExpressionList &sigs, pIIR_Expression e);
509 void add_to_signal_list (pIIR_ExpressionList &sigs,
510 pIIR_ObjectReference sig);
511
512 // blocks.cc
513
514 pIIR_BindingIndication build_BindingIndic(pVAUL_IncrementalBindingIndic);
515 pIIR_BindingIndication build_BindingIndic(pIIR_PosInfo pos,
516 pIIR_Component unit,
517 pVAUL_NamedAssocElem gmap,
518 pVAUL_NamedAssocElem pmap);
519
520 pIIR_ComponentInstantiationStatement build_CompInst (int l,
521 pIIR_Identifier,
522 pIIR_BindingIndication);
523 pIIR_ComponentInstantiationStatement build_CompInst (pIIR_PosInfo p,
524 pIIR_Identifier,
525 pIIR_BindingIndication);
526
527 pIIR_BindingIndication
528 find_component_configuration (pIIR_Identifier label,
529 pIIR_BindingIndication inst_binding);
530
531 void add_spec (pIIR_DeclarativeRegion b, pVAUL_ConfigSpec cs);
532
533 #if 0
534 void bind_specs (pIIR_BlockStatement);
535 #endif
536
537 pIIR_ArchitectureDeclaration get_architecture (pIIR_EntityDeclaration entity,
538 pIIR_TextLiteral arch);
539
540 pIIR_ArchitectureRef get_architecture_ref (int lineno, pVAUL_Name entity,
541 pIIR_Identifier arch);
542 pIIR_ArchitectureRef get_architecture_ref (pIIR_EntityDeclaration entity,
543 pVAUL_SimpleName arch);
544
545 pIIR_BlockConfiguration start_BlockConfig (pVAUL_Name);
546 pIIR_ComponentConfiguration start_CompConfig (int lineno,
547 pVAUL_ComponentSpec,
548 pVAUL_IncrementalBindingIndic);
549 void check_BlockConfig (pIIR_BlockConfiguration);
550
551 pIIR_ComponentInstantiationList list_comps (pVAUL_ComponentSpec,
552 pIIR_DeclarativeRegion);
553
554 // super private:
555 bool associate_one (pIIR_AssociationList &tail,
556 pIIR_ObjectReference, pIIR_Declaration,
557 pIIR_Expression, pIIR_Declaration,
558 bool need_overload_resolution);
559 int max_constrain_depth, constrain_depth;
560 int constrain(pIIR_Expression, pIIR_Type, IR_Kind);
561 int constrain1(pIIR_Expression, pIIR_Type, IR_Kind);
562 int pre_constrain(pIIR_Expression);
563 int try_one_association(pVAUL_NamedAssocElem, pIIR_InterfaceDeclaration);
564 int try_association(pVAUL_NamedAssocElem, pIIR_InterfaceList);
565 static int filter_return_stub (pIIR_Declaration, void *);
566 struct filter_return_closure;
567 int filter_return (pIIR_Declaration, filter_return_closure *);
568 int conversion_cost (pIIR, pIIR_Type, IR_Kind);
569 int try_array_subscription(pIIR_ArrayType, pVAUL_GenAssocElem);
570 pIIR_Type is_one_dim_array(pIIR_Type);
571 bool is_one_dim_logical_array(pIIR_Type);
572 bool is_one_dim_discrete_array(pIIR_Type);
573 bool is_discrete_type (pIIR_Type);
574 int choice_conversion_cost (pIIR_Choice, pIIR_Expression actual,
575 pIIR_Type, IR_Kind);
576 int array_literal_conversion_cost (pVAUL_AmbgArrayLitRef l, pIIR_Type t, IR_Kind k,
577 bool look_inside = true);
578 struct cat_closure;
579 static void collect_ambg_types_stub (pIIR_Declaration, void *);
580 void collect_ambg_types (pIIR_Declaration d, cat_closure *);
581 bool check_target(pIIR_Expression target, VAUL_ObjectClass oc,
582 const char *oc_label);
583 pIIR_Declaration
584 grab_formal_conversion (pVAUL_NamedAssocElem assoc,
585 pIIR_InterfaceList formals,
586 int *formal_cost = NULL,
587 pIIR_InterfaceDeclaration *converted_formal = NULL);
588 pIIR_Expression add_partial_choice(pIIR_Expression &pactual, pVAUL_Name formal, pIIR_Expression actual);
589 pIIR_Expression disambiguate_expr(pIIR_Expression, pIIR_Type, bool procs);
590 pIIR_Expression disambiguate_expr1(pIIR_Expression, pIIR_Type, bool procs);
591 bool evaluate_locally_static_universal_integer(pIIR_Expression, int &);
592 pIIR_Type find_array_attr_index_type(pIIR_ArrayType, pIIR_Expression, int &);
593 pIIR_Expression make_appropriate(pIIR_Expression);
594 void report_mismatched_subprog(pVAUL_Name, vaul_decl_set *, pVAUL_NamedAssocElem);
595 pIIR_Identifier closing_label;
596 pIIR_Identifier starting_label;
597 void add_disconnect_spec (pIIR_ExpressionList, pVAUL_Name mark,
598 pIIR_Expression after);
599 pIIR_ConstantDeclaration fix_for_scheme (pVAUL_ForScheme);
600 bool check_for_unresolved_names (pIIR_Expression e);
601
602 pIIR_Range range_from_assoc (pVAUL_GenAssocElem assoc);
603 pIIR_Type ensure_range_type (pIIR_Range, pIIR_Type);
604
605 pVAUL_DeclCache decl_cache;
606 void invalidate_decl_cache (pIIR_TextLiteral id);
607 bool find_in_decl_cache (vaul_decl_set &dset, pIIR_TextLiteral id,
608 pIIR_Declaration scope, bool by_sel);
609 void add_to_decl_cache (vaul_decl_set &dset, pIIR_TextLiteral id,
610 pIIR_Declaration scope, bool by_sel);
611
612 struct cstat_item {
613 cstat_item *prev;
614 pIIR_ConcurrentStatementList *tail;
615 pIIR_ConcurrentStatementList *start_tail;
616 pIIR_DeclarativeRegion context;
617 };
618 cstat_item *cstat_tail;
619
620 void push_concurrent_stats_tail (pIIR_ConcurrentStatementList *);
621 void pop_concurrent_stats_tail (pIIR_ConcurrentStatementList *);
622 void add_to_concurrent_stats_tail (pIIR_ConcurrentStatement);
623
624 void collect ();
625
626 bool legal_file_type (pIIR_Type);
627 };
628
629 void vaul_add_spec (pIIR_BlockStatement, pVAUL_ConfigSpec);
630 IR_StaticLevel vaul_merge_levels (IR_StaticLevel l1, IR_StaticLevel l2);
631
632 #endif
633