Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » syntactic predicates mapping from ANTLR to XTEXT
syntactic predicates mapping from ANTLR to XTEXT [message #1608110] Mon, 09 February 2015 09:27 Go to next message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
Hello all,

I am trying to use syntactic predicates in Xtext and I am using ANTLR WORKS to help me visualize my rules diagrams. I want to know how can I make this syntactic predicate using Xtext

(rule_name ':') => rule_label

Thanks,
Re: syntactic predicates mapping from ANTLR to XTEXT [message #1608228 is a reply to message #1608110] Mon, 09 February 2015 11:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

did you have a look at the section "Syntactic Predicates" in the xtext docs? it should be pretty the same


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: syntactic predicates mapping from ANTLR to XTEXT [message #1608239 is a reply to message #1608228] Mon, 09 February 2015 11:20 Go to previous messageGo to next message
Eleanor Richie is currently offline Eleanor RichieFriend
Messages: 125
Registered: August 2014
Senior Member
Yes I surely did,
I know how to add syntactic predicate for some rules all together , but the one I mentioned is different, I want it to be as if I am saying when u find rule_name followed by a ':' go to rule_label
This is different from the normal syntactic predicates for rules
Re: syntactic predicates mapping from ANTLR to XTEXT [message #1608279 is a reply to message #1608239] Mon, 09 February 2015 11:58 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i dont know of that concept in xtext but you may have a look at assigned actions


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Section "7 Languages For The JVM" ist lost
Next Topic:Problem with quoted string that should be split
Goto Forum:
  


Current Time: Fri Apr 26 15:02:20 GMT 2024

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

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

Back to the top