Class ASTs

java.lang.Object
edu.udel.cis.vsl.abc.ast.IF.ASTs

public class ASTs extends Object
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 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 producing ASTNodes
      tokenFactory - a factory for producing CivlcTokens
      typeFactory - a factory for producing Types
      Returns:
      the new ASTFactory
    • prettyPrint

      public static void prettyPrint(ASTNode node, PrintStream out)
      Prints an AST node in the form of the original programming language.
      Parameters:
      node - the AST node to be printed
      out - the print stream to be used for printing
    • prettyRepresentation

      public static StringBuffer prettyRepresentation(ASTNode node, int maxLength)