Class JJTree

  • All Implemented Interfaces:

    
    public class JJTree
    
                        

    Configuration container for JJTree code generation.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      JJTree()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Boolean isConfigured() This must be set to true if JTree will be used.
      final Unit setConfigured(Boolean value) This must be set to true if JTree will be used.
      final String getMulti() MULTI: Generate a multi mode parse tree.
      final Unit setMulti(String value) MULTI: Generate a multi mode parse tree.
      final String getNodeDefaultVoid() NODE_DEFAULT_VOID: Instead of making each non-decorated production an indefinite node, make it void instead.
      final Unit setNodeDefaultVoid(String value) NODE_DEFAULT_VOID: Instead of making each non-decorated production an indefinite node, make it void instead.
      final String getNodeScopeHook() NODE_SCOPE_HOOK: Insert calls to user-defined parser methods on entry and exit of every node scope.
      final Unit setNodeScopeHook(String value) NODE_SCOPE_HOOK: Insert calls to user-defined parser methods on entry and exit of every node scope.
      final String getNodeUsesParser() NODE_USES_PARSER: JJTree will use an alternate form of the node construction routines where it passes the parser object in.
      final Unit setNodeUsesParser(String value) NODE_USES_PARSER: JJTree will use an alternate form of the node construction routines where it passes the parser object in.
      final String getBuildNodeFiles() BUILD_NODE_FILES: Generate sample implementations for SimpleNode and any other nodes used in the grammar.
      final Unit setBuildNodeFiles(String value) BUILD_NODE_FILES: Generate sample implementations for SimpleNode and any other nodes used in the grammar.
      final String getTrackTokens() TRACK_TOKENS: Insert jjtGetFirstToken(), jjtSetFirstToken(), getLastToken(), and jjtSetLastToken() methods in SimpleNode.
      final Unit setTrackTokens(String value) TRACK_TOKENS: Insert jjtGetFirstToken(), jjtSetFirstToken(), getLastToken(), and jjtSetLastToken() methods in SimpleNode.
      final String getVisitor() VISITOR: Insert a jjtAccept() method in the node classes, and generate a visitor implementation with an entry for every node type used in the grammar.
      final Unit setVisitor(String value) VISITOR: Insert a jjtAccept() method in the node classes, and generate a visitor implementation with an entry for every node type used in the grammar.
      final String getStaticParam() STATIC: Generate code for a static parser.
      final Unit setStaticParam(String value) STATIC: Generate code for a static parser.
      final String getNodeClass() NODE_CLASS: If set defines the name of a user-supplied class that will extend SimpleNode.
      final Unit setNodeClass(String value) NODE_CLASS: If set defines the name of a user-supplied class that will extend SimpleNode.
      final String getNodePrefix() NODE_PREFIX: The prefix used to construct node class names from node identifiers in multi mode.
      final Unit setNodePrefix(String value) NODE_PREFIX: The prefix used to construct node class names from node identifiers in multi mode.
      final String getNodePackage() NODE_PACKAGE: The package to generate the node classes into.
      final Unit setNodePackage(String value) NODE_PACKAGE: The package to generate the node classes into.
      final String getNodeExtends() NODE_EXTENDS: The superclass for the SimpleNode class.
      final Unit setNodeExtends(String value) NODE_EXTENDS: The superclass for the SimpleNode class.
      final String getNodeFactory() NODE_FACTORY: Specify a class containing a factory method with following signature to construct nodes.
      final Unit setNodeFactory(String value) NODE_FACTORY: Specify a class containing a factory method with following signature to construct nodes.
      final String getVisitorDataType() VISITOR_DATA_TYPE: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods as the type of the data argument.
      final Unit setVisitorDataType(String value) VISITOR_DATA_TYPE: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods as the type of the data argument.
      final String getVisitorReturnType() VISITOR_RETURN_TYPE: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods as the return type of the method.
      final Unit setVisitorReturnType(String value) VISITOR_RETURN_TYPE: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods as the return type of the method.
      final String getVisitorException() VISITOR_EXCEPTION: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods.
      final Unit setVisitorException(String value) VISITOR_EXCEPTION: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods.
      final List<String> getArgs() Additional command line arguments passed to jjTree.
      final Unit setArgs(List<String> value) Additional command line arguments passed to jjTree.
      final Unit addArg(String argument) Add a single argument to the list of arguments for JTree.
      final Unit addArgs(List<String> args) Add a list of arguments to the list of arguments for JTree.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JJTree

        JJTree()
    • Method Detail

      • isConfigured

        @Input() final Boolean isConfigured()

        This must be set to true if JTree will be used.

      • getMulti

        @Optional()@Input() final String getMulti()

        MULTI: Generate a multi mode parse tree.

      • getNodeDefaultVoid

        @Optional()@Input() final String getNodeDefaultVoid()

        NODE_DEFAULT_VOID: Instead of making each non-decorated production an indefinite node, make it void instead.

      • setNodeDefaultVoid

         final Unit setNodeDefaultVoid(String value)

        NODE_DEFAULT_VOID: Instead of making each non-decorated production an indefinite node, make it void instead.

      • getNodeScopeHook

        @Optional()@Input() final String getNodeScopeHook()

        NODE_SCOPE_HOOK: Insert calls to user-defined parser methods on entry and exit of every node scope.

      • setNodeScopeHook

         final Unit setNodeScopeHook(String value)

        NODE_SCOPE_HOOK: Insert calls to user-defined parser methods on entry and exit of every node scope.

      • getNodeUsesParser

        @Optional()@Input() final String getNodeUsesParser()

        NODE_USES_PARSER: JJTree will use an alternate form of the node construction routines where it passes the parser object in.

      • setNodeUsesParser

         final Unit setNodeUsesParser(String value)

        NODE_USES_PARSER: JJTree will use an alternate form of the node construction routines where it passes the parser object in.

      • getBuildNodeFiles

        @Optional()@Input() final String getBuildNodeFiles()

        BUILD_NODE_FILES: Generate sample implementations for SimpleNode and any other nodes used in the grammar.

      • setBuildNodeFiles

         final Unit setBuildNodeFiles(String value)

        BUILD_NODE_FILES: Generate sample implementations for SimpleNode and any other nodes used in the grammar.

      • getTrackTokens

        @Optional()@Input() final String getTrackTokens()

        TRACK_TOKENS: Insert jjtGetFirstToken(), jjtSetFirstToken(), getLastToken(), and jjtSetLastToken() methods in SimpleNode.

      • setTrackTokens

         final Unit setTrackTokens(String value)

        TRACK_TOKENS: Insert jjtGetFirstToken(), jjtSetFirstToken(), getLastToken(), and jjtSetLastToken() methods in SimpleNode.

      • getVisitor

        @Optional()@Input() final String getVisitor()

        VISITOR: Insert a jjtAccept() method in the node classes, and generate a visitor implementation with an entry for every node type used in the grammar.

      • setVisitor

         final Unit setVisitor(String value)

        VISITOR: Insert a jjtAccept() method in the node classes, and generate a visitor implementation with an entry for every node type used in the grammar.

      • getStaticParam

        @Optional()@Input() final String getStaticParam()

        STATIC: Generate code for a static parser.

      • getNodeClass

        @Optional()@Input() final String getNodeClass()

        NODE_CLASS: If set defines the name of a user-supplied class that will extend SimpleNode. Any tree nodes created will then be subclasses of NODE_CLASS.

      • setNodeClass

         final Unit setNodeClass(String value)

        NODE_CLASS: If set defines the name of a user-supplied class that will extend SimpleNode. Any tree nodes created will then be subclasses of NODE_CLASS.

      • getNodePrefix

        @Optional()@Input() final String getNodePrefix()

        NODE_PREFIX: The prefix used to construct node class names from node identifiers in multi mode.

      • setNodePrefix

         final Unit setNodePrefix(String value)

        NODE_PREFIX: The prefix used to construct node class names from node identifiers in multi mode.

      • getNodePackage

        @Optional()@Input() final String getNodePackage()

        NODE_PACKAGE: The package to generate the node classes into.

      • getNodeExtends

        @Optional()@Input() final String getNodeExtends()

        NODE_EXTENDS: The superclass for the SimpleNode class.

      • getNodeFactory

        @Optional()@Input() final String getNodeFactory()

        NODE_FACTORY: Specify a class containing a factory method with following signature to construct nodes.

      • setNodeFactory

         final Unit setNodeFactory(String value)

        NODE_FACTORY: Specify a class containing a factory method with following signature to construct nodes.

      • getVisitorDataType

        @Optional()@Input() final String getVisitorDataType()

        VISITOR_DATA_TYPE: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods as the type of the data argument.

      • setVisitorDataType

         final Unit setVisitorDataType(String value)

        VISITOR_DATA_TYPE: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods as the type of the data argument.

      • getVisitorReturnType

        @Optional()@Input() final String getVisitorReturnType()

        VISITOR_RETURN_TYPE: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods as the return type of the method.

      • setVisitorReturnType

         final Unit setVisitorReturnType(String value)

        VISITOR_RETURN_TYPE: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods as the return type of the method.

      • getVisitorException

        @Optional()@Input() final String getVisitorException()

        VISITOR_EXCEPTION: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods.

      • setVisitorException

         final Unit setVisitorException(String value)

        VISITOR_EXCEPTION: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods.

      • getArgs

        @Optional()@Input() final List<String> getArgs()

        Additional command line arguments passed to jjTree.

      • addArg

         final Unit addArg(String argument)

        Add a single argument to the list of arguments for JTree.

      • addArgs

         final Unit addArgs(List<String> args)

        Add a list of arguments to the list of arguments for JTree.