[antlr-interest] Re: A simple Visual C++ example
Ric Klaren
ric.klaren at gmail.com
Fri Dec 10 06:07:08 PST 2004
On Fri, 10 Dec 2004 13:18:42 -0000, eugene_babeshko
<eugene_babeshko at yahoo.com> wrote:
> > Check out examples/cpp/calc of the distribution. Main2.cpp and
> > Main3.cpp demonstrate ways of how you feed a string to an antlr
> > parser. The .g file contains a simple expression parser evaluator.
>
> Thanks:) How can I make conditions parsing?
>
> Input:
>
> if (0)
> print (0)
> endif
You mean how can you check the complete result of an expression ? Or
do checks inside the parser ? Anycase the first you can see in the
example the second is explained in the docs, antlr is not a tool you
can mess with without a proper understanding of it's features (or
parsing in general). It's also very helpfull to read the generated
code to get a feel for what is happening. For examples like calc this
is very manageable.
Cheers,
Ric
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list