|
|
Re: How is XText terminals match its previous terminal? [message #1697362 is a reply to message #1697318] |
Wed, 03 June 2015 12:33 |
Jiaju Shen Messages: 5 Registered: June 2015 |
Junior Member |
|
|
I was trying to figure out if XText (or XTend if possible) supports literals matching nearest previous occurance of literals within the same class. For example in this occasion, if T3 is the closest literal of T before T4, then T4 derives in a same way as T3.
Another example is shown below
//"Text1", "Text2", "Text3" are pre-set strings, followed by a collection of strings E1, E2 and E3. E1, E2 and E3 are derived from E
//e1, e2 and e3 are strings from E1, E2 and E3, respectively.
"Text1" e1 //E1 always comes and only comes after "Text1", e1 is from a collection (enumeration) of E1
"Another Text" e' // Can we set an event handler catching e1, so that e' becomes e1?
//"Another Text" can follow after "Text1" "Text2" and "Text3"
In the example I showed above, E' (where e' derives from) can be E1, E2 and E3 but only one at one point, depending on which occurred from E is closest before the E'.
[Updated on: Wed, 03 June 2015 12:36] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02853 seconds