Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Yacc to Xtext(Conversion from Yacc to Xtext)
Yacc to Xtext [message #1818192] Tue, 10 December 2019 01:13 Go to next message
Eclipse UserFriend
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 01:31 Go to previous messageGo to next message
Eclipse UserFriend
I don't know any tool
And LL vs LALR as internals of antlr vs yacc
Nay give you some trouble
Re: Yacc to Xtext [message #1818194 is a reply to message #1818193] Tue, 10 December 2019 01:33 Go to previous messageGo to next message
Eclipse UserFriend
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 03:29 Go to previous messageGo to next message
Eclipse UserFriend
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 04:42 Go to previous messageGo to next message
Eclipse UserFriend
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 04:43 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the link Mr. Tamas Miklossy.
Re: Yacc to Xtext [message #1818210 is a reply to message #1818203] Tue, 10 December 2019 04:44 Go to previous message
Eclipse UserFriend
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: Wed Jul 16 02:41:49 EDT 2025

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

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

Back to the top