com.thoughtworks.qdox.parser.impl
Class Parser

java.lang.Object
  extended by com.thoughtworks.qdox.parser.impl.Parser

public class Parser
extends java.lang.Object


Nested Class Summary
private  class Parser.Value
           
 
Field Summary
static short ABSTRACT
           
static short AMPERSAND
           
static short AMPERSAND2
           
static short ANNOCHAR
           
static short ANNOINTERFACE
           
static short ANNOSTRING
           
private  Annotation annotation
           
private  java.util.List annotationStack
           
private  java.util.List annoValueList
           
private  java.util.List 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 CLASS
           
private  ClassDef cls
           
static short CODEBLOCK
           
static short COLON
           
private  int column
           
static short COMMA
           
private  boolean debugLexer
           
static short DEFAULT
           
static short DOT
           
static short DOTDOTDOT
           
static short DOUBLE
           
static short DOUBLE_LITERAL
           
static short ENUM
           
static short EQUALS
           
static short EQUALS2
           
static short EXCLAMATION
           
static short EXTENDS
           
private  TypeDef fieldType
           
static short FINAL
           
static short FLOAT
           
static short FLOAT_LITERAL
           
static short GREATEREQUALS
           
static short GREATERTHAN
           
static short GREATERTHAN2
           
static short GREATERTHAN3
           
static short IDENTIFIER
           
static short IMPLEMENTS
           
static short IMPORT
           
static short INT
           
static short INTEGER_LITERAL
           
static short INTERFACE
           
static short JAVADOCEND
           
static short JAVADOCEOL
           
static short JAVADOCLINE
           
static short JAVADOCSTART
           
static short JAVADOCTAG
           
static short LESSEQUALS
           
static short LESSTHAN
           
static short LESSTHAN2
           
private  Lexer lexer
           
private  int line
           
static short LONG
           
static short LONG_LITERAL
           
static short MINUS
           
private  java.util.Set modifiers
           
private  MethodDef mth
           
static short NATIVE
           
static short NOTEQUALS
           
static short PACKAGE
           
private  FieldDef param
           
static short PARENBLOCK
           
static short PARENCLOSE
           
static short PARENOPEN
           
static short PERCENT
           
static short PLUS
           
static short PRIVATE
           
static short PROTECTED
           
static short PUBLIC
           
static short QUERY
           
static short SEMI
           
static short SHORT
           
static short SLASH
           
static short SQUARECLOSE
           
static short SQUAREOPEN
           
static short STAR
           
(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.StringBuffer textBuffer
           
static short THROWS
           
static short TILDE
           
static short TRANSIENT
           
private  java.util.List typeParams
           
private  java.util.Stack typeStack
           
private  TypeVariableDef typeVariable
           
(package private)  int valptr
           
(package private)  Parser.Value[] valstk
           
static short VERTLINE
           
static short VERTLINE2
           
static short VOID
           
static short VOLATILE
           
(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 Summary
Parser(Lexer lexer, Builder builder)
           
 
Method Summary
private  void appendToBuffer(java.lang.String word)
           
private  java.lang.String buffer()
           
private  java.lang.String convertString(java.lang.String str)
           
(package private)  void debug(java.lang.String msg)
           
(package private)  void dump_stacks(int count)
           
(package private)  boolean init_stacks()
           
private  void makeField(TypeDef field, java.lang.String body)
           
 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)
           
private  java.lang.Boolean toBoolean(java.lang.String str)
           
private  java.lang.Character toChar(java.lang.String str)
          Convert a character literal into a character.
private  java.lang.Double toDouble(java.lang.String str)
           
private  java.lang.Float toFloat(java.lang.String str)
           
private  java.lang.Integer toInteger(java.lang.String str)
           
private  java.lang.Long toLong(java.lang.String str)
           
private  java.lang.String toString(java.lang.String str)
          Convert a string literal into a string.
(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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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

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

DEFAULT

public static final short DEFAULT
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

AT

public static final short AT
See Also:
Constant Field Values

JAVADOCSTART

public static final short JAVADOCSTART
See Also:
Constant Field Values

JAVADOCEND

public static final short JAVADOCEND
See Also:
Constant Field Values

JAVADOCEOL

public static final short JAVADOCEOL
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

JAVADOCTAG

public static final short JAVADOCTAG
See Also:
Constant Field Values

JAVADOCLINE

public static final short JAVADOCLINE
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

LONG_LITERAL

public static final short LONG_LITERAL
See Also:
Constant Field Values

FLOAT_LITERAL

public static final short FLOAT_LITERAL
See Also:
Constant Field Values

DOUBLE_LITERAL

public static final short DOUBLE_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

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 Lexer lexer

builder

private Builder builder

textBuffer

private java.lang.StringBuffer textBuffer

cls

private ClassDef cls

mth

private MethodDef mth

typeParams

private java.util.List typeParams

annotationStack

private java.util.List annotationStack

annotation

private Annotation annotation

annoValueListStack

private java.util.List annoValueListStack

annoValueList

private java.util.List annoValueList

param

private FieldDef param

modifiers

private java.util.Set modifiers

fieldType

private TypeDef fieldType

typeVariable

private TypeVariableDef typeVariable

typeStack

private java.util.Stack typeStack

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
Constructor Detail

Parser

public Parser(Lexer lexer,
              Builder builder)
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)

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)

convertString

private java.lang.String convertString(java.lang.String str)

toBoolean

private java.lang.Boolean toBoolean(java.lang.String str)

toInteger

private java.lang.Integer toInteger(java.lang.String str)

toLong

private java.lang.Long toLong(java.lang.String str)

toFloat

private java.lang.Float toFloat(java.lang.String str)

toDouble

private java.lang.Double toDouble(java.lang.String str)

toChar

private java.lang.Character toChar(java.lang.String str)
Convert a character literal into a character.


toString

private java.lang.String toString(java.lang.String str)
Convert a string literal into a string.


yylexdebug

void yylexdebug(int state,
                int ch)

yyparse

int yyparse()