YCode Class Reference

YCode for precompiled ycp code. More...

#include <YCode.h>

Inheritance diagram for YCode:

YBlock YConst YEBinary YEBracket YEBuiltin YECall YECompare YEIs YEList YELocale YEMap YEPropagate YEReference YEReturn YETerm YETriple YEUnary YEVariable YFunction YLocale YStatement List of all members.

Public Types

enum  ykind {
  yxError = 0, ycVoid, ycBoolean, ycInteger,
  ycFloat, ycString, ycByteblock, ycPath,
  ycSymbol, ycList, ycMap, ycTerm,
  ycEntry, ycConstant, ycLocale, ycFunction,
  yePropagate, yeUnary, yeBinary, yeTriple,
  yeCompare, yeLocale, yeList, yeMap,
  yeTerm, yeIs, yeBracket, yeBlock,
  yeReturn, yeVariable, yeBuiltin, yeFunction,
  yeReference, yeFunctionPointer, yeExpression, ysTypedef,
  ysVariable, ysFunction, ysAssign, ysBracket,
  ysIf, ysWhile, ysDo, ysRepeat,
  ysExpression, ysReturn, ysBreak, ysContinue,
  ysTextdomain, ysInclude, ysFilename, ysImport,
  ysBlock, ysSwitch, ysStatement
}

Public Member Functions

 YCode ()
virtual ~YCode ()
virtual ykind kind () const=0
virtual string toString () const
virtual std::ostream & toStream (std::ostream &str) const=0
virtual bool isConstant () const
bool isError () const
virtual bool isStatement () const
virtual bool isBlock () const
virtual bool isReferenceable () const
virtual YCPValue evaluate (bool cse=false)
virtual constTypePtr type () const

Static Public Member Functions

static string toString (ykind kind)

Private Member Functions

 REP_BODY (YCode)

Detailed Description

YCode for precompiled ycp code.


Member Enumeration Documentation

enum YCode::ykind

Enumerator:
yxError 
ycVoid 
ycBoolean 
ycInteger 
ycFloat 
ycString 
ycByteblock 
ycPath 
ycSymbol 
ycList 
ycMap 
ycTerm 
ycEntry 
ycConstant 
ycLocale 
ycFunction 
yePropagate 
yeUnary 
yeBinary 
yeTriple 
yeCompare 
yeLocale 
yeList 
yeMap 
yeTerm 
yeIs 
yeBracket 
yeBlock 
yeReturn 
yeVariable 
yeBuiltin 
yeFunction 
yeReference 
yeFunctionPointer 
yeExpression 
ysTypedef 
ysVariable 
ysFunction 
ysAssign 
ysBracket 
ysIf 
ysWhile 
ysDo 
ysRepeat 
ysExpression 
ysReturn 
ysBreak 
ysContinue 
ysTextdomain 
ysInclude 
ysFilename 
ysImport 
ysBlock 
ysSwitch 
ysStatement 


Constructor & Destructor Documentation

YCode::YCode (  ) 

Creates a new YCode element

YCode::~YCode (  )  [virtual]

Cleans up


Member Function Documentation

YCode::REP_BODY ( YCode   )  [private]

virtual ykind YCode::kind (  )  const [pure virtual]

Returns the YCode kind

Implemented in YBlock, YConst, YLocale, YFunction, YEVariable, YEReference, YETerm, YECompare, YELocale, YEList, YEMap, YEPropagate, YEUnary, YEBinary, YETriple, YEIs, YEReturn, YEBracket, YEBuiltin, YEFunction, YEFunctionPointer, YSBreak, YSContinue, YSExpression, YSBlock, YSReturn, YSTypedef, YSFunction, YSAssign, YSVariable, YSBracket, YSIf, YSWhile, YSRepeat, YSDo, YSTextdomain, YSInclude, YSImport, YSFilename, and YSSwitch.

string YCode::toString (  )  const [virtual]

Returns an ASCII representation of the YCode.

Reimplemented in YBlock, YConst, YLocale, YFunction, YEVariable, YEReference, YETerm, YECompare, YELocale, YEList, YEMap, YEPropagate, YEUnary, YEBinary, YETriple, YEIs, YEReturn, YEBracket, YEBuiltin, YECall, YStatement, YSBreak, YSContinue, YSExpression, YSBlock, YSReturn, YSTypedef, YSFunction, YSAssign, YSVariable, YSBracket, YSIf, YSWhile, YSRepeat, YSDo, YSTextdomain, YSInclude, YSImport, YSFilename, and YSSwitch.

string YCode::toString ( ykind  kind  )  [static]

std::ostream & YCode::toStream ( std::ostream &  str  )  const [pure virtual]

writes YCode to a stream see Bytecode for read

Implemented in YBlock, YConst, YLocale, YFunction, YEVariable, YEReference, YETerm, YECompare, YELocale, YEList, YEMap, YEPropagate, YEUnary, YEBinary, YETriple, YEIs, YEReturn, YEBracket, YEBuiltin, YECall, YStatement, YSBreak, YSContinue, YSExpression, YSBlock, YSReturn, YSTypedef, YSFunction, YSAssign, YSBracket, YSIf, YSWhile, YSRepeat, YSDo, YSTextdomain, YSInclude, YSImport, YSFilename, and YSSwitch.

bool YCode::isConstant (  )  const [virtual]

returns true if the YCode represents a constant

Reimplemented in YConst.

bool YCode::isError (  )  const

returns true if the YCode represents an error

bool YCode::isStatement (  )  const [virtual]

returns true if the YCode represents a statement

Reimplemented in YBlock, and YStatement.

bool YCode::isBlock (  )  const [virtual]

returns true if the YCode represents a block

Reimplemented in YBlock.

bool YCode::isReferenceable (  )  const [virtual]

returns true if the YCode represents something we can reference to

Reimplemented in YEVariable.

YCPValue YCode::evaluate ( bool  cse = false  )  [virtual]

evaluate YCode to YCPValue if debugger == 0 called for parse time evaluation (i.e. constant subexpression elimination) else called for runtime evaluation

Reimplemented in YBlock, YConst, YLocale, YFunction, YEVariable, YEReference, YETerm, YECompare, YELocale, YEList, YEMap, YEPropagate, YEUnary, YEBinary, YETriple, YEIs, YEReturn, YEBracket, YEBuiltin, YEFunction, YEFunctionPointer, YStatement, YSBreak, YSContinue, YSExpression, YSBlock, YSReturn, YSTypedef, YSFunction, YSAssign, YSBracket, YSIf, YSWhile, YSRepeat, YSDo, YSTextdomain, YSInclude, YSImport, YSFilename, and YSSwitch.

constTypePtr YCode::type (  )  const [virtual]

return type (interesting mostly for function calls)

Reimplemented in YBlock, YConst, YLocale, YFunction, YEVariable, YEReference, YETerm, YECompare, YELocale, YEList, YEMap, YEPropagate, YEUnary, YEBinary, YETriple, YEIs, YEReturn, YEBracket, YEBuiltin, YECall, YStatement, YSExpression, YSBlock, YSReturn, YSTypedef, YSFunction, YSBracket, YSIf, YSWhile, YSRepeat, YSDo, YSTextdomain, YSInclude, YSImport, YSFilename, and YSSwitch.


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 01:20:22 2007 for yast2-core by  doxygen 1.5.0