Create AST Tree for code snippet

Dec 19, 2010 at 7:31 AM

Thank you for the very nice work! I have another questions regarding tree construction. I understand one can get a tree from compiliation_unit() when setting outpit=AST. If I hgave a cope snippet, would I be able to get an AST by calling statement_list()? Thanks.

Coordinator
Dec 20, 2010 at 8:13 PM

statement_list() also returns an AST (all the rules do), so that would work fine.

Dec 20, 2010 at 11:16 PM
Thank you very much.

On Mon, Dec 20, 2010 at 12:14 PM, anbrad <notifications@codeplex.com> wrote:

From: anbrad

statement_list() also returns an AST (all the rules do), so that would work fine.

Read the full discussion online.

To add a post to this discussion, reply to this email (antlrcsharp@discussions.codeplex.com)

To start a new discussion for this project, email antlrcsharp@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Mar 24, 2011 at 2:32 PM

Hi guys,

When I set the "Conditional compilation symbol" to AST, it throws a compilation error in this line:

parser_rt = p.compilation_unit();

I went to my csParser and that method returns void. I guess I need to re-generate the parser, but I'm not sure how. Can you give me some more detail instructions?

Thanks,

Gustavo