Class JJTree
-
- All Implemented Interfaces:
public class JJTreeConfiguration container for JJTree code generation.
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanisConfiguredprivate Stringmultiprivate StringnodeDefaultVoidprivate StringnodeScopeHookprivate StringnodeUsesParserprivate StringbuildNodeFilesprivate StringtrackTokensprivate Stringvisitorprivate StringstaticParamprivate StringnodeClassprivate StringnodePrefixprivate StringnodePackageprivate StringnodeExtendsprivate StringnodeFactoryprivate StringvisitorDataTypeprivate StringvisitorReturnTypeprivate StringvisitorExceptionprivate List<String>args
-
Constructor Summary
Constructors Constructor Description JJTree()
-
Method Summary
Modifier and Type Method Description final BooleanisConfigured()This must be set to true if JTree will be used. final UnitsetConfigured(Boolean value)This must be set to true if JTree will be used. final StringgetMulti()MULTI: Generate a multi mode parse tree. final UnitsetMulti(String value)MULTI: Generate a multi mode parse tree. final StringgetNodeDefaultVoid()NODE_DEFAULT_VOID: Instead of making each non-decorated production an indefinite node, make it void instead. final UnitsetNodeDefaultVoid(String value)NODE_DEFAULT_VOID: Instead of making each non-decorated production an indefinite node, make it void instead. final StringgetNodeScopeHook()NODE_SCOPE_HOOK: Insert calls to user-defined parser methods on entry and exit of every node scope. final UnitsetNodeScopeHook(String value)NODE_SCOPE_HOOK: Insert calls to user-defined parser methods on entry and exit of every node scope. final StringgetNodeUsesParser()NODE_USES_PARSER: JJTree will use an alternate form of the node construction routines where it passes the parser object in. final UnitsetNodeUsesParser(String value)NODE_USES_PARSER: JJTree will use an alternate form of the node construction routines where it passes the parser object in. final StringgetBuildNodeFiles()BUILD_NODE_FILES: Generate sample implementations for SimpleNode and any other nodes used in the grammar. final UnitsetBuildNodeFiles(String value)BUILD_NODE_FILES: Generate sample implementations for SimpleNode and any other nodes used in the grammar. final StringgetTrackTokens()TRACK_TOKENS: Insert jjtGetFirstToken(), jjtSetFirstToken(), getLastToken(), and jjtSetLastToken() methods in SimpleNode. final UnitsetTrackTokens(String value)TRACK_TOKENS: Insert jjtGetFirstToken(), jjtSetFirstToken(), getLastToken(), and jjtSetLastToken() methods in SimpleNode. final StringgetVisitor()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 UnitsetVisitor(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 StringgetStaticParam()STATIC: Generate code for a static parser. final UnitsetStaticParam(String value)STATIC: Generate code for a static parser. final StringgetNodeClass()NODE_CLASS: If set defines the name of a user-supplied class that will extend SimpleNode. final UnitsetNodeClass(String value)NODE_CLASS: If set defines the name of a user-supplied class that will extend SimpleNode. final StringgetNodePrefix()NODE_PREFIX: The prefix used to construct node class names from node identifiers in multi mode. final UnitsetNodePrefix(String value)NODE_PREFIX: The prefix used to construct node class names from node identifiers in multi mode. final StringgetNodePackage()NODE_PACKAGE: The package to generate the node classes into. final UnitsetNodePackage(String value)NODE_PACKAGE: The package to generate the node classes into. final StringgetNodeExtends()NODE_EXTENDS: The superclass for the SimpleNode class. final UnitsetNodeExtends(String value)NODE_EXTENDS: The superclass for the SimpleNode class. final StringgetNodeFactory()NODE_FACTORY: Specify a class containing a factory method with following signature to construct nodes. final UnitsetNodeFactory(String value)NODE_FACTORY: Specify a class containing a factory method with following signature to construct nodes. final StringgetVisitorDataType()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 UnitsetVisitorDataType(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 StringgetVisitorReturnType()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 UnitsetVisitorReturnType(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 StringgetVisitorException()VISITOR_EXCEPTION: If this option is set, it is used in the signature of the generated jjtAccept() methods and the visit() methods. final UnitsetVisitorException(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 UnitsetArgs(List<String> value)Additional command line arguments passed to jjTree. final UnitaddArg(String argument)Add a single argument to the list of arguments for JTree. final UnitaddArgs(List<String> args)Add a list of arguments to the list of arguments for JTree. -
-
Method Detail
-
isConfigured
@Input() final Boolean isConfigured()
This must be set to true if JTree will be used.
-
setConfigured
final Unit setConfigured(Boolean value)
This must be set to true if JTree will be used.
-
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.
-
setStaticParam
final Unit setStaticParam(String value)
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.
-
setNodePackage
final Unit setNodePackage(String value)
NODE_PACKAGE: The package to generate the node classes into.
-
getNodeExtends
@Optional()@Input() final String getNodeExtends()
NODE_EXTENDS: The superclass for the SimpleNode class.
-
setNodeExtends
final Unit setNodeExtends(String value)
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.
-
-
-
-