pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree
Class PairFormalParametersList
java.lang.Object
|
+--pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.AbstractSyntaxTree
|
+--pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.FormalParametersList
|
+--pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.PairFormalParametersList
- All Implemented Interfaces:
- java.io.Serializable
- public class PairFormalParametersList
- extends FormalParametersList
The LastFormalParametersList
class represents the pair of formal
parameter list nodes in the abstract syntax tree.
- Author:
- Jakub Trzetrzelewski, jakub_trzetrzelewski@yahoo.com
- See Also:
- Serialized Form
Method Summary |
void |
accept(Visitor v)
Method responsible for traversing the abstract syntax tree structure. |
int |
getNumberOfParameters(java.util.Vector v)
|
java.lang.String |
getSpellingAndPosition()
Returns the spelling and positions of all terminals in a node. |
java.lang.String |
getTypeAsString()
Returns the abstract syntax tree node type as a string value. |
void |
show(java.lang.String st)
Method responsible for displaying the unary node. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
head
public IdentifierTerminal head
tail
public FormalParametersList tail
PairFormalParametersList
public PairFormalParametersList(IdentifierTerminal head,
FormalParametersList tail)
- Creates a new pair formal parameters list node with the given formal
parameters list
tail
and terminal head
.
- Parameters:
tail
- any formal parameters list.head
- identifier terminal.
getTypeAsString
public java.lang.String getTypeAsString()
- Returns the abstract syntax tree node type as a string value.
- Overrides:
getTypeAsString
in class AbstractSyntaxTree
- Returns:
- the abstract syntax tree node type as string.
getSpellingAndPosition
public java.lang.String getSpellingAndPosition()
- Returns the spelling and positions of all terminals in a node.
- Overrides:
getSpellingAndPosition
in class AbstractSyntaxTree
- Returns:
- the spelling and positions of all terminals in a node.
getNumberOfParameters
public int getNumberOfParameters(java.util.Vector v)
- Overrides:
getNumberOfParameters
in class FormalParametersList
accept
public void accept(Visitor v)
throws EvalException
- Description copied from class:
AbstractSyntaxTree
- Method responsible for traversing the abstract syntax tree structure.
- Overrides:
accept
in class AbstractSyntaxTree
- Following copied from class:
pl.edu.pjwstk.yaod.yaql.abstractsyntaxtree.AbstractSyntaxTree
- Parameters:
v
- the visitor.- Throws:
EvalException
- if evaluation fails.- See Also:
Visitor
show
public void show(java.lang.String st)
- Method responsible for displaying the unary node.
- Overrides:
show
in class AbstractSyntaxTree
- Parameters:
st
- the string which is an auxiliary tabulator.