Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hibachi » Java based AST for Ada
Java based AST for Ada [message #3258] Sun, 23 March 2008 08:31 Go to next message
Saliya Ekanayake is currently offline Saliya EkanayakeFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

I am a final year undergraduate of the Department of Computer Science &
Engineering of University of Moratuwa. I am interested in implementing an
AST for Ada language under Hibachi project for this year's Google Summer
of Code. I have undertaken the subject compiler theory at university and
have implemented a JavaScript pretty printer based on PLY and a JavaScript
lexical analyzer in C. I have also developed Axis TCP Monitor
(http://ws.apache.org/commons/tcpmon/) as a plug-in for Eclipse. So I
believe I am capable of working with this project based on my experience
with Eclipse and ASTs.

Thus I like to know more information regarding this project and any
relevant information is highly appreciated as well.

Thanks in advance,
Saliya Ekanayake
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 Go to previous message
Tom GROSMAN is currently offline Tom GROSMANFriend
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 Go to previous message
Tom GROSMAN is currently offline Tom GROSMANFriend
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
Previous Topic:Any new status?
Next Topic:noobie qns on using the update plug'in
Goto Forum:
  


Current Time: Sat Apr 27 05:11:54 GMT 2024

Powered by FUDForum. Page generated in 0.03080 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top