toggle menu
alchemist
jvm
switch theme
search in API
alchemist
/
it.unibo.alchemist.model.sapere.dsl.impl
/
Expression
Expression
class
Expression
:
IExpression
Members
Constructors
Expression
Link copied to clipboard
constructor
(
tree
:
ITree
)
This constructor does not do any parsing, and thus is much faster than the other one.
constructor
(
n
:
ITreeNode
<
out
Any
>
)
constructor
(
s
:
String
)
This constructor parses the String into an Expression.
Properties
ast
Link copied to clipboard
val
ast
:
ITree
root
Node
Link copied to clipboard
val
rootNode
:
ITreeNode
<
out
Any
>
Functions
calculate
Link copied to clipboard
open
fun
calculate
(
map
:
Map
<
HashString
,
ITreeNode
<
out
Any
>
>
)
:
ITreeNode
<
out
Any
>
get
Left
Children
Link copied to clipboard
open
fun
getLeftChildren
(
)
:
ITreeNode
<
out
Any
>
get
Right
Children
Link copied to clipboard
open
fun
getRightChildren
(
)
:
ITreeNode
<
out
Any
>
get
Root
Node
Data
Link copied to clipboard
open
fun
getRootNodeData
(
)
:
Any
get
Root
Node
Type
Link copied to clipboard
open
fun
getRootNodeType
(
)
:
Type
matches
Link copied to clipboard
open
fun
matches
(
expr
:
IExpression
,
matches
:
Map
<
HashString
,
ITreeNode
<
out
Any
>
>
)
:
Boolean
Tries to match this expression with expr.
may
Match
Link copied to clipboard
open
fun
mayMatch
(
expr
:
IExpression
)
:
Boolean
This match method test whether or not two expressions might match.
syntactic
Match
Link copied to clipboard
open
fun
syntacticMatch
(
e
:
IExpression
)
:
Boolean
Runs a syntactic match against the e.
to
String
Link copied to clipboard
open
fun
toString
(
)
:
String
update
Matched
Var
Link copied to clipboard
open
fun
updateMatchedVar
(
matches
:
Map
<
HashString
,
ITreeNode
<
out
Any
>
>
)
:
ITree