|
-
February 24th, 2009, 05:46 AM
#1
Abstract Syntax Tree Generator Tool
Hello , i need an Open Source AST Generator tool. Can anyone plz specify any tool to which can generate AST .
I found one named GNU - Profiler tool for the same . But i m not able to Understand that.
guyz plz help.
-
February 25th, 2009, 06:07 PM
#2
Re: Abstract Syntax Tree Generator Tool
Most compiler compilers or parser toolkits can be made to output a representation of an AST given the grammar of the language to be parsed. This has very little to do with profiling tools.
Do you have a grammar for the language you're thinking of, or is it a standard language?
Do you have a preference for the language the compiler compiler generates, or the parser uses?
-
February 27th, 2009, 07:47 AM
#3
Re: Abstract Syntax Tree Generator Tool
Yes i want that tool for 'C language'.
i want the tool to generate AST for any C code supplied to it.
Plz help.
Thanks in advance.
-
February 27th, 2009, 05:32 PM
#4
Re: Abstract Syntax Tree Generator Tool
There is an option in gcc (-fdump-translation-unit) to dump AST information, but then you have to process that yourself. The Elsa C++ parser has a direct AST interface in C++, which might be suitable unless you're a C purist. Or any other parser will generate a parse tree you can process to an AST, and many have C grammars already available for them.
-
February 28th, 2009, 01:47 AM
#5
Re: Abstract Syntax Tree Generator Tool
Hey thnks for the info. can u plz elaborate on more tools please.
Also what is a GNU - GProfiler.
Also Can i use the Elsa Code in my project and under which license?
Thanks in advance.
Last edited by agutal; February 28th, 2009 at 02:10 AM.
-
February 28th, 2009, 05:48 AM
#6
Re: Abstract Syntax Tree Generator Tool
There are many other parser tools - google for the names yacc, bison, antlr, rats, javacc, and I'm sure others. Too many to elaborate on without a specific question, and most of them I haven't used.
I don't know anything about 'GProfiler'. GNU's profiler is called 'gprof', which reports how much time a program spends in each function, and that information lets you improve the running time of the software by targeting your optimisations better.
The Elsa/Elkhound code is released under the BSD license - see their main page at http://www.cs.berkeley.edu/~smcpeak/elkhound/
-
February 28th, 2009, 07:07 AM
#7
Re: Abstract Syntax Tree Generator Tool
-
March 9th, 2009, 07:55 AM
#8
Re: Abstract Syntax Tree Generator Tool
Please help. Now i want to parse the AST generated by the ELSA Tool.
How to do that ? Please elaborate on that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|