At 12:37 6/10/2009, Kirby Bohling wrote:
 >Couldn't you do that in the lexer/parser?  Just don't match EOF 
on
 >the start rule?  That you can just have something like:
 >
 >parser.game_prefix();
 >while (game_or_end_return = parser.game_or_end()) {
 >// Process game here
 >// make sure it you didn't hit the end case here.
 >}
 >
 >That might not make the lexer dump everything, but I thought 
that
 >would get the parser to not have everything in there.

Unfortunately not; the default behaviour of the lexer/token-stream 
is to translate the entire input into tokens before processing 
parser rules.  So you'd at least need to use a modified one that 
tokenises only as much as required each time; I think there's an 
example of this on the Wiki.


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to