• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#import <Foundation/Foundation.h>
2#import "CombinedLexer.h"
3#import <ANTLR/ANTLR.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<Token> currentToken;
14	while ((currentToken = [lexer nextToken]) && currentToken.type != TokenTypeEOF) {
15		NSLog(@"%@", currentToken);
16	}
17	[lexer release];
18	[stream release];
19
20	[pool release];
21    NSLog(@"exiting combined\n");
22	return 0;
23}