Skip to main content



      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 05:29 Go to next message
Eclipse UserFriend
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 14:13 Go to previous message
Eclipse UserFriend
Can you elaborate on the criteria?
When to chose which

and how do you call serialization?

[Updated on: Tue, 13 February 2018 14:18] by Moderator

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


Current Time: Tue Sep 16 21:38:18 EDT 2025

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

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

Back to the top