|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectstep9.expr
public class expr
fairly comprehensive mixed mode expressions on lines.
| Nested Class Summary | |
|---|---|
static interface |
expr.yyActions
interface between grammar and actions. |
static class |
expr.yyException
thrown for irrecoverable syntax errors and stack overflow. |
static interface |
expr.yyInput
must be implemented by a scanner object to supply input to the parser. |
static class |
expr.yyLex
|
static class |
expr.yyTree
tree factory. |
| Field Summary | |
|---|---|
static int |
_0
|
static int |
_1
|
static int |
_2
|
static int |
_3
|
static int |
_4
|
static int |
_5
|
static int |
_6
|
static int |
_7
|
static int |
Bool
|
static int |
Int
|
static int |
Real
|
static int |
Text
|
protected expr.yyActions |
yyAct
current factory. |
protected static short[] |
yyCheck
parser tables. |
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 String[] |
yyNames
maps symbol value to printable name. |
protected static short[] |
yyRindex
parser tables. |
protected static short[] |
yySindex
parser tables. |
protected static short[] |
yyTable
parser tables. |
| Constructor Summary | |
|---|---|
expr()
|
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
main program to test parser and tree factory. |
protected Object |
yyDefault(Object first)
executed at the beginning of a reduce action. |
void |
yyerror(String message)
simplified error message. |
void |
yyerror(String message,
String[] expected)
(syntax) error message. |
protected String[] |
yyExpecting(int state)
computes list of expected tokens on error by tracing the tables. |
Object |
yyparse(expr.yyInput yyLex)
the generated parser. |
Object |
yyparse(expr.yyInput yyLex,
expr.yyActions yyAct)
entry point for parser without trace. |
Object |
yyparse(expr.yyInput yyLex,
Object yydebug)
the generated parser, with debugging messages. |
Object |
yyparse(expr.yyInput yyLex,
Object yydebug,
expr.yyActions yyAct)
entry point for parser with trace. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected expr.yyActions yyAct
public static final int Bool
public static final int Int
public static final int Real
public static final int Text
public static final int _0
public static final int _1
public static final int _2
public static final int _3
public static final int _4
public static final int _5
public static final int _6
public static final int _7
public static final int yyErrorCode
protected static final int yyFinal
protected static final short[] yyLhs
protected static final short[] yyLen
protected static final short[] yyDefRed
protected static final short[] yyDgoto
protected static final short[] yySindex
protected static final short[] yyRindex
protected static final short[] yyGindex
protected static final short[] yyTable
protected static final short[] yyCheck
protected static final String[] yyNames
yyExpecting(int)protected int yyMax
yyparse(step9.expr.yyInput, java.lang.Object, step9.expr.yyActions).
| Constructor Detail |
|---|
public expr()
| Method Detail |
|---|
public Object yyparse(expr.yyInput yyLex,
Object yydebug,
expr.yyActions yyAct)
throws IOException,
expr.yyException
IOException
expr.yyException
public Object yyparse(expr.yyInput yyLex,
expr.yyActions yyAct)
throws IOException,
expr.yyException
IOException
expr.yyExceptionpublic void yyerror(String message)
yyerror(java.lang.String, java.lang.String[])
public void yyerror(String message,
String[] expected)
message - text to be displayed.expected - list of acceptable tokens, if available.protected String[] yyExpecting(int state)
state - for which to compute the list.
public Object yyparse(expr.yyInput yyLex,
Object yydebug)
throws IOException,
expr.yyException
yyLex - scanner.yydebug - debug message writer implementing yyDebug, or null.
expr.yyException - on irrecoverable parse error.
IOExceptionprotected Object yyDefault(Object first)
first - value for $1, or null.
public Object yyparse(expr.yyInput yyLex)
throws IOException,
expr.yyException
yyLex - scanner.
expr.yyException - on irrecoverable parse error.
IOException
public static void main(String[] args)
throws expr.yyException,
IOException
expr.yyException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||