antlr.debug
Class ParserEventSupport
java.lang.Object
|
+--antlr.debug.ParserEventSupport
- public class ParserEventSupport
- extends java.lang.Object
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...
Method Summary |
void |
addDoneListener(ListenerBase l)
|
void |
addMessageListener(MessageListener l)
|
void |
addNewLineListener(NewLineListener l)
|
void |
addParserListener(ParserListener l)
|
void |
addParserMatchListener(ParserMatchListener l)
|
void |
addParserTokenListener(ParserTokenListener l)
|
void |
addSemanticPredicateListener(SemanticPredicateListener l)
|
void |
addSyntacticPredicateListener(SyntacticPredicateListener l)
|
void |
addTraceListener(TraceListener l)
|
void |
fireConsume(int value)
|
void |
fireDoneParsing()
|
void |
fireEnterRule(int ruleNum,
int guessing,
int data)
|
void |
fireEvent(int type,
ListenerBase l)
|
void |
fireEvents(int type,
java.util.Vector listeners)
|
void |
fireExitRule(int ruleNum,
int guessing,
int data)
|
void |
fireLA(int k,
int la)
|
void |
fireMatch(char value,
BitSet b,
int guessing)
|
void |
fireMatch(char c,
int guessing)
|
void |
fireMatch(char value,
java.lang.String target,
int guessing)
|
void |
fireMatch(int value,
BitSet b,
java.lang.String text,
int guessing)
|
void |
fireMatch(int n,
java.lang.String text,
int guessing)
|
void |
fireMatch(java.lang.String s,
int guessing)
|
void |
fireMatchNot(char value,
char n,
int guessing)
|
void |
fireMatchNot(int value,
int n,
java.lang.String text,
int guessing)
|
void |
fireMismatch(char value,
BitSet b,
int guessing)
|
void |
fireMismatch(char value,
char n,
int guessing)
|
void |
fireMismatch(char value,
java.lang.String target,
int guessing)
|
void |
fireMismatch(int value,
BitSet b,
java.lang.String text,
int guessing)
|
void |
fireMismatch(int value,
int n,
java.lang.String text,
int guessing)
|
void |
fireMismatch(java.lang.String value,
java.lang.String text,
int guessing)
|
void |
fireMismatchNot(char value,
char c,
int guessing)
|
void |
fireMismatchNot(int value,
int n,
java.lang.String text,
int guessing)
|
void |
fireNewLine(int line)
|
void |
fireReportError(java.lang.Exception e)
|
void |
fireReportError(java.lang.String s)
|
void |
fireReportWarning(java.lang.String s)
|
boolean |
fireSemanticPredicateEvaluated(int type,
int condition,
boolean result,
int guessing)
|
void |
fireSyntacticPredicateFailed(int guessing)
|
void |
fireSyntacticPredicateStarted(int guessing)
|
void |
fireSyntacticPredicateSucceeded(int guessing)
|
protected void |
refresh(java.util.Vector listeners)
|
void |
refreshListeners()
|
void |
removeDoneListener(ListenerBase l)
|
void |
removeMessageListener(MessageListener l)
|
void |
removeNewLineListener(NewLineListener l)
|
void |
removeParserListener(ParserListener l)
|
void |
removeParserMatchListener(ParserMatchListener l)
|
void |
removeParserTokenListener(ParserTokenListener l)
|
void |
removeSemanticPredicateListener(SemanticPredicateListener l)
|
void |
removeSyntacticPredicateListener(SyntacticPredicateListener l)
|
void |
removeTraceListener(TraceListener l)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
source
private java.lang.Object source
doneListeners
private java.util.Hashtable doneListeners
matchListeners
private java.util.Vector matchListeners
messageListeners
private java.util.Vector messageListeners
tokenListeners
private java.util.Vector tokenListeners
traceListeners
private java.util.Vector traceListeners
semPredListeners
private java.util.Vector semPredListeners
synPredListeners
private java.util.Vector synPredListeners
newLineListeners
private java.util.Vector newLineListeners
matchEvent
private ParserMatchEvent matchEvent
messageEvent
private MessageEvent messageEvent
tokenEvent
private ParserTokenEvent tokenEvent
semPredEvent
private SemanticPredicateEvent semPredEvent
synPredEvent
private SyntacticPredicateEvent synPredEvent
traceEvent
private TraceEvent traceEvent
newLineEvent
private NewLineEvent newLineEvent
controller
private ParserController controller
CONSUME
protected static final int CONSUME
- See Also:
- Constant Field Values
ENTER_RULE
protected static final int ENTER_RULE
- See Also:
- Constant Field Values
EXIT_RULE
protected static final int EXIT_RULE
- See Also:
- Constant Field Values
LA
protected static final int LA
- See Also:
- Constant Field Values
MATCH
protected static final int MATCH
- See Also:
- Constant Field Values
MATCH_NOT
protected static final int MATCH_NOT
- See Also:
- Constant Field Values
MISMATCH
protected static final int MISMATCH
- See Also:
- Constant Field Values
MISMATCH_NOT
protected static final int MISMATCH_NOT
- See Also:
- Constant Field Values
REPORT_ERROR
protected static final int REPORT_ERROR
- See Also:
- Constant Field Values
REPORT_WARNING
protected static final int REPORT_WARNING
- See Also:
- Constant Field Values
SEMPRED
protected static final int SEMPRED
- See Also:
- Constant Field Values
SYNPRED_FAILED
protected static final int SYNPRED_FAILED
- See Also:
- Constant Field Values
SYNPRED_STARTED
protected static final int SYNPRED_STARTED
- See Also:
- Constant Field Values
SYNPRED_SUCCEEDED
protected static final int SYNPRED_SUCCEEDED
- See Also:
- Constant Field Values
NEW_LINE
protected static final int NEW_LINE
- See Also:
- Constant Field Values
DONE_PARSING
protected static final int DONE_PARSING
- See Also:
- Constant Field Values
ruleDepth
private int ruleDepth
ParserEventSupport
public ParserEventSupport(java.lang.Object source)
addDoneListener
public void addDoneListener(ListenerBase l)
addMessageListener
public void addMessageListener(MessageListener l)
addNewLineListener
public void addNewLineListener(NewLineListener l)
addParserListener
public void addParserListener(ParserListener l)
addParserMatchListener
public void addParserMatchListener(ParserMatchListener l)
addParserTokenListener
public void addParserTokenListener(ParserTokenListener l)
addSemanticPredicateListener
public void addSemanticPredicateListener(SemanticPredicateListener l)
addSyntacticPredicateListener
public void addSyntacticPredicateListener(SyntacticPredicateListener l)
addTraceListener
public void addTraceListener(TraceListener l)
fireConsume
public void fireConsume(int value)
fireDoneParsing
public void fireDoneParsing()
fireEnterRule
public void fireEnterRule(int ruleNum,
int guessing,
int data)
fireEvent
public void fireEvent(int type,
ListenerBase l)
fireEvents
public void fireEvents(int type,
java.util.Vector listeners)
fireExitRule
public void fireExitRule(int ruleNum,
int guessing,
int data)
fireLA
public void fireLA(int k,
int la)
fireMatch
public void fireMatch(char c,
int guessing)
fireMatch
public void fireMatch(char value,
BitSet b,
int guessing)
fireMatch
public void fireMatch(char value,
java.lang.String target,
int guessing)
fireMatch
public void fireMatch(int value,
BitSet b,
java.lang.String text,
int guessing)
fireMatch
public void fireMatch(int n,
java.lang.String text,
int guessing)
fireMatch
public void fireMatch(java.lang.String s,
int guessing)
fireMatchNot
public void fireMatchNot(char value,
char n,
int guessing)
fireMatchNot
public void fireMatchNot(int value,
int n,
java.lang.String text,
int guessing)
fireMismatch
public void fireMismatch(char value,
char n,
int guessing)
fireMismatch
public void fireMismatch(char value,
BitSet b,
int guessing)
fireMismatch
public void fireMismatch(char value,
java.lang.String target,
int guessing)
fireMismatch
public void fireMismatch(int value,
int n,
java.lang.String text,
int guessing)
fireMismatch
public void fireMismatch(int value,
BitSet b,
java.lang.String text,
int guessing)
fireMismatch
public void fireMismatch(java.lang.String value,
java.lang.String text,
int guessing)
fireMismatchNot
public void fireMismatchNot(char value,
char c,
int guessing)
fireMismatchNot
public void fireMismatchNot(int value,
int n,
java.lang.String text,
int guessing)
fireNewLine
public void fireNewLine(int line)
fireReportError
public void fireReportError(java.lang.Exception e)
fireReportError
public void fireReportError(java.lang.String s)
fireReportWarning
public void fireReportWarning(java.lang.String s)
fireSemanticPredicateEvaluated
public boolean fireSemanticPredicateEvaluated(int type,
int condition,
boolean result,
int guessing)
fireSyntacticPredicateFailed
public void fireSyntacticPredicateFailed(int guessing)
fireSyntacticPredicateStarted
public void fireSyntacticPredicateStarted(int guessing)
fireSyntacticPredicateSucceeded
public void fireSyntacticPredicateSucceeded(int guessing)
refresh
protected void refresh(java.util.Vector listeners)
refreshListeners
public void refreshListeners()
removeDoneListener
public void removeDoneListener(ListenerBase l)
removeMessageListener
public void removeMessageListener(MessageListener l)
removeNewLineListener
public void removeNewLineListener(NewLineListener l)
removeParserListener
public void removeParserListener(ParserListener l)
removeParserMatchListener
public void removeParserMatchListener(ParserMatchListener l)
removeParserTokenListener
public void removeParserTokenListener(ParserTokenListener l)
removeSemanticPredicateListener
public void removeSemanticPredicateListener(SemanticPredicateListener l)
removeSyntacticPredicateListener
public void removeSyntacticPredicateListener(SyntacticPredicateListener l)
removeTraceListener
public void removeTraceListener(TraceListener l)