[antlr-interest] Re: Please - can someone help me out?
Geir Ove Skjaervik
geiroves at online.no
Sun Nov 7 11:53:05 PST 2004
Hello Terrence,
And thanks a lot for your feedback. I feel a bit lost for the time
being, but am in the process of working me through the ANTLR
reference manual. I love this stuff, and can hardly wait to start
coding, but must hold back until I understand how to make the right
decisions. I haven't seen the material you referred to, but will
read it.
Might I come with a suggestion that might help newcomers to ANTLR? I
take my chances:
An ANTLR example aka. the Calc example, but that also adds:
function definition and function call AND walks a tree to excute the
stuff. The problem with the provided examples like TinyBasic is that
it is to big, to much to grasp. A very simple example makes it
easier to grasp the principle and get flying. I usually learn by
examples, then enchance the examples and consult the docs as
needed :-) If you have such an example already, please provide me
pointers !
Again, thanks for dealing with these beginners questions!
Geir Ove
--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...>
wrote:
>
> On Nov 7, 2004, at 4:53 AM, Geir Ove Skjaervik wrote:
> > Q1:
> > As for how to use ANTLR to implement a Stack Machine: Couldn't I
> > simply emit the stack instructions from the Parser part of ANTLR?
> > (That's what I did in the hand coded lexer / parser I wrote).
What
> > are the benefits of doing it walking an AST tree?
>
> Have you seen my CS652 lab that builds stack code?
>
> http://www.cs.usfca.edu/~parrt/course/652/labs/trees.html
>
> here's an interpreter and assembler:
>
> http://www.cs.usfca.edu/~parrt/course/652/labs/interp.html
>
> Ter
> --
> CS Professor & Grad Director, University of San Francisco
> Creator, ANTLR Parser Generator, http://www.antlr.org
> Cofounder, http://www.jguru.com
> Cofounder, http://www.knowspam.net enjoy email again!
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