01: package antlr.debug;
02:
03: public class SemanticPredicateEvent extends GuessingEvent {
04: public static final int VALIDATING = 0;
05: public static final int PREDICTING = 1;
06: private int condition;
07: private boolean result;
08:
09: public SemanticPredicateEvent(Object source) {
10: super (source);
11: }
12:
13: public SemanticPredicateEvent(Object source, int type) {
14: super (source, type);
15: }
16:
17: public int getCondition() {
18: return condition;
19: }
20:
21: public boolean getResult() {
22: return result;
23: }
24:
25: void setCondition(int condition) {
26: this .condition = condition;
27: }
28:
29: void setResult(boolean result) {
30: this .result = result;
31: }
32:
33: /** This should NOT be called from anyone other than ParserEventSupport! */
34: void setValues(int type, int condition, boolean result, int guessing) {
35: super .setValues(type, guessing);
36: setCondition(condition);
37: setResult(result);
38: }
39:
40: public String toString() {
41: return "SemanticPredicateEvent [" + getCondition() + ","
42: + getResult() + "," + getGuessing() + "]";
43: }
44: }
|