#import #import "TestLexer.h" #import #import int main(int argc, const char * argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ANTLRStringStream *stream = [ANTLRStringStream newANTLRStringStream:@"abB9Cdd44"]; TestLexer *lexer = [[TestLexer alloc] initWithCharStream:stream]; id currentToken; while ((currentToken = [[lexer nextToken] retain]) && currentToken.type != TokenTypeEOF) { NSLog(@"%@", currentToken); } [lexer release]; [stream release]; [pool release]; // sleep for objectalloc // while (1) sleep(60); return 0; }