Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext and left recursive
Xtext and left recursive [message #981724] Mon, 12 November 2012 16:46 Go to next message
Tommaso De Sica is currently offline Tommaso De SicaFriend
Messages: 131
Registered: March 2012
Location: Italy
Senior Member

Goodevening all,
today is my first day working with Xtext. I'm trying to write a small grammar and I've got a problem with Left Recursive in one of my Rule.

I have to define ArithmeticExpression, and I use this statement:
ArithmeticExpression:
	term1=ArithmeticExpression ArithmeticOperator term2=ArithmeticExpression | Term | '(' ArithmeticExpression ')'
;


Where
Term
is final (Varible or Constant).

How can I resolve it?

Very thank you for help. Smile
Re: Xtext and left recursive [message #981726 is a reply to message #981724] Mon, 12 November 2012 16:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

did you read http://blog.efftinge.de/2010/08/parsing-expressions-with-xtext.html

Regards
Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext and left recursive [message #985455 is a reply to message #981726] Thu, 15 November 2012 12:07 Go to previous message
Tommaso De Sica is currently offline Tommaso De SicaFriend
Messages: 131
Registered: March 2012
Location: Italy
Senior Member

That's what I need!

Very thank you!
Previous Topic:XText builder run takes many minutes on eclipse start
Next Topic:Allow keywords in any order
Goto Forum:
  


Current Time: Fri Apr 19 02:13:14 GMT 2024

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

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

Back to the top