|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antlr.debug.ParserEventSupport
Untamed: A class to assist in firing parser events NOTE: I intentionally _did_not_ synchronize the event firing and add/remove listener methods. This is because the add/remove should _only_ be called by the parser at its start/end, and the _same_thread_ should be performing the parsing. This should help performance a tad...
Constructor Summary | |
ParserEventSupport(Object source)
Enabled: |
Method Summary | |
void |
addDoneListener(ListenerBase l)
Enabled: |
void |
addMessageListener(MessageListener l)
Enabled: |
void |
addNewLineListener(NewLineListener l)
Enabled: |
void |
addParserListener(ParserListener l)
Enabled: |
void |
addParserMatchListener(ParserMatchListener l)
Enabled: |
void |
addParserTokenListener(ParserTokenListener l)
Enabled: |
void |
addSemanticPredicateListener(SemanticPredicateListener l)
Enabled: |
void |
addSyntacticPredicateListener(SyntacticPredicateListener l)
Enabled: |
void |
addTraceListener(TraceListener l)
Enabled: |
void |
fireConsume(int value)
Enabled: |
void |
fireDoneParsing()
Enabled: |
void |
fireEnterRule(int ruleNum,
int guessing,
int data)
Enabled: |
void |
fireEvent(int type,
ListenerBase l)
Enabled: |
void |
fireEvents(int type,
Vector listeners)
Enabled: |
void |
fireExitRule(int ruleNum,
int guessing,
int data)
Enabled: |
void |
fireLA(int k,
int la)
Enabled: |
void |
fireMatch(char value,
BitSet b,
int guessing)
Enabled: |
void |
fireMatch(char c,
int guessing)
Enabled: |
void |
fireMatch(char value,
String target,
int guessing)
Enabled: |
void |
fireMatch(int value,
BitSet b,
String text,
int guessing)
Enabled: |
void |
fireMatch(int n,
String text,
int guessing)
Enabled: |
void |
fireMatch(String s,
int guessing)
Enabled: |
void |
fireMatchNot(char value,
char n,
int guessing)
Enabled: |
void |
fireMatchNot(int value,
int n,
String text,
int guessing)
Enabled: |
void |
fireMismatch(char value,
BitSet b,
int guessing)
Enabled: |
void |
fireMismatch(char value,
char n,
int guessing)
Enabled: |
void |
fireMismatch(char value,
String target,
int guessing)
Enabled: |
void |
fireMismatch(int value,
BitSet b,
String text,
int guessing)
Enabled: |
void |
fireMismatch(int value,
int n,
String text,
int guessing)
Enabled: |
void |
fireMismatch(String value,
String text,
int guessing)
Enabled: |
void |
fireMismatchNot(char value,
char c,
int guessing)
Enabled: |
void |
fireMismatchNot(int value,
int n,
String text,
int guessing)
Enabled: |
void |
fireNewLine(int line)
Enabled: |
void |
fireReportError(Exception e)
Enabled: |
void |
fireReportError(String s)
Enabled: |
void |
fireReportWarning(String s)
Enabled: |
boolean |
fireSemanticPredicateEvaluated(int type,
int condition,
boolean result,
int guessing)
Enabled: |
void |
fireSyntacticPredicateFailed(int guessing)
Enabled: |
void |
fireSyntacticPredicateStarted(int guessing)
Enabled: |
void |
fireSyntacticPredicateSucceeded(int guessing)
Enabled: |
protected void |
refresh(Vector listeners)
|
void |
refreshListeners()
Enabled: |
void |
removeDoneListener(ListenerBase l)
Enabled: |
void |
removeMessageListener(MessageListener l)
Enabled: |
void |
removeNewLineListener(NewLineListener l)
Enabled: |
void |
removeParserListener(ParserListener l)
Enabled: |
void |
removeParserMatchListener(ParserMatchListener l)
Enabled: |
void |
removeParserTokenListener(ParserTokenListener l)
Enabled: |
void |
removeSemanticPredicateListener(SemanticPredicateListener l)
Enabled: |
void |
removeSyntacticPredicateListener(SyntacticPredicateListener l)
Enabled: |
void |
removeTraceListener(TraceListener l)
Enabled: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Object source
private Hashtable doneListeners
private Vector matchListeners
private Vector messageListeners
private Vector tokenListeners
private Vector traceListeners
private Vector semPredListeners
private Vector synPredListeners
private Vector newLineListeners
private ParserMatchEvent matchEvent
private MessageEvent messageEvent
private ParserTokenEvent tokenEvent
private SemanticPredicateEvent semPredEvent
private SyntacticPredicateEvent synPredEvent
private TraceEvent traceEvent
private NewLineEvent newLineEvent
private ParserController controller
protected static final int CONSUME
protected static final int ENTER_RULE
protected static final int EXIT_RULE
protected static final int LA
protected static final int MATCH
protected static final int MATCH_NOT
protected static final int MISMATCH
protected static final int MISMATCH_NOT
protected static final int REPORT_ERROR
protected static final int REPORT_WARNING
protected static final int SEMPRED
protected static final int SYNPRED_FAILED
protected static final int SYNPRED_STARTED
protected static final int SYNPRED_SUCCEEDED
protected static final int NEW_LINE
protected static final int DONE_PARSING
private int ruleDepth
Constructor Detail |
public ParserEventSupport(Object source)
Method Detail |
public void addDoneListener(ListenerBase l)
public void addMessageListener(MessageListener l)
public void addNewLineListener(NewLineListener l)
public void addParserListener(ParserListener l)
public void addParserMatchListener(ParserMatchListener l)
public void addParserTokenListener(ParserTokenListener l)
public void addSemanticPredicateListener(SemanticPredicateListener l)
public void addSyntacticPredicateListener(SyntacticPredicateListener l)
public void addTraceListener(TraceListener l)
public void fireConsume(int value)
public void fireDoneParsing()
public void fireEnterRule(int ruleNum, int guessing, int data)
public void fireEvent(int type, ListenerBase l)
public void fireEvents(int type, Vector listeners)
public void fireExitRule(int ruleNum, int guessing, int data)
public void fireLA(int k, int la)
public void fireMatch(char c, int guessing)
public void fireMatch(char value, BitSet b, int guessing)
public void fireMatch(char value, String target, int guessing)
public void fireMatch(int value, BitSet b, String text, int guessing)
public void fireMatch(int n, String text, int guessing)
public void fireMatch(String s, int guessing)
public void fireMatchNot(char value, char n, int guessing)
public void fireMatchNot(int value, int n, String text, int guessing)
public void fireMismatch(char value, char n, int guessing)
public void fireMismatch(char value, BitSet b, int guessing)
public void fireMismatch(char value, String target, int guessing)
public void fireMismatch(int value, int n, String text, int guessing)
public void fireMismatch(int value, BitSet b, String text, int guessing)
public void fireMismatch(String value, String text, int guessing)
public void fireMismatchNot(char value, char c, int guessing)
public void fireMismatchNot(int value, int n, String text, int guessing)
public void fireNewLine(int line)
public void fireReportError(Exception e)
public void fireReportError(String s)
public void fireReportWarning(String s)
public boolean fireSemanticPredicateEvaluated(int type, int condition, boolean result, int guessing)
public void fireSyntacticPredicateFailed(int guessing)
public void fireSyntacticPredicateStarted(int guessing)
public void fireSyntacticPredicateSucceeded(int guessing)
protected void refresh(Vector listeners)
public void refreshListeners()
public void removeDoneListener(ListenerBase l)
public void removeMessageListener(MessageListener l)
public void removeNewLineListener(NewLineListener l)
public void removeParserListener(ParserListener l)
public void removeParserMatchListener(ParserMatchListener l)
public void removeParserTokenListener(ParserTokenListener l)
public void removeSemanticPredicateListener(SemanticPredicateListener l)
public void removeSyntacticPredicateListener(SyntacticPredicateListener l)
public void removeTraceListener(TraceListener l)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |