Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Define a grammar to parse Java-Code
Define a grammar to parse Java-Code [message #670365] Fri, 13 May 2011 16:55 Go to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi you all,

I want to write an utility to convert javacode for different issues.
Currently we want to migrate our Junit3-Testcases to Junit4 (later we want to migrate our persistence to hibernate or jpa).

I found a tool, which works with ANTLR, but I have done something with XTEXT before already and I think XText is really better to work with for me.

(1)Does anyone of you now if some grammar already defined to parse java?
(2)Or is there a possibility to convert my old ANTLR-Grammar to XText?

(1) would be the better way, because the ANTLR-grammar is not at all complete.

Any help would be welcome,

Thanks by now,

Markus

Re: Define a grammar to parse Java-Code [message #670564 is a reply to message #670365] Sun, 15 May 2011 01:14 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Although fun to write a java grammar in Xtext, your use case sounds like a
good fit for the Modisco project.
- henrik

Markus Oley <forums-noreply@eclipse.org> wrote:
> Hi you all,
> I want to write an utility to convert javacode for different
> issues. Currently we want to migrate our Junit3-Testcases to Junit4
> (later we want to migrate our persistence to hibernate or
> jpa).
> I found a tool, which works with ANTLR, but I have done
> something with XTEXT before already and I think XText is
> really better to work with for me.
> (1)Does anyone of you now if some grammar already defined to
> parse java? (2)Or is there a possibility to convert my old ANTLR-Grammar
> to XText?
>
> (1) would be the better way, because the ANTLR-grammar is
> not at all complete.
> Any help would be welcome,
> Thanks by now,
> Markus


--
- henrik
Re: Define a grammar to parse Java-Code [message #670677 is a reply to message #670564] Sun, 15 May 2011 11:08 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi Henrik,

yes, of course, this seems to be a good approach for my use case.
Guess I'll give it a try, looks very handsome and easy to use


Markus
Re: Define a grammar to parse Java-Code [message #670678 is a reply to message #670564] Sun, 15 May 2011 11:10 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi Henrik,

yes I guess this tool looks very handsome for my use case
and I'll give it a try.

Thanks for your help
Markus
Re: Define a grammar to parse Java-Code [message #670682 is a reply to message #670564] Sun, 15 May 2011 11:12 Go to previous message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi Henrik,

I guess this approach looks very promising.
I think I'll give it a try.

Thanks by now
Markus
Previous Topic:XTEXT - Problems with my grammar
Next Topic:Intermittent IReferenceFinder injection
Goto Forum:
  


Current Time: Thu Apr 25 02:31:12 GMT 2024

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

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

Back to the top