Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Simple question about the syntax tree
Simple question about the syntax tree [message #1703115] Tue, 28 July 2015 15:29 Go to next message
Denny Xx is currently offline Denny XxFriend
Messages: 1
Registered: July 2015
Junior Member
Hi everyone!

Consider this grammar rule

TemporalUnaryExpr:
TemporalPrimaryExpr | (('G'|'F'|'O'|'H'|'Y') TemporalUnaryExpr);


(in which we call G,F,O, etc... the possible operators)

and consider for example the string:

H something

(where something is a TemporalPrimaryExpr)

Where do I find in the syntax tree the information about which operator has been applied?
Re: Simple question about the syntax tree [message #1703136 is a reply to message #1703115] Tue, 28 July 2015 19:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
You dont since you failed to assign it.

operator=('G'|'F'|'O'|'H'|'Y') expr=...


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 28 July 2015 19:44]

Report message to a moderator

Re: Simple question about the syntax tree [message #1703137 is a reply to message #1703136] Tue, 28 July 2015 19:43 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
You may read the docs on the grammar lang http://blog.efftinge.de/2010/08/parsing-expressions-with-xtext.html?m=1

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Lining up arguments vertically
Next Topic:Inferring type in variable declaration not working in interface generation
Goto Forum:
  


Current Time: Tue Mar 19 08:08:29 GMT 2024

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

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

Back to the top