fmrisc.Syntax
Interface AST
- All Known Subinterfaces:
- Declaration, Expression, Selector, Type
- All Known Implementing Classes:
- AndFormula, ApplicationExpression, ArrayTerm, ArrayType, ASTBase, AtomicType, AxiomDeclaration, BinaryExpression, DeclarationBase, DividesTerm, EqualsFormula, EquivalentFormula, ExistsFormula, ExpressionBase, ForallFormula, FormulaDeclaration, FormulaDeclIdentifier, FunctionType, GreaterEqualFormula, GreaterFormula, Identifier, IfThenElseExpression, ImpliesFormula, LambdaTerm, LessEqualFormula, LessFormula, LetExpression, LetType, Logical, MinusTerm, NegationTerm, NotEqualsFormula, NotEquivalentFormula, NotFormula, Number, OrFormula, PlusTerm, PowerTerm, QuantifiedExpression, RecordTerm, RecordType, Reference, SelectionTerm, SelectorBase, SelectorIdentifier, SelectorIndex, SelectorNumber, SubrangeType, SubType, TimesTerm, TupleTerm, TupleType, TypeBase, TypeDeclaration, TypeDeclIdentifier, TypedIdentifier, UnaryExpression, UpdateTerm, ValueDeclaration, ValueDeclIdentifier, ValuedIdentifier
public interface AST
Interface to abstract syntax trees.
Method Summary |
AST |
accept(ASTVisitor visitor)
Accept visitor for a visit. |
void |
print(java.io.PrintWriter out)
Prints text representation of tree on out (without new line termination). |
void |
printCore(java.io.PrintWriter out)
Like print, but parentheses around outer expression are not printed. |
void |
printParens(java.io.PrintWriter out)
Like print, but parentheses around outer expression are always printed. |
java.lang.String |
toString()
returns string representation of tree |
accept
AST accept(ASTVisitor visitor)
- Accept visitor for a visit.
- Parameters:
visitor
- the visitor who is accepted by this node.
- Returns:
- the result of the visit (may be null).
print
void print(java.io.PrintWriter out)
- Prints text representation of tree on out (without new line termination).
If ASTUtil.setParentheses(true) is called, parentheses are printed around
the whole expression and its subexpressions.
- Parameters:
out
- the stream on which the text is written
printParens
void printParens(java.io.PrintWriter out)
- Like print, but parentheses around outer expression are always printed.
- Parameters:
out
- the stream on which the text is written
printCore
void printCore(java.io.PrintWriter out)
- Like print, but parentheses around outer expression are not printed.
- Parameters:
out
- the stream on which the text is written
toString
java.lang.String toString()
- returns string representation of tree
- Overrides:
toString
in class java.lang.Object
- Returns:
- the string representation