All Classes and Interfaces
Class
Description
The
This facilitates the user customization work by preparing all the lines of code the user wants to keep or to modify.
AcceptInliner
visitor (an extension of visitor
) is called by
VisitorsGenerator
(which calls
AcceptInliner.genAcceptMethods(StringBuilder, Spacing, UserClassInfo, VisitorInfo)
to "inline" the accept
methods on the user classes nodes.This facilitates the user customization work by preparing all the lines of code the user wants to keep or to modify.
JTB node class for the production AccessModifier:
Corresponding grammar:
f0 -> ( %0 "public"
..
Corresponding grammar:
f0 -> ( %0 "public"
..
Describes actions that may occur on the right hand side of productions.
JTB node class for the production AdditiveExpression:
Corresponding grammar:
f0 -> MultiplicativeExpression()
f1 -> ( #0 ( %0 "+"
..
Corresponding grammar:
f0 -> MultiplicativeExpression()
f1 -> ( #0 ( %0 "+"
..
JTB node class for the production AllocationExpression:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production AndExpression:
Corresponding grammar:
f0 -> EqualityExpression()
f1 -> ( #0 "invalid input: '&'" #1 EqualityExpression() )*
s: -629554573
Corresponding grammar:
f0 -> EqualityExpression()
f1 -> ( #0 "invalid input: '&'" #1 EqualityExpression() )*
s: -629554573
JTB node class for the production Annotation:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production AnnotationTypeBody:
Corresponding grammar:
f0 -> "{"
f1 -> ( AnnotationTypeMemberDeclaration() )*
f2 -> "}"
s: -667465535
Corresponding grammar:
f0 -> "{"
f1 -> ( AnnotationTypeMemberDeclaration() )*
f2 -> "}"
s: -667465535
JTB node class for the production AnnotationTypeDeclaration:
Corresponding grammar:
f0 -> "@"
f1 -> "interface"
f2 -> invalid input: '<' IDENTIFIER >
f3 -> AnnotationTypeBody()
s: 383718196
Corresponding grammar:
f0 -> "@"
f1 -> "interface"
f2 -> invalid input: '<' IDENTIFIER >
f3 -> AnnotationTypeBody()
s: 383718196
JTB node class for the production AnnotationTypeMemberDeclaration:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production ArgumentList:
Corresponding grammar:
f0 -> Expression()
f1 -> ( #0 "," #1 Expression() )*
s: -662366547
Corresponding grammar:
f0 -> Expression()
f1 -> ( #0 "," #1 Expression() )*
s: -662366547
JTB node class for the production Arguments:
Corresponding grammar:
f0 -> "("
f1 -> [ ArgumentList() ]
f2 -> ")"
s: 2046130821
Corresponding grammar:
f0 -> "("
f1 -> [ ArgumentList() ]
f2 -> ")"
s: 2046130821
JTB node class for the production ArrayDimsAndInits:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production ArrayInitializer:
Corresponding grammar:
f0 -> "{"
f1 -> [ #0 VariableInitializer()
..
Corresponding grammar:
f0 -> "{"
f1 -> [ #0 VariableInitializer()
..
JTB node class for the production AssertStatement:
Corresponding grammar:
f0 -> "assert"
f1 -> Expression()
f2 -> [ #0 ":" #1 Expression() ]
f3 -> ";"
s: -579866328
Corresponding grammar:
f0 -> "assert"
f1 -> Expression()
f2 -> [ #0 ":" #1 Expression() ]
f3 -> ";"
s: -579866328
JTB node class for the production AssignmentOperator:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
Class
BaseNodesGenerator
contains methods to generate the base nodes interfaces and classes.JTB node class for the production Block:
Corresponding grammar:
f0 -> "{"
f1 -> ( BlockStatement() )*
f2 -> "}"
s: -47169424
Corresponding grammar:
f0 -> "{"
f1 -> ( BlockStatement() )*
f2 -> "}"
s: -47169424
JTB node class for the production BlockStatement:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production BNFProduction:
Corresponding grammar:
f0 -> AccessModifier()
f1 -> ResultType()
f2 -> IdentifierAsString()
f3 -> FormalParameters()
f4 -> [ #0 "throws" #1 Name()
..
Corresponding grammar:
f0 -> AccessModifier()
f1 -> ResultType()
f2 -> IdentifierAsString()
f3 -> FormalParameters()
f4 -> [ #0 "throws" #1 Name()
..
Describes BNF productions.
JTB node class for the production BooleanLiteral:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production BreakStatement:
Corresponding grammar:
f0 -> "break"
f1 -> [ invalid input: '<' IDENTIFIER > ]
f2 -> ";"
s: 2096828507
Corresponding grammar:
f0 -> "break"
f1 -> [ invalid input: '<' IDENTIFIER > ]
f2 -> ";"
s: 2096828507
JTB node class for the production CastExpression:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production CastLookahead:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production CharacterDescriptor:
Corresponding grammar:
f0 -> StringLiteral()
f1 -> [ #0 "-" #1 StringLiteral() ]
s: 895087809
Corresponding grammar:
f0 -> StringLiteral()
f1 -> [ #0 "-" #1 StringLiteral() ]
s: 895087809
JTB node class for the production CharacterList:
Corresponding grammar:
f0 -> [ "~" ]
f1 -> "["
f2 -> [ #0 CharacterDescriptor()
..
Corresponding grammar:
f0 -> [ "~" ]
f1 -> "["
f2 -> [ #0 CharacterDescriptor()
..
Describes character range descriptors in a character list.
Describes expansions where one of many choices is taken (c1 | c2 | ...).
The
ClassesFinder
visitor creates a list of UserClassInfo
objects describing every class to
be generated.JTB node class for the production ClassOrInterfaceBody:
Corresponding grammar:
f0 -> "{"
f1 -> ( ClassOrInterfaceBodyDeclaration() )*
f2 -> "}"
s: 1154515364
Corresponding grammar:
f0 -> "{"
f1 -> ( ClassOrInterfaceBodyDeclaration() )*
f2 -> "}"
s: 1154515364
JTB node class for the production ClassOrInterfaceBodyDeclaration:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production ClassOrInterfaceDeclaration:
Corresponding grammar:
f0 -> ( %0 "class"
..
Corresponding grammar:
f0 -> ( %0 "class"
..
JTB node class for the production ClassOrInterfaceType:
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> [ TypeArguments() ]
f2 -> ( #0 "." #1 invalid input: '<' IDENTIFIER >
..
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> [ TypeArguments() ]
f2 -> ( #0 "." #1 invalid input: '<' IDENTIFIER >
..
Class
CommonCodeGenerator
contains methods to generate common pieces of code (fields and methods).JTB node class for the production CompilationUnit:
Corresponding grammar:
f0 -> [ PackageDeclaration() ]
f1 -> ( ImportDeclaration() )*
f2 -> ( TypeDeclaration() )*
s: 1761039264
Corresponding grammar:
f0 -> [ PackageDeclaration() ]
f1 -> ( ImportDeclaration() )*
f2 -> ( TypeDeclaration() )*
s: 1761039264
JTB node class for the production ComplexRegularExpression:
Corresponding grammar:
f0 -> ( ComplexRegularExpressionUnit() )+
s: 896313544
Corresponding grammar:
f0 -> ( ComplexRegularExpressionUnit() )+
s: 896313544
JTB node class for the production ComplexRegularExpressionChoices:
Corresponding grammar:
f0 -> ComplexRegularExpression()
f1 -> ( #0 "|" #1 ComplexRegularExpression() )*
s: -1240933595
Corresponding grammar:
f0 -> ComplexRegularExpression()
f1 -> ( #0 "|" #1 ComplexRegularExpression() )*
s: -1240933595
JTB node class for the production ComplexRegularExpressionUnit:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production ConditionalAndExpression:
Corresponding grammar:
f0 -> InclusiveOrExpression()
f1 -> ( #0 "invalid input: '&'invalid input: '&'" #1 InclusiveOrExpression() )*
s: -1425815203
Corresponding grammar:
f0 -> InclusiveOrExpression()
f1 -> ( #0 "invalid input: '&'invalid input: '&'" #1 InclusiveOrExpression() )*
s: -1425815203
JTB node class for the production ConditionalExpression:
Corresponding grammar:
f0 -> ConditionalOrExpression()
f1 -> [ #0 "?" #1 Expression() #2 ":" #3 Expression() ]
s: -1150694214
Corresponding grammar:
f0 -> ConditionalOrExpression()
f1 -> [ #0 "?" #1 Expression() #2 ":" #3 Expression() ]
s: -1150694214
JTB node class for the production ConditionalOrExpression:
Corresponding grammar:
f0 -> ConditionalAndExpression()
f1 -> ( #0 "||" #1 ConditionalAndExpression() )*
s: -1592298777
Corresponding grammar:
f0 -> ConditionalAndExpression()
f1 -> ( #0 "||" #1 ConditionalAndExpression() )*
s: -1592298777
Class
Constants
contains static global flags, constants and names.JTB node class for the production ConstructorDeclaration:
Corresponding grammar:
f0 -> [ TypeParameters() ]
f1 -> invalid input: '<' IDENTIFIER >
f2 -> FormalParameters()
f3 -> [ #0 "throws" #1 NameList() ]
f4 -> "{"
f5 -> [ ExplicitConstructorInvocation() ]
f6 -> ( BlockStatement() )*
f7 -> "}"
s: 1258397065
Corresponding grammar:
f0 -> [ TypeParameters() ]
f1 -> invalid input: '<' IDENTIFIER >
f2 -> FormalParameters()
f3 -> [ #0 "throws" #1 NameList() ]
f4 -> "{"
f5 -> [ ExplicitConstructorInvocation() ]
f6 -> ( BlockStatement() )*
f7 -> "}"
s: 1258397065
An object container.
JTB node class for the production ContinueStatement:
Corresponding grammar:
f0 -> "continue"
f1 -> [ invalid input: '<' IDENTIFIER > ]
f2 -> ";"
s: -1991535243
Corresponding grammar:
f0 -> "continue"
f1 -> [ invalid input: '<' IDENTIFIER > ]
f2 -> ";"
s: -1991535243
The
ControlSignatureProcessor
annotation processor issues a compile error when the user
visitors' visit methods annotated NodeFieldsSignature
are not coded against the last
nodes definitions.JTB node class for the production DefaultValue:
Corresponding grammar:
f0 -> "default"
f1 -> MemberValue()
s: -1936312236
Corresponding grammar:
f0 -> "default"
f1 -> MemberValue()
s: -1936312236
Provides default methods which visit each node in the tree in depth-first order.
In your "Int" visitors extend this class and override part or all of these methods.
In your "Int" visitors extend this class and override part or all of these methods.
Class handling a programmatic exception.
Provides default methods which visit each node in the tree in depth-first order.
In your "Void" visitors extend this class and override part or all of these methods.
In your "Void" visitors extend this class and override part or all of these methods.
Class handling a programmatic exception.
JTB node class for the production DoStatement:
Corresponding grammar:
f0 -> "do"
f1 -> Statement()
f2 -> "while"
f3 -> "("
f4 -> Expression()
f5 -> ")"
f6 -> ";"
s: 1162769715
Corresponding grammar:
f0 -> "do"
f1 -> Statement()
f2 -> "while"
f3 -> "("
f4 -> Expression()
f5 -> ")"
f6 -> ";"
s: 1162769715
JTB node class for the production EmptyStatement:
Corresponding grammar:
f0 -> ";"
s: 2055660624
Corresponding grammar:
f0 -> ";"
s: 2055660624
JTB node class for the production EmptyTypeArguments:
Corresponding grammar:
f0 -> "invalid input: '<'"
f1 -> ">"
s: 859421181
Corresponding grammar:
f0 -> "invalid input: '<'"
f1 -> ">"
s: 859421181
JTB node class for the production EnumBody:
Corresponding grammar:
f0 -> "{"
f1 -> [ #0 EnumConstant()
..
Corresponding grammar:
f0 -> "{"
f1 -> [ #0 EnumConstant()
..
JTB node class for the production EnumConstant:
Corresponding grammar:
f0 -> Modifiers()
f1 -> invalid input: '<' IDENTIFIER >
f2 -> [ Arguments() ]
f3 -> [ ClassOrInterfaceBody() ]
s: -8699830
Corresponding grammar:
f0 -> Modifiers()
f1 -> invalid input: '<' IDENTIFIER >
f2 -> [ Arguments() ]
f3 -> [ ClassOrInterfaceBody() ]
s: -8699830
JTB node class for the production EnumDeclaration:
Corresponding grammar:
f0 -> "enum"
f1 -> invalid input: '<' IDENTIFIER >
f2 -> [ ImplementsList() ]
f3 -> EnumBody()
s: 359041865
Corresponding grammar:
f0 -> "enum"
f1 -> invalid input: '<' IDENTIFIER >
f2 -> [ ImplementsList() ]
f3 -> EnumBody()
s: 359041865
JTB node class for the production EqualityExpression:
Corresponding grammar:
f0 -> InstanceOfExpression()
f1 -> ( #0 ( %0 "=="
..
Corresponding grammar:
f0 -> InstanceOfExpression()
f1 -> ( #0 ( %0 "=="
..
JTB node class for the production ExclusiveOrExpression:
Corresponding grammar:
f0 -> AndExpression()
f1 -> ( #0 "^" #1 AndExpression() )*
s: -1241708769
Corresponding grammar:
f0 -> AndExpression()
f1 -> ( #0 "^" #1 AndExpression() )*
s: -1241708769
JTB node class for the production Expansion:
Corresponding grammar:
f0 -> ( #0 "LOOKAHEAD" #1 "(" #2 LocalLookahead() #3 ")" )?
f1 -> ( ExpansionUnit() )+
s: -2134365682
Corresponding grammar:
f0 -> ( #0 "LOOKAHEAD" #1 "(" #2 LocalLookahead() #3 ")" )?
f1 -> ( ExpansionUnit() )+
s: -2134365682
Describes expansions - entities that may occur on the right hand sides of productions.
Subclasses enum type
JTB node class for the production ExpansionChoices:
Corresponding grammar:
f0 -> Expansion()
f1 -> ( #0 "|" #1 Expansion() )*
s: -1726831935
Corresponding grammar:
f0 -> Expansion()
f1 -> ( #0 "|" #1 Expansion() )*
s: -1726831935
JTB node class for the production ExpansionUnit:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production ExpansionUnitTCF:
Corresponding grammar:
f0 -> "try"
f1 -> "{"
f2 -> ExpansionChoices()
f3 -> "}"
f4 -> ( #0 "catch" #1 "("
..
Corresponding grammar:
f0 -> "try"
f1 -> "{"
f2 -> ExpansionChoices()
f3 -> "}"
f4 -> ( #0 "catch" #1 "("
..
JTB node class for the production ExplicitConstructorInvocation:
Corresponding grammar:
f0 -> ( %0 #0 [ $0 "invalid input: '<'" $1 ReferenceType()
..
Corresponding grammar:
f0 -> ( %0 #0 [ $0 "invalid input: '<'" $1 ReferenceType()
..
JTB node class for the production Expression:
Corresponding grammar:
f0 -> ConditionalExpression()
f1 -> [ #0 AssignmentOperator() #1 Expression() ]
s: -1186270200
Corresponding grammar:
f0 -> ConditionalExpression()
f1 -> [ #0 AssignmentOperator() #1 Expression() ]
s: -1186270200
JTB node class for the production ExtendsList:
Corresponding grammar:
f0 -> "extends"
f1 -> ClassOrInterfaceType()
f2 -> ( #0 "," #1 ClassOrInterfaceType() )*
s: 24279225
Corresponding grammar:
f0 -> "extends"
f1 -> ClassOrInterfaceType()
f2 -> ( #0 "," #1 ClassOrInterfaceType() )*
s: 24279225
JTB node class for the production FieldDeclaration:
Corresponding grammar:
f0 -> Type()
f1 -> VariableDeclarator()
f2 -> ( #0 "," #1 VariableDeclarator() )*
f3 -> ";"
s: 1567612384
Corresponding grammar:
f0 -> Type()
f1 -> VariableDeclarator()
f2 -> ( #0 "," #1 VariableDeclarator() )*
f3 -> ";"
s: 1567612384
JTB node class for the production ForInit:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production FormalParameter:
Corresponding grammar:
f0 -> Modifiers()
f1 -> Type()
f2 -> [ "..." ]
f3 -> VariableDeclaratorId()
s: -1358852705
Corresponding grammar:
f0 -> Modifiers()
f1 -> Type()
f2 -> [ "..." ]
f3 -> VariableDeclaratorId()
s: -1358852705
JTB node class for the production FormalParameters:
Corresponding grammar:
f0 -> "("
f1 -> [ #0 FormalParameter()
..
Corresponding grammar:
f0 -> "("
f1 -> [ #0 FormalParameter()
..
JTB node class for the production ForStatement:
Corresponding grammar:
f0 -> "for"
f1 -> "("
f2 -> ( %0 #0 VariableModifiers() #1 Type() #2 invalid input: '<' IDENTIFIER > #3 ":" #4 Expression()
..
Corresponding grammar:
f0 -> "for"
f1 -> "("
f2 -> ( %0 #0 VariableModifiers() #1 Type() #2 invalid input: '<' IDENTIFIER > #3 ":" #4 Expression()
..
JTB node class for the production ForUpdate:
Corresponding grammar:
f0 -> StatementExpressionList()
s: -1489663891
Corresponding grammar:
f0 -> StatementExpressionList()
s: -1489663891
The
GlobalDataBuilder
visitor performs, at the beginning of the JTB processing, some error checking
and builds and stores objects needed by other classes:
a HashMap (GlobalDataBuilder.notTbcNodesHM
) of JavaCodeProductions whose nodes must be created ("%" syntax) and
of BNFProductions whose nodes must not be created ("!" syntax),
a HashMap (GlobalDataBuilder.prodHM
) of all JavaCodeProductions and BNFProductions identifiers and their result
type,
a list (GlobalDataBuilder.retVarInfo
) of return variables declarations (for all non "void" JavaCodeProductions
for which the node creation has been asked and BNFProductions for which the node creation has not been
forbidden)
a HashMap (GlobalDataBuilder.tokenHM
) of tokens which have a constant regular expression, e.g.JTB node class for the production IdentifierAsString:
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
s: -1580059612
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
s: -1580059612
JTB node class for the production IfStatement:
Corresponding grammar:
f0 -> "if"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> Statement()
f5 -> [ #0 "else" #1 Statement() ]
s: -1906079982
Corresponding grammar:
f0 -> "if"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> Statement()
f5 -> [ #0 "else" #1 Statement() ]
s: -1906079982
All "IIntVisitor" visitors must implement this interface.
JTB node class for the production ImplementsList:
Corresponding grammar:
f0 -> "implements"
f1 -> ClassOrInterfaceType()
f2 -> ( #0 "," #1 ClassOrInterfaceType() )*
s: 1830366786
Corresponding grammar:
f0 -> "implements"
f1 -> ClassOrInterfaceType()
f2 -> ( #0 "," #1 ClassOrInterfaceType() )*
s: 1830366786
JTB node class for the production ImportDeclaration:
Corresponding grammar:
f0 -> "import"
f1 -> [ "static" ]
f2 -> Name()
f3 -> [ #0 "." #1 "*" ]
f4 -> ";"
s: -1592912780
Corresponding grammar:
f0 -> "import"
f1 -> [ "static" ]
f2 -> Name()
f3 -> [ #0 "." #1 "*" ]
f4 -> ";"
s: -1592912780
JTB node class for the production InclusiveOrExpression:
Corresponding grammar:
f0 -> ExclusiveOrExpression()
f1 -> ( #0 "|" #1 ExclusiveOrExpression() )*
s: 963402497
Corresponding grammar:
f0 -> ExclusiveOrExpression()
f1 -> ( #0 "|" #1 ExclusiveOrExpression() )*
s: 963402497
JTB node class for the production Initializer:
Corresponding grammar:
f0 -> [ "static" ]
f1 -> Block()
s: -423135641
Corresponding grammar:
f0 -> [ "static" ]
f1 -> Block()
s: -423135641
The interface which all syntax tree classes must implement.
JTB node class for the production InstanceOfExpression:
Corresponding grammar:
f0 -> RelationalExpression()
f1 -> [ #0 "instanceof" #1 Type() ]
s: 933354553
Corresponding grammar:
f0 -> RelationalExpression()
f1 -> [ #0 "instanceof" #1 Type() ]
s: 933354553
JTB node class for the production IntegerLiteral:
Corresponding grammar:
f0 -> invalid input: '<' INTEGER_LITERAL >
s: -1048223857
Corresponding grammar:
f0 -> invalid input: '<' INTEGER_LITERAL >
s: -1048223857
All "IVoidVisitor" visitors must implement this interface.
Class
JavaBranchPrinter
is not itself a visitor but it uses a JavaPrinter
visitor to visit
a java code branch of the tree and returns a pretty printed string representation of the subtree.Output error messages and keep track of totals.
This package contains data created as a result of parsing and semanticizing a JavaCC input file.
JTB node class for the production JavaCCInput:
Corresponding grammar:
f0 -> JavaCCOptions()
f1 -> "PARSER_BEGIN"
f2 -> "("
f3 -> IdentifierAsString()
f4 -> ")"
f5 -> CompilationUnit()
f6 -> "PARSER_END"
f7 -> "("
f8 -> IdentifierAsString()
f9 -> ")"
f10 -> ( Production() )+
f11 -> invalid input: '<' EOF >
s: 1465207473
Corresponding grammar:
f0 -> JavaCCOptions()
f1 -> "PARSER_BEGIN"
f2 -> "("
f3 -> IdentifierAsString()
f4 -> ")"
f5 -> CompilationUnit()
f6 -> "PARSER_END"
f7 -> "("
f8 -> IdentifierAsString()
f9 -> ")"
f10 -> ( Production() )+
f11 -> invalid input: '<' EOF >
s: 1465207473
JTB node class for the production JavaCCOptions:
Corresponding grammar:
f0 -> [ #0 "options" #1 "{"
..
Corresponding grammar:
f0 -> [ #0 "options" #1 "{"
..
Token literal values and constants.
Utilities.
An implementation of interface CharStream, where the stream is assumed to
contain only ASCII characters (with java-like unicode escape processing).
JTB node class for the production JavaCodeProduction:
Corresponding grammar:
f0 -> "JAVACODE"
f1 -> AccessModifier()
f2 -> ResultType()
f3 -> IdentifierAsString()
f4 -> FormalParameters()
f5 -> [ #0 "throws" #1 Name()
..
Corresponding grammar:
f0 -> "JAVACODE"
f1 -> AccessModifier()
f2 -> ResultType()
f3 -> IdentifierAsString()
f4 -> FormalParameters()
f5 -> [ #0 "throws" #1 Name()
..
Describes JAVACODE productions.
JTB node class for the production JavaIdentifier:
Corresponding grammar:
f0 -> ( %00 invalid input: '<' IDENTIFIER >
..
Corresponding grammar:
f0 -> ( %00 invalid input: '<' IDENTIFIER >
..
The
JavaPrinter
visitor reprints (with indentation) JavaCC grammar Java specific productions.The
JJFileAnnotator
visitor generates the (jtb) annotated .jj file containing the tree-building
code.Java Tree Builder (JTB) Driver.
A subclass of the JavaCC options class to extend it to the JTB options.
It also handles the global variables reflecting the JTB options and some derived objects and methods.
It also handles the global variables reflecting the JTB options and some derived objects and methods.
Token literal values and constants.
Token Manager.
JTB node class for the production LabeledStatement:
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> ":"
f2 -> Statement()
s: -1956923191
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> ":"
f2 -> Statement()
s: -1956923191
Generate lexer.
JTB node class for the production Literal:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production LocalLookahead:
Corresponding grammar:
f0 -> [ IntegerLiteral() ]
f1 -> [ "," ]
f2 -> [ ExpansionChoices() ]
f3 -> [ "," ]
f4 -> [ #0 "{"
..
Corresponding grammar:
f0 -> [ IntegerLiteral() ]
f1 -> [ "," ]
f2 -> [ ExpansionChoices() ]
f3 -> [ "," ]
f4 -> [ #0 "{"
..
JTB node class for the production LocalVariableDeclaration:
Corresponding grammar:
f0 -> VariableModifiers()
f1 -> Type()
f2 -> VariableDeclarator()
f3 -> ( #0 "," #1 VariableDeclarator() )*
s: 225808290
Corresponding grammar:
f0 -> VariableModifiers()
f1 -> Type()
f2 -> VariableDeclarator()
f3 -> ( #0 "," #1 VariableDeclarator() )*
s: 225808290
Describes lookahead rule for a particular expansion or expansion sequence (See Sequence.java).
JTB node class for the production MarkerAnnotation:
Corresponding grammar:
f0 -> "@"
f1 -> Name()
s: -11544239
Corresponding grammar:
f0 -> "@"
f1 -> Name()
s: -11544239
JTB node class for the production MemberSelector:
Corresponding grammar:
f0 -> "."
f1 -> TypeArguments()
f2 -> invalid input: '<' IDENTIFIER >
s: 257570924
Corresponding grammar:
f0 -> "."
f1 -> TypeArguments()
f2 -> invalid input: '<' IDENTIFIER >
s: 257570924
JTB node class for the production MemberValue:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production MemberValueArrayInitializer:
Corresponding grammar:
f0 -> "{"
f1 -> MemberValue()
f2 -> ( #0 "," #1 MemberValue() )*
f3 -> [ "," ]
f4 -> "}"
s: 111140055
Corresponding grammar:
f0 -> "{"
f1 -> MemberValue()
f2 -> ( #0 "," #1 MemberValue() )*
f3 -> [ "," ]
f4 -> "}"
s: 111140055
JTB node class for the production MemberValuePair:
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> "="
f2 -> MemberValue()
s: -476335468
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> "="
f2 -> MemberValue()
s: -476335468
JTB node class for the production MemberValuePairs:
Corresponding grammar:
f0 -> MemberValuePair()
f1 -> ( #0 "," #1 MemberValuePair() )*
s: -113472239
Corresponding grammar:
f0 -> MemberValuePair()
f1 -> ( #0 "," #1 MemberValuePair() )*
s: -113472239
Class
Messages
handles messages (informations, warnings and fatal errors), printing a message to
the user and handling it appropriately.JTB node class for the production MethodDeclaration:
Corresponding grammar:
f0 -> [ TypeParameters() ]
f1 -> ResultType()
f2 -> MethodDeclarator()
f3 -> [ #0 "throws" #1 NameList() ]
f4 -> ( %0 Block()
..
Corresponding grammar:
f0 -> [ TypeParameters() ]
f1 -> ResultType()
f2 -> MethodDeclarator()
f3 -> [ #0 "throws" #1 NameList() ]
f4 -> ( %0 Block()
..
JTB node class for the production MethodDeclarator:
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> FormalParameters()
f2 -> ( #0 "[" #1 "]" )*
s: -837793747
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> FormalParameters()
f2 -> ( #0 "[" #1 "]" )*
s: -837793747
JTB node class for the production Modifiers:
Corresponding grammar:
f0 -> ( ( %00 "public"
..
Corresponding grammar:
f0 -> ( ( %00 "public"
..
JTB node class for the production MultiplicativeExpression:
Corresponding grammar:
f0 -> UnaryExpression()
f1 -> ( #0 ( %0 "*"
..
Corresponding grammar:
f0 -> UnaryExpression()
f1 -> ( #0 ( %0 "*"
..
JTB node class for the production Name:
Corresponding grammar:
f0 -> JavaIdentifier()
f1 -> ( #0 "." #1 JavaIdentifier() )*
s: 565597065
Corresponding grammar:
f0 -> JavaIdentifier()
f1 -> ( #0 "." #1 JavaIdentifier() )*
s: 565597065
JTB node class for the production NameList:
Corresponding grammar:
f0 -> Name()
f1 -> ( #0 "," #1 Name() )*
s: -1147957113
Corresponding grammar:
f0 -> Name()
f1 -> ( #0 "," #1 Name() )*
s: -1147957113
A Non-deterministic Finite Automaton.
The state of a Non-deterministic Finite Automaton.
Represents a grammar choice (|), e.g.
Provides constants reflecting the JTB user nodes.
Annotation
The user nodes signatures are generated in the
the default visitors' visit methods are generated with the
and the user visitors' visit methods can be annotated with the same annotation.
NodeFieldsSignature
enables the ControlSignatureProcessor
annotation
processor to issue a compile error if the user visitors' visit methods are not coded against the
last nodes definitions.The user nodes signatures are generated in the
NodeConstants
class,the default visitors' visit methods are generated with the
NodeFieldsSignature
annotation, with the 3 values NodeFieldsSignature.value()
,and the user visitors' visit methods can be annotated with the same annotation.
Represents a grammar list (+), e.g.
Represents an optional grammar list (*), e.g.
Represents a grammar optional node (? or []), e.g.
Represents a sequence of nodes (x y z ...) nested within a choice (|), list (+),
optional list (*), or optional node (? or []), e.g.
Describes non terminals.
JTB node class for the production NormalAnnotation:
Corresponding grammar:
f0 -> "@"
f1 -> Name()
f2 -> "("
f3 -> [ MemberValuePairs() ]
f4 -> ")"
s: -50913587
Corresponding grammar:
f0 -> "@"
f1 -> Name()
f2 -> "("
f3 -> [ MemberValuePairs() ]
f4 -> ")"
s: -50913587
Describes JavaCC productions.
JTB node class for the production NullLiteral:
Corresponding grammar:
f0 -> "null"
s: -1703344686
Corresponding grammar:
f0 -> "null"
s: -1703344686
Describes one-or-more expansions (e.g., foo+).
JTB node class for the production OptionBinding:
Corresponding grammar:
f0 -> ( %0 invalid input: '<' IDENTIFIER >
..
Corresponding grammar:
f0 -> ( %0 invalid input: '<' IDENTIFIER >
..
A class that stores all JTB / JavaCC file options information.
JTB node class for the production PackageDeclaration:
Corresponding grammar:
f0 -> "package"
f1 -> Name()
f2 -> ";"
s: -2133750237
Corresponding grammar:
f0 -> "package"
f1 -> Name()
f2 -> ";"
s: -2133750237
This exception is thrown when parse errors are encountered.
JTB node class for the production PostfixExpression:
Corresponding grammar:
f0 -> PrimaryExpression()
f1 -> [ %0 "++"
..
Corresponding grammar:
f0 -> PrimaryExpression()
f1 -> [ %0 "++"
..
JTB node class for the production PreDecrementExpression:
Corresponding grammar:
f0 -> "--"
f1 -> PrimaryExpression()
s: -743030168
Corresponding grammar:
f0 -> "--"
f1 -> PrimaryExpression()
s: -743030168
JTB node class for the production PreIncrementExpression:
Corresponding grammar:
f0 -> "++"
f1 -> PrimaryExpression()
s: 2138182184
Corresponding grammar:
f0 -> "++"
f1 -> PrimaryExpression()
s: 2138182184
JTB node class for the production PrimaryExpression:
Corresponding grammar:
f0 -> PrimaryPrefix()
f1 -> ( PrimarySuffix() )*
s: -840041189
Corresponding grammar:
f0 -> PrimaryPrefix()
f1 -> ( PrimarySuffix() )*
s: -840041189
JTB node class for the production PrimaryPrefix:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production PrimarySuffix:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production PrimitiveType:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production Production:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
Class
ProgrammaticError
reports internal programmatic unrecoverable errors.Describes character lists.
Describes regular expressions which are choices from from among included regular expressions.
JTB node class for the production ReferenceType:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production RegExprKind:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production RegExprSpec:
Corresponding grammar:
f0 -> RegularExpression()
f1 -> [ "!" ]
f2 -> [ Block() ]
f3 -> [ #0 ":" #1 invalid input: '<' IDENTIFIER > ]
s: -1949948808
Corresponding grammar:
f0 -> RegularExpression()
f1 -> [ "!" ]
f2 -> [ Block() ]
f3 -> [ #0 ":" #1 invalid input: '<' IDENTIFIER > ]
s: -1949948808
The object type of entries in the vector "respecs" of class
"TokenProduction".
JTB node class for the production RegularExpression:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
Describes regular expressions.
JTB node class for the production RegularExprProduction:
Corresponding grammar:
f0 -> [ %0 #0 "invalid input: '<'" #1 "*" #2 ">"
..
Corresponding grammar:
f0 -> [ %0 #0 "invalid input: '<'" #1 "*" #2 ">"
..
JTB node class for the production RelationalExpression:
Corresponding grammar:
f0 -> ShiftExpression()
f1 -> ( #0 ( %0 "invalid input: '<'"
..
Corresponding grammar:
f0 -> ShiftExpression()
f1 -> ( #0 ( %0 "invalid input: '<'"
..
Describes the EOF regular expression
JTB node class for the production ResultType:
Corresponding grammar:
f0 -> ( %0 "void"
..
Corresponding grammar:
f0 -> ( %0 "void"
..
JTB node class for the production ReturnStatement:
Corresponding grammar:
f0 -> "return"
f1 -> [ Expression() ]
f2 -> ";"
s: -1971167888
Corresponding grammar:
f0 -> "return"
f1 -> [ Expression() ]
f2 -> ";"
s: -1971167888
Describes regular expressions which are referred to just by their name.
Describes one-or-more regular expressions (invalid input: '<'foo+>).
Describes one-or-more regular expressions (invalid input: '<'foo+>).
Describes regular expressions which are sequences of other regular expressions.
JTB node class for the production RSignedShift:
Corresponding grammar:
f0 -> ">"
f1 -> ">"
s: 1560485759
Corresponding grammar:
f0 -> ">"
f1 -> ">"
s: 1560485759
Describes string literals.
JTB node class for the production RUnsignedShift:
Corresponding grammar:
f0 -> ">"
f1 -> ">"
f2 -> ">"
s: -171434548
Corresponding grammar:
f0 -> ">"
f1 -> ">"
f2 -> ">"
s: -171434548
Describes zero-or-more regular expressions (invalid input: '<'foo*>).
Describes zero-or-one regular expressions (invalid input: '<'foo?>).
The
when a JavaCodeProduction is to be generated (warning if return type is non "void", information otherwise) (JTB will alter the code), when a BNFProduction is not to be generated (information), when a to be generated BNFProduction has a return value other than "void" (warning) (JTB will alter the code), when a JavaCodeProduction or a BNFProduction is not to be generated locally but is also not to be generated globally (warning) (as unnecessary), when a JavaCodeProduction or a BNFProduction has a name reserved for an automatically generated JTB class (e.g.
SemanticChecker
visitor checks and report informations, warnings or errors for the following
conditions:when a JavaCodeProduction is to be generated (warning if return type is non "void", information otherwise) (JTB will alter the code), when a BNFProduction is not to be generated (information), when a to be generated BNFProduction has a return value other than "void" (warning) (JTB will alter the code), when a JavaCodeProduction or a BNFProduction is not to be generated locally but is also not to be generated globally (warning) (as unnecessary), when a JavaCodeProduction or a BNFProduction has a name reserved for an automatically generated JTB class (e.g.
Describes expansions that are sequences of expansion units.
JTB node class for the production ShiftExpression:
Corresponding grammar:
f0 -> AdditiveExpression()
f1 -> ( #0 ( %0 "invalid input: '<'invalid input: '<'"
..
Corresponding grammar:
f0 -> AdditiveExpression()
f1 -> ( #0 ( %0 "invalid input: '<'invalid input: '<'"
..
Describes single character descriptors in a character list.
JTB node class for the production SingleMemberAnnotation:
Corresponding grammar:
f0 -> "@"
f1 -> Name()
f2 -> "("
f3 -> MemberValue()
f4 -> ")"
s: -1771126382
Corresponding grammar:
f0 -> "@"
f1 -> Name()
f2 -> "("
f3 -> MemberValue()
f4 -> ")"
s: -1771126382
Class
Spacing
manages the indentation information for pretty printing.JTB node class for the production Statement:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production StatementExpression:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production StatementExpressionList:
Corresponding grammar:
f0 -> StatementExpression()
f1 -> ( #0 "," #1 StatementExpression() )*
s: 186773841
Corresponding grammar:
f0 -> StatementExpression()
f1 -> ( #0 "," #1 StatementExpression() )*
s: 186773841
JTB node class for the production StringLiteral:
Corresponding grammar:
f0 -> invalid input: '<' STRING_LITERAL >
s: 241433948
Corresponding grammar:
f0 -> invalid input: '<' STRING_LITERAL >
s: 241433948
JTB node class for the production SwitchLabel:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production SwitchStatement:
Corresponding grammar:
f0 -> "switch"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> "{"
f5 -> ( #0 SwitchLabel()
..
Corresponding grammar:
f0 -> "switch"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> "{"
f5 -> ( #0 SwitchLabel()
..
JTB node class for the production SynchronizedStatement:
Corresponding grammar:
f0 -> "synchronized"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> Block()
s: 2040551171
Corresponding grammar:
f0 -> "synchronized"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> Block()
s: 2040551171
JTB node class for the production ThrowStatement:
Corresponding grammar:
f0 -> "throw"
f1 -> Expression()
f2 -> ";"
s: 568421270
Corresponding grammar:
f0 -> "throw"
f1 -> Expression()
f2 -> ";"
s: 568421270
Represents a JavaCC single token in the grammar and a JTB corresponding node.
The class holds all the fields and methods generated normally by JavaCC, plus the ones required by JTB.
If the "-tk" JTB option is used, it also contains an ArrayList of preceding special tokens.
The class holds all the fields and methods generated normally by JavaCC, plus the ones required by JTB.
If the "-tk" JTB option is used, it also contains an ArrayList of preceding special tokens.
JTB node class for the production TokenManagerDecls:
Corresponding grammar:
f0 -> "TOKEN_MGR_DECLS"
f1 -> ":"
f2 -> ClassOrInterfaceBody()
s: -1566997219
Corresponding grammar:
f0 -> "TOKEN_MGR_DECLS"
f1 -> ":"
f2 -> ClassOrInterfaceBody()
s: -1566997219
Token Manager Error.
Describes the various regular expression productions.
Class
TreeDumperGenerator
generates the TreeDumper visitor which simply prints all the tokens in
the tree at the locations given in their beginLine and beginColumn member variables.Class
Using some pre-defined methods, users can quickly and easily create a formatter for their grammar.
The formatter will then take a tree, insert token location information into the Tokens of the tree.
TreeDumper can then be used to output the result.
Note that unlike the other automatically generated file, since this one must be edited to be useful, JTB will not overwrite this file automatically.
JTB will take this precaution for the other files only if the "-w" command-line parameter is used.
TreeFormatterGenerator
generates the TreeFormatter visitor which is a skeleton
pretty-printer.Using some pre-defined methods, users can quickly and easily create a formatter for their grammar.
The formatter will then take a tree, insert token location information into the Tokens of the tree.
TreeDumper can then be used to output the result.
Note that unlike the other automatically generated file, since this one must be edited to be useful, JTB will not overwrite this file automatically.
JTB will take this precaution for the other files only if the "-w" command-line parameter is used.
Describes expansions of the form "try {...} ...".
JTB node class for the production TryStatement:
Corresponding grammar:
f0 -> "try"
f1 -> Block()
f2 -> ( #0 "catch" #1 "(" #2 FormalParameter() #3 ")" #4 Block() )*
f3 -> [ #0 "finally" #1 Block() ]
s: 1108527850
Corresponding grammar:
f0 -> "try"
f1 -> Block()
f2 -> ( #0 "catch" #1 "(" #2 FormalParameter() #3 ")" #4 Block() )*
f3 -> [ #0 "finally" #1 Block() ]
s: 1108527850
JTB node class for the production Type:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production TypeArgument:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production TypeArguments:
Corresponding grammar:
f0 -> "invalid input: '<'"
f1 -> TypeArgument()
f2 -> ( #0 "," #1 TypeArgument() )*
f3 -> ">"
s: 131755052
Corresponding grammar:
f0 -> "invalid input: '<'"
f1 -> TypeArgument()
f2 -> ( #0 "," #1 TypeArgument() )*
f3 -> ">"
s: 131755052
JTB node class for the production TypeBound:
Corresponding grammar:
f0 -> "extends"
f1 -> ClassOrInterfaceType()
f2 -> ( #0 "invalid input: '&'" #1 ClassOrInterfaceType() )*
s: -2080520397
Corresponding grammar:
f0 -> "extends"
f1 -> ClassOrInterfaceType()
f2 -> ( #0 "invalid input: '&'" #1 ClassOrInterfaceType() )*
s: -2080520397
JTB node class for the production TypeDeclaration:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production TypeParameter:
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> [ TypeBound() ]
s: 1306471903
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> [ TypeBound() ]
s: 1306471903
JTB node class for the production TypeParameters:
Corresponding grammar:
f0 -> "invalid input: '<'"
f1 -> TypeParameter()
f2 -> ( #0 "," #1 TypeParameter() )*
f3 -> ">"
s: 1962566888
Corresponding grammar:
f0 -> "invalid input: '<'"
f1 -> TypeParameter()
f2 -> ( #0 "," #1 TypeParameter() )*
f3 -> ">"
s: 1962566888
JTB node class for the production UnaryExpression:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production UnaryExpressionNotPlusMinus:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
Class
UnicodeConverter
contains some static methods to convert unicode chars into their escape
sequence form (provided by James Huang from the JavaCC mailing list).A set of routines that walk down the Expansion_ tree in various ways.
Not used by JTB.
Not used by JTB.
Objects of this type are passed to the tree walker routines in
UnusedExpansionTreeWalker
.Generates the contents of the invariant files (TokenMgrError.java,
ParseException.java,Token.java, TokenManager.java, CharStream.java, JavaCharStream.java,
SimpleCharStream.java).
Not used by JTB.
Not used by JTB.
Not used by JTB.
Not used by JTB.
Describes a match, within a given lookahead.
Not used by JTB.
Not used by JTB.
Thrown when there is a mis-configuration or a bug.
Not used by JTB.
Not used by JTB.
Generates the invariant files (TokenMgrError.java, ParseException.java,Token.java,
TokenManager.java, CharStream.java, JavaCharStream.java, SimpleCharStream.java) and the
'Parser'Constants.java.
Not used by JTB.
Not used by JTB.
This class handles the creation and maintenance of the boiler-plate (invariant) classes,
(TokenMgrError.java, ParseException.java,Token.java, TokenManager.java, CharStream.java,
JavaCharStream.java, SimpleCharStream.java).
It is responsible for: Writing the JavaCC header lines to the file. Writing the checksum line. Using the checksum to determine if an existing file has been changed by the user (and so should be left alone). Checking any existing file's version (if the file can not be overwritten). Checking any existing file's creation options (if the file can not be overwritten).
Not used by JTB.
It is responsible for: Writing the JavaCC header lines to the file. Writing the checksum line. Using the checksum to determine if an existing file has been changed by the user (and so should be left alone). Checking any existing file's version (if the file can not be overwritten). Checking any existing file's creation options (if the file can not be overwritten).
Not used by JTB.
Not used by JTB.
Generate the parser.
Not used by JTB.
Not used by JTB.
Not used by JTB.
Class
UserClassInfo
is used by the JTB driver, the visitors and the files generator to store and
retrieve information about a (grammar) user (node) class including its name, the list of its fields, its
comments.Class
UserFilesGenerator
contains methods to generate: CODEJAVA
the (grammar) user nodes classes (genUserXxx, using UserClassInfo
),
the hook interface and empty class files (genXxxEnterExitHook).
JTB node class for the production VariableDeclarator:
Corresponding grammar:
f0 -> VariableDeclaratorId()
f1 -> [ #0 "=" #1 VariableInitializer() ]
s: -484955779
Corresponding grammar:
f0 -> VariableDeclaratorId()
f1 -> [ #0 "=" #1 VariableInitializer() ]
s: -484955779
JTB node class for the production VariableDeclaratorId:
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> ( #0 "[" #1 "]" )*
s: 416704472
Corresponding grammar:
f0 -> invalid input: '<' IDENTIFIER >
f1 -> ( #0 "[" #1 "]" )*
s: 416704472
JTB node class for the production VariableInitializer:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
JTB node class for the production VariableModifiers:
Corresponding grammar:
f0 -> ( ( %0 "final"
..
Corresponding grammar:
f0 -> ( ( %0 "final"
..
Class
VisitorInfo
holds the characteristics (name, return and arguments types) of a visitor to be
generated and the VisitorInfo.extract(String, List)
method to create the visitors list from the visitors
specification.Class
VisitorsGenerator
contains methods to generate: CODEJAVA
the different IXxxVisitor interfaces and DepthFirstXxxVisitor classes files,
the signature files.
JTB node class for the production WhileStatement:
Corresponding grammar:
f0 -> "while"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> Statement()
s: 503551312
Corresponding grammar:
f0 -> "while"
f1 -> "("
f2 -> Expression()
f3 -> ")"
f4 -> Statement()
s: 503551312
JTB node class for the production WildcardBounds:
Corresponding grammar:
f0 -> .
Corresponding grammar:
f0 -> .
Describes zero-or-more expansions (e.g., foo*).
Describes zero-or-one expansions (e.g., [foo], foo?).