Package org.jruby.parser
Class JavaSignatureParser
java.lang.Object
org.jruby.parser.JavaSignatureParser
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected static final short[]
protected static final short[]
parser tables.protected static final short[]
parser tables.static final int
protected static final int
number of final state.protected static final short[]
parser tables.protected static final short[]
parser tables.protected static final short[]
parser tables.protected int
initial size and increment of the state/value stack [default 256].protected static final String[]
maps symbol value to printable name.protected static final short[]
parser tables.protected static final short[]
parser tables.protected static final short[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SignatureNode
parse
(InputStream in) protected Object
executed at the beginning of a reduce action.void
simplified error message.void
(syntax) error message.protected String[]
yyExpecting
(int state) computes list of expected tokens on error by tracing the tables.yyparse
(JavaSignatureLexer yyLex) the generated parser.yyparse
(JavaSignatureLexer yyLex, Object ayydebug) the generated parser, with debugging messages.
-
Field Details
-
BOOLEAN
public static final int BOOLEAN- See Also:
-
BYTE
public static final int BYTE- See Also:
-
SHORT
public static final int SHORT- See Also:
-
INT
public static final int INT- See Also:
-
LONG
public static final int LONG- See Also:
-
CHAR
public static final int CHAR- See Also:
-
FLOAT
public static final int FLOAT- See Also:
-
DOUBLE
public static final int DOUBLE- See Also:
-
VOID
public static final int VOID- See Also:
-
PUBLIC
public static final int PUBLIC- See Also:
-
PROTECTED
public static final int PROTECTED- See Also:
-
PRIVATE
public static final int PRIVATE- See Also:
-
STATIC
public static final int STATIC- See Also:
-
ABSTRACT
public static final int ABSTRACT- See Also:
-
FINAL
public static final int FINAL- See Also:
-
NATIVE
public static final int NATIVE- See Also:
-
SYNCHRONIZED
public static final int SYNCHRONIZED- See Also:
-
TRANSIENT
public static final int TRANSIENT- See Also:
-
VOLATILE
public static final int VOLATILE- See Also:
-
STRICTFP
public static final int STRICTFP- See Also:
-
IDENTIFIER
public static final int IDENTIFIER- See Also:
-
AND
public static final int AND- See Also:
-
AT
public static final int AT- See Also:
-
DOT
public static final int DOT- See Also:
-
COMMA
public static final int COMMA- See Also:
-
ELLIPSIS
public static final int ELLIPSIS- See Also:
-
EQUAL
public static final int EQUAL- See Also:
-
LCURLY
public static final int LCURLY- See Also:
-
RCURLY
public static final int RCURLY- See Also:
-
LPAREN
public static final int LPAREN- See Also:
-
RPAREN
public static final int RPAREN- See Also:
-
LBRACK
public static final int LBRACK- See Also:
-
RBRACK
public static final int RBRACK- See Also:
-
QUESTION
public static final int QUESTION- See Also:
-
LT
public static final int LT- See Also:
-
GT
public static final int GT- See Also:
-
THROWS
public static final int THROWS- See Also:
-
EXTENDS
public static final int EXTENDS- See Also:
-
SUPER
public static final int SUPER- See Also:
-
RSHIFT
public static final int RSHIFT- See Also:
-
URSHIFT
public static final int URSHIFT- See Also:
-
QQ
public static final int QQ- See Also:
-
Q
public static final int Q- See Also:
-
CHARACTER_LITERAL
public static final int CHARACTER_LITERAL- See Also:
-
STRING_LITERAL
public static final int STRING_LITERAL- See Also:
-
TRUE_LITERAL
public static final int TRUE_LITERAL- See Also:
-
FALSE_LITERAL
public static final int FALSE_LITERAL- See Also:
-
NUM_LITERAL
public static final int NUM_LITERAL- See Also:
-
HEXNUM_LITERAL
public static final int HEXNUM_LITERAL- See Also:
-
yyErrorCode
public static final int yyErrorCode- See Also:
-
yyFinal
protected static final int yyFinalnumber of final state.- See Also:
-
yyLhs
protected static final short[] yyLhsparser tables. Order is mandated by jay. -
yyLen
protected static final short[] yyLenparser tables. Order is mandated by jay. -
yyDefRed
protected static final short[] yyDefRedparser tables. Order is mandated by jay. -
yyDgoto
protected static final short[] yyDgotoparser tables. Order is mandated by jay. -
yySindex
protected static final short[] yySindexparser tables. Order is mandated by jay. -
yyRindex
protected static final short[] yyRindexparser tables. Order is mandated by jay. -
yyGindex
protected static final short[] yyGindexparser tables. Order is mandated by jay. -
yyTable
protected static final short[] yyTable -
yyCheck
protected static final short[] yyCheck -
yyNames
maps symbol value to printable name.- See Also:
-
yyMax
protected int yyMaxinitial size and increment of the state/value stack [default 256]. This is not final so that it can be overwritten outside of invocations ofyyparse(org.jruby.lexer.JavaSignatureLexer, java.lang.Object)
.
-
-
Constructor Details
-
JavaSignatureParser
public JavaSignatureParser()
-
-
Method Details
-
parse
- Throws:
IOException
ParserSyntaxException
-
yyerror
simplified error message.- Throws:
ParserSyntaxException
- See Also:
-
yyerror
(syntax) error message. Can be overwritten to control message format.- Parameters:
message
- text to be displayed.expected
- list of acceptable tokens, if available.- Throws:
ParserSyntaxException
-
yyExpecting
computes list of expected tokens on error by tracing the tables.- Parameters:
state
- for which to compute the list.- Returns:
- list of token names.
-
yyparse
public Object yyparse(JavaSignatureLexer yyLex, Object ayydebug) throws IOException, ParserSyntaxException the generated parser, with debugging messages. Maintains a dynamic state and value stack.- Parameters:
yyLex
- scanner.ayydebug
- debug message writer implementingyyDebug
, ornull
.- Returns:
- result of the last reduction, if any.
- Throws:
ParserSyntaxException
- on irrecoverable parse error.IOException
-
yyDefault
executed at the beginning of a reduce action. Used as$$ = yyDefault($1)
, prior to the user-specified action, if any. Can be overwritten to provide deep copy, etc.- Parameters:
first
- value for$1
, ornull
.- Returns:
- first.
-
yyparse
the generated parser. Maintains a dynamic state and value stack.- Parameters:
yyLex
- scanner.- Returns:
- result of the last reduction, if any.
- Throws:
ParserSyntaxException
- on irrecoverable parse error.IOException
-