Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Java Grammar
Xtext Java Grammar [message #743163] Fri, 21 October 2011 07:25 Go to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi,

Im looking for a project(or a grammar) that used java as a Grammar of its language

Any Ideas
Re: Xtext Java Grammar [message #743392 is a reply to message #743163] Fri, 21 October 2011 12:27 Go to previous messageGo to next message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
Have a look at: http://www.eclipse.org/Xtext/community/

fj-eclipse, SWRTJ may be of interest, as would be the Xtend2 or Xbase grammars. http://wiki.eclipse.org/MoDisco/Components/Java could also be interesting to you.


Re: Xtext Java Grammar [message #749441 is a reply to message #743392] Tue, 25 October 2011 08:14 Go to previous messageGo to next message
Elhamlaoui Mahmoud is currently offline Elhamlaoui MahmoudFriend
Messages: 268
Registered: March 2010
Senior Member
Hi Meinte,

Your links was very helpfull thanks Very Happy
Re: Xtext Java Grammar [message #869596 is a reply to message #749441] Thu, 03 May 2012 17:02 Go to previous messageGo to next message
kon f is currently offline kon fFriend
Messages: 152
Registered: March 2012
Senior Member
Hey,

I had the same issue. Since Xtext uses Antlr under the hood, I was trying to find an Antlr Java grammar. I found this file from Terence Parr [1]. I got about 1000 lines ...

I took this post[2] into consideration and adjusted the grammar line by line. I took me while Wink I wasn't able to adapt every statement, so I just commented some of them out. I attached the grammar if someone else is trying to build a DSL on top of Java. I don't think that the grammar is completely right, it at least contains the issues listed in the original grammar.

kon

[1] www.antlr.org/grammar/1152141644268/Java.g
[2] www.stackoverflow.com/questions/8279790/convert-simple-antlr-grammar-to-xtext
  • Attachment: MyDsl.xtext
    (Size: 29.79KB, Downloaded 568 times)
Re: Xtext Java Grammar [message #1432102 is a reply to message #869596] Fri, 26 September 2014 16:15 Go to previous messageGo to next message
Marko Markovic is currently offline Marko MarkovicFriend
Messages: 35
Registered: August 2014
Member
Hi Kon,

I can't download your attachment, do you upload again?

Thank you in advance,

Marko
Re: Xtext Java Grammar [message #1670486 is a reply to message #869596] Fri, 13 March 2015 08:00 Go to previous message
Ma DeWael is currently offline Ma DeWaelFriend
Messages: 6
Registered: March 2015
Junior Member
Hi Kon,

Is there a more recent version of this MyDSL grammar
and do happen to know if there is a pretty-printer/compiler for it?

A sample project that uses this grammer would equally be helpful to me!

Greetings.

[Updated on: Fri, 13 March 2015 13:04]

Report message to a moderator

Previous Topic:Can't resolve jvmType reference to file in project (using maven)
Next Topic:[Xbase][Eclipse] Open Type on generated source link to the DSL source
Goto Forum:
  


Current Time: Thu Apr 25 19:17:57 GMT 2024

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

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

Back to the top