Package edu.udel.cis.vsl.abc.ast.IF
Class ASTs
java.lang.Object
edu.udel.cis.vsl.abc.ast.IF.ASTs
Factory class providing static method to produce a new
ASTFactory
.
This is the entry point for the ast module. To construct an
AST, one starts by invoking
newASTFactory(NodeFactory, TokenFactory, TypeFactory)
to get an
ASTFactory
, then uses that ASTFactory to produce the components of
the AST and finally the AST itself.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ASTFactory
newASTFactory
(NodeFactory nodeFactory, TokenFactory tokenFactory, TypeFactory typeFactory) Create a new ASTFactory that used the given node factory, token factory, and type factory.static void
prettyPrint
(ASTNode node, PrintStream out) Prints an AST node in the form of the original programming language.static StringBuffer
prettyRepresentation
(ASTNode node, int maxLength)
-
Constructor Details
-
ASTs
public ASTs()
-
-
Method Details
-
newASTFactory
public static ASTFactory newASTFactory(NodeFactory nodeFactory, TokenFactory tokenFactory, TypeFactory typeFactory) Create a new ASTFactory that used the given node factory, token factory, and type factory.- Parameters:
nodeFactory
- a factory for producingASTNode
stokenFactory
- a factory for producingCivlcToken
stypeFactory
- a factory for producingType
s- Returns:
- the new ASTFactory
-
prettyPrint
Prints an AST node in the form of the original programming language.- Parameters:
node
- the AST node to be printedout
- the print stream to be used for printing
-
prettyRepresentation
-