[antlr-interest] Re: Please - can someone help me out?
Geir Ove Skjaervik
geiroves at online.no
Sun Nov 7 04:53:28 PST 2004
Hello,
And thanks a lot for dealing with my "novice" questions :-)
I think I remember how to implement a stack machine, so that part
should be relatively easy. I am not familiar with the term "threaded
code compiler though".
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?
Additional info: I need a K>1 kind of parser.
I feel pretty comfortable setting up the Lexer and Parser part in
ANTLR (I think), but the TreeParser part is unfamiliar ground
although I think I grasp the basics.
Q2:
What would be easier: Implementing a debugger for the Stack Machine
or the solution where code is executed walking the tree (is this
called a register machine?)
Thanks for your patitence and help.
Geir Ove
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