java.lang.Object
dev.civl.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 ASTFactorynewASTFactory(NodeFactory nodeFactory, TokenFactory tokenFactory, TypeFactory typeFactory) Create a new ASTFactory that used the given node factory, token factory, and type factory.static voidprettyPrint(ASTNode node, PrintStream out) Prints an AST node in the form of the original programming language.static StringBufferprettyRepresentation(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 producingASTNodestokenFactory- a factory for producingCivlcTokenstypeFactory- a factory for producingTypes- 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
-