public class Parser extends java.lang.Object implements CommentHandler
Modifier and Type | Class and Description |
---|---|
private class |
Parser.Value |
Modifier and Type | Field and Description |
---|---|
static short |
ABSTRACT |
static short |
AMPERSAND |
static short |
AMPERSAND2 |
static short |
AMPERSANDEQUALS |
static short |
ANNOCHAR |
static short |
ANNOINTERFACE |
static short |
ANNOSTRING |
private java.util.LinkedList<AnnoDef> |
annotationStack |
private java.util.List<ElemValueDef> |
annoValueList |
private java.util.List<java.util.List<ElemValueDef>> |
annoValueListStack |
static short |
AT |
static short |
BOOLEAN |
static short |
BOOLEAN_LITERAL |
static short |
BRACECLOSE |
static short |
BRACEOPEN |
private Builder |
builder |
static short |
BYTE |
static short |
CHAR |
static short |
CHAR_LITERAL |
static short |
CIRCUMFLEX |
static short |
CIRCUMFLEXEQUALS |
static short |
CLASS |
private ClassDef |
cls |
static short |
CODEBLOCK |
static short |
COLON |
static short |
COLONCOLON |
private int |
column |
static short |
COMMA |
private boolean |
debugLexer |
static short |
DEFAULT |
static short |
DOT |
static short |
DOTDOTDOT |
static short |
DOUBLE |
static short |
ENUM |
static short |
EQUALS |
static short |
EQUALS2 |
static short |
EXCLAMATION |
private ModuleDef.ExportsDef |
exp |
static short |
EXPORTS |
static short |
EXTENDS |
private FieldDef |
fd |
private TypeDef |
fieldType |
static short |
FINAL |
static short |
FLOAT |
static short |
FLOAT_LITERAL |
static short |
GREATEREQUALS |
static short |
GREATERTHAN |
static short |
GREATERTHAN2 |
static short |
GREATERTHAN2EQUALS |
static short |
GREATERTHAN3 |
static short |
GREATERTHAN3EQUALS |
static short |
IDENTIFIER |
static short |
IMPLEMENTS |
static short |
IMPORT |
static short |
INT |
static short |
INTEGER_LITERAL |
static short |
INTERFACE |
static short |
LESSEQUALS |
static short |
LESSTHAN |
static short |
LESSTHAN2 |
static short |
LESSTHAN2EQUALS |
private JavaLexer |
lexer |
private int |
line |
static short |
LONG |
static short |
MINUS |
static short |
MINUSEQUALS |
static short |
MINUSMINUS |
private java.util.Set<java.lang.String> |
modifiers |
static short |
MODULE |
private java.util.List<java.lang.String> |
moduleTargets |
private MethodDef |
mth |
static short |
NATIVE |
static short |
NEW |
static short |
NOTEQUALS |
static short |
OPEN |
static short |
OPENS |
private ModuleDef.OpensDef |
opn |
static short |
PACKAGE |
private FieldDef |
param |
static short |
PARENBLOCK |
static short |
PARENCLOSE |
static short |
PARENOPEN |
static short |
PERCENT |
static short |
PERCENTEQUALS |
static short |
PLUS |
static short |
PLUSEQUALS |
static short |
PLUSPLUS |
static short |
PRIVATE |
static short |
PROTECTED |
static short |
PROVIDES |
private ModuleDef.ProvidesDef |
prv |
static short |
PUBLIC |
static short |
QUERY |
static short |
REQUIRES |
static short |
SEMI |
static short |
SHORT |
static short |
SLASH |
static short |
SLASHEQUALS |
static short |
SQUARECLOSE |
static short |
SQUAREOPEN |
static short |
STAR |
static short |
STAREQUALS |
(package private) int |
statemax |
(package private) int |
stateptr |
(package private) int |
stateptrmax |
(package private) int[] |
statestk |
static short |
STATIC |
static short |
STRICTFP |
static short |
STRING_LITERAL |
static short |
SUPER |
static short |
SYNCHRONIZED |
private java.lang.StringBuilder |
textBuffer |
static short |
THROWS |
static short |
TILDE |
static short |
TO |
static short |
TRANSIENT |
static short |
TRANSITIVE |
private java.util.List<TypeDef> |
typeList |
private java.util.List<TypeVariableDef> |
typeParams |
private java.util.Stack<TypeDef> |
typeStack |
private TypeVariableDef |
typeVariable |
static short |
USES |
(package private) int |
valptr |
(package private) Parser.Value[] |
valstk |
static short |
VERTLINE |
static short |
VERTLINE2 |
static short |
VERTLINEEQUALS |
static short |
VOID |
static short |
VOLATILE |
static short |
WITH |
(package private) int |
yychar |
(package private) static short[] |
yycheck |
(package private) boolean |
yydebug |
(package private) static short[] |
yydefred |
(package private) static short[] |
yydgoto |
static short |
YYERRCODE |
(package private) int |
yyerrflag |
(package private) static short |
YYFINAL |
(package private) static short[] |
yygindex |
(package private) static short[] |
yylen |
(package private) static short[] |
yylhs |
(package private) Parser.Value |
yylval |
(package private) int |
yym |
(package private) static short |
YYMAXTOKEN |
(package private) int |
yyn |
(package private) static java.lang.String[] |
yyname |
(package private) int |
yynerrs |
(package private) static short[] |
yyrindex |
(package private) static java.lang.String[] |
yyrule |
(package private) java.lang.String |
yys |
(package private) static short[] |
yysindex |
(package private) static int |
YYSTACKSIZE |
(package private) int |
yystate |
(package private) static short[] |
yytable |
(package private) static int |
YYTABLESIZE |
(package private) java.lang.String |
yytext |
(package private) Parser.Value |
yyval |
Constructor and Description |
---|
Parser(JavaLexer lexer,
Builder builder) |
Modifier and Type | Method and Description |
---|---|
private void |
appendToBuffer(java.lang.String word) |
private java.lang.String |
buffer() |
(package private) void |
debug(java.lang.String msg) |
(package private) void |
dump_stacks(int count) |
(package private) Parser.Value |
dup_yyval(Parser.Value val) |
(package private) boolean |
init_stacks() |
private void |
makeField(TypeDef field,
java.lang.String body,
boolean enumConstant) |
void |
onComment(java.lang.String comment,
int line,
int column)
Called if the parser hits a comment
|
boolean |
parse()
Parse file.
|
void |
setDebugLexer(boolean debug) |
void |
setDebugParser(boolean debug) |
(package private) void |
state_drop(int cnt) |
(package private) int |
state_peek(int relative) |
(package private) int |
state_pop() |
(package private) void |
state_push(int state) |
(package private) void |
val_drop(int cnt) |
(package private) void |
val_init() |
(package private) Parser.Value |
val_peek(int relative) |
(package private) Parser.Value |
val_pop() |
(package private) void |
val_push(Parser.Value val) |
(package private) static void |
yycheck() |
private void |
yyerror(java.lang.String msg) |
private int |
yylex() |
(package private) void |
yylexdebug(int state,
int ch) |
(package private) int |
yyparse() |
(package private) static void |
yytable() |
boolean yydebug
int yynerrs
int yyerrflag
int yychar
static final int YYSTACKSIZE
int[] statestk
int stateptr
int stateptrmax
int statemax
java.lang.String yytext
Parser.Value yyval
Parser.Value yylval
Parser.Value[] valstk
int valptr
public static final short SEMI
public static final short DOT
public static final short DOTDOTDOT
public static final short COMMA
public static final short STAR
public static final short PERCENT
public static final short EQUALS
public static final short ANNOSTRING
public static final short ANNOCHAR
public static final short SLASH
public static final short PLUS
public static final short MINUS
public static final short STAREQUALS
public static final short SLASHEQUALS
public static final short PERCENTEQUALS
public static final short PLUSEQUALS
public static final short MINUSEQUALS
public static final short LESSTHAN2EQUALS
public static final short GREATERTHAN2EQUALS
public static final short GREATERTHAN3EQUALS
public static final short AMPERSANDEQUALS
public static final short CIRCUMFLEXEQUALS
public static final short VERTLINEEQUALS
public static final short PACKAGE
public static final short IMPORT
public static final short PUBLIC
public static final short PROTECTED
public static final short PRIVATE
public static final short STATIC
public static final short FINAL
public static final short ABSTRACT
public static final short NATIVE
public static final short STRICTFP
public static final short SYNCHRONIZED
public static final short TRANSIENT
public static final short VOLATILE
public static final short DEFAULT
public static final short OPEN
public static final short MODULE
public static final short REQUIRES
public static final short TRANSITIVE
public static final short EXPORTS
public static final short OPENS
public static final short TO
public static final short USES
public static final short PROVIDES
public static final short WITH
public static final short CLASS
public static final short INTERFACE
public static final short ENUM
public static final short ANNOINTERFACE
public static final short THROWS
public static final short EXTENDS
public static final short IMPLEMENTS
public static final short SUPER
public static final short NEW
public static final short BRACEOPEN
public static final short BRACECLOSE
public static final short SQUAREOPEN
public static final short SQUARECLOSE
public static final short PARENOPEN
public static final short PARENCLOSE
public static final short LESSTHAN
public static final short GREATERTHAN
public static final short LESSEQUALS
public static final short GREATEREQUALS
public static final short LESSTHAN2
public static final short GREATERTHAN2
public static final short GREATERTHAN3
public static final short EXCLAMATION
public static final short AMPERSAND2
public static final short VERTLINE2
public static final short EQUALS2
public static final short NOTEQUALS
public static final short TILDE
public static final short AMPERSAND
public static final short VERTLINE
public static final short CIRCUMFLEX
public static final short VOID
public static final short QUERY
public static final short COLON
public static final short COLONCOLON
public static final short AT
public static final short CODEBLOCK
public static final short PARENBLOCK
public static final short BYTE
public static final short SHORT
public static final short INT
public static final short LONG
public static final short CHAR
public static final short FLOAT
public static final short DOUBLE
public static final short BOOLEAN
public static final short IDENTIFIER
public static final short BOOLEAN_LITERAL
public static final short INTEGER_LITERAL
public static final short FLOAT_LITERAL
public static final short CHAR_LITERAL
public static final short STRING_LITERAL
public static final short PLUSPLUS
public static final short MINUSMINUS
public static final short YYERRCODE
static final short[] yylhs
static final short[] yylen
static final short[] yydefred
static final short[] yydgoto
static final short[] yysindex
static final short[] yyrindex
static final short[] yygindex
static final int YYTABLESIZE
static short[] yytable
static short[] yycheck
static final short YYFINAL
static final short YYMAXTOKEN
static final java.lang.String[] yyname
static final java.lang.String[] yyrule
private JavaLexer lexer
private Builder builder
private java.lang.StringBuilder textBuffer
private ClassDef cls
private MethodDef mth
private FieldDef fd
private ModuleDef.ExportsDef exp
private ModuleDef.OpensDef opn
private ModuleDef.ProvidesDef prv
private java.util.List<java.lang.String> moduleTargets
private java.util.List<TypeVariableDef> typeParams
private java.util.LinkedList<AnnoDef> annotationStack
private java.util.List<java.util.List<ElemValueDef>> annoValueListStack
private java.util.List<ElemValueDef> annoValueList
private FieldDef param
private java.util.Set<java.lang.String> modifiers
private TypeDef fieldType
private TypeVariableDef typeVariable
private java.util.Stack<TypeDef> typeStack
private java.util.List<TypeDef> typeList
private int line
private int column
private boolean debugLexer
int yyn
int yym
int yystate
java.lang.String yys
void debug(java.lang.String msg)
final void state_push(int state)
final int state_pop()
final void state_drop(int cnt)
final int state_peek(int relative)
final boolean init_stacks()
void dump_stacks(int count)
final void val_init()
final void val_push(Parser.Value val)
final Parser.Value val_pop()
final void val_drop(int cnt)
final Parser.Value val_peek(int relative)
final Parser.Value dup_yyval(Parser.Value val)
static void yytable()
static void yycheck()
private void appendToBuffer(java.lang.String word)
private java.lang.String buffer()
public void setDebugParser(boolean debug)
public void setDebugLexer(boolean debug)
public boolean parse()
private int yylex()
private void yyerror(java.lang.String msg)
private void makeField(TypeDef field, java.lang.String body, boolean enumConstant)
public void onComment(java.lang.String comment, int line, int column)
CommentHandler
onComment
in interface CommentHandler
comment
- the commentline
- the line numbercolumn
- the column numbervoid yylexdebug(int state, int ch)
int yyparse()