Class Parser
- java.lang.Object
-
- com.thoughtworks.qdox.parser.impl.Parser
-
- All Implemented Interfaces:
CommentHandler
public class Parser extends java.lang.Object implements CommentHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classParser.Value
-
Field Summary
Fields Modifier and Type Field Description static shortABSTRACTstatic shortAMPERSANDstatic shortAMPERSAND2static shortAMPERSANDEQUALSstatic shortANNOCHARstatic shortANNOINTERFACEstatic shortANNOSTRINGprivate java.util.LinkedList<AnnoDef>annotationStackprivate java.util.List<ElemValueDef>annoValueListprivate java.util.List<java.util.List<ElemValueDef>>annoValueListStackstatic shortATstatic shortBOOLEANstatic shortBOOLEAN_LITERALstatic shortBRACECLOSEstatic shortBRACEOPENprivate Builderbuilderstatic shortBYTEstatic shortCHARstatic shortCHAR_LITERALstatic shortCIRCUMFLEXstatic shortCIRCUMFLEXEQUALSstatic shortCLASSprivate ClassDefclsstatic shortCODEBLOCKstatic shortCOLONstatic shortCOLONCOLONprivate intcolumnstatic shortCOMMAprivate booleandebugLexerstatic shortDEFAULTstatic shortDOTstatic shortDOTDOTDOTstatic shortDOUBLEstatic shortENUMstatic shortEQUALSstatic shortEQUALS2static shortEXCLAMATIONprivate ModuleDef.ExportsDefexpstatic shortEXPORTSstatic shortEXTENDSprivate FieldDeffdprivate TypeDeffieldTypestatic shortFINALstatic shortFLOATstatic shortFLOAT_LITERALstatic shortGREATEREQUALSstatic shortGREATERTHANstatic shortGREATERTHAN2static shortGREATERTHAN2EQUALSstatic shortGREATERTHAN3static shortGREATERTHAN3EQUALSstatic shortIDENTIFIERstatic shortIMPLEMENTSstatic shortIMPORTstatic shortINTstatic shortINTEGER_LITERALstatic shortINTERFACEstatic shortLESSEQUALSstatic shortLESSTHANstatic shortLESSTHAN2static shortLESSTHAN2EQUALSprivate JavaLexerlexerprivate intlinestatic shortLONGstatic shortMINUSstatic shortMINUSEQUALSstatic shortMINUSMINUSprivate java.util.Set<java.lang.String>modifiersstatic shortMODULEprivate java.util.List<java.lang.String>moduleTargetsprivate MethodDefmthstatic shortNATIVEstatic shortNEWstatic shortNOTEQUALSstatic shortOPENstatic shortOPENSprivate ModuleDef.OpensDefopnstatic shortPACKAGEprivate FieldDefparamstatic shortPARENBLOCKstatic shortPARENCLOSEstatic shortPARENOPENstatic shortPERCENTstatic shortPERCENTEQUALSstatic shortPLUSstatic shortPLUSEQUALSstatic shortPLUSPLUSstatic shortPRIVATEstatic shortPROTECTEDstatic shortPROVIDESprivate ModuleDef.ProvidesDefprvstatic shortPUBLICstatic shortQUERYstatic shortREQUIRESstatic shortSEMIstatic shortSHORTstatic shortSLASHstatic shortSLASHEQUALSstatic shortSQUARECLOSEstatic shortSQUAREOPENstatic shortSTARstatic shortSTAREQUALS(package private) intstatemax(package private) intstateptr(package private) intstateptrmax(package private) int[]statestkstatic shortSTATICstatic shortSTRICTFPstatic shortSTRING_LITERALstatic shortSUPERstatic shortSYNCHRONIZEDprivate java.lang.StringBuildertextBufferstatic shortTHROWSstatic shortTILDEstatic shortTOstatic shortTRANSIENTstatic shortTRANSITIVEprivate java.util.List<TypeDef>typeListprivate java.util.List<TypeVariableDef>typeParamsprivate java.util.Stack<TypeDef>typeStackprivate TypeVariableDeftypeVariablestatic shortUSES(package private) intvalptr(package private) Parser.Value[]valstkstatic shortVERTLINEstatic shortVERTLINE2static shortVERTLINEEQUALSstatic shortVOIDstatic shortVOLATILEstatic shortWITH(package private) intyychar(package private) static short[]yycheck(package private) booleanyydebug(package private) static short[]yydefred(package private) static short[]yydgotostatic shortYYERRCODE(package private) intyyerrflag(package private) static shortYYFINAL(package private) static short[]yygindex(package private) static short[]yylen(package private) static short[]yylhs(package private) Parser.Valueyylval(package private) intyym(package private) static shortYYMAXTOKEN(package private) intyyn(package private) static java.lang.String[]yyname(package private) intyynerrs(package private) static short[]yyrindex(package private) static java.lang.String[]yyrule(package private) java.lang.Stringyys(package private) static short[]yysindex(package private) static intYYSTACKSIZE(package private) intyystate(package private) static short[]yytable(package private) static intYYTABLESIZE(package private) java.lang.Stringyytext(package private) Parser.Valueyyval
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidappendToBuffer(java.lang.String word)private java.lang.Stringbuffer()(package private) voiddebug(java.lang.String msg)(package private) voiddump_stacks(int count)(package private) Parser.Valuedup_yyval(Parser.Value val)(package private) booleaninit_stacks()private voidmakeField(TypeDef field, java.lang.String body, boolean enumConstant)voidonComment(java.lang.String comment, int line, int column)Called if the parser hits a commentbooleanparse()Parse file.voidsetDebugLexer(boolean debug)voidsetDebugParser(boolean debug)(package private) voidstate_drop(int cnt)(package private) intstate_peek(int relative)(package private) intstate_pop()(package private) voidstate_push(int state)(package private) voidval_drop(int cnt)(package private) voidval_init()(package private) Parser.Valueval_peek(int relative)(package private) Parser.Valueval_pop()(package private) voidval_push(Parser.Value val)(package private) static voidyycheck()private voidyyerror(java.lang.String msg)private intyylex()(package private) voidyylexdebug(int state, int ch)(package private) intyyparse()(package private) static voidyytable()
-
-
-
Field Detail
-
yydebug
boolean yydebug
-
yynerrs
int yynerrs
-
yyerrflag
int yyerrflag
-
yychar
int yychar
-
YYSTACKSIZE
static final int YYSTACKSIZE
- See Also:
- Constant Field Values
-
statestk
int[] statestk
-
stateptr
int stateptr
-
stateptrmax
int stateptrmax
-
statemax
int statemax
-
yytext
java.lang.String yytext
-
yyval
Parser.Value yyval
-
yylval
Parser.Value yylval
-
valstk
Parser.Value[] valstk
-
valptr
int valptr
-
SEMI
public static final short SEMI
- See Also:
- Constant Field Values
-
DOT
public static final short DOT
- See Also:
- Constant Field Values
-
DOTDOTDOT
public static final short DOTDOTDOT
- See Also:
- Constant Field Values
-
COMMA
public static final short COMMA
- See Also:
- Constant Field Values
-
STAR
public static final short STAR
- See Also:
- Constant Field Values
-
PERCENT
public static final short PERCENT
- See Also:
- Constant Field Values
-
EQUALS
public static final short EQUALS
- See Also:
- Constant Field Values
-
ANNOSTRING
public static final short ANNOSTRING
- See Also:
- Constant Field Values
-
ANNOCHAR
public static final short ANNOCHAR
- See Also:
- Constant Field Values
-
SLASH
public static final short SLASH
- See Also:
- Constant Field Values
-
PLUS
public static final short PLUS
- See Also:
- Constant Field Values
-
MINUS
public static final short MINUS
- See Also:
- Constant Field Values
-
STAREQUALS
public static final short STAREQUALS
- See Also:
- Constant Field Values
-
SLASHEQUALS
public static final short SLASHEQUALS
- See Also:
- Constant Field Values
-
PERCENTEQUALS
public static final short PERCENTEQUALS
- See Also:
- Constant Field Values
-
PLUSEQUALS
public static final short PLUSEQUALS
- See Also:
- Constant Field Values
-
MINUSEQUALS
public static final short MINUSEQUALS
- See Also:
- Constant Field Values
-
LESSTHAN2EQUALS
public static final short LESSTHAN2EQUALS
- See Also:
- Constant Field Values
-
GREATERTHAN2EQUALS
public static final short GREATERTHAN2EQUALS
- See Also:
- Constant Field Values
-
GREATERTHAN3EQUALS
public static final short GREATERTHAN3EQUALS
- See Also:
- Constant Field Values
-
AMPERSANDEQUALS
public static final short AMPERSANDEQUALS
- See Also:
- Constant Field Values
-
CIRCUMFLEXEQUALS
public static final short CIRCUMFLEXEQUALS
- See Also:
- Constant Field Values
-
VERTLINEEQUALS
public static final short VERTLINEEQUALS
- See Also:
- Constant Field Values
-
PACKAGE
public static final short PACKAGE
- See Also:
- Constant Field Values
-
IMPORT
public static final short IMPORT
- See Also:
- Constant Field Values
-
PUBLIC
public static final short PUBLIC
- See Also:
- Constant Field Values
-
PROTECTED
public static final short PROTECTED
- See Also:
- Constant Field Values
-
PRIVATE
public static final short PRIVATE
- See Also:
- Constant Field Values
-
STATIC
public static final short STATIC
- See Also:
- Constant Field Values
-
FINAL
public static final short FINAL
- See Also:
- Constant Field Values
-
ABSTRACT
public static final short ABSTRACT
- See Also:
- Constant Field Values
-
NATIVE
public static final short NATIVE
- See Also:
- Constant Field Values
-
STRICTFP
public static final short STRICTFP
- See Also:
- Constant Field Values
-
SYNCHRONIZED
public static final short SYNCHRONIZED
- See Also:
- Constant Field Values
-
TRANSIENT
public static final short TRANSIENT
- See Also:
- Constant Field Values
-
VOLATILE
public static final short VOLATILE
- See Also:
- Constant Field Values
-
DEFAULT
public static final short DEFAULT
- See Also:
- Constant Field Values
-
OPEN
public static final short OPEN
- See Also:
- Constant Field Values
-
MODULE
public static final short MODULE
- See Also:
- Constant Field Values
-
REQUIRES
public static final short REQUIRES
- See Also:
- Constant Field Values
-
TRANSITIVE
public static final short TRANSITIVE
- See Also:
- Constant Field Values
-
EXPORTS
public static final short EXPORTS
- See Also:
- Constant Field Values
-
OPENS
public static final short OPENS
- See Also:
- Constant Field Values
-
TO
public static final short TO
- See Also:
- Constant Field Values
-
USES
public static final short USES
- See Also:
- Constant Field Values
-
PROVIDES
public static final short PROVIDES
- See Also:
- Constant Field Values
-
WITH
public static final short WITH
- See Also:
- Constant Field Values
-
CLASS
public static final short CLASS
- See Also:
- Constant Field Values
-
INTERFACE
public static final short INTERFACE
- See Also:
- Constant Field Values
-
ENUM
public static final short ENUM
- See Also:
- Constant Field Values
-
ANNOINTERFACE
public static final short ANNOINTERFACE
- See Also:
- Constant Field Values
-
THROWS
public static final short THROWS
- See Also:
- Constant Field Values
-
EXTENDS
public static final short EXTENDS
- See Also:
- Constant Field Values
-
IMPLEMENTS
public static final short IMPLEMENTS
- See Also:
- Constant Field Values
-
SUPER
public static final short SUPER
- See Also:
- Constant Field Values
-
NEW
public static final short NEW
- See Also:
- Constant Field Values
-
BRACEOPEN
public static final short BRACEOPEN
- See Also:
- Constant Field Values
-
BRACECLOSE
public static final short BRACECLOSE
- See Also:
- Constant Field Values
-
SQUAREOPEN
public static final short SQUAREOPEN
- See Also:
- Constant Field Values
-
SQUARECLOSE
public static final short SQUARECLOSE
- See Also:
- Constant Field Values
-
PARENOPEN
public static final short PARENOPEN
- See Also:
- Constant Field Values
-
PARENCLOSE
public static final short PARENCLOSE
- See Also:
- Constant Field Values
-
LESSTHAN
public static final short LESSTHAN
- See Also:
- Constant Field Values
-
GREATERTHAN
public static final short GREATERTHAN
- See Also:
- Constant Field Values
-
LESSEQUALS
public static final short LESSEQUALS
- See Also:
- Constant Field Values
-
GREATEREQUALS
public static final short GREATEREQUALS
- See Also:
- Constant Field Values
-
LESSTHAN2
public static final short LESSTHAN2
- See Also:
- Constant Field Values
-
GREATERTHAN2
public static final short GREATERTHAN2
- See Also:
- Constant Field Values
-
GREATERTHAN3
public static final short GREATERTHAN3
- See Also:
- Constant Field Values
-
EXCLAMATION
public static final short EXCLAMATION
- See Also:
- Constant Field Values
-
AMPERSAND2
public static final short AMPERSAND2
- See Also:
- Constant Field Values
-
VERTLINE2
public static final short VERTLINE2
- See Also:
- Constant Field Values
-
EQUALS2
public static final short EQUALS2
- See Also:
- Constant Field Values
-
NOTEQUALS
public static final short NOTEQUALS
- See Also:
- Constant Field Values
-
TILDE
public static final short TILDE
- See Also:
- Constant Field Values
-
AMPERSAND
public static final short AMPERSAND
- See Also:
- Constant Field Values
-
VERTLINE
public static final short VERTLINE
- See Also:
- Constant Field Values
-
CIRCUMFLEX
public static final short CIRCUMFLEX
- See Also:
- Constant Field Values
-
VOID
public static final short VOID
- See Also:
- Constant Field Values
-
QUERY
public static final short QUERY
- See Also:
- Constant Field Values
-
COLON
public static final short COLON
- See Also:
- Constant Field Values
-
COLONCOLON
public static final short COLONCOLON
- See Also:
- Constant Field Values
-
AT
public static final short AT
- See Also:
- Constant Field Values
-
CODEBLOCK
public static final short CODEBLOCK
- See Also:
- Constant Field Values
-
PARENBLOCK
public static final short PARENBLOCK
- See Also:
- Constant Field Values
-
BYTE
public static final short BYTE
- See Also:
- Constant Field Values
-
SHORT
public static final short SHORT
- See Also:
- Constant Field Values
-
INT
public static final short INT
- See Also:
- Constant Field Values
-
LONG
public static final short LONG
- See Also:
- Constant Field Values
-
CHAR
public static final short CHAR
- See Also:
- Constant Field Values
-
FLOAT
public static final short FLOAT
- See Also:
- Constant Field Values
-
DOUBLE
public static final short DOUBLE
- See Also:
- Constant Field Values
-
BOOLEAN
public static final short BOOLEAN
- See Also:
- Constant Field Values
-
IDENTIFIER
public static final short IDENTIFIER
- See Also:
- Constant Field Values
-
BOOLEAN_LITERAL
public static final short BOOLEAN_LITERAL
- See Also:
- Constant Field Values
-
INTEGER_LITERAL
public static final short INTEGER_LITERAL
- See Also:
- Constant Field Values
-
FLOAT_LITERAL
public static final short FLOAT_LITERAL
- See Also:
- Constant Field Values
-
CHAR_LITERAL
public static final short CHAR_LITERAL
- See Also:
- Constant Field Values
-
STRING_LITERAL
public static final short STRING_LITERAL
- See Also:
- Constant Field Values
-
PLUSPLUS
public static final short PLUSPLUS
- See Also:
- Constant Field Values
-
MINUSMINUS
public static final short MINUSMINUS
- See Also:
- Constant Field Values
-
YYERRCODE
public static final short YYERRCODE
- See Also:
- Constant Field Values
-
yylhs
static final short[] yylhs
-
yylen
static final short[] yylen
-
yydefred
static final short[] yydefred
-
yydgoto
static final short[] yydgoto
-
yysindex
static final short[] yysindex
-
yyrindex
static final short[] yyrindex
-
yygindex
static final short[] yygindex
-
YYTABLESIZE
static final int YYTABLESIZE
- See Also:
- Constant Field Values
-
yytable
static short[] yytable
-
yycheck
static short[] yycheck
-
YYFINAL
static final short YYFINAL
- See Also:
- Constant Field Values
-
YYMAXTOKEN
static final short YYMAXTOKEN
- See Also:
- Constant Field Values
-
yyname
static final java.lang.String[] yyname
-
yyrule
static final java.lang.String[] yyrule
-
lexer
private JavaLexer lexer
-
builder
private Builder builder
-
textBuffer
private java.lang.StringBuilder textBuffer
-
cls
private ClassDef cls
-
mth
private MethodDef mth
-
fd
private FieldDef fd
-
exp
private ModuleDef.ExportsDef exp
-
opn
private ModuleDef.OpensDef opn
-
prv
private ModuleDef.ProvidesDef prv
-
moduleTargets
private java.util.List<java.lang.String> moduleTargets
-
typeParams
private java.util.List<TypeVariableDef> typeParams
-
annotationStack
private java.util.LinkedList<AnnoDef> annotationStack
-
annoValueListStack
private java.util.List<java.util.List<ElemValueDef>> annoValueListStack
-
annoValueList
private java.util.List<ElemValueDef> annoValueList
-
param
private FieldDef param
-
modifiers
private java.util.Set<java.lang.String> modifiers
-
fieldType
private TypeDef fieldType
-
typeVariable
private TypeVariableDef typeVariable
-
typeStack
private java.util.Stack<TypeDef> typeStack
-
typeList
private java.util.List<TypeDef> typeList
-
line
private int line
-
column
private int column
-
debugLexer
private boolean debugLexer
-
yyn
int yyn
-
yym
int yym
-
yystate
int yystate
-
yys
java.lang.String yys
-
-
Method Detail
-
debug
void debug(java.lang.String msg)
-
state_push
final void state_push(int state)
-
state_pop
final int state_pop()
-
state_drop
final void state_drop(int cnt)
-
state_peek
final int state_peek(int relative)
-
init_stacks
final boolean init_stacks()
-
dump_stacks
void dump_stacks(int count)
-
val_init
final void val_init()
-
val_push
final void val_push(Parser.Value val)
-
val_pop
final Parser.Value val_pop()
-
val_drop
final void val_drop(int cnt)
-
val_peek
final Parser.Value val_peek(int relative)
-
dup_yyval
final Parser.Value dup_yyval(Parser.Value val)
-
yytable
static void yytable()
-
yycheck
static void yycheck()
-
appendToBuffer
private void appendToBuffer(java.lang.String word)
-
buffer
private java.lang.String buffer()
-
setDebugParser
public void setDebugParser(boolean debug)
-
setDebugLexer
public void setDebugLexer(boolean debug)
-
parse
public boolean parse()
Parse file. Return true if successful.
-
yylex
private int yylex()
-
yyerror
private void yyerror(java.lang.String msg)
-
makeField
private void makeField(TypeDef field, java.lang.String body, boolean enumConstant)
-
onComment
public void onComment(java.lang.String comment, int line, int column)Description copied from interface:CommentHandlerCalled if the parser hits a comment- Specified by:
onCommentin interfaceCommentHandler- Parameters:
comment- the commentline- the line numbercolumn- the column number
-
yylexdebug
void yylexdebug(int state, int ch)
-
yyparse
int yyparse()
-
-