|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.ObjectExpr
public abstract class Expr
class Expr, our internal representation of an expression in the O0 language. See http://www.radford.edu/itec380/2013fall/Homeworks/hw06.html
| Field Summary | |
|---|---|
static String |
PUNCTUATION
|
| Constructor Summary | |
|---|---|
Expr()
|
|
| Method Summary | |
|---|---|
abstract Value |
eval()
Evaluate a given Expr. |
int |
hashCode()
|
static Expr |
parse(Scanner s)
Return (our internal representation of) the expression s. |
static Expr |
parse(String s)
Return (our internal representation of) the expression s. |
abstract String |
toString()
Return a String representation of this Expr. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PUNCTUATION
| Constructor Detail |
|---|
public Expr()
| Method Detail |
|---|
public abstract Value eval()
public int hashCode()
hashCode in class Objectpublic static Expr parse(Scanner s)
s - A scanner reading the source code for exactly one Expr.
Must by syntactically correct.
public static Expr parse(String s)
s - The source code for exactly one Expr. Must by syntactically correct.
public abstract String toString()
toString in class Object
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||