|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.evelopers.unimod.core.ModelElement com.evelopers.unimod.core.stateworks.Guard
Contains guard condition. Parses given logical expression into Abstract Syntax Tree for futher interpreting.
Guard condition expression must sutisfy the following gramma:
S -> S '||' I1
S -> I1
I1 -> I1 '&&' I2
I1 -> I2
I2 -> '!' I3
I2 -> I3
I3 -> '(' S ')'
I3 -> I4
I4 -> I5 rel I5
I4 -> ident_bool
I4 -> const_bool
I5 -> ident_number
I5 -> const_number
Where rel is one of
'>', '<', '>=', '<=', '!=', '=='
com.evelopers.unimod.parser.ExprParser
,
Serialized FormField Summary | |
static Guard |
ELSE
Else Guard |
static java.lang.String |
ELSE_EXPR
Expression for else guard |
static java.lang.String |
EXPR_PROPERTY
|
static Guard |
TRUE
True Guard |
static java.lang.String |
TRUE_EXPR
Guard with empty expression will be interpreted as "true". |
Fields inherited from class com.evelopers.unimod.core.ModelElement |
listeners, name, NAME_PROPERTY, stereotype, STEREOTYPE_PROPERTY |
Constructor Summary | |
protected |
Guard(java.lang.String expr)
Creates gruard condition based on given logical expression. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Two guards equal if their expr equal |
antlr.collections.AST |
getAST()
Returns Abstract Syntax Tree (AST) |
java.lang.String |
getExpr()
Return guard condition logical expression. |
java.util.Set |
getInputActions()
Returns set of input actions, that is being used in guard condiiton. |
int |
hashCode()
Takes hashcode from expr |
void |
setAST(antlr.collections.AST ast)
Sets abstract syntax tree. |
void |
setExpr(java.lang.String expr)
Sets guard condition logical expression |
void |
setInputActions(java.util.Set inputActions)
|
java.lang.String |
toString()
Returns guard condition string representation. |
Methods inherited from class com.evelopers.unimod.core.ModelElement |
accept, addPropertyChangeListener, firePropertyChange, getName, getStereotype, initListeners, removePropertyChangeListener, setName, setStereotype |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String EXPR_PROPERTY
public static final java.lang.String TRUE_EXPR
public static final Guard TRUE
public static final java.lang.String ELSE_EXPR
public static final Guard ELSE
Constructor Detail |
protected Guard(java.lang.String expr)
expr
- guard condition logical expression.
Null will be converted to true.Method Detail |
public antlr.collections.AST getAST()
public void setAST(antlr.collections.AST ast)
compiler
ast
- abstract syntax treepublic java.lang.String getExpr()
public void setInputActions(java.util.Set inputActions)
inputActions
- The inputActions to set.public java.util.Set getInputActions()
public void setExpr(java.lang.String expr)
expr
- new logical expression to setpublic java.lang.String toString()
toString
in class ModelElement
public boolean equals(java.lang.Object o)
equals
in class ModelElement
o
- guard to compare with this
public int hashCode()
hashCode
in class ModelElement
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |