Gavin Lambert wrote:
> At 05:31 8/09/2009, Sam Barnett-Cormack wrote:
>  >However, the rules I'll pass them to won't match EOF.
>  >
>  >It strikes me that all I need to do is make the token stream
>  >wrapper *not* return an EOF. However, the docs seem to specify
>  >that it *should* return an EOF. How, practically or ideally,
>  >should I resolve this?
> 
> Your custom streams should return an EOF when they run out of input.  It 
> doesn't really matter (from this perspective) whether or not the rule 
> being invoked is expecting an EOF; by default rules are not required to 
> consume all input.  (Adding EOF matching to a rule is the main way of 
> requesting that a rule *should* try to consume all input.)

Huzzah, that's good, I don't need to write anything odd. My custom 
stream currently sends the EOF, as that's what the docs seemed to say to do.

-- 
Sam Barnett-Cormack

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