yast2-core
YExpression.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | |
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
8 | |
9 | core system |
10 | (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12 
13  File: YExpression.h
14 
15  Author: Klaus Kaempf <kkaempf@suse.de>
16  Maintainer: Klaus Kaempf <kkaempf@suse.de>
17 
18  This file defines the various 'expressions' in YCode
19 
20 /-*/
21 // -*- c++ -*-
22 
23 #ifndef YExpression_h
24 #define YExpression_h
25 
26 #include <iosfwd>
27 #include <string>
28 using std::string;
29 
30 #include "ycp/YCode.h"
31 #include "y2/Y2Function.h"
32 
33 class Logger;
34 
35 //---------------------------------------------------------
36 
55 
56 //---------------------------------------------------------
57 // variable ref (-> Block + position)
58 
59 class YEVariable : public YCode
60 {
62  SymbolEntryPtr m_entry;
63 public:
64  YEVariable (SymbolEntryPtr entry);
66  ~YEVariable () {};
67  virtual ykind kind () const { return yeVariable; }
68  const char *name () const;
69  SymbolEntryPtr entry () const;
70  string toString () const;
72  virtual bool isReferenceable () const { return true; }
73  YCPValue evaluate (bool cse = false);
74  std::ostream & toStream (std::ostream & str) const;
75  std::ostream & toXml (std::ostream & str, int indent ) const;
76  constTypePtr type() const { return m_entry->type(); }
77 };
78 
79 //---------------------------------------------------------
80 // reference (-> Block + position)
81 
82 class YEReference : public YCode
83 {
85  SymbolEntryPtr m_entry;
86 public:
87  YEReference (SymbolEntryPtr entry);
89  ~YEReference () {};
90  virtual ykind kind () const { return yeReference; }
91  const char *name () const;
92  SymbolEntryPtr entry () const;
93  string toString () const;
94  YCPValue evaluate (bool cse = false);
95  std::ostream & toStream (std::ostream & str) const;
96  std::ostream & toXml (std::ostream & str, int indent ) const;
97  constTypePtr type() const;
98 };
99 
100 //---------------------------------------------------------
101 // Term (-> name, args)
102 
103 class YETerm : public YCode
104 {
105  REP_BODY(YETerm);
106  const char *m_name;
108 public:
109  YETerm (const char *name);
111  ~YETerm ();
112  virtual ykind kind () const { return yeTerm; }
113  // dummy is here just to make it similar to YEBuiltin and YEFunction
114  constTypePtr attachParameter (YCodePtr code, constTypePtr dummy = Type::Unspec);
115  string toString () const;
116  const char *name () const;
117  YCPValue evaluate (bool cse = false);
118  std::ostream & toStream (std::ostream & str) const;
119  std::ostream & toXml (std::ostream & str, int indent ) const;
120  constTypePtr type() const { return Type::Term; }
121 };
122 
123 
124 //---------------------------------------------------------
125 // Compare (-> arg1, arg2, type)
126 
127 class YECompare : public YCode
128 {
130 public:
131  enum cmp_op { C_NOT = 1, C_EQ = 2, C_LT = 4, // base operations
136  };
137  typedef cmp_op c_op;
138 private:
139  YCodePtr m_left;
141  YCodePtr m_right;
142 public:
143  YECompare (YCodePtr left, c_op op, YCodePtr right);
145  ~YECompare ();
146  virtual ykind kind () const { return yeCompare; }
147  string toString () const;
148  YCPValue evaluate (bool cse = false);
149  std::ostream & toStream (std::ostream & str) const;
150  std::ostream & toXml (std::ostream & str, int indent ) const;
151  constTypePtr type() const { return Type::Boolean; }
152 };
153 
154 
155 //---------------------------------------------------------
156 // locale expression (-> singular, plural, count)
157 
158 class YELocale : public YCode
159 {
161  const char *m_singular;
162  const char *m_plural;
163  YCodePtr m_count;
164  YLocale::t_uniquedomains::const_iterator m_domain;
165 public:
166  YELocale (const char *singular, const char *plural, YCodePtr count, const char *textdomain);
168  ~YELocale ();
169  virtual ykind kind () const { return yeLocale; }
170  string toString () const;
171  YCPValue evaluate (bool cse = false);
172  std::ostream & toStream (std::ostream & str) const;
173  std::ostream & toXml (std::ostream & str, int indent ) const;
174  constTypePtr type() const { return Type::Locale; }
175 };
176 
177 
178 //---------------------------------------------------------
179 // list expression (-> value, next list value)
180 
181 class YEList : public YCode
182 {
183  REP_BODY(YEList);
185 public:
186  YEList (YCodePtr code);
188  ~YEList ();
189  virtual ykind kind () const { return yeList; }
190  void attach (YCodePtr element);
191 // YCodePtr code () const;
192  string toString () const;
193  YCPValue evaluate (bool cse = false);
194  std::ostream & toStream (std::ostream & str) const;
195  std::ostream & toXml (std::ostream & str, int indent ) const;
196  constTypePtr type() const;
197  int count () const;
198  YCodePtr value (int index) const;
199 };
200 
201 
202 //---------------------------------------------------------
203 // map expression (-> key, value, next key/value pair)
204 
205 class YEMap : public YCode
206 {
207  REP_BODY(YEMap);
208  typedef struct mapval { YCodePtr key; YCodePtr value; struct mapval *next; } mapval_t;
210 public:
211  YEMap (YCodePtr key, YCodePtr value);
213  ~YEMap ();
214  virtual ykind kind () const { return yeMap; }
215  void attach (YCodePtr key, YCodePtr value);
216 // YCodePtr key () const;
217 // YCodePtr value () const;
218  string toString () const;
219  YCPValue evaluate (bool cse = false);
220  std::ostream & toStream (std::ostream & str) const;
221  std::ostream & toXml (std::ostream & str, int indent ) const;
222  constTypePtr type() const;
223 };
224 
225 
226 //---------------------------------------------------------
227 // propagation expression (-> value, from type, to type)
228 
229 class YEPropagate : public YCode
230 {
232  constTypePtr m_from;
233  constTypePtr m_to;
234  YCodePtr m_value;
235 public:
236  YEPropagate (YCodePtr value, constTypePtr from, constTypePtr to);
238  ~YEPropagate ();
239  virtual ykind kind () const { return yePropagate; }
240  string toString () const;
241  bool canPropagate(const YCPValue& value, constTypePtr to_type) const;
242  YCPValue evaluate (bool cse = false);
243  std::ostream & toStream (std::ostream & str) const;
244  std::ostream & toXml (std::ostream & str, int indent ) const;
245  constTypePtr type() const { return m_to; }
246 };
247 
248 
249 //---------------------------------------------------------
250 // unary expression (-> declaration_t, arg)
251 
252 class YEUnary : public YCode
253 {
254  REP_BODY(YEUnary);
256  YCodePtr m_arg; // argument
257 public:
258  YEUnary (declaration_t *decl, YCodePtr arg); // expression
260  ~YEUnary ();
261  virtual ykind kind () const { return yeUnary; }
262  declaration_t *decl () const;
263 // YCodePtr arg () const;
264  string toString () const;
265  YCPValue evaluate (bool cse = false);
266  std::ostream & toStream (std::ostream & str) const;
267  std::ostream & toXml (std::ostream & str, int indent ) const;
268  constTypePtr type() const { return ((constFunctionTypePtr)m_decl->type)->returnType (); }
269 };
270 
271 
272 //---------------------------------------------------------
273 // binary expression (-> declaration_t, arg1, arg2)
274 
275 class YEBinary : public YCode
276 {
279  YCodePtr m_arg1; // argument1
280  YCodePtr m_arg2; // argument2
281 public:
282  YEBinary (declaration_t *decl, YCodePtr arg1, YCodePtr arg2);
284  ~YEBinary ();
285  virtual ykind kind () const { return yeBinary; }
286  declaration_t *decl ();
287 // YCodePtr arg1 () const;
288 // YCodePtr arg2 () const;
289  string toString () const;
290  YCPValue evaluate (bool cse = false);
291  std::ostream & toStream (std::ostream & str) const;
292  std::ostream & toXml (std::ostream & str, int indent ) const;
293  constTypePtr type() const;
294 };
295 
296 
297 //---------------------------------------------------------
298 // Triple (? :) expression (-> bool expr, true value, false value)
299 
300 class YETriple : public YCode
301 {
303  YCodePtr m_expr; // bool expr
304  YCodePtr m_true; // true value
305  YCodePtr m_false; // false value
306 public:
307  YETriple (YCodePtr a_expr, YCodePtr a_true, YCodePtr a_false);
309  ~YETriple ();
310  virtual ykind kind () const { return yeTriple; }
311 // YCodePtr expr () const;
312 // YCodePtr iftrue () const;
313 // YCodePtr iffalse () const;
314  string toString () const;
315  YCPValue evaluate (bool cse = false);
316  std::ostream & toStream (std::ostream & str) const;
317  std::ostream & toXml (std::ostream & str, int indent ) const;
318  constTypePtr type() const { return m_true->type ()->commontype (m_false->type ()); }
319 };
320 
321 
322 //---------------------------------------------------------
323 // is (-> expression, type)
324 
325 class YEIs : public YCode
326 {
327  REP_BODY(YEIs);
328  YCodePtr m_expr;
329  constTypePtr m_type;
330 public:
331  YEIs (YCodePtr expr, constTypePtr type);
333  ~YEIs ();
334  virtual ykind kind () const { return yeIs; }
335  string toString () const;
336  YCPValue evaluate (bool cse = false);
337  std::ostream & toStream (std::ostream & str) const;
338  std::ostream & toXml (std::ostream & str, int indent ) const;
339  constTypePtr type() const { return Type::Boolean; }
340 };
341 
342 
343 //---------------------------------------------------------
344 // return (-> expression)
345 
346 class YEReturn : public YCode
347 {
349  YCodePtr m_expr;
350 public:
351  YEReturn (YCodePtr expr);
353  ~YEReturn ();
354  virtual ykind kind () const { return yeReturn; }
355  string toString () const;
356  YCPValue evaluate (bool cse = false);
357  std::ostream & toStream (std::ostream & str) const;
358  std::ostream & toXml (std::ostream & str, int indent ) const;
359  constTypePtr type() const { return m_expr->type(); }
360 };
361 
362 
363 //---------------------------------------------------------
364 // bracket (-> expression)
365 
366 class YEBracket : public YCode
367 {
369  YCodePtr m_var; // (list, map) variable
370  YCodePtr m_arg; // bracket arguments
371  YCodePtr m_def; // default expression
372  constTypePtr m_resultType; // result type according to the parser
373 public:
374  YEBracket (YCodePtr var, YCodePtr arg, YCodePtr def, constTypePtr resultType);
376  ~YEBracket ();
377  virtual ykind kind () const { return yeBracket; }
378  string toString () const;
379  YCPValue evaluate (bool cse = false);
380  std::ostream & toStream (std::ostream & str) const;
381  std::ostream & toXml (std::ostream & str, int indent ) const;
382  constTypePtr type() const { return m_resultType; }
383  YCodePtr def () const { return m_def; }
384 };
385 
386 
387 //---------------------------------------------------------
388 // Builtin ref (-> declaration_t, type, Args)
389 
390 class YEBuiltin : public YCode
391 {
394  constFunctionTypePtr m_type;
395 
396  // symbol parameters (NULL, if no symbolic parameters)
397  YBlockPtr m_parameterblock;
398 
400 public:
401  YEBuiltin (declaration_t *decl, YBlockPtr parameterblock = 0, constTypePtr type = 0);
403  ~YEBuiltin ();
404  virtual ykind kind () const { return yeBuiltin; }
405  declaration_t *decl () const;
414  constTypePtr finalize (Logger* problem_logger);
415  // check if m_parameterblock is really needed, drop if not
416  void closeParameters ();
417  // see YEFunction::attachParameter
418  constTypePtr attachParameter (YCodePtr code, constTypePtr type = Type::Unspec);
419  // attach symbolic variable parameter to function, return created TableEntry
420  constTypePtr attachSymVariable (const char *name, constTypePtr type, unsigned int line, TableEntry *&tentry);
421  string toString () const;
422  YCPValue evaluate (bool cse = false);
423  std::ostream & toStream (std::ostream & str) const;
424  std::ostream & toXml (std::ostream & str, int indent ) const;
425  constTypePtr type () const;
426  constTypePtr completeType () const;
427  YBlockPtr parameterBlock () const;
428 };
429 
430 //---------------------------------------------------------
431 // Function call - parameter handling common base
432 
433 class YECall : public YCode
434 {
435  REP_BODY(YECall);
436 protected:
438  SymbolEntryPtr m_sentry;
439  YCodePtr *m_parameters;
440  constTypePtr *m_parameter_types;
442 
444 public:
447  ~YECall ();
448  const SymbolEntryPtr entry () const;
458  constTypePtr attachParameter (YCodePtr code, constTypePtr type);
466  virtual constTypePtr finalize ();
467  string toString () const;
468  std::ostream & toStream (std::ostream & str) const;
469  std::ostream & toXml (std::ostream & str, int indent ) const;
470  constTypePtr type() const;
471  string qualifiedName () const;
472 
473  static YECallPtr readCall (bytecodeistream & str);
474 };
475 
476 //---------------------------------------------------------
477 // Function ref (-> SymbolEntry ( param, param, ...) )
478 
479 class YEFunction : public YECall
480 {
482 public:
485  virtual ykind kind () const { return yeFunction; }
486  virtual YCPValue evaluate (bool cse = false);
487  virtual constTypePtr finalize ();
488 };
489 
490 //---------------------------------------------------------
491 // Function ref (-> SymbolEntry ( param, param, ...) )
492 
493 class YEFunctionPointer : public YECall
494 {
496 public:
499  virtual ykind kind () const { return yeFunctionPointer; }
500  virtual YCPValue evaluate (bool cse = false);
501 };
502 
503 //---------------------------------------------------------
504 // Function call for outer space (similar to YEFunction) ref (-> SymbolEntry ( param, param, ...) )
505 
506 class Y2YCPFunction : public Y2Function
507 {
508  YSymbolEntryPtr m_sentry;
510 public:
511  Y2YCPFunction (YSymbolEntryPtr entry);
512  ~Y2YCPFunction ();
513 
514  string qualifiedName () const;
515  string name () const;
516 
517  // implementation of the Y2Function interface:
518 
519  virtual bool attachParameter (const YCPValue& arg, const int pos);
520  virtual constTypePtr wantedParameterType () const;
521  virtual bool appendParameter (const YCPValue& arg);
522  virtual bool finishParameters ();
523  virtual YCPValue evaluateCall ();
524  virtual bool reset ();
525 };
526 
527 #endif // YExpression_h
c++ interface for logging
Definition: libycp/src/include/ycp/y2log.h:73
Y2Function * m_functioncall
Definition: YExpression.h:441
YETriple(YCodePtr a_expr, YCodePtr a_true, YCodePtr a_false)
Definition: YExpression.cc:1480
Definition: YExpression.h:229
TableEntry * m_entry
Definition: YExpression.h:437
constTypePtr type() const
Definition: YExpression.h:268
constTypePtr type() const
Definition: YExpression.h:151
YCPValue * m_parameters
Definition: YExpression.h:509
declaration_t * decl() const
Definition: YExpression.cc:1261
#define DEFINE_DERIVED_POINTER(NAME, BASE)
Definition: RepDef.h:69
string toString() const
Definition: YExpression.cc:465
constTypePtr completeType() const
Definition: YExpression.cc:2305
Definition: YExpression.h:325
Definition: YCode.h:106
YCode for precompiled ycp code.
Definition: YCode.h:75
Definition: YCode.h:110
static const constTypePtr Term
Definition: Type.h:131
YCodePtr m_false
Definition: YExpression.h:305
YCodePtr m_arg1
Definition: YExpression.h:279
string qualifiedName() const
Definition: YExpression.cc:3518
constTypePtr attachSymVariable(const char *name, constTypePtr type, unsigned int line, TableEntry *&tentry)
Definition: YExpression.cc:2380
SymbolEntryPtr m_entry
Definition: YExpression.h:62
~YEUnary()
Definition: YExpression.cc:1255
Definition: YExpression.h:181
uint m_next_param_id
Definition: YExpression.h:443
Definition: YCode.h:126
YCodePtr m_expr
Definition: YExpression.h:349
#define str
Definition: scanner.cc:997
Definition: YExpression.h:127
Definition: YExpression.h:158
int count() const
Definition: YExpression.cc:775
virtual ykind kind() const
Definition: YExpression.h:310
string toString() const
Definition: YExpression.cc:2431
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:616
constTypePtr type() const
Definition: YExpression.h:318
YCodePtr m_def
Definition: YExpression.h:371
string toString() const
Definition: YExpression.cc:2991
struct mapval * next
Definition: YExpression.h:208
constTypePtr type() const
Definition: YExpression.cc:2278
YCodePtr m_arg
Definition: YExpression.h:370
virtual ykind kind() const
Definition: YExpression.h:67
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:1775
virtual ykind kind() const
Definition: YExpression.h:239
YEVariable(SymbolEntryPtr entry)
Definition: YExpression.cc:77
constFunctionTypePtr m_type
Definition: YExpression.h:394
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:1710
virtual ykind kind() const
Definition: YExpression.h:90
const char * m_singular
Definition: YExpression.h:161
constTypePtr type() const
Definition: YExpression.h:174
declaration_t * m_decl
Definition: YExpression.h:278
static const constTypePtr Locale
Definition: Type.h:127
virtual bool attachParameter(const YCPValue &arg, const int pos)
Definition: YExpression.cc:3457
~YEReference()
Definition: YExpression.h:89
SymbolEntryPtr m_entry
Definition: YExpression.h:85
YCodePtr m_expr
Definition: YExpression.h:328
YELocale(const char *singular, const char *plural, YCodePtr count, const char *textdomain)
Definition: YExpression.cc:561
constTypePtr type
Definition: StaticDeclaration.h:77
virtual ykind kind() const
Definition: YExpression.h:499
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:1717
Definition: YExpression.h:103
virtual YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:3231
string toString() const
Definition: YExpression.cc:338
virtual bool reset()
Definition: YExpression.cc:3527
cmp_op
Definition: YExpression.h:131
declaration_t * decl()
Definition: YExpression.cc:1366
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:1724
string toString() const
Definition: YExpression.cc:1504
YCodePtr m_value
Definition: YExpression.h:234
ykind
Definition: YCode.h:90
Definition: YExpression.h:390
virtual YCPValue evaluateCall()
Definition: YExpression.cc:3344
virtual ykind kind() const
Definition: YExpression.h:404
Definition: YExpression.h:131
constTypePtr type() const
Definition: YExpression.h:245
Definition: YExpression.h:252
Y2YCPFunction(YSymbolEntryPtr entry)
Definition: YExpression.cc:3316
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:1548
void attach(YCodePtr element)
Definition: YExpression.cc:708
Definition: YCode.h:118
Definition: YExpression.h:131
string toString() const
Definition: YExpression.cc:906
Definition: YCode.h:127
YCodePtr m_arg
Definition: YExpression.h:256
YEUnary(declaration_t *decl, YCodePtr arg)
Definition: YExpression.cc:1234
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:140
virtual constTypePtr finalize()
Definition: YExpression.cc:3192
ycodelist_t * m_parameters
Definition: YExpression.h:107
REP_BODY(YEList)
constTypePtr type() const
Definition: YExpression.h:120
constTypePtr finalize(Logger *problem_logger)
Definition: YExpression.cc:2093
virtual ykind kind() const
Definition: YExpression.h:285
YECall(TableEntry *entry)
Definition: YExpression.cc:2637
constTypePtr attachParameter(YCodePtr code, constTypePtr dummy=Type::Unspec)
Definition: YExpression.cc:303
constTypePtr type() const
Definition: YExpression.h:339
virtual YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:3099
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:1950
~YEList()
Definition: YExpression.cc:694
constTypePtr attachParameter(YCodePtr code, constTypePtr type)
Definition: YExpression.cc:2805
void closeParameters()
Definition: YExpression.cc:2258
REP_BODY(YETerm)
virtual ykind kind() const
Definition: YExpression.h:189
Definition: YExpression.h:275
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:535
const char * name() const
Definition: YExpression.cc:99
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:218
YBlockPtr m_parameterblock
Definition: YExpression.h:397
ycodelist_t * m_parameters
Definition: YExpression.h:399
YEReturn(YCodePtr expr)
Definition: YExpression.cc:1680
Definition: YCode.h:58
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:1558
constTypePtr type() const
Definition: YExpression.cc:1452
Definition: YExpression.h:82
declaration_t * m_decl
Definition: YExpression.h:255
YEBracket(YCodePtr var, YCodePtr arg, YCodePtr def, constTypePtr resultType)
Definition: YExpression.cc:1737
YCodePtr value(int index) const
Definition: YExpression.cc:789
YSymbolEntryPtr m_sentry
Definition: YExpression.h:508
SymbolEntryPtr entry() const
Definition: YExpression.cc:184
~YEBuiltin()
Definition: YExpression.cc:2057
~Y2YCPFunction()
Definition: YExpression.cc:3337
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:113
REP_BODY(YECall)
YECompare(YCodePtr left, c_op op, YCodePtr right)
Definition: YExpression.cc:422
mapval_t * m_first
Definition: YExpression.h:209
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:745
Definition: YExpression.h:366
Definition: YExpression.h:346
REP_BODY(YEReturn)
YLocale::t_uniquedomains::const_iterator m_domain
Definition: YExpression.h:164
REP_BODY(YEMap)
const char * m_plural
Definition: YExpression.h:162
YETerm(const char *name)
Definition: YExpression.cc:248
SymbolEntryPtr m_sentry
Definition: YExpression.h:438
~YEPropagate()
Definition: YExpression.cc:1074
virtual ykind kind() const
Definition: YExpression.h:377
Definition: YExpression.h:208
virtual ykind kind() const
Definition: YExpression.h:485
string toString() const
Definition: YExpression.cc:606
const char * name() const
Definition: YExpression.cc:191
YCodePtr * m_parameters
Definition: YExpression.h:439
string toString() const
Definition: YExpression.cc:1268
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:547
static const constTypePtr Unspec
Definition: Type.h:118
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:1608
Definition: YExpression.h:134
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:1322
REP_BODY(YEUnary)
Definition: YCode.h:130
string name() const
Definition: YExpression.cc:3539
YEIs(YCodePtr expr, constTypePtr type)
Definition: YExpression.cc:1575
string toString() const
Definition: YExpression.cc:1765
constTypePtr type() const
Definition: YExpression.h:359
Definition: YCode.h:107
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:1438
constTypePtr type() const
Definition: YExpression.cc:829
constTypePtr type() const
Definition: YExpression.h:76
REP_BODY(YECompare)
c_op m_op
Definition: YExpression.h:140
~YEBracket()
Definition: YExpression.cc:1759
REP_BODY(YEReference)
YEBuiltin(declaration_t *decl, YBlockPtr parameterblock=0, constTypePtr type=0)
Definition: YExpression.cc:1913
virtual ykind kind() const
Definition: YExpression.h:354
constTypePtr * m_parameter_types
Definition: YExpression.h:440
Definition: YExpression.h:59
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:1211
SymbolEntryPtr entry() const
Definition: YExpression.cc:92
const char * m_name
Definition: YExpression.h:106
ycodelist_t * m_first
Definition: YExpression.h:184
Definition: YCode.h:116
Definition: YExpression.h:132
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:650
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:3014
static YECallPtr readCall(bytecodeistream &str)
Definition: YExpression.cc:2734
Definition: YCode.h:113
Definition: YExpression.h:133
~YEMap()
Definition: YExpression.cc:871
Definition: YCode.h:125
Definition: YExpression.h:433
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:3031
constTypePtr m_resultType
Definition: YExpression.h:372
Definition: YCode.h:117
YCodePtr m_left
Definition: YExpression.h:139
const SymbolEntryPtr entry() const
Definition: YExpression.cc:2784
Definition: YCode.h:122
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:477
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:1311
YEMap(YCodePtr key, YCodePtr value)
Definition: YExpression.cc:849
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:802
string toString() const
Definition: YExpression.cc:727
cmp_op c_op
Definition: YExpression.h:137
Definition: StaticDeclaration.h:71
constTypePtr m_type
Definition: YExpression.h:329
bool canPropagate(const YCPValue &value, constTypePtr to_type) const
Definition: YExpression.cc:1087
~YEBinary()
Definition: YExpression.cc:1360
declaration_t * decl() const
Definition: YExpression.cc:2070
REP_BODY(YELocale)
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:2451
constTypePtr type() const
Definition: YExpression.cc:1014
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:227
virtual bool appendParameter(const YCPValue &arg)
Definition: YExpression.cc:3470
Definition: YExpression.h:131
string qualifiedName() const
Definition: YExpression.cc:3066
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:1658
REP_BODY(YEIs)
string toString() const
Definition: YExpression.cc:1700
string toString() const
Definition: YExpression.cc:1080
constTypePtr attachParameter(YCodePtr code, constTypePtr type=Type::Unspec)
Definition: YExpression.cc:2323
constTypePtr m_to
Definition: YExpression.h:233
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:1977
virtual bool finishParameters()
Definition: YExpression.cc:3502
REP_BODY(YEFunctionPointer)
YEReference(SymbolEntryPtr entry)
Definition: YExpression.cc:166
Definition: YExpression.h:205
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:1382
~YECompare()
Definition: YExpression.cc:442
virtual ykind kind() const
Definition: YExpression.h:261
REP_BODY(YEPropagate)
YCodePtr m_true
Definition: YExpression.h:304
Definition: YExpression.h:135
YEFunctionPointer(TableEntry *entry)
Definition: YExpression.cc:3215
Definition: YCode.h:108
YEFunction(TableEntry *entry)
Definition: YExpression.cc:3077
~YEReturn()
Definition: YExpression.cc:1694
YBlockPtr parameterBlock() const
Definition: YExpression.cc:2077
YCodePtr value
Definition: YExpression.h:208
virtual constTypePtr wantedParameterType() const
Definition: YExpression.cc:3427
Definition: YCode.h:128
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:1276
Definition: YCode.h:115
REP_BODY(YEBuiltin)
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:1426
virtual ykind kind() const
Definition: YExpression.h:112
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:392
struct YEMap::mapval mapval_t
virtual constTypePtr finalize()
Definition: YExpression.cc:2865
Wrapper for YCPValueRep This class realizes an automatic memory management via YCPElement. Access the functionality of YCPValueRep with the arrow operator. See YCPValueRep.
Definition: YCPValue.h:275
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:400
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:205
string toString() const
Definition: YExpression.cc:1373
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:362
REP_BODY(YEVariable)
Definition: YExpression.h:506
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:987
virtual ykind kind() const
Definition: YExpression.h:334
virtual ykind kind() const
Definition: YExpression.h:214
constTypePtr type() const
Definition: YExpression.h:382
YCodePtr m_right
Definition: YExpression.h:141
constTypePtr m_from
Definition: YExpression.h:232
YCodePtr m_expr
Definition: YExpression.h:303
const char * name() const
Definition: YExpression.cc:286
static const constTypePtr Boolean
Definition: Type.h:123
An istream that remembers some data about the bytecode.
Definition: Bytecode.h:42
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:927
~YECall()
Definition: YExpression.cc:2706
constTypePtr type() const
Definition: YExpression.cc:3059
virtual ykind kind() const
Definition: YExpression.h:169
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:810
~YEIs()
Definition: YExpression.cc:1591
declaration_t * m_decl
Definition: YExpression.h:393
YEList(YCodePtr code)
Definition: YExpression.cc:677
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:1886
YEBinary(declaration_t *decl, YCodePtr arg1, YCodePtr arg2)
Definition: YExpression.cc:1337
constTypePtr type() const
Definition: YExpression.cc:238
~YELocale()
Definition: YExpression.cc:598
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:662
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:1166
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:1667
string toString() const
Definition: YExpression.cc:198
REP_BODY(YEFunction)
Definition: YCode.h:114
string toString() const
Definition: YExpression.cc:106
~YEVariable()
Definition: YExpression.h:66
~YETriple()
Definition: YExpression.cc:1498
YEPropagate(YCodePtr value, constTypePtr from, constTypePtr to)
Definition: YExpression.cc:1051
REP_BODY(YETriple)
Definition: YExpression.h:300
Definition: SymbolTable.h:42
YCodePtr m_var
Definition: YExpression.h:369
YCodePtr m_arg2
Definition: YExpression.h:280
virtual bool isReferenceable() const
Definition: YExpression.h:72
~YETerm()
Definition: YExpression.cc:272
REP_BODY(YEBinary)
virtual ykind kind() const
Definition: YExpression.h:146
REP_BODY(YEBracket)
YCodePtr key
Definition: YExpression.h:208
Definition: Y2Function.h:71
string toString() const
Definition: YExpression.cc:1597
std::ostream & toStream(std::ostream &str) const
Definition: YExpression.cc:963
Definition: YExpression.h:493
YCPValue evaluate(bool cse=false)
Definition: YExpression.cc:1513
YCodePtr def() const
Definition: YExpression.h:383
void attach(YCodePtr key, YCodePtr value)
Definition: YExpression.cc:885
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:1897
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:1220
Definition: YExpression.h:479
Definition: YCode.h:109
std::ostream & toXml(std::ostream &str, int indent) const
Definition: YExpression.cc:148
YCodePtr m_count
Definition: YExpression.h:163

Generated on a sunny day for yast2-core by doxygen 1.8.5