On Thu, 2008-11-20 at 15:13 -0600, Vishwanath Hawargi wrote:
> Hello,
> Another dumb question from me.
>
> I am looking for parsing an expression from the command line. Each of
> these expressions are syntactically correct.
> Instead of having a input file, i am having one expression at a time
> to be processed.
> In this situation is it optimal/ ok to use antlr to validate and
> generate the tokens?
>
> Also, how do i process input arg instead of input file?
>
It makes sense if the input is relatively complicated, but if it is
just: command {options} something, then probably custom code is as good.
You run it exactly the same way as a file but use the StringStream
rather than the file stream. See teh api docs:
http://www.antlr.org/api/Java/classorg_1_1antlr_1_1runtime_1_1_a_n_t_l_r_string_stream.html
http://www.antlr.org/api/Java
Jim
> please let me know.
>
> thank you.
> vishwa
>
> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org:8080/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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address