Merge pull request #81 from gpilisi/master
[deliverable/titan.core.git] / compiler2 / Value.hh
CommitLineData
d44e3c4f 1/******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Baji, Laszlo
10 * Balasko, Jeno
11 * Baranyi, Botond
12 * Beres, Szabolcs
13 * Bibo, Zoltan
14 * Cserveni, Akos
15 * Delic, Adam
16 * Forstner, Matyas
17 * Gecse, Roland
18 * Kovacs, Ferenc
19 * Raduly, Csaba
20 * Szabados, Kristof
1d0599f0 21 * Szabo, Bence Janos
d44e3c4f 22 * Szabo, Janos Zoltan – initial implementation
23 * Tatarka, Gabor
24 * Zalanyi, Balazs Andor
25 *
26 ******************************************************************************/
970ed795
EL
27#ifndef _Common_Value_HH
28#define _Common_Value_HH
29
30#include "Setting.hh"
31#include "Code.hh"
32#include "Type.hh"
33#include "Int.hh"
34#include "../common/ttcn3float.hh"
35
36class ustring;
3abe9331 37class JSON_Tokenizer;
970ed795
EL
38
39namespace Asn {
40 class Block;
41}
42
43namespace Ttcn {
44 class Reference;
45 class Ref_base;
46 class TemplateInstance;
47 class TemplateInstances;
48 class ActualParList;
49 class ActualPar;
50 class ParsedActualParameters;
51 class LogArguments;
3f84031e 52 class JsonOmitCombination;
970ed795
EL
53}
54
55namespace Common {
56
57 // not defined here
58 class OID_comp;
59 class Values;
60 class NamedValue;
61 class NamedValues;
62 class CharSyms;
63 class Assignment;
64 class Scope;
65
66 using Asn::Block;
67 using Ttcn::TemplateInstance;
68 using Ttcn::LogArguments;
69
70 /**
71 * \ingroup AST
72 *
73 * \defgroup AST_Value Value
74 *
75 * These classes provide a unified interface for values.
76 *
77 * @{
78 */
79
80 /**
81 * Represents a value in the AST.
82 */
83 class Value : public GovernedSimple {
84 public:
85 /** value type */
86
87
970ed795
EL
88 enum valuetype_t {
89 V_ERROR, /**< erroneous */
90 V_NULL, /**< NULL (for ASN.1 NULL type, also in TTCN-3) */
91 V_BOOL, /**< boolean */
92 V_NAMEDINT, /**< integer / named number */
93 V_NAMEDBITS, /**< named bits (identifiers) */
94 V_INT, /**< integer */
95 V_REAL, /**< real/float */
96 V_ENUM, /**< enumerated */
97 V_BSTR, /**< bitstring */
98 V_HSTR, /**< hexstring */
99 V_OSTR, /**< octetstring */
100 V_CSTR, /**< charstring */
101 V_USTR, /**< universal charstring */
102 V_ISO2022STR, /**< ISO-2022 string (treat as octetstring) */
103 V_CHARSYMS, /**< parsed ASN.1 universal string notation */
104 V_OID, /**< object identifier */
105 V_ROID, /**< relative object identifier */
106 V_CHOICE, /**< choice; set directly by the ASN.1 parser */
107 V_SEQOF, /**< sequence (record) of */
108 V_SETOF, /**< set of */
109 V_ARRAY, /**< array */
110 V_SEQ, /**< sequence (record) */
111 V_SET, /**< set */
112 V_OPENTYPE, /**< open type */
113 V_REFD, /**< referenced */
114 V_UNDEF_LOWERID, /**< undefined loweridentifier */
115 V_UNDEF_BLOCK, /**< undefined {block} */
116 V_OMIT, /**< special value for optional values */
117 V_VERDICT, /**< verdict */
118 V_TTCN3_NULL, /**< TTCN-3 null (for component or default references) */
119 V_DEFAULT_NULL, /**< null default reference */
120 V_FAT_NULL, /**< null for function, altstep and testcase */
121 V_EXPR, /**< expressions */
122 V_MACRO, /**< macros (%%something) */
123 V_NOTUSED, /**< not used symbol ('-') */
124 V_FUNCTION, /**< function */
125 V_ALTSTEP, /**< altstep */
126 V_TESTCASE, /**< testcase */
127 V_INVOKE, /**< invoke operation */
128 V_REFER /**< refer(function) */
129 };
130
131 enum verdict_t {
132 Verdict_NONE,
133 Verdict_PASS,
134 Verdict_INCONC,
135 Verdict_FAIL,
136 Verdict_ERROR
137 };
138
139 /** Operation type, for V_EXPR */
140 enum operationtype_t {
141 OPTYPE_RND, // -
142 OPTYPE_TESTCASENAME, // -
143
144 OPTYPE_UNARYPLUS, // v1
145 OPTYPE_UNARYMINUS, // v1
146 OPTYPE_NOT, // v1
147 OPTYPE_NOT4B, // v1
148
149 OPTYPE_BIT2HEX, // v1 6
150 OPTYPE_BIT2INT, // v1
151 OPTYPE_BIT2OCT, // v1
152 OPTYPE_BIT2STR, // v1
153 OPTYPE_CHAR2INT, // v1 10
154 OPTYPE_CHAR2OCT, // v1
155 OPTYPE_FLOAT2INT, // v1
156 OPTYPE_FLOAT2STR, // v1
157 OPTYPE_HEX2BIT, // v1
158 OPTYPE_HEX2INT, // v1
159 OPTYPE_HEX2OCT, // v1
160 OPTYPE_HEX2STR, // v1
161 OPTYPE_INT2CHAR, // v1
162 OPTYPE_INT2FLOAT, // v1
163 OPTYPE_INT2STR, // v1 20
164 OPTYPE_INT2UNICHAR, // v1
165 OPTYPE_OCT2BIT, // v1
166 OPTYPE_OCT2CHAR, // v1
167 OPTYPE_OCT2HEX, // v1
168 OPTYPE_OCT2INT, // v1
169 OPTYPE_OCT2STR, // v1
170 OPTYPE_OCT2UNICHAR, // v1 [v2]
171 OPTYPE_STR2BIT, // v1
172 OPTYPE_STR2FLOAT, // v1
173 OPTYPE_STR2HEX, // v1
174 OPTYPE_STR2INT, // v1 30
175 OPTYPE_STR2OCT, // v1
176 OPTYPE_UNICHAR2INT, // v1
177 OPTYPE_UNICHAR2CHAR, // v1
178 OPTYPE_UNICHAR2OCT, // v1 [v2]
179 OPTYPE_ENUM2INT, // v1
180
181 OPTYPE_ENCODE, // ti1 35
182
183 OPTYPE_RNDWITHVAL, /** \todo -> SEED */ // v1
184
185 OPTYPE_ADD, // v1 v2
186 OPTYPE_SUBTRACT, // v1 v2
187 OPTYPE_MULTIPLY, // v1 v2
188 OPTYPE_DIVIDE, // v1 v2 40
189 OPTYPE_MOD, // v1 v2
190 OPTYPE_REM, // v1 v2
191 OPTYPE_CONCAT, // v1 v2
192 OPTYPE_EQ, // v1 v2
193 OPTYPE_LT, // v1 v2
194 OPTYPE_GT, // v1 v2
195 OPTYPE_NE, // v1 v2
196 OPTYPE_GE, // v1 v2
197 OPTYPE_LE, // v1 v2
198 OPTYPE_AND, // v1 v2 50
199 OPTYPE_OR, // v1 v2
200 OPTYPE_XOR, // v1 v2
201 OPTYPE_AND4B, // v1 v2
202 OPTYPE_OR4B, // v1 v2
203 OPTYPE_XOR4B, // v1 v2
204 OPTYPE_SHL, // v1 v2
205 OPTYPE_SHR, // v1 v2
206 OPTYPE_ROTL, // v1 v2
207 OPTYPE_ROTR, // v1 v2
208
209 OPTYPE_INT2BIT, // v1 v2 60
210 OPTYPE_INT2HEX, // v1 v2
211 OPTYPE_INT2OCT, // v1 v2
212
213 OPTYPE_DECODE, // r1 r2
214
215 OPTYPE_SUBSTR, // ti1 v2 v3
216 OPTYPE_REGEXP, // ti1 t2 v3
217 OPTYPE_DECOMP, // v1 v2 v3 66
218
219 OPTYPE_REPLACE, // ti1 v2 v3 ti4
220
221 OPTYPE_ISVALUE, // ti1 68
222 OPTYPE_ISBOUND, // ti1
223 OPTYPE_ISPRESENT, // ti1
224 OPTYPE_ISCHOSEN, // r1 i2
225 OPTYPE_ISCHOSEN_V, // v1 i2
226 OPTYPE_ISCHOSEN_T, // t1 i2
227
228 OPTYPE_LENGTHOF, // ti1
229 OPTYPE_SIZEOF, // ti1
230 OPTYPE_VALUEOF, // ti1
231 OPTYPE_MATCH, // v1 t2
232
233 OPTYPE_TTCN2STRING, // ti1
234 OPTYPE_REMOVE_BOM, //v1
235 OPTYPE_GET_STRINGENCODING, //v1
236 OPTYPE_ENCODE_BASE64, //v1 [v2]
237 OPTYPE_DECODE_BASE64, //v1
238
239 /** cannot distinguish during parsing; can be COMP or TMR */
240 OPTYPE_UNDEF_RUNNING, // r1 78
241 OPTYPE_COMP_NULL, // - (from V_TTCN3_NULL)
242 OPTYPE_COMP_MTC, // -
243 OPTYPE_COMP_SYSTEM, // -
244 OPTYPE_COMP_SELF, // -
245 OPTYPE_COMP_CREATE, // r1 [v2] [v3] b4
246 OPTYPE_COMP_RUNNING, // v1
247 OPTYPE_COMP_RUNNING_ANY, // -
248 OPTYPE_COMP_RUNNING_ALL, // -
249 OPTYPE_COMP_ALIVE, // v1
250 OPTYPE_COMP_ALIVE_ANY, // -
251 OPTYPE_COMP_ALIVE_ALL, // -
252 OPTYPE_TMR_READ, // r1 90
253 OPTYPE_TMR_RUNNING, // r1
254 OPTYPE_TMR_RUNNING_ANY, // -
255 OPTYPE_GETVERDICT, // -
256 OPTYPE_ACTIVATE, // r1
257 OPTYPE_ACTIVATE_REFD, //v1 t_list2
258 OPTYPE_EXECUTE, // r1 [v2]
259 OPTYPE_EXECUTE_REFD, // v1 t_list2 [v3]
260
a50716c1 261 OPTYPE_LOG2STR, // logargs
a38c6d4c 262 OPTYPE_PROF_RUNNING, // - 99
1d0599f0 263
264 OPTYPE_ENCVALUE_UNICHAR, // ti1 [v2]
265 OPTYPE_DECVALUE_UNICHAR, // r1 r2 [v3]
a50716c1 266
267 OPTYPE_ANY2UNISTR, // logarg, length = 1
0a1610f4 268 OPTYPE_CHECKSTATE_ANY, // [r1] v2, port or any
269 OPTYPE_CHECKSTATE_ALL, // [r1] v2, port or all
efbe586d 270 OPTYPE_HOSTID, // [v1]
970ed795
EL
271
272 NUMBER_OF_OPTYPES // must be last
273 };
274
275 enum macrotype_t {
276 MACRO_MODULEID, /**< module identifier (%moduleId) */
277 MACRO_FILENAME, /**< name of input file (%fileName) */
278 MACRO_BFILENAME, /**< name of input file (__BFILE__) */
279 MACRO_FILEPATH, /**< canonical file name (name with full path) */
280 MACRO_LINENUMBER, /**< line number (%lineNumber) */
281 MACRO_LINENUMBER_C, /**< line number in C style (__LINE__)
282 gives an integer value */
283 MACRO_DEFINITIONID, /**< name of (top level) definition (%definitionId) */
284 /* the following macro may be needed in future versions of titan,
285 * functionality will be explained by a quick study written by Kristof
286 MACRO_NOTSCOPE_NAME_BUT_THE_NAME_OF_SOMETHING_ELSE */
287 MACRO_SCOPE,
288 MACRO_TESTCASEID /**< name of current testcase (%testcaseId)
289 (evaluated at runtime) */
290 };
291
292 enum expr_state_t {EXPR_NOT_CHECKED, EXPR_CHECKING,
293 EXPR_CHECKING_ERR, EXPR_CHECKED};
294 private:
295
296 valuetype_t valuetype;
297 Type *my_governor;
298 union {
299 bool val_bool;
300 int_val_t *val_Int;
301 Identifier *val_id;
302 ttcn3float val_Real;
303 struct {
304 string *val_str;
305 map<size_t, Value> *str_elements;
306 } str;
307 struct {
308 ustring *val_ustr;
309 map<size_t, Value> *ustr_elements;
310 bool convert_str; /**< Indicates that universal charstring is */
311 /* initialized with charstring */
312 } ustr;
313 CharSyms *char_syms;
314 vector<OID_comp> *oid_comps;
315 struct {
316 Identifier *alt_name; /**< The name of the selected alternative */
317 Value *alt_value; /**< The value given */
318 } choice;
319 Values *val_vs;
320 NamedValues *val_nvs;
321 struct {
322 Reference *ref;
323 Value *refd_last; /**< cache */
324 } ref;
325 Reference *refered;
326 struct {
327 operationtype_t v_optype;
328 expr_state_t state;
329 union {
330 Value *v1;
331 Template *t1;
332 TemplateInstance *ti1;
333 Ttcn::Ref_base *r1; /**< timer or component */
334 LogArguments *logargs; /**< arguments of log2str() */
335 };
336 union {
337 Value *v2;
338 TemplateInstance *t2;
339 Identifier *i2;
340 Ttcn::ParsedActualParameters *t_list2;
341 Ttcn::ActualParList *ap_list2;
342 Ttcn::Ref_base *r2;
343 };
344 Value *v3;
345 union {
346 Value *v4;
347 TemplateInstance *ti4;
348 bool b4;
349 };
350 } expr;
351 macrotype_t macro;
352 struct {
353 Value *v;
354 Ttcn::ParsedActualParameters *t_list;
355 Ttcn::ActualParList *ap_list;
356 } invoke;
357 map<string, Identifier> *ids;
358 Block *block;
359 verdict_t verdict;
360 Common::Assignment *refd_fat; /** function, altstep, testcase */
361 } u;
362
363 /** Used to avoid infinite recursions of is_unfoldable() */
364 class UnfoldabilityCheck {
365 static map<Value*, void> running;
366 Value* value;
367 public:
368 static bool is_running(Value* p_value) { return running.has_key(p_value); }
369 UnfoldabilityCheck(Value* p_value) : value(p_value) { running.add(value, 0); }
370 ~UnfoldabilityCheck() { running.erase(value); }
371 };
372
373 /** Copy constructor for Value::clone() only. */
374 Value(const Value& p);
375 /** Assignment op not implemented. */
376 Value& operator=(const Value& p);
377 /** Release resources. */
378 void clean_up();
379 /** Release resources if Value::valuetype == V_EXPR.
380 * Called by Value::clean_up(). */
381 void clean_up_expr();
382 /** Copies (moves) the contents of \a src (valuetype & u) into \a this and
383 * after that destroys (deletes) src. Before doing the copy the contents of
384 * \a this are destroyed by calling \a clean_up(). */
385 void copy_and_destroy(Value *src);
386 public:
387 Value(valuetype_t p_vt);
388 Value(valuetype_t p_vt, bool p_val_bool);
389 Value(valuetype_t p_vt, const Int& p_val_Int);
390 Value(valuetype_t p_vt, int_val_t *p_val_Int);
391 Value(valuetype_t p_vt, string *p_val_str);
392 Value(valuetype_t p_vt, ustring *p_val_ustr);
393 Value(valuetype_t p_vt, CharSyms *p_char_syms);
394 Value(valuetype_t p_vt, Identifier *p_val_id);
395 Value(valuetype_t p_vt, Identifier *p_id, Value *p_val);
396 Value(valuetype_t p_vt, const Real& p_val_Real);
397 Value(valuetype_t p_vt, Values *p_vs);
398 Value(valuetype_t p_vt, Value *p_v, Ttcn::ParsedActualParameters *p_t_list);
399 /** Constructor used by V_EXPR "-": RND, TESTCASENAME, COMP_NULL, COMP_MTC,
400 * COMP_SYSTEM, COMP_SELF, COMP_RUNNING_ANY, COMP_RUNNING_ALL,
a38c6d4c 401 * COMP_ALIVE_ALL, COMP_ALIVE_ANY, TMR_RUNNING_ANY, GETVERDICT,
402 * PROF_RUNNING */
970ed795 403 Value(operationtype_t p_optype);
efbe586d 404 /** Constructor used by V_EXPR "v1" or [v1] */
970ed795
EL
405 Value(operationtype_t p_optype, Value *p_v1);
406 /** Constructor used by V_EXPR "ti1": LENGTHOF, SIZEOF, VALUEOF, TTCN2STRING */
407 Value(operationtype_t p_optype, TemplateInstance *p_ti1);
408 /** Constructor used by V_EXPR "r1": COMP_RUNNING, COMP_ALIVE,
409 * TMR_READ, TMR_RUNNING, ACTIVATE */
410 Value(operationtype_t p_optype, Ttcn::Ref_base *p_r1);
411 /** ACTIVATE_REFD, OPTYPE_INVOKE, OPTYPE_COMP_ALIVE_REFD */
412 Value(operationtype_t p_optype, Value *p_v1,
413 Ttcn::ParsedActualParameters *p_ap_list);
414 /** OPTYPE_EXECUTE_REFD */
415 Value(operationtype_t p_optype, Value *p_v1,
416 Ttcn::ParsedActualParameters *p_t_list2, Value *p_v3);
0a1610f4 417 /** Constructor used by V_EXPR "r1 [v2]": EXECUTE or [r1] v2 */
970ed795
EL
418 Value(operationtype_t p_optype, Ttcn::Ref_base *p_r1, Value *v2);
419 /** Constructor used by V_EXPR "r1 [v2] [v3] b4": COMP_CREATE */
420 Value(operationtype_t p_optype, Ttcn::Ref_base *p_r1, Value *p_v2,
421 Value *p_v3, bool p_b4);
422 /** Constructor used by V_EXPR "v1 v2" */
423 Value(operationtype_t p_optype, Value *p_v1, Value *p_v2);
424 /** Constructor used by V_EXPR "v1 v2 v3" */
425 Value(operationtype_t p_optype, Value *p_v1, Value *p_v2, Value *p_v3);
1d0599f0 426 /** Constructor used by encvalue_unichar "ti1 [v2]" */
427 Value(operationtype_t p_optype, TemplateInstance *p_ti1, Value *p_v2);
970ed795
EL
428 /** Constructor used by V_EXPR "ti1 v2 v3" */
429 Value(operationtype_t p_optype, TemplateInstance *p_ti1, Value *p_v2, Value *p_v3);
430 /** Constructor used by V_EXPR "ti1 t2 v3" */
431 Value(operationtype_t p_optype, TemplateInstance *p_ti1, TemplateInstance *p_t2, Value *p_v3);
432 /** Constructor used by V_EXPR "ti1 v2 v3 ti4" */
433 Value(operationtype_t p_optype, TemplateInstance *p_ti1, Value *p_v2,
434 Value *p_v3, TemplateInstance *p_ti4);
435 /** Constructor used by V_EXPR "v1 t2": MATCH */
436 Value(operationtype_t p_optype, Value *p_v1, TemplateInstance *p_t2);
437 /** Constructor used by V_EXPR "r1 i2": ISPRESENT, ISCHOSEN */
438 Value(operationtype_t p_optype, Ttcn::Reference *p_r1, Identifier *p_i2);
439 Value(operationtype_t p_optype, LogArguments *p_logargs);
440 /** Constructor used by V_MACRO */
441 Value(valuetype_t p_vt, macrotype_t p_macrotype);
442 Value(valuetype_t p_vt, NamedValues *p_nvs);
443 /** V_REFD, V_REFER */
444 Value(valuetype_t p_vt, Reference *p_ref);
445 Value(valuetype_t p_vt, Block *p_block);
446 Value(valuetype_t p_vt, verdict_t p_verdict);
447 /** Constructor used by decode */
448 Value(operationtype_t p_optype, Ttcn::Ref_base *p_r1, Ttcn::Ref_base *p_r2);
1d0599f0 449 /** Constructor used by decvalue_unichar*/
450 Value(operationtype_t p_optype, Ttcn::Ref_base *p_r1, Ttcn::Ref_base *p_r2, Value *p_v3);
970ed795
EL
451 virtual ~Value();
452 virtual Value* clone() const;
453 valuetype_t get_valuetype() const {return valuetype;}
454 /** it it is not V_EXPR then fatal error. */
455 operationtype_t get_optype() const;
456 /** Sets the governor type. */
457 virtual void set_my_governor(Type *p_gov);
458 /** Gets the governor type. */
459 virtual Type *get_my_governor() const;
460 /** Returns true if it is a value reference. */
461 bool is_ref() const { return valuetype == V_REFD; }
462 virtual void set_fullname(const string& p_fullname);
463 virtual void set_my_scope(Scope *p_scope);
464 private:
465 void set_fullname_expr(const string& p_fullname);
466 void set_my_scope_expr(Scope *p_scope);
467 public:
468 void set_genname_recursive(const string& p_genname);
469 void set_genname_prefix(const char *p_genname_prefix);
470 void set_code_section(code_section_t p_code_section);
471 void change_sign();
472 void add_oid_comp(OID_comp* p_comp);
473 void set_valuetype(valuetype_t p_valuetype);
474 void set_valuetype_COMP_NULL();
475 void set_valuetype(valuetype_t p_valuetype, const Int& p_val_int);
476 void set_valuetype(valuetype_t p_valuetype, string *p_str);
477 void set_valuetype(valuetype_t p_valuetype, Identifier *p_id);
478 void set_valuetype(valuetype_t p_valuetype, Assignment *p_ass);
479 void add_id(Identifier *p_id);
480 /** Follows the chain of references if any and returns the last
481 * element of the chain. In other words, the returned value is
482 * the first value which is not a reference. */
483 Value* get_value_refd_last
484 (ReferenceChain *refch=0,
485 Type::expected_value_t exp_val=Type::EXPECTED_DYNAMIC_VALUE);
486 Value *get_refd_sub_value(Ttcn::FieldOrArrayRefs *subrefs,
487 size_t start_i, bool usedInIsbound,
488 ReferenceChain *refch);
489 /** Returns true if the value is unknown at compile-time. */
490 bool is_unfoldable
491 (ReferenceChain *refch=0,
492 Type::expected_value_t exp_val=Type::EXPECTED_DYNAMIC_VALUE);
493
494 /** Returns whether the value is a single identifier, which can be either
495 * a reference or an enum value. */
496 bool is_undef_lowerid();
497 /** Returns the single identifier.
498 * It can be used only if \a is_undef_lowerid() returned true. */
499 const Identifier& get_undef_lowerid();
500 /** Converts the single identifier to a referenced value. */
501 void set_lowerid_to_ref();
502 /** Check if ref++; can be used instead of ref = ref + 1; */
503 bool can_use_increment(Reference *ref) const;
504
505 /** If this value is used in an expression, what is its return type? */
506 Type::typetype_t get_expr_returntype
507 (Type::expected_value_t exp_val=Type::EXPECTED_DYNAMIC_VALUE);
508 /** If this value is used in an expression, what is its governor?
509 * If has no governor, but is reference, then tries the
510 * referenced stuff... If not known, returns NULL. */
511 Type* get_expr_governor(Type::expected_value_t exp_val);
512 Type* get_expr_governor_v1v2(Type::expected_value_t exp_val);
513 Type* get_expr_governor_last();
514 /** get the type invoked */
515 Type *get_invoked_type(Type::expected_value_t exp_val);
970ed795
EL
516 private:
517 const char* get_opname() const;
518 /** Used to determine whether the reference points to value or
519 * template in ISCHOSEN, then convert to {ISCHOSEN}_{V,T} */
520 void chk_expr_ref_ischosen();
521 void chk_expr_operandtype_enum(const char *opname, Value *v,
522 Type::expected_value_t exp_val);
523 void chk_expr_operandtype_bool(Type::typetype_t tt, const char *opnum,
524 const char *opname, const Location *loc);
525 void chk_expr_operandtype_int(Type::typetype_t tt, const char *opnum,
526 const char *opname, const Location *loc);
527 void chk_expr_operandtype_float(Type::typetype_t tt, const char *opnum,
528 const char *opname, const Location *loc);
529 void chk_expr_operandtype_int_float(Type::typetype_t tt, const char *opnum,
530 const char *opname, const Location *loc);
531 void chk_expr_operandtype_int_float_enum(Type::typetype_t tt,
532 const char *opnum,
533 const char *opname,
534 const Location *loc);
535 /** Check that the operand is a list or string or something like it.
536 *
537 * This Value is usually an expression like
538 * @code lengthof(foo) @endcode
539 *
540 * @param t the type (governor) of the operand
541 * @param opnum describes the operand ("first", "left", ...)
542 * @param opname the name of the operation
543 * @param loc the operand itself as a Location object
544 * @param allow_array \a true if T_ARRAY is acceptable (rotate, lengthof)
545 * or \a false if it's not (concat, substr, replace).
546 */
547 void chk_expr_operandtype_list(Type* t, const char *opnum,
548 const char *opname, const Location *loc,
549 bool allow_array);
550 // Check that the operand of the operation is a string value
551 void chk_expr_operandtype_str(Type::typetype_t tt, const char *opnum,
552 const char *opname, const Location *loc);
553 void chk_expr_operandtype_charstr(Type::typetype_t tt, const char *opnum,
554 const char *opname, const Location *loc);
555 void chk_expr_operandtype_cstr(Type::typetype_t tt, const char *opnum,
556 const char *opname, const Location *loc);
557 void chk_expr_operandtype_binstr(Type::typetype_t tt, const char *opnum,
558 const char *opname, const Location *loc);
559 void chk_expr_operandtype_bstr(Type::typetype_t tt, const char *opnum,
560 const char *opname, const Location *loc);
561 void chk_expr_operandtype_hstr(Type::typetype_t tt, const char *opnum,
562 const char *opname, const Location *loc);
563 void chk_expr_operandtype_ostr(Type::typetype_t tt, const char *opnum,
564 const char *opname, const Location *loc);
565 void chk_expr_operandtypes_same(Type::typetype_t tt1, Type::typetype_t tt2,
566 const char *opname);
567 void chk_expr_operandtypes_same_with_opnum(Type::typetype_t tt1, Type::typetype_t tt2,
568 const char *opnum1, const char *opnum2,
569 const char *opname);
570 void chk_expr_operandtypes_compat(Type::expected_value_t exp_val,
571 Value *v1, Value *v2,
572 const char *opnum1 = "left",
573 const char *opnum2 = "right");
574 void chk_expr_operand_undef_running(Type::expected_value_t exp_val,
575 Ttcn::Ref_base *ref,
576 const char *opnum, const char *opname);
577 /** Returns the referred component type if it is correct. */
578 Type *chk_expr_operand_comptyperef_create();
579 /** Checks whether the special component references mtc, system and self
580 * have the correct component types (compatible with \a my_governor). */
581 void chk_expr_comptype_compat();
582 void chk_expr_operand_compref(Value *val, const char *opnum,
583 const char *opname);
584 void chk_expr_operand_tmrref(Ttcn::Ref_base *ref,
585 const char *opnum, const char *opname);
586 void chk_expr_operand_activate(Ttcn::Ref_base *ref,
587 const char *opnum, const char *opname);
588 void chk_expr_operand_activate_refd(Value *val,
589 Ttcn::TemplateInstances* t_list2,
590 Ttcn::ActualParList *&parlist,
591 const char *opnum, const char *opname);
592 void chk_expr_operand_execute(Ttcn::Ref_base *ref, Value *val,
593 const char *opnum, const char *opname);
594 void chk_expr_operand_execute_refd(Value *v1,
595 Ttcn::TemplateInstances* t_list2,
596 Ttcn::ActualParList *&parlist,
597 Value *v3, const char *opnum,
598 const char *opname);
599 void chk_invoke(Type::expected_value_t exp_val);
600 void chk_expr_eval_value(Value *val, Type &t,
601 ReferenceChain *refch,
602 Type::expected_value_t exp_val);
603 void chk_expr_eval_ti(TemplateInstance *ti, Type *t,
604 ReferenceChain *refch, Type::expected_value_t exp_val);
605 void chk_expr_val_int_pos0(Value *val, const char *opnum,
606 const char *opname);
607 void chk_expr_val_int_pos7bit(Value *val, const char *opnum,
608 const char *opname);
609 void chk_expr_val_int_pos31bit(Value *val, const char *opnum,
610 const char *opname);
611 void chk_expr_val_int_float_not0(Value *val, const char *opnum,
612 const char *opname);
613 void chk_expr_val_large_int(Value *val, const char *opnum,
614 const char *opname);
615 void chk_expr_val_len1(Value *val, const char *opnum,
616 const char *opname);
617 void chk_expr_val_str_len_even(Value *val, const char *opnum,
618 const char *opname);
619 void chk_expr_val_str_bindigits(Value *val, const char *opnum,
620 const char *opname);
621 void chk_expr_val_str_hexdigits(Value *val, const char *opnum,
622 const char *opname);
623 void chk_expr_val_str_7bitoctets(Value *val, const char *opnum,
624 const char *opname);
625 void chk_expr_val_str_int(Value *val, const char *opnum,
626 const char *opname);
627 void chk_expr_val_str_float(Value *val, const char *opnum,
628 const char *opname);
629 void chk_expr_val_ustr_7bitchars(Value *val, const char *opnum,
630 const char *opname);
631 void chk_expr_val_bitstr_intsize(Value *val, const char *opnum,
632 const char *opname);
633 void chk_expr_val_hexstr_intsize(Value *val, const char *opnum,
634 const char *opname);
635 void chk_expr_operands_int2binstr();
636 void chk_expr_operands_str_samelen();
637 void chk_expr_operands_replace();
638 void chk_expr_operands_substr();
639 void chk_expr_operands_regexp();
640 void chk_expr_operands_ischosen(ReferenceChain *refch,
641 Type::expected_value_t exp_val);
642 void chk_expr_operand_encode(ReferenceChain *refch,
643 Type::expected_value_t exp_val);
1d0599f0 644 /** \a has two possible value: OPTYPE_DECODE | OPTYPE_DECVALUE_UNICHAR */
645 void chk_expr_operands_decode(operationtype_t p_optype);
970ed795
EL
646 /** Checks whether \a this can be compared with omit value (i.e. \a this
647 * should be a referenced value pointing to a optional record/set field. */
648 void chk_expr_omit_comparison(Type::expected_value_t exp_val);
649 Int chk_eval_expr_sizeof(ReferenceChain *refch,
650 Type::expected_value_t exp_val);
651 /** The governor is returned. */
652 Type *chk_expr_operands_ti(TemplateInstance* ti, Type::expected_value_t exp_val);
653 void chk_expr_operands_match(Type::expected_value_t exp_val);
654 void chk_expr_dynamic_part(Type::expected_value_t exp_val,
655 bool allow_controlpart,
656 bool allow_runs_on = true,
657 bool require_runs_on = false);
658 /** Check the operands of an expression */
659 void chk_expr_operands(ReferenceChain *refch,
660 Type::expected_value_t exp_val);
661 void chk_expr_operand_valid_float(Value* v, const char *opnum, const char *opname);
662 /** Evaluate...
663 * Called by Value::get_value_refd_last() for V_EXPR */
664 void evaluate_value(ReferenceChain *refch, Type::expected_value_t exp_val);
665 /** Evaluate macro.
666 * Called by Value::get_value_refd_last() for V_MACRO */
667 void evaluate_macro(Type::expected_value_t exp_val);
668 /** Compile-time evaluation of isvalue()
669 *
670 * @param from_sequence \c true if called for a member of a sequence/set
671 * @return the compile-time result of calling isvalue()
672 */
673 bool evaluate_isvalue(bool from_sequence);
674
675 Value *get_refd_field_value(const Identifier& field_id, bool usedInIsbound,
676 const Location& loc);
677 Value *get_refd_array_value(Value *array_index, bool usedInIsbound,
678 ReferenceChain *refch);
679 Value *get_string_element(const Int& index, const Location& loc);
680
681 public:
682 /** Checks whether the value (expression) evaluates to built-in type
683 * \a p_tt. Argument \a type_name is the name of that type, it is used in
684 * error messages. */
685 void chk_expr_type(Type::typetype_t p_tt, const char *type_name,
686 Type::expected_value_t exp_val);
687 /** Checks that the value (expression) evals to a boolean value */
688 inline void chk_expr_bool(Type::expected_value_t exp_val)
689 { chk_expr_type(Type::T_BOOL, "boolean", exp_val); }
690 /** Checks that the value (expression) evals to an integer value */
691 inline void chk_expr_int(Type::expected_value_t exp_val)
692 { chk_expr_type(Type::T_INT, "integer", exp_val); }
693 /** Checks that the value (expression) evals to a float value */
694 inline void chk_expr_float(Type::expected_value_t exp_val)
695 { chk_expr_type(Type::T_REAL, "float", exp_val); }
696 /** Checks that the value (expression) evals to a verdict value */
697 inline void chk_expr_verdict(Type::expected_value_t exp_val)
698 { chk_expr_type(Type::T_VERDICT, "verdict", exp_val); }
699 /** Checks that the value (expression) evals to a default value */
700 inline void chk_expr_default(Type::expected_value_t exp_val)
701 { chk_expr_type(Type::T_DEFAULT, "default", exp_val); }
702
703 /* if "infinity" or "-infinity" was parsed then this is a real value or
704 a unary - expression containing a real value, where the real value is
705 infinity.
706 Returns -1 if -infinity was parsed, +1 if infinity, 0 in other cases */
707 int is_parsed_infinity();
708
709 bool get_val_bool();
710 int_val_t* get_val_Int();
711 const Identifier* get_val_id();
712 const ttcn3float& get_val_Real();
713 string get_val_str();
714 ustring get_val_ustr();
715 string get_val_iso2022str();
716 size_t get_val_strlen();
717 verdict_t get_val_verdict();
718 size_t get_nof_comps();
719 bool is_indexed() const;
720 const Identifier& get_alt_name();
721 Value *get_alt_value();
3abe9331 722 /** Sets the first letter in the name of the alternative to lowercase
723 * if it's an uppercase letter.
724 * Used on open types (the name of their alternatives can be given with both
725 * an uppercase or a lowercase first letter, and the generated code will need
726 * to use the lowercase version). */
727 void set_alt_name_to_lowercase();
970ed795
EL
728 /** Returns whether the embedded object identifier components
729 * contain any error. Applicable to OID/ROID values only. */
730 bool has_oid_error();
731 /** Collects all object identifier components of the value into \a
732 * comps. It follows and expands the embedded references.
733 * Applicable to OID/ROID values and referenced values pointing
734 * to them.
735 * @return true, if all components can be calculated in compile-time */
736 bool get_oid_comps(vector<string>& comps);
737 /** Get a component of SEQUENCE/SET, zero-based */
738 void add_se_comp(NamedValue* nv); // needed by implicit_omit
739 NamedValue* get_se_comp_byIndex(size_t n);
740 /** Get a component of an array/REC-OF/SET-OF */
741 Value *get_comp_byIndex(size_t n);
742 /** Get an index of an array/REC-OF/SET-OF */
743 Value *get_index_byIndex(size_t n);
744 /** Does a named component exist ? For SEQ/SET/CHOICE */
745 bool has_comp_withName(const Identifier& p_name);
746 NamedValue* get_se_comp_byName(const Identifier& p_name);
747 Value* get_comp_value_byName(const Identifier& p_name);
748 bool field_is_present(const Identifier& p_name);
749 bool field_is_chosen(const Identifier& p_name);
750 void chk_dupl_id();
751 size_t get_nof_ids() const;
752 Identifier* get_id_byIndex(size_t p_i);
753 bool has_id(const Identifier& p_id);
754 Reference *get_reference() const;
755 Reference *get_refered() const;
756 Common::Assignment *get_refd_fat() const;
757 /** Usable during AST building. If VariableRef is needed, then use
758 * the return value of this function, then delete this. */
759 Ttcn::Reference* steal_ttcn_ref();
760 Ttcn::Ref_base* steal_ttcn_ref_base();
761 void steal_invoke_data(Value*& p_v, Ttcn::ParsedActualParameters*& p_ti,
762 Ttcn::ActualParList*& p_ap);
763 Common::Assignment* get_refd_assignment();
764
765 void chk();
766 void chk_OID(ReferenceChain& refch);
767 void chk_ROID(ReferenceChain& refch);
768 /** Checks for circular references within embedded values */
769 void chk_recursions(ReferenceChain& refch);
770 /** Checks for circular references within embedded expressions */
771 void chk_recursions_expr(ReferenceChain& refch);
772 void chk_recursions_expr_decode(Ttcn::Ref_base* ref, ReferenceChain& refch);
773 /** Check that the value (a V_EXPR) - being used as the RHS - refers to
774 * the LHS of the assignment.
775 * @return true if self-assignment*/
776 bool chk_expr_self_ref(Common::Assignment *lhs);
777
778 virtual string create_stringRepr();
779 private:
780 static bool chk_expr_self_ref_templ(Ttcn::Template *t, Common::Assignment *lhs);
781 static bool chk_expr_self_ref_val (Common::Value *v, Common::Assignment *lhs);
782 string create_stringRepr_unary(const char *operator_str);
783 string create_stringRepr_infix(const char *operator_str);
784 string create_stringRepr_predef1(const char *function_name);
785 string create_stringRepr_predef2(const char *function_name);
786 public:
787 bool operator==(Value& val);
788 bool operator<(Value& val);
789 public:
790 /** Returns true if this value is of a string type */
791 bool is_string_type(Type::expected_value_t exp_val);
792 /** Public entry points for code generation. */
793 /** Generates the equivalent C++ code for the value. It is used
794 * when the value is part of a complex expression (e.g. as
795 * operand of a built-in operation, actual parameter, array
796 * index). The generated code fragments are appended to the
797 * fields of visitor \a expr. */
798 void generate_code_expr(expression_struct *expr);
799 /** Generates the C++ equivalent of \a this into \a expr and adds a "()"
800 * to expr->expr if \a this is referenced value that points to an optional
801 * field of a record/set value. */
802 void generate_code_expr_mandatory(expression_struct *expr);
803 /** Generates a C++ code sequence, which initializes the C++
804 * object named \a name with the contents of the value. The code
805 * sequence is appended to argument \a str and the resulting
806 * string is returned. */
807 char *generate_code_init(char *str, const char *name);
808 /** Appends the initialization sequence of all referred
809 * non-parameterized templates to \a str and returns the
810 * resulting string. Such templates may appear in the actual
811 * parameter list of parameterized value references
812 * (e.g. function calls) and in operands of valueof or match
813 * operations. */
2861f5cd 814 char *rearrange_init_code(char *str, Common::Module* usage_mod);
970ed795
EL
815 /**
816 * Generates a value for temporary use. Example:
817 *
818 * str: // empty
819 * prefix: if(
820 * blockcount: 0
821 *
822 * if the value is simple, then returns:
823 *
824 * // empty
825 * if(simple
826 *
827 * if the value is complex, then returns:
828 *
829 * // empty
830 * {
831 * booelan tmp_2;
832 * {
833 * preamble... tmp_1...
834 * tmp_2=func5(tmp_1);
835 * postamble
836 * }
837 * if(tmp_2
838 *
839 * and also increments the blockcount because you have to close it...
840 */
841 char* generate_code_tmp(char *str, const char *prefix, size_t& blockcount);
842 char* generate_code_tmp(char *str, char*& init);
843 /** Generates the C++ statement that puts the value of \a this into the
844 * log. It is used when the value appears in the argument of a log()
845 * statement. */
846 void generate_code_log(expression_struct *expr);
847 /** Generates the C++ equivalent of a match operation if it
848 * appears within a log() statement. Applicable only if \a this is
849 * an expression containing a match operation. */
850 void generate_code_log_match(expression_struct *expr);
851
852 private:
853 /** Private helper functions for code generation. */
854 /** Helper function for \a generate_code_expr(). It is used when
855 * the value is an expression. */
856 void generate_code_expr_expr(expression_struct *expr);
857 /** Helper function for \a generate_code_expr_expr(). It handles
858 * unary operators. */
859 static void generate_code_expr_unary(expression_struct *expr,
860 const char *operator_str, Value *v1);
861 /** Helper function for \a generate_code_expr_expr(). It handles infix
862 * binary operators. Flag \a optional_allowed is true when the operation
863 * has different meaning on optional fields (like comparison). Otherwise
864 * the optional operands are explicitly converted to a regular data
865 * type. */
866 void generate_code_expr_infix(expression_struct *expr,
867 const char *operator_str, Value *v1,
868 Value *v2, bool optional_allowed);
869 /** Helper function for \a generate_code_expr_expr(). It handles the
870 * logical "and" and "or" operation with short-circuit evaluation
871 * semantics. */
872 void generate_code_expr_and_or(expression_struct *expr);
873 /** Helper function for \a generate_code_expr_expr(). It handles
874 * built-in functions with one argument. */
875 static void generate_code_expr_predef1(expression_struct *expr,
876 const char *function_name,
877 Value *v1);
878 /** Helper function for \a generate_code_expr_expr(). It handles
879 * built-in functions with two arguments. */
880 static void generate_code_expr_predef2(expression_struct *expr,
881 const char *function_name,
882 Value *v1, Value *v2);
883 /** Helper function for \a generate_code_expr_expr(). It handles
884 * built-in functions with three arguments. */
885 static void generate_code_expr_predef3(expression_struct *expr,
886 const char *function_name,
887 Value *v1, Value *v2, Value *v3);
888 /** Helper functions for \a generate_code_expr_expr(). */
889 void generate_code_expr_substr(expression_struct *expr);
890 void generate_code_expr_substr_replace_compat(expression_struct *expr);
891 void generate_code_expr_regexp(expression_struct *expr);
892 void generate_code_expr_replace(expression_struct *expr);
893 /** Helper function for \a generate_code_expr_expr(). It handles
894 * built-in function rnd(). */
895 static void generate_code_expr_rnd(expression_struct *expr,
896 Value *v1);
897 /** Helper function for \a generate_code_expr_expr(). It handles
898 * create(). */
899 static void generate_code_expr_create(expression_struct *expr,
900 Ttcn::Ref_base *type, Value *name, Value *location, bool alive);
901 /** Helper function for \a generate_code_expr_expr(). It handles
902 * activate(). */
903 void generate_code_expr_activate(expression_struct *expr);
904 /** Helper function for \a generate_code_expr_expr(). It handles
905 * activate() with derefers(). */
906 void generate_code_expr_activate_refd(expression_struct *expr);
907 /** Helper function for \a generate_code_expr_expr(). It handles
908 * execute(). */
909 void generate_code_expr_execute(expression_struct *expr);
910 /** Helper function for \a generate_code_expr_expr(). It handles
911 * execute() with derefers(). */
912 void generate_code_expr_execute_refd(expression_struct *expr);
913 /** Helper function for \a generate_code_expr(). It handles invoke */
914 void generate_code_expr_invoke(expression_struct *expr);
915
916 /** Adds the character sequence "()" to expr->expr if \a ref points to
917 * an optional field of a record/set value. */
918 static void generate_code_expr_optional_field_ref(expression_struct *expr,
919 Reference *ref);
920
921 void generate_code_expr_encode(expression_struct *expr);
922
923 void generate_code_expr_decode(expression_struct *expr);
1d0599f0 924
925 void generate_code_expr_encvalue_unichar(expression_struct *expr);
926
927 void generate_code_expr_decvalue_unichar(expression_struct *expr);
928
0a1610f4 929 void generate_code_expr_checkstate(expression_struct *expr);
930
efbe586d 931 void generate_code_expr_hostid(expression_struct *expr);
932
1d0599f0 933 char* generate_code_char_coding_check(expression_struct *expr, Value *v, const char *name);
970ed795
EL
934
935 /** Helper function for \a generate_code_init(). It handles the
936 * union (CHOICE) values. */
937 char *generate_code_init_choice(char *str, const char *name);
938 /** Helper function for \a generate_code_init(). It handles the
939 * 'record of'/'set of' ('SEQUENCE OF'/'SET OF') values. */
940 char *generate_code_init_seof(char *str, const char *name);
941 /** Helper function for \a generate_code_init(). It handles the
942 * indexed value notation for 'record of'/'set of' ('SEQUENCE OF'/
943 * 'SET OF') values. */
944 char *generate_code_init_indexed(char *str, const char *name);
945 /** Helper function for \a generate_code_init(). It handles the
946 * array values. */
947 char *generate_code_init_array(char *str, const char *name);
948 /** Helper function for \a generate_code_init(). It handles the
949 * record/set (SEQUENCE/SET) values. */
950 char *generate_code_init_se(char *str, const char *name);
951 /** Helper function for \a generate_code_init(). It handles the
952 * referenced values. */
953 char *generate_code_init_refd(char *str, const char *name);
954
955 public:
3abe9331 956 /** Generates JSON code from this value. Used in JSON schema generation.
957 * No code is generated for special float values NaN, INF and -INF if the
958 * 2nd parameter is false. */
3f84031e 959 void generate_json_value(JSON_Tokenizer& json,
960 bool allow_special_float = true, bool union_value_list = false,
961 Ttcn::JsonOmitCombination* omit_combo = NULL);
3abe9331 962
970ed795
EL
963 /** Returns whether C++ explicit cast (type conversion) is necessary when
964 * \a this is the argument of a send() or log() statement. True is returned
965 * when the type of the C++ equivalent is ambiguous or is a built-in type
966 * that has to be converted to the respective TTCN-3 value class
967 * (e.g. int -> class INTEGER). */
968 bool explicit_cast_needed(bool forIsValue = false);
969 /** Returns whether the value can be represented by an in-line C++
970 * expression. */
971 bool has_single_expr();
972 /** Returns the equivalent C++ expression. It can be used only if
973 * \a has_single_expr() returns true. */
974 string get_single_expr();
975 private:
976 /** Helper function for has_single_expr(). Used when the value contains
977 * an expression */
978 bool has_single_expr_expr();
979 /** Helper function for has_single_expr(). Used for invoke operations and
980 * for activate and execute combined with derefer */
981 static bool has_single_expr_invoke(Value *v, Ttcn::ActualParList *ap_list);
982 /** Helper function for \a get_single_expr(). Used for enumerated
983 * values only. It considers the enum-hack option. */
984 string get_single_expr_enum();
985 /** Helper function for \a get_single_expr(). Used for ISO2022
986 * string values only. The generated code refers to the
987 * user-defined conversion functions of the RTE. */
988 string get_single_expr_iso2022str();
989 /** Helper function for \a get_single_expr(). Used by literal function,
990 * altstep and testcase values denoted by refer(). */
991 string get_single_expr_fat();
992 /** Returns whether the value is compound (i.e. record, set,
993 * union, record of, set of). */
994 bool is_compound();
995 /** Returns whether the C++ initialization sequence requires a
996 * temporary variable reference to be introduced for efficiency
997 * reasons. */
998 bool needs_temp_ref();
999 /** Returns whether the evaluation of \a this has side-effects that shall
1000 * be eliminated in case of short-circuit evaluation of logical "and" and
1001 * "or" operations. This function is applied on the second (right) operand
1002 * of the expression. */
1003 bool needs_short_circuit();
1004 public:
1005 virtual void dump(unsigned level) const;
1006 private:
1007 inline void set_val_str(string *p_val_str)
1008 { u.str.val_str = p_val_str; u.str.str_elements = 0; }
1009 inline void set_val_ustr(ustring *p_val_ustr)
1010 { u.ustr.val_ustr = p_val_ustr; u.ustr.ustr_elements = 0; }
1011 void add_string_element(size_t index, Value *v_element,
1012 map<size_t, Value>*& string_elements);
1013 };
1014
1015 /** @} end of AST_Value group */
1016
1017 class LazyParamData {
1018 static int depth; // recursive code generation: calling a func. with lazy param inside a lazy param
1019 static bool used_as_lvalue;
1020 static vector<string>* type_vec;
1021 static vector<string>* refd_vec;
1022 public:
1023 static bool in_lazy();
1024 static void init(bool p_used_as_lvalue);
1025 static void clean();
1026 static string add_ref_genname(Assignment* ass, Scope* scope);
1027 static string get_member_name(size_t idx);
1028 static string get_constr_param_name(size_t idx);
1029 static void generate_code_for_value(expression_struct* expr, Value* val, Scope* my_scope);
1030 static void generate_code_for_template(expression_struct* expr, TemplateInstance* temp, template_restriction_t gen_restriction_check, Scope* my_scope);
1031 static void generate_code(expression_struct *expr, Value* value, Scope* scope);
1032 static void generate_code(expression_struct *expr, TemplateInstance* temp, template_restriction_t gen_restriction_check, Scope* scope);
1033 static void generate_code_lazyparam_class(expression_struct *expr, expression_struct& param_expr, const string& lazy_param_id, const string& type_name);
1034 static void generate_code_ap_default_ref(expression_struct *expr, Ttcn::Ref_base* ref, Scope* scope);
1035 static void generate_code_ap_default_value(expression_struct *expr, Value* value, Scope* scope);
1036 static void generate_code_ap_default_ti(expression_struct *expr, TemplateInstance* ti, Scope* scope);
1037 };
3abe9331 1038
970ed795
EL
1039} // namespace Common
1040
1041#endif // _Common_Value_HH
This page took 0.062716 seconds and 5 git commands to generate.