All Packages Class Hierarchy This Package Previous Next Index
Class edu.mit.ai.psg.jevaES.JevaES
java.lang.Object
|
+----edu.mit.ai.psg.jevaES.JevaES
- public class JevaES
- extends Object
JevaES is the top level class for the JevaES Java Expression & Statement evaluator.
JevaES = Java EVAluator: Expressions & Statements
See edu.mit.ai.psg.jevaESUI.JevaESUI for user interface
- Author:
- CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998 Massachusetts Institute of Technology
- See Also:
- JevaESUI
-
checkPackageNames
- Option: check spelling of package names against directory names;
turn off if security prevents access to classPath
-
extendEnv(boolean, Class, String, Object, IEnv)
- Extend an env with a new local named value (may specify if final).
-
extendEnv(Class, String, Object, IEnv)
- Extend an env with a new local named value (that is not final).
-
getCopyright()
-
-
getNoWarranty()
-
-
getVersion()
-
-
makeDefaultEnv()
- Return a new default environment.
-
parseEvalStreamExpression(InputStream)
- Parse and evaluate a single top-level java expression from stream.
-
parseEvalStreamExpression(InputStream, IEnv)
- Parse and evaluate a single top-level java expression from stream in
environment env.
-
parseEvalStreamStatement(InputStream)
- Parse and evaluate a single top-level java statement from stream.
-
parseEvalStreamStatement(InputStream, IEnv)
- Parse and evaluate a single top-level java statement from stream.
-
parseEvalStringExpression(String)
- Parse and evaluate a single top-level java expression from string s.
-
parseEvalStringExpression(String, IEnv)
- Parse and evaluate a single top-level java expression from string s in
environment env.
-
parseEvalStringStatement(String)
- Parse and evaluate one top-level (no free local vars) Java statement
from string s.
-
parseEvalStringStatement(String, IEnv)
- Parse and evaluate one top-level (no free local vars) Java statement
from string s.
-
parseStreamExpression(InputStream)
- Parse one top-level (no free local vars) Java expression from stream.
-
parseStreamStatement(InputStream)
- Parse one top-level (no free local vars) Java statement from stream.
-
parseStringExpression(String)
- Parse one top-level (no free local vars) Java expression in string s.
-
parseStringStatement(String)
- Parse one top-level (no free local vars) Java statement in string s.
checkPackageNames
public static boolean checkPackageNames
- Option: check spelling of package names against directory names;
turn off if security prevents access to classPath
getCopyright
public static String getCopyright()
getNoWarranty
public static String getNoWarranty()
getVersion
public static String getVersion()
makeDefaultEnv
public static IEnv makeDefaultEnv()
- Return a new default environment. (Applets may need to first
set checkPackageNames to false to prevent security exceptions.)
extendEnv
public static IEnv extendEnv(Class type,
String name,
Object value,
IEnv nextEnv)
- Extend an env with a new local named value (that is not final).
For example, might be used from compiled code to give access to values
at a breakpoint that calls JevaES.
- Throws: IllegalArgumentException
- if type, name, or nextEnv is null, or
if value cannot be assigned to variable of given type.
extendEnv
public static IEnv extendEnv(boolean isFinal,
Class type,
String name,
Object value,
IEnv nextEnv)
- Extend an env with a new local named value (may specify if final).
parseEvalStringExpression
public static Object parseEvalStringExpression(String s) throws ParseException, EvalException
- Parse and evaluate a single top-level java expression from string s.
- Returns:
- the result of evaluating the expression
- Throws: ParseException
- wasn't able to parse expression
- Throws: EvalException
- wasn't able to evaluate the
parsed expression.
parseEvalStreamExpression
public static Object parseEvalStreamExpression(InputStream stream) throws ParseException, EvalException
- Parse and evaluate a single top-level java expression from stream.
- Returns:
- the result of evaluating the expression
- Throws: ParseException
- wasn't able to parse expression
- Throws: EvalException
- wasn't able to evaluate the
parsed expression.
parseEvalStringExpression
public static Object parseEvalStringExpression(String s,
IEnv env) throws ParseException, EvalException
- Parse and evaluate a single top-level java expression from string s in
environment env.
- Returns:
- the result of evaluating the expression
- Throws: ParseException
- wasn't able to parse expression
- Throws: EvalException
- wasn't able to evaluate the
parsed expression.
parseEvalStreamExpression
public static Object parseEvalStreamExpression(InputStream stream,
IEnv env) throws ParseException, EvalException
- Parse and evaluate a single top-level java expression from stream in
environment env.
- Returns:
- the result of evaluating the expression
- Throws: ParseException
- wasn't able to parse expression
- Throws: EvalException
- wasn't able to evaluate the
parsed expression.
parseEvalStringStatement
public static IEnv parseEvalStringStatement(String s) throws ParseException, EvalException
- Parse and evaluate one top-level (no free local vars) Java statement
from string s. With empty environment.
- Returns:
- IEnv, environment with extensions by statement (e.g., local decl)
- Throws: ParseException
- wasn't able to parse statement.
- Throws: EvalException
- wasn't able to evaluate the
parsed statement.
parseEvalStreamStatement
public static IEnv parseEvalStreamStatement(InputStream stream) throws ParseException, EvalException
- Parse and evaluate a single top-level java statement from stream.
With empty environment.
- Returns:
- IEnv, environment with extensions by statement (e.g., local decl)
- Throws: ParseException
- wasn't able to parse expression
- Throws: EvalException
- wasn't able to evaluate the
parsed expression.
parseEvalStringStatement
public static IEnv parseEvalStringStatement(String s,
IEnv env) throws ParseException, EvalException
- Parse and evaluate one top-level (no free local vars) Java statement
from string s. With empty environment.
- Returns:
- IEnv, environment with extensions by statement (e.g., local decl)
- Throws: ParseException
- wasn't able to parse statement.
- Throws: EvalException
- wasn't able to evaluate the
parsed statement.
parseEvalStreamStatement
public static IEnv parseEvalStreamStatement(InputStream stream,
IEnv env) throws ParseException, EvalException
- Parse and evaluate a single top-level java statement from stream.
With empty environment.
- Returns:
- IEnv, environment with extensions by statement (e.g., local decl)
- Throws: ParseException
- wasn't able to parse expression
- Throws: EvalException
- wasn't able to evaluate the
parsed expression.
parseStreamExpression
public static ExpressionNode parseStreamExpression(InputStream stream) throws ParseException
- Parse one top-level (no free local vars) Java expression from stream.
- Returns:
- the root node of the expression's parse tree.
- Throws: ParseException
- wasn't able to parse expression
parseStringExpression
public static ExpressionNode parseStringExpression(String s) throws ParseException
- Parse one top-level (no free local vars) Java expression in string s.
- Returns:
- the root node of the expression's parse tree.
- Throws: ParseException
- wasn't able to parse expression
parseStreamStatement
public static StatementNode parseStreamStatement(InputStream stream) throws ParseException
- Parse one top-level (no free local vars) Java statement from stream.
- Returns:
- the root node of the statement's parse tree.
- Throws: ParseException
- wasn't able to parse statement.
parseStringStatement
public static StatementNode parseStringStatement(String s) throws ParseException
- Parse one top-level (no free local vars) Java statement in string s.
- Returns:
- the root node of the statement's parse tree.
- Throws: ParseException
- wasn't able to parse statement.
All Packages Class Hierarchy This Package Previous Next Index