[antlr-interest] understanding the intuition behind LL(k) parsers
and LR(k) parsers
Mark Felzer
mark.felzer at gmail.com
Thu Apr 20 13:42:39 PDT 2006
Hey guys,
Maybe you can help me visualize the basic idea behind the two approaches
to AST tree generation.
As I understand it a top-down parser..will start with the first input
symbol of the program file,check if its a terminal/nonterminal, then it
expands it..looking for the next predicted symbol. A bottom up parser
has to start with some kind of "last terminal" then build the tree in
upward direction. Intuitively where would the bottom-up parser start if
presented an input file. How does it find this starting point, of the
parse.It ha to be the deepest part of the tree. But how do you detect
this, without expending the tree first from top-bottom? Is my thinking
faulted?
Thank You.
Mark F.
More information about the antlr-interest
mailing list