|
Re: Java based AST for Ada (Google Summer of Code Project) [message #3327 is a reply to message #3258] |
Thu, 27 March 2008 04:12 |
Tom GROSMAN Messages: 16 Registered: July 2009 |
Junior Member |
|
|
Hello Saliya,
Part of the work of generating the AST is already completed. We currently
use an Ada language parser generated by ANTLR (www.antlr.org) to parse Ada
source files into a generic AST. What we need is to convert this AST into an
Ada-centric API that can be more easily used by tool builders. We want to
use the AST API of JDT and CDT as a basis for the Hibachi AST, but modifying
the API to provide constructs specific to Ada. For example, instead of an
interface called IImportDeclaration, we would probably have something like
IWithClause, IUseClause, and IUseTypeClause.
Like JDT and CDT, we would also like to provide an "AST rewrite" API that
supports creating or modifying Ada source files given a set of AST changes.
We would like the AST to be able to handle both Ada2005 and Ada95 code. JDT
uses the same framework for pre-1.5 and post-1.5 JVMs, but provides a switch
to the AST generator to determine which JVM is being used. We'd like to do
something similar for Hibachi.
There are not currently any plans to include an AST Viewer, but the student
would be welcome to create one for testing purposes at least.
Our belief is that (1) adapting the ANTLR-generated AST to an Ada-specific
AST, and (2) creating the AST rewrite framework, would likely be enough to
keep a student busy for the allocated time. However, if there is time left
over after finishing these tasks, startingt to implement tools using the AST
would be feasible.
Tom
"Saliya Ekanayake" <esaliya@gmail.com> a
|
|
|
Re: Java based AST for Ada (Google Summer of Code Project) [message #565359 is a reply to message #3258] |
Thu, 27 March 2008 04:12 |
Tom GROSMAN Messages: 16 Registered: July 2009 |
Junior Member |
|
|
Hello Saliya,
Part of the work of generating the AST is already completed. We currently
use an Ada language parser generated by ANTLR (www.antlr.org) to parse Ada
source files into a generic AST. What we need is to convert this AST into an
Ada-centric API that can be more easily used by tool builders. We want to
use the AST API of JDT and CDT as a basis for the Hibachi AST, but modifying
the API to provide constructs specific to Ada. For example, instead of an
interface called IImportDeclaration, we would probably have something like
IWithClause, IUseClause, and IUseTypeClause.
Like JDT and CDT, we would also like to provide an "AST rewrite" API that
supports creating or modifying Ada source files given a set of AST changes.
We would like the AST to be able to handle both Ada2005 and Ada95 code. JDT
uses the same framework for pre-1.5 and post-1.5 JVMs, but provides a switch
to the AST generator to determine which JVM is being used. We'd like to do
something similar for Hibachi.
There are not currently any plans to include an AST Viewer, but the student
would be welcome to create one for testing purposes at least.
Our belief is that (1) adapting the ANTLR-generated AST to an Ada-specific
AST, and (2) creating the AST rewrite framework, would likely be enough to
keep a student busy for the allocated time. However, if there is time left
over after finishing these tasks, startingt to implement tools using the AST
would be feasible.
Tom
"Saliya Ekanayake" <esaliya@gmail.com> a
|
|
|
Powered by
FUDForum. Page generated in 0.03048 seconds