hi. antlr shouldn't see past actions to sem preds. are you sure that
the define sym action is in every path? Do you get an error about
insufficiently uncovered alts?
Ter
On Mar 18, 2010, at 4:54 PM, swalton wrote:
I derived my grammar from Terry's C grammar. I have added a lot of
Having a bit of difficulty in figuring out how to unambiguously parse
this into an AST.
Order of the elements is significant, the parens are significant, and
the leading dot is significant.
(.buf_unittest.complex_opt1).foo;
.buf_unittest.complex_opt1.fum;
That will give a tree that isn't very useful ;-) You need to express this in LL
form such that the things that can be elements of your compound appear at the
bottom of the tree. Then use DOT and not '.', make that be the root node and do
not try to impose any semantic verification via
On Fri, Mar 19, 2010 at 10:37 AM, Kaleb Pederson
kaleb.peder...@gmail.com wrote:
Venkat,
One way to do what you've mentioned is to create a tree walker which
walks the AST. Then, within the AST, you'll need to do a couple of
things.
First, you need to populate a symbol table. That symbol
Thanks, Jim. Please understand though that I dumbed down the test
grammar to minimally illustrate the problem I was asking about - my
actual grammar shapes a much more complex tree and uses tidy
tokens;). The revision you suggest unfortunately looses a bit too much
intrinsic information that
Yes - you can retain all that stuff, but if you try to do it the way you have
it, you won't get a tree that makes sense. You can see a much more complicated
example using my C# parser, which is online at:
http://www.temporal-wave.com/index.php?option=com_psrrunview=psrrunItemid=58
All you need
Greetings!
On Fri, 2010-03-19 at 15:26 -0400, William Koscho wrote:
Hi All,
I have a tree grammar, and am trying to just print out some information from
the tree. This works fine for matching tokens, but not when matching the
rules. I'm hoping someone can help explain why this is giving
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/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
Hi,
I have a simple grammar for which I was able to walk through the AST and
printout the input text to the console. I learned that we need to put the
information in the symbol table and do the semantic analysis from there on.
How , what information should I put into the symbol table and how do I
Greetings!
On Fri, 2010-03-19 at 17:01 -0400, venkat medhaj wrote:
Hi,
I have a simple grammar for which I was able to walk through the AST and
printout the input text to the console. I learned that we need to put the
information in the symbol table and do the semantic analysis from there
10 matches
Mail list logo