ANTLRTreeNodeStream.h revision 324c4644fee44b9898524c09511bd33c3f12e2df
1076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// [The "BSD licence"] 2076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// Copyright (c) 2006-2007 Kay Roepke 3076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// All rights reserved. 4076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// 5076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// Redistribution and use in source and binary forms, with or without 6076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// modification, are permitted provided that the following conditions 7076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// are met: 8076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// 1. Redistributions of source code must retain the above copyright 9076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// notice, this list of conditions and the following disclaimer. 10076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// 2. Redistributions in binary form must reproduce the above copyright 11076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// notice, this list of conditions and the following disclaimer in the 12076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// documentation and/or other materials provided with the distribution. 13076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// 3. The name of the author may not be used to endorse or promote products 14076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// derived from this software without specific prior written permission. 15076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// 16076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 185629eb167638a9ebfa5059177d227c7ac67db46fMathias Agopian// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19cf56319d4deb2215e5274f321f7fee71caa1ada1Mathias Agopian// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 205629eb167638a9ebfa5059177d227c7ac67db46fMathias Agopian// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 224243e666213029a293935987c979831093fb0779Mathias Agopian// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 234243e666213029a293935987c979831093fb0779Mathias Agopian// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25cf56319d4deb2215e5274f321f7fee71caa1ada1Mathias Agopian// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian 273330b203039dea366d4981db1408a460134b2d2cMathias Agopian 28076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian#import <Cocoa/Cocoa.h> 29076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian#import "ANTLRIntStream.h" 30076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian#import "ANTLRCharStream.h" 31076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian#import "ANTLRTokenStream.h" 323330b203039dea366d4981db1408a460134b2d2cMathias Agopian#import "ANTLRCommonTree.h" 334243e666213029a293935987c979831093fb0779Mathias Agopian#import "ANTLRCommonTreeAdaptor.h" 343330b203039dea366d4981db1408a460134b2d2cMathias Agopian 35b26af23744fa73e8bc142b1eb98772fde5970c10Mathias Agopian@protocol ANTLRTreeNodeStream < ANTLRIntStream > 36b26af23744fa73e8bc142b1eb98772fde5970c10Mathias Agopian 37076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian- (id) initWithTree:(ANTLRCommonTree *)theTree; 383330b203039dea366d4981db1408a460134b2d2cMathias Agopian- (id) initWithTreeAdaptor:(id<ANTLRTreeAdaptor>)theAdaptor Tree:(ANTLRCommonTree *)theTree; 39076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian 40076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian- (id) LT:(NSInteger)k; 41076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian- (id) getTreeSource; 42076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian- (id<ANTLRTreeAdaptor>) getTreeAdaptor; 43e6f43ddce78d6846af12550ff9193c5c6fe5844bSteve Block- (id<ANTLRTokenStream>) getTokenStream; 44076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian- (void) setUniqueNavigationNodes:(BOOL)flag; 45076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian 46076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian- (id) getNode:(NSInteger) idx; 47076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian 48076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian- (NSString *) toStringFromNode:(id)startNode ToNode:(id)stopNode; 493330b203039dea366d4981db1408a460134b2d2cMathias Agopian 50076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian@end 51076b1cc3a9b90aa5b381a1ed268ca0b548444c9bMathias Agopian