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


Field Summary
protected  ParserEventSupport parserEventSupport
           
protected  String[] ruleNames
           
protected  String[] semPredNames
           
 
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
 
Constructor Summary
LLkDebuggingParser(int k_)
           
LLkDebuggingParser(ParserSharedInputState state, int k_)
           
LLkDebuggingParser(TokenBuffer tokenBuf, int k_)
           
LLkDebuggingParser(TokenStream lexer, int k_)
           
 
Method Summary
 void addMessageListener(MessageListener 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 consume()
          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)
           
 String getSemPredName(int num)
           
 void goToSleep()
           
 boolean isDebugMode()
           
 boolean isGuessing()
           
 int LA(int i)
          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)
          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)
          Make sure current lookahead symbol matches token type t.
 void matchNot(int t)
           
 void removeMessageListener(MessageListener 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)
           
 void reportError(RecognitionException ex)
          Parser error-reporting function can be overridden in subclass
 void reportError(String s)
          Parser error-reporting function can be overridden in subclass
 void reportWarning(String s)
          Parser warning-reporting function can be overridden in subclass
 void setDebugMode(boolean value)
           
 void setupDebugging(TokenBuffer tokenBuf)
           
 void setupDebugging(TokenStream lexer)
           
protected  void setupDebugging(TokenStream lexer, TokenBuffer tokenBuf)
          User can override to do their own debugging
 void wakeUp()
           
 
Methods inherited from class antlr.LLkParser
LT, traceIn, traceOut
 
Methods inherited from class antlr.Parser
consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, 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

ruleNames

protected String[] ruleNames

semPredNames

protected String[] semPredNames
Constructor Detail

LLkDebuggingParser

public LLkDebuggingParser(int k_)

LLkDebuggingParser

public LLkDebuggingParser(ParserSharedInputState state,
                          int k_)

LLkDebuggingParser

public LLkDebuggingParser(TokenBuffer tokenBuf,
                          int k_)

LLkDebuggingParser

public LLkDebuggingParser(TokenStream lexer,
                          int k_)
Method Detail

addMessageListener

public void addMessageListener(MessageListener l)
Overrides:
addMessageListener in class Parser

addParserListener

public void addParserListener(ParserListener l)
Overrides:
addParserListener in class Parser

addParserMatchListener

public void addParserMatchListener(ParserMatchListener l)
Overrides:
addParserMatchListener in class Parser

addParserTokenListener

public void addParserTokenListener(ParserTokenListener l)
Overrides:
addParserTokenListener in class Parser

addSemanticPredicateListener

public void addSemanticPredicateListener(SemanticPredicateListener l)
Overrides:
addSemanticPredicateListener in class Parser

addSyntacticPredicateListener

public void addSyntacticPredicateListener(SyntacticPredicateListener l)
Overrides:
addSyntacticPredicateListener in class Parser

addTraceListener

public void addTraceListener(TraceListener l)
Overrides:
addTraceListener in class Parser

consume

public void consume()
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)
Specified by:
getRuleName in interface DebuggingParser

getSemPredName

public String getSemPredName(int num)
Specified by:
getSemPredName in interface DebuggingParser

goToSleep

public void goToSleep()

isDebugMode

public boolean isDebugMode()
Overrides:
isDebugMode in class Parser

isGuessing

public boolean isGuessing()

LA

public int LA(int i)
       throws TokenStreamException
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
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
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
Overrides:
matchNot in class Parser
MismatchedTokenException
TokenStreamException

removeMessageListener

public void removeMessageListener(MessageListener l)
Overrides:
removeMessageListener in class Parser

removeParserListener

public void removeParserListener(ParserListener l)
Overrides:
removeParserListener in class Parser

removeParserMatchListener

public void removeParserMatchListener(ParserMatchListener l)
Overrides:
removeParserMatchListener in class Parser

removeParserTokenListener

public void removeParserTokenListener(ParserTokenListener l)
Overrides:
removeParserTokenListener in class Parser

removeSemanticPredicateListener

public void removeSemanticPredicateListener(SemanticPredicateListener l)
Overrides:
removeSemanticPredicateListener in class Parser

removeSyntacticPredicateListener

public void removeSyntacticPredicateListener(SyntacticPredicateListener l)
Overrides:
removeSyntacticPredicateListener in class Parser

removeTraceListener

public void removeTraceListener(TraceListener l)
Overrides:
removeTraceListener in class Parser

reportError

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

Overrides:
reportError in class Parser

reportError

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

Overrides:
reportError in class Parser

reportWarning

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

Overrides:
reportWarning in class Parser

setDebugMode

public void setDebugMode(boolean value)
Overrides:
setDebugMode in class Parser

setupDebugging

public void setupDebugging(TokenBuffer tokenBuf)

setupDebugging

public void setupDebugging(TokenStream lexer)

setupDebugging

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


wakeUp

public void wakeUp()


Copyright 1999-2003 Oliver Zeigermann. All Rights Reserved.