Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Yacc to Xtext(Conversion from Yacc to Xtext)
Yacc to Xtext [message #1818192] Tue, 10 December 2019 06:13 Go to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 130
Registered: June 2014
Senior Member
Hi,

I have a Yacc file, where grammar rules are written.
I want to create a Xtext file with similar rules.
Is there any conversion tool / Script available ? I want to reduce the manual effort writing rules again in Xtext format.

Please guide me.

Thanks and regards,
Virag
Re: Yacc to Xtext [message #1818193 is a reply to message #1818192] Tue, 10 December 2019 06:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13643
Registered: July 2009
Senior Member
I don't know any tool
And LL vs LALR as internals of antlr vs yacc
Nay give you some trouble


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Yacc to Xtext [message #1818194 is a reply to message #1818193] Tue, 10 December 2019 06:33 Go to previous messageGo to next message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 114
Registered: February 2016
Senior Member
See also previous discussion in https://www.eclipse.org/forums/index.php/t/1068674/
Re: Yacc to Xtext [message #1818203 is a reply to message #1818194] Tue, 10 December 2019 08:29 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6880
Registered: July 2009
Senior Member
Hi

Xtext is much much more than yacc [1]. The ability to integrate with an EMF model and so autogenerate an editor is very very powerful. Unless you have a 100 yacc grammars to migrate to Xtext and so can justify the effort of developing an analyzer for yacc actions, I recommend just cutting and pasting, probably starting with the smallest subset of the grammar that can be useful to gain confidence before expanding to more and more and rewriting the left recursions as * repeats.

Regards

Ed Willink

[1] Although for grammar checking I prefer 'yacc' or rather LPG and sometimes use GIT\org.eclipse.ocl\examples\org.eclipse.ocl.examples.xtext2lpg to check my Xtext grammars.
Re: Yacc to Xtext [message #1818208 is a reply to message #1818193] Tue, 10 December 2019 09:42 Go to previous messageGo to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 130
Registered: June 2014
Senior Member
Thanks. Mr. Christian Dietrich.
I will try to do this manually.
Re: Yacc to Xtext [message #1818209 is a reply to message #1818194] Tue, 10 December 2019 09:43 Go to previous messageGo to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 130
Registered: June 2014
Senior Member
Thanks for the link Mr. Tamas Miklossy.
Re: Yacc to Xtext [message #1818210 is a reply to message #1818203] Tue, 10 December 2019 09:44 Go to previous message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 130
Registered: June 2014
Senior Member
Thanks for the pointer Mr. Ed Willink.
I will try to migrate manually.
I will ask in forum, if I face any issues.
Previous Topic:Can we support both an LS and Eclipse Workbench at the same time?
Next Topic:MWE2 code generation is different between Eclipse/Maven
Goto Forum:
  


Current Time: Fri Oct 30 13:38:14 GMT 2020

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

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

Back to the top