Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Serialization: how to choose which optionnal rule is used
Serialization: how to choose which optionnal rule is used [message #1781701] Mon, 12 February 2018 10:29 Go to next message
Nicolas Beaudrot is currently offline Nicolas BeaudrotFriend
Messages: 1
Registered: February 2018
Junior Member
Hello,

I have a grammar like this :

Polygon:
	'POLY:'(locations+=Location)*':'
;
SQUARE:
	'SQR:'color=INT';'lineStyle=INT';'thickness=INT(locations+=Location)*':'
;
Location: 
	(';'|':')x=INT';'y=INT
;


x is preceding by ';' or by ':' it depends on the rule.

When parsing a file with this grammar, it's ok, I have no error, but when I tried to serialize the file, it replaces ':' by ';'

For example, for this file as input :
POLY:100;200;150;250

The output will be:
POLY;100;200;150;250

How can I resolve this problem ?

Thank you in advance.

PS: I can't change the format of the input file, it's given by an other application.
Re: Serialization: how to choose which optionnal rule is used [message #1781837 is a reply to message #1781701] Tue, 13 February 2018 19:13 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12033
Registered: July 2009
Senior Member
Can you elaborate on the criteria?
When to chose which

and how do you call serialization?


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Tue, 13 February 2018 19:18]

Report message to a moderator

Previous Topic:Creating new xtext resource in quickfix
Next Topic:Clickable link in LabelProvider
Goto Forum:
  


Current Time: Wed Jun 20 21:01:36 GMT 2018

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

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

Back to the top