Related articles |
---|
about syntax trees chinluchinawa@yahoo.co.uk (chinlu chinawa) (2007-03-19) |
Re: about syntax trees grable0@gmail.com (grable) (2007-03-21) |
Re: about syntax trees chinluchinawa@yahoo.co.uk (Chinlu) (2007-03-23) |
Re: about syntax trees leppoc@gmail.com (leppoc@gmail.com) (2007-03-23) |
Re: about syntax trees DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-03-26) |
From: | chinlu chinawa <chinluchinawa@yahoo.co.uk> |
Newsgroups: | comp.compilers |
Date: | 19 Mar 2007 15:40:22 -0400 |
Organization: | Compilers Central |
Keywords: | parse, question |
Posted-Date: | 19 Mar 2007 15:40:22 EDT |
Hello,
I'm relatively new to parsing. I've managed to code a
recursive-descent ll(1) parser in c (thus, a
stack/table based one). My question is about syntax
trees.
If I trace each accepting operation with a printf,
this is what I get for the expression: a+b*c
accept on: a
accept on: +
accept on: b
accept on: *
accept on: c
However I can see ast's being more like this all over
the place:
+
/|\
b | a
*
c
But I cannot think of a way you get exactly this, any
pointers or advises? thanks so much.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.