| 123456789101112131415161718192021222324252627 |
- //Value:top//
- //Value:import//
- import java.util.*;
- public abstract class Value /*Value:class*/ {
- public static final String $className = "Value";
- public static Value parse(Scan scn$, Trace trace$) {
- Token t$ = scn$.cur();
- Token.Match match$ = t$.match;
- switch(match$) {
- case VAR:
- return VARValue.parse(scn$,trace$);
- case NUM:
- return NUMValue.parse(scn$,trace$);
- default:
- throw new PLCCException(
- "Parse error",
- "Value cannot begin with " + t$.errString()
- );
- }
- }
- abstract public int eval();
- //Value//
- }
|