org.jruby.parser
Class JavaSignatureParser

java.lang.Object
  extended by org.jruby.parser.JavaSignatureParser

public class JavaSignatureParser
extends java.lang.Object


Field Summary
static int ABSTRACT
           
static int AND
           
static int BOOLEAN
           
static int BYTE
           
static int CHAR
           
static int COMMA
           
static int DOT
           
static int DOUBLE
           
static int ELLIPSIS
           
static int EXTENDS
           
static int FINAL
           
static int FLOAT
           
static int GT
           
static int IDENTIFIER
           
static int INT
           
static int LBRACK
           
static int LONG
           
static int LPAREN
           
static int LT
           
static int NATIVE
           
static int PRIVATE
           
static int PROTECTED
           
static int PUBLIC
           
static int QUESTION
           
static int RBRACK
           
static int RPAREN
           
static int RSHIFT
           
static int SHORT
           
static int STATIC
           
static int STRICTFP
           
static int SUPER
           
static int SYNCHRONIZED
           
static int THROWS
           
static int TRANSIENT
           
static int URSHIFT
           
static int VOID
           
static int VOLATILE
           
protected static short[] yyCheck
           
protected static short[] yyDefRed
          parser tables.
protected static short[] yyDgoto
          parser tables.
static int yyErrorCode
           
protected static int yyFinal
          number of final state.
protected static short[] yyGindex
          parser tables.
protected static short[] yyLen
          parser tables.
protected static short[] yyLhs
          parser tables.
protected  int yyMax
          initial size and increment of the state/value stack [default 256].
protected static java.lang.String[] yyNames
          maps symbol value to printable name.
protected static short[] yyRindex
          parser tables.
protected static short[] yySindex
          parser tables.
protected static short[] yyTable
           
 
Constructor Summary
JavaSignatureParser()
           
 
Method Summary
static SignatureNode parse(java.io.InputStream in)
           
protected  java.lang.Object yyDefault(java.lang.Object first)
          executed at the beginning of a reduce action.
 void yyerror(java.lang.String message)
          simplified error message.
 void yyerror(java.lang.String message, java.lang.String[] expected, java.lang.String found)
          (syntax) error message.
protected  java.lang.String[] yyExpecting(int state)
          computes list of expected tokens on error by tracing the tables.
 java.lang.Object yyparse(JavaSignatureLexer yyLex)
          the generated parser.
 java.lang.Object yyparse(JavaSignatureLexer yyLex, java.lang.Object ayydebug)
          the generated parser, with debugging messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN

public static final int BOOLEAN
See Also:
Constant Field Values

BYTE

public static final int BYTE
See Also:
Constant Field Values

SHORT

public static final int SHORT
See Also:
Constant Field Values

INT

public static final int INT
See Also:
Constant Field Values

LONG

public static final int LONG
See Also:
Constant Field Values

CHAR

public static final int CHAR
See Also:
Constant Field Values

FLOAT

public static final int FLOAT
See Also:
Constant Field Values

DOUBLE

public static final int DOUBLE
See Also:
Constant Field Values

VOID

public static final int VOID
See Also:
Constant Field Values

PUBLIC

public static final int PUBLIC
See Also:
Constant Field Values

PROTECTED

public static final int PROTECTED
See Also:
Constant Field Values

PRIVATE

public static final int PRIVATE
See Also:
Constant Field Values

STATIC

public static final int STATIC
See Also:
Constant Field Values

ABSTRACT

public static final int ABSTRACT
See Also:
Constant Field Values

FINAL

public static final int FINAL
See Also:
Constant Field Values

NATIVE

public static final int NATIVE
See Also:
Constant Field Values

SYNCHRONIZED

public static final int SYNCHRONIZED
See Also:
Constant Field Values

TRANSIENT

public static final int TRANSIENT
See Also:
Constant Field Values

VOLATILE

public static final int VOLATILE
See Also:
Constant Field Values

STRICTFP

public static final int STRICTFP
See Also:
Constant Field Values

IDENTIFIER

public static final int IDENTIFIER
See Also:
Constant Field Values

AND

public static final int AND
See Also:
Constant Field Values

DOT

public static final int DOT
See Also:
Constant Field Values

COMMA

public static final int COMMA
See Also:
Constant Field Values

ELLIPSIS

public static final int ELLIPSIS
See Also:
Constant Field Values

LPAREN

public static final int LPAREN
See Also:
Constant Field Values

RPAREN

public static final int RPAREN
See Also:
Constant Field Values

LBRACK

public static final int LBRACK
See Also:
Constant Field Values

RBRACK

public static final int RBRACK
See Also:
Constant Field Values

QUESTION

public static final int QUESTION
See Also:
Constant Field Values

LT

public static final int LT
See Also:
Constant Field Values

GT

public static final int GT
See Also:
Constant Field Values

THROWS

public static final int THROWS
See Also:
Constant Field Values

EXTENDS

public static final int EXTENDS
See Also:
Constant Field Values

SUPER

public static final int SUPER
See Also:
Constant Field Values

RSHIFT

public static final int RSHIFT
See Also:
Constant Field Values

URSHIFT

public static final int URSHIFT
See Also:
Constant Field Values

yyErrorCode

public static final int yyErrorCode
See Also:
Constant Field Values

yyFinal

protected static final int yyFinal
number of final state.

See Also:
Constant Field Values

yyLhs

protected static final short[] yyLhs
parser tables. Order is mandated by jay.


yyLen

protected static final short[] yyLen
parser tables. Order is mandated by jay.


yyDefRed

protected static final short[] yyDefRed
parser tables. Order is mandated by jay.


yyDgoto

protected static final short[] yyDgoto
parser tables. Order is mandated by jay.


yySindex

protected static final short[] yySindex
parser tables. Order is mandated by jay.


yyRindex

protected static final short[] yyRindex
parser tables. Order is mandated by jay.


yyGindex

protected static final short[] yyGindex
parser tables. Order is mandated by jay.


yyTable

protected static final short[] yyTable

yyCheck

protected static final short[] yyCheck

yyNames

protected static final java.lang.String[] yyNames
maps symbol value to printable name.

See Also:
yyExpecting(int)

yyMax

protected int yyMax
initial size and increment of the state/value stack [default 256]. This is not final so that it can be overwritten outside of invocations of yyparse(org.jruby.lexer.JavaSignatureLexer, java.lang.Object).

Constructor Detail

JavaSignatureParser

public JavaSignatureParser()
Method Detail

parse

public static SignatureNode parse(java.io.InputStream in)
                           throws java.io.IOException,
                                  ParserSyntaxException
Throws:
java.io.IOException
ParserSyntaxException

yyerror

public void yyerror(java.lang.String message)
             throws ParserSyntaxException
simplified error message.

Throws:
ParserSyntaxException
See Also:
#yyerror(java.lang.String, java.lang.String[])

yyerror

public void yyerror(java.lang.String message,
                    java.lang.String[] expected,
                    java.lang.String found)
             throws ParserSyntaxException
(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

protected java.lang.String[] yyExpecting(int state)
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 java.lang.Object yyparse(JavaSignatureLexer yyLex,
                                java.lang.Object ayydebug)
                         throws java.io.IOException,
                                ParserSyntaxException
the generated parser, with debugging messages. Maintains a dynamic state and value stack.

Parameters:
yyLex - scanner.
yydebug - debug message writer implementing yyDebug, or null.
Returns:
result of the last reduction, if any.
Throws:
ParserSyntaxException - on irrecoverable parse error.
java.io.IOException

yyDefault

protected java.lang.Object yyDefault(java.lang.Object first)
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, or null.
Returns:
first.

yyparse

public java.lang.Object yyparse(JavaSignatureLexer yyLex)
                         throws java.io.IOException,
                                ParserSyntaxException
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.
java.io.IOException


Copyright © 2002-2009 JRuby Team. All Rights Reserved.