ANTLRDebugTreeNodeStream.h revision 324c4644fee44b9898524c09511bd33c3f12e2df
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// [The "BSD licence"]
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2006-2007 Kay Roepke
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// All rights reserved.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Redistribution and use in source and binary forms, with or without
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// modification, are permitted provided that the following conditions
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// are met:
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 1. Redistributions of source code must retain the above copyright
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//    notice, this list of conditions and the following disclaimer.
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 2. Redistributions in binary form must reproduce the above copyright
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//    notice, this list of conditions and the following disclaimer in the
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//    documentation and/or other materials provided with the distribution.
135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// 3. The name of the author may not be used to endorse or promote products
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//    derived from this software without specific prior written permission.
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
274e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#import <Cocoa/Cocoa.h>
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#import "ANTLRDebugEventListener.h"
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#import "ANTLRTreeAdaptor.h"
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#import "ANTLRTreeNodeStream.h"
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)@interface ANTLRDebugTreeNodeStream : NSObject <ANTLRTreeNodeStream> {
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	id<ANTLRDebugEventListener> debugListener;
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	id<ANTLRTreeAdaptor> treeAdaptor;
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	id<ANTLRTreeNodeStream> input;
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)	BOOL initialStreamState;
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (id) initWithTreeNodeStream:(id<ANTLRTreeNodeStream>)theStream debugListener:(id<ANTLRDebugEventListener>)debugger;
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (id<ANTLRDebugEventListener>) debugListener;
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) setDebugListener: (id<ANTLRDebugEventListener>) aDebugListener;
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (id<ANTLRTreeNodeStream>) getInput;
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) setInput: (id<ANTLRTreeNodeStream>) aTreeNodeStream;
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (id<ANTLRTreeAdaptor>) getTreeAdaptor;
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) setTreeAdaptor: (id<ANTLRTreeAdaptor>) aTreeAdaptor;
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#pragma mark ANTLRTreeNodeStream conformance
512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)- (id) LT:(NSInteger)k;
532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)- (id<ANTLRTreeAdaptor>) getTreeAdaptor;
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) setUniqueNavigationNodes:(BOOL)flag;
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#pragma mark ANTLRIntStream conformance
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) consume;
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (NSInteger) LA:(NSUInteger) i;
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (NSUInteger) mark;
605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (NSUInteger) getIndex;
615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) rewind:(NSUInteger) marker;
625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) rewind;
635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) release:(NSUInteger) marker;
645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (void) seek:(NSUInteger) index;
655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)- (NSUInteger) size;
665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)@end
685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)