Skip to main content



      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 04:03 Go to next message
Eclipse UserFriend
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 10:38 Go to previous messageGo to next message
Eclipse UserFriend
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 10:55 Go to previous message
Eclipse UserFriend
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: Sun Jul 13 09:09:00 EDT 2025

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

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

Back to the top