antlr.debug
Class LLkDebuggingParser

java.lang.Object
  |
  +--antlr.Parser
        |
        +--antlr.LLkParser
              |
              +--antlr.debug.LLkDebuggingParser
All Implemented Interfaces:
DebuggingParser

public class LLkDebuggingParser
extends LLkParser
implements DebuggingParser

Untamed:


Field Summary
private  boolean _notDebugMode
           
protected  ParserEventSupport parserEventSupport
           
protected  String[] ruleNames
           
protected  String[] semPredNames
           
 
Fields inherited from class antlr.LLkParser
 
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, traceDepth
 
Constructor Summary
LLkDebuggingParser(int k_)
          Enabled:
LLkDebuggingParser(ParserSharedInputState state, int k_)
          Enabled:
LLkDebuggingParser(TokenBuffer tokenBuf, int k_)
          Enabled:
LLkDebuggingParser(TokenStream lexer, int k_)
          Enabled:
 
Method Summary
 void addMessageListener(MessageListener 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 consume()
          Enabled: Get another token object from the token stream
protected  void fireEnterRule(int num, int data)
           
protected  void fireExitRule(int num, int data)
           
protected  boolean fireSemanticPredicateEvaluated(int type, int num, boolean condition)
           
protected  void fireSyntacticPredicateFailed()
           
protected  void fireSyntacticPredicateStarted()
           
protected  void fireSyntacticPredicateSucceeded()
           
 String getRuleName(int num)
          Enabled:
 String getSemPredName(int num)
          Enabled:
 void goToSleep()
          Enabled:
 boolean isDebugMode()
          Enabled:
 boolean isGuessing()
          Enabled:
 int LA(int i)
          Enabled: Return the token type of the ith token of lookahead where i=1 is the current token being examined by the parser (i.e., it has not been matched yet).
 void match(BitSet b)
          Enabled: Make sure current lookahead symbol matches the given set Throw an exception upon mismatch, which is catch by either the error handler or by the syntactic predicate.
 void match(int t)
          Enabled: Make sure current lookahead symbol matches token type t.
 void matchNot(int t)
          Enabled:
 void removeMessageListener(MessageListener 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:
 void reportError(RecognitionException ex)
          Enabled: Parser error-reporting function can be overridden in subclass
 void reportError(String s)
          Enabled: Parser error-reporting function can be overridden in subclass
 void reportWarning(String s)
          Enabled: Parser warning-reporting function can be overridden in subclass
 void setDebugMode(boolean value)
          Enabled:
 void setupDebugging(TokenBuffer tokenBuf)
          Enabled:
 void setupDebugging(TokenStream lexer)
          Enabled:
protected  void setupDebugging(TokenStream lexer, TokenBuffer tokenBuf)
          User can override to do their own debugging
 void wakeUp()
          Enabled:
 
Methods inherited from class antlr.LLkParser
LT, traceIn, traceOut
 
Methods inherited from class antlr.Parser
consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, mark, panic, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parserEventSupport

protected ParserEventSupport parserEventSupport

_notDebugMode

private boolean _notDebugMode

ruleNames

protected String[] ruleNames

semPredNames

protected String[] semPredNames
Constructor Detail

LLkDebuggingParser

public LLkDebuggingParser(int k_)
Enabled:


LLkDebuggingParser

public LLkDebuggingParser(ParserSharedInputState state,
                          int k_)
Enabled:


LLkDebuggingParser

public LLkDebuggingParser(TokenBuffer tokenBuf,
                          int k_)
Enabled:


LLkDebuggingParser

public LLkDebuggingParser(TokenStream lexer,
                          int k_)
Enabled:

Method Detail

addMessageListener

public void addMessageListener(MessageListener l)
Enabled:

Overrides:
addMessageListener in class Parser

addParserListener

public void addParserListener(ParserListener l)
Enabled:

Overrides:
addParserListener in class Parser

addParserMatchListener

public void addParserMatchListener(ParserMatchListener l)
Enabled:

Overrides:
addParserMatchListener in class Parser

addParserTokenListener

public void addParserTokenListener(ParserTokenListener l)
Enabled:

Overrides:
addParserTokenListener in class Parser

addSemanticPredicateListener

public void addSemanticPredicateListener(SemanticPredicateListener l)
Enabled:

Overrides:
addSemanticPredicateListener in class Parser

addSyntacticPredicateListener

public void addSyntacticPredicateListener(SyntacticPredicateListener l)
Enabled:

Overrides:
addSyntacticPredicateListener in class Parser

addTraceListener

public void addTraceListener(TraceListener l)
Enabled:

Overrides:
addTraceListener in class Parser

consume

public void consume()
Enabled: Get another token object from the token stream

Overrides:
consume in class LLkParser

fireEnterRule

protected void fireEnterRule(int num,
                             int data)

fireExitRule

protected void fireExitRule(int num,
                            int data)

fireSemanticPredicateEvaluated

protected boolean fireSemanticPredicateEvaluated(int type,
                                                 int num,
                                                 boolean condition)

fireSyntacticPredicateFailed

protected void fireSyntacticPredicateFailed()

fireSyntacticPredicateStarted

protected void fireSyntacticPredicateStarted()

fireSyntacticPredicateSucceeded

protected void fireSyntacticPredicateSucceeded()

getRuleName

public String getRuleName(int num)
Enabled:

Specified by:
getRuleName in interface DebuggingParser

getSemPredName

public String getSemPredName(int num)
Enabled:

Specified by:
getSemPredName in interface DebuggingParser

goToSleep

public void goToSleep()
Enabled:


isDebugMode

public boolean isDebugMode()
Enabled:

Overrides:
isDebugMode in class Parser

isGuessing

public boolean isGuessing()
Enabled:


LA

public int LA(int i)
       throws TokenStreamException
Enabled: Return the token type of the ith token of lookahead where i=1 is the current token being examined by the parser (i.e., it has not been matched yet).

Overrides:
LA in class LLkParser
TokenStreamException

match

public void match(int t)
           throws MismatchedTokenException,
                  TokenStreamException
Enabled: Make sure current lookahead symbol matches token type t. Throw an exception upon mismatch, which is catch by either the error handler or by the syntactic predicate.

Overrides:
match in class Parser
MismatchedTokenException
TokenStreamException

match

public void match(BitSet b)
           throws MismatchedTokenException,
                  TokenStreamException
Enabled: Make sure current lookahead symbol matches the given set Throw an exception upon mismatch, which is catch by either the error handler or by the syntactic predicate.

Overrides:
match in class Parser
MismatchedTokenException
TokenStreamException

matchNot

public void matchNot(int t)
              throws MismatchedTokenException,
                     TokenStreamException
Enabled:

Overrides:
matchNot in class Parser
MismatchedTokenException
TokenStreamException

removeMessageListener

public void removeMessageListener(MessageListener l)
Enabled:

Overrides:
removeMessageListener in class Parser

removeParserListener

public void removeParserListener(ParserListener l)
Enabled:

Overrides:
removeParserListener in class Parser

removeParserMatchListener

public void removeParserMatchListener(ParserMatchListener l)
Enabled:

Overrides:
removeParserMatchListener in class Parser

removeParserTokenListener

public void removeParserTokenListener(ParserTokenListener l)
Enabled:

Overrides:
removeParserTokenListener in class Parser

removeSemanticPredicateListener

public void removeSemanticPredicateListener(SemanticPredicateListener l)
Enabled:

Overrides:
removeSemanticPredicateListener in class Parser

removeSyntacticPredicateListener

public void removeSyntacticPredicateListener(SyntacticPredicateListener l)
Enabled:

Overrides:
removeSyntacticPredicateListener in class Parser

removeTraceListener

public void removeTraceListener(TraceListener l)
Enabled:

Overrides:
removeTraceListener in class Parser

reportError

public void reportError(RecognitionException ex)
Enabled: Parser error-reporting function can be overridden in subclass

Overrides:
reportError in class Parser

reportError

public void reportError(String s)
Enabled: Parser error-reporting function can be overridden in subclass

Overrides:
reportError in class Parser

reportWarning

public void reportWarning(String s)
Enabled: Parser warning-reporting function can be overridden in subclass

Overrides:
reportWarning in class Parser

setDebugMode

public void setDebugMode(boolean value)
Enabled:

Overrides:
setDebugMode in class Parser

setupDebugging

public void setupDebugging(TokenBuffer tokenBuf)
Enabled:


setupDebugging

public void setupDebugging(TokenStream lexer)
Enabled:


setupDebugging

protected void setupDebugging(TokenStream lexer,
                              TokenBuffer tokenBuf)
User can override to do their own debugging


wakeUp

public void wakeUp()
Enabled:



comments?