SemanticPredicateEvent.java
上传用户:afrynkmhm
上传日期:2007-01-06
资源大小:1262k
文件大小:1k
源码类别:

编译器/解释器

开发平台:

Others

  1. package antlr.debug;
  2. public class SemanticPredicateEvent extends GuessingEvent {
  3. public static final int VALIDATING=0;
  4. public static final int PREDICTING=1;
  5. private int condition;
  6. private boolean result;
  7. public SemanticPredicateEvent(Object source) {
  8. super(source);
  9. }
  10. public SemanticPredicateEvent(Object source, int type) {
  11. super(source, type);
  12. }
  13. public int getCondition() {
  14. return condition;
  15. }
  16. public boolean getResult() {
  17. return result;
  18. }
  19. void setCondition(int condition) {
  20. this.condition = condition;
  21. }
  22. void setResult(boolean result) {
  23. this.result = result;
  24. }
  25. /** This should NOT be called from anyone other than ParserEventSupport! */
  26. void setValues(int type, int condition, boolean result, int guessing) {
  27. super.setValues(type, guessing);
  28. setCondition(condition);
  29. setResult(result);
  30. }
  31. public String toString() {
  32. return "SemanticPredicateEvent [" + 
  33.        getCondition() + "," + getResult() + "," + getGuessing() + "]";
  34. }
  35. }