public class ProgressPatternWorker.ProgressAstHelper
extends java.lang.Object
Constructor and Description |
---|
ProgressAstHelper() |
Modifier and Type | Method and Description |
---|---|
Aast |
createProgressAst(int type,
Aast parent)
General purpose Progress AST creation function which can create a
ProgressAst node using the passed token type and the
empty string as the text of the node. |
Aast |
createProgressAst(int type,
Aast parent,
int index)
General purpose Progress AST creation function which can create a
ProgressAst node using the passed token type and the
empty string as the text of the node. |
Aast |
createProgressAst(int type,
java.lang.String text,
Aast parent)
General purpose Progress AST creation function which can create a
ProgressAst node using the passed token type and text
and then it will attach that node to the specified parent as the
last child. |
Aast |
createProgressAst(int type,
java.lang.String text,
Aast parent,
int index)
General purpose Progress AST creation function which can create a
ProgressAst node using the passed token type and text
and then it will attach that node to the specified parent at the
given index. |
java.lang.String |
lookupTokenName(int type)
Translates an integer value of a parser token type into the associated
human readable text representation.
|
public Aast createProgressAst(int type, Aast parent)
ProgressAst
node using the passed token type and the
empty string as the text of the node. It will then attach that node
to the specified parent as the last child.type
- The token type for the Progress AST.parent
- The parent AST node.null
if
the parent is invalid, if the type is not valid or on any
unexpected error during AST creation.public Aast createProgressAst(int type, java.lang.String text, Aast parent)
ProgressAst
node using the passed token type and text
and then it will attach that node to the specified parent as the
last child.type
- The token type for the Progress AST.text
- The text for the AST.parent
- The parent AST node.null
if
the parent is invalid, if the type is not valid or on any
unexpected error during AST creation.public Aast createProgressAst(int type, Aast parent, int index)
ProgressAst
node using the passed token type and the
empty string as the text of the node. It will then attach that node
to the specified parent at the given index.type
- The token type for the Progress AST.parent
- The parent AST node.index
- 0 to insert as the first child, -1 to insert as the last
child or a 0-based index to specify an exact child index
at which to insert the new child. All current children at
that index or at a greater index, are moved right. If the
index is greater than the current number of children, the
new child will be added at the end.null
if
the parent is invalid, if the type is not valid or on any
unexpected error during AST creation.public Aast createProgressAst(int type, java.lang.String text, Aast parent, int index)
ProgressAst
node using the passed token type and text
and then it will attach that node to the specified parent at the
given index.type
- The token type for the Progress AST.text
- The text for the AST.parent
- The parent AST node.index
- 0 to insert as the first child, -1 to insert as the last
child or a 0-based index to specify an exact child index
at which to insert the new child. All current children at
that index or at a greater index, are moved right. If the
index is greater than the current number of children, the
new child will be added at the end.null
if
the parent is invalid, if the type is not valid or on any
unexpected error during AST creation.public java.lang.String lookupTokenName(int type)
type
- The integer token type.null
if
no match was found.