On Mon, Apr 11, 2011 at 11:19 AM, NeoPhyte <[email protected]> wrote:

> Will this method allow me to process each line in an input file
> individually.
> Like if my grammar has multiple rules and I want to process each of these
> rules individually....
> Something like...
>
> say my grammar has following 3 individual parser rules
>
> rule1 : ....
> rule2 : ....
> rule3: ...
>
> final : (rule1|rule2|rule3)+;
>
> //rest of the lexer and parser rules
>
> and my i/o is
>
> read input for rule1
> show output for rule1
>
> read input for rule3
> show output for rule3
>
> read input for rule1
> show output for rule1
>
> an so on, until I use something like an EOF(ctrl-z)....
>
> with the method suggested by you, can I achieve this?...and if so can u plz
> provide a sample code for the same....



Hmm, I really don't know what you mean...

As long as you invoke the `final` method on your parser (which matches one
of: `rule1`, `rule2` or `rule3`), you're okay, AFAIK.

Regards,

Bart.

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