001: /*
002: [The "BSD licence"]
003: Copyright (c) 2005-2006 Terence Parr
004: All rights reserved.
005:
006: Redistribution and use in source and binary forms, with or without
007: modification, are permitted provided that the following conditions
008: are met:
009: 1. Redistributions of source code must retain the above copyright
010: notice, this list of conditions and the following disclaimer.
011: 2. Redistributions in binary form must reproduce the above copyright
012: notice, this list of conditions and the following disclaimer in the
013: documentation and/or other materials provided with the distribution.
014: 3. The name of the author may not be used to endorse or promote products
015: derived from this software without specific prior written permission.
016:
017: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
018: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
019: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
020: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
021: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
022: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
023: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
024: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
025: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
026: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
027: */
028: package org.antlr.runtime.debug;
029:
030: import org.antlr.runtime.RecognitionException;
031: import org.antlr.runtime.Token;
032:
033: /** A blank listener that does nothing; useful for real classes so
034: * they don't have to have lots of blank methods and are less
035: * sensitive to updates to debug interface.
036: */
037: public class BlankDebugEventListener implements DebugEventListener {
038: public void enterRule(String ruleName) {
039: }
040:
041: public void exitRule(String ruleName) {
042: }
043:
044: public void enterAlt(int alt) {
045: }
046:
047: public void enterSubRule(int decisionNumber) {
048: }
049:
050: public void exitSubRule(int decisionNumber) {
051: }
052:
053: public void enterDecision(int decisionNumber) {
054: }
055:
056: public void exitDecision(int decisionNumber) {
057: }
058:
059: public void location(int line, int pos) {
060: }
061:
062: public void consumeToken(Token token) {
063: }
064:
065: public void consumeHiddenToken(Token token) {
066: }
067:
068: public void LT(int i, Token t) {
069: }
070:
071: public void mark(int i) {
072: }
073:
074: public void rewind(int i) {
075: }
076:
077: public void rewind() {
078: }
079:
080: public void beginBacktrack(int level) {
081: }
082:
083: public void endBacktrack(int level, boolean successful) {
084: }
085:
086: public void recognitionException(RecognitionException e) {
087: }
088:
089: public void beginResync() {
090: }
091:
092: public void endResync() {
093: }
094:
095: public void semanticPredicate(boolean result, String predicate) {
096: }
097:
098: public void commence() {
099: }
100:
101: public void terminate() {
102: }
103:
104: // Tree parsing stuff
105:
106: public void consumeNode(Object t) {
107: }
108:
109: public void LT(int i, Object t) {
110: }
111:
112: // AST Stuff
113:
114: public void nilNode(Object t) {
115: }
116:
117: //public void setSubTreeRoot(String name, int ID) {}
118: public void createNode(Object t) {
119: }
120:
121: public void createNode(Object node, Token token) {
122: }
123:
124: public void becomeRoot(Object newRoot, Object oldRoot) {
125: }
126:
127: public void addChild(Object root, Object child) {
128: }
129:
130: public void setTokenBoundaries(Object t, int tokenStartIndex,
131: int tokenStopIndex) {
132: }
133: }
|