Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Can I use external compiler for Xtext?
Can I use external compiler for Xtext? [message #1296812] Tue, 15 April 2014 08:03 Go to next message
Jiwon Song is currently offline Jiwon SongFriend
Messages: 7
Registered: April 2014
Junior Member
Hello,

I developed my own compiler using "JavaCC".

I want to use this on Xtext. Please answer me how to use my own parser executable files on Xtext Project. Uh Oh
Re: Can I use external compiler for Xtext? [message #1297257 is a reply to message #1296812] Tue, 15 April 2014 14:38 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
On 2014-15-04 15:30, Jiwon Song wrote:
> Hello,
>
> I developed my own compiler using "JavaCC".
>
> I want to use this on Xtext. Please answer me how to use my own parser
> executable files on Xtext Project. :uhoh:

There is no direct support for anything like that in Xtext. Your options
are:

- to write some kind of adapter that makes your JavaCC implementation
look like an Xtext generated implementation (lots of work and probably
very complex)
- use your JavaCC as a very advanced lexer, and produce higher level
tokens to an Xtext grammar describing your language.
- write a new grammar using Xtext, possibly a simplified version that
makes use of the JavaCC implementation for details / support, or for
building/compiling/generating code.

Remember that Xtext generates the parser, and IDE support for the
language that you see from a grammar, and an EMF model, (or
alternatively also generates the EMF model from the grammar).

Regards
- henrik
Re: Can I use external compiler for Xtext? [message #1297279 is a reply to message #1296812] Tue, 15 April 2014 14:55 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I would recommend the opposite approach. If you want to use JavaCC as
your parsing engine, develop an Xtext2JavaCC grammar transformation so
that you get the benefits of JavaCC for your traditional applications
and the benefits of Xtext for editors and such like.

Regards

Ed Willink

On 15/04/2014 14:30, Jiwon Song wrote:
> Hello,
>
> I developed my own compiler using "JavaCC".
>
> I want to use this on Xtext. Please answer me how to use my own parser
> executable files on Xtext Project. :uhoh:
Previous Topic:Xtext Grammar generation
Next Topic:XText in combination wit ATL
Goto Forum:
  


Current Time: Thu Apr 18 14:55:41 GMT 2024

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

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

Back to the top