Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » [xText]left-recursive
[xText]left-recursive [message #379040] Sat, 18 August 2007 12:07 Go to next message
Irina is currently offline IrinaFriend
Messages: 27
Registered: July 2009
Junior Member
Hi all,
can anybody help me please?
how can i define left-recursive rule in xText?

Stm ->
Stm "::" Stm
| Stm "||" Stm
| Stm ";" Stm
| "if" "(" Expr ")" Stm ["else" Stm]
| "{" Stm "}"
| "assert" "(" Expr ")" ";"
| Id["[" Expr "]"] "=" Expr ";"
| [^] ["this" "."] Id "(" [Expr {"," Expr}] ")" ";"
| [^] Id["[" Expr "]"] "." Id "(" [Expr {"," Expr}] ")" ";"
| ";"

Thanks in advance,
Irina
Re: [xText]left-recursive [message #379046 is a reply to message #379040] Wed, 22 August 2007 13:08 Go to previous message
Marc Habiger is currently offline Marc HabigerFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Irina!

> how can i define left-recursive rule in xText?
> [...]

You can't. You have to rewrite your rules to right-recursive ones.
Have a look (for example) at http://sui66iy.livejournal.com/173598.html

Regards,

Marc
Re: [xText]left-recursive [message #607040 is a reply to message #379040] Wed, 22 August 2007 13:08 Go to previous message
Marc Habiger is currently offline Marc HabigerFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Irina!

> how can i define left-recursive rule in xText?
> [...]

You can't. You have to rewrite your rules to right-recursive ones.
Have a look (for example) at http://sui66iy.livejournal.com/173598.html

Regards,

Marc
Previous Topic:[Epsilon] Error in Running Examples
Next Topic:[MOFScript] Problems with creating and editing a MOFSCript File
Goto Forum:
  


Current Time: Thu Apr 25 19:37:49 GMT 2024

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

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

Back to the top