1#import <Cocoa/Cocoa.h> 2#import "CombinedLexer.h" 3#import "antlr3.h" 4 5int main(int argc, const char * argv[]) 6{ 7 NSLog(@"starting combined\n"); 8 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 9 NSString *string = @"xyyyyaxyyyyb"; 10 NSLog(@"%@", string); 11 ANTLRStringStream *stream = [ANTLRStringStream newANTLRStringStream:string]; 12 CombinedLexer *lexer = [CombinedLexer newCombinedLexerWithCharStream:stream]; 13 id<ANTLRToken> currentToken; 14 while ((currentToken = [lexer nextToken]) && [currentToken getType] != ANTLRTokenTypeEOF) { 15 NSLog(@"%@", currentToken); 16 } 17 [lexer release]; 18 [stream release]; 19 20 [pool release]; 21 NSLog(@"exiting combined\n"); 22 return 0; 23}