Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » [TCS] Problem with serializer
[TCS] Problem with serializer [message #381957] Tue, 22 April 2008 22:21 Go to next message
Guillaume Hillairet is currently offline Guillaume HillairetFriend
Messages: 97
Registered: July 2009
Member
Hi all,

I'm trying to finalize a TCS project but i have some problems with the
serializer.
Here is a problematic extract of an input file:

PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>

which is defined like this in my TCS:

template PrefixDecl addToContext
: "PREFIX" name <no_space> ":" iref{as = uriSymbol}
;

an uriSymbol is defined like this:

primitiveTemplate uriSymbol for String default using IRI:
value = "%token%",
serializer="'<' + %value%.toCString() + '>'";

IRI
: '<'!
(
~('>')
)+
'>'!
%v3 (setText($text.substring(1, $text.length() - 1));}
;

In fact, the injection process goes well, but when trying an extraction i
obtain this:

PREFIX vcard: "http://www.w3.org/2001/vcard-rdf/3.0#"

It seems that the serializer from the uriSymbol primitiveTemplate is not
taken in account !
How can i resolve this ?

Thanks.
Re: [TCS] Problem with serializer [message #381962 is a reply to message #381957] Tue, 29 April 2008 09:01 Go to previous messageGo to next message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi,

> It seems that the serializer from the uriSymbol primitiveTemplate is not
> taken in account !

You are correct.


> How can i resolve this ?

The best solution I can think of for the time being is to make <> parts
of the value (i.e., remove the ! after them in the lexer).
Then, you can pass an empty string as the identEsc argument to the
extractor.



Regards,

Frédéric Jouault
Re: [TCS] Problem with serializer [message #383061 is a reply to message #381962] Tue, 29 April 2008 13:44 Go to previous message
Guillaume Hillairet is currently offline Guillaume HillairetFriend
Messages: 97
Registered: July 2009
Member
Frédéric Jouault wrote:

> Hi,

> > It seems that the serializer from the uriSymbol primitiveTemplate is not
> > taken in account !

> You are correct.


> > How can i resolve this ?

> The best solution I can think of for the time being is to make <> parts
> of the value (i.e., remove the ! after them in the lexer).
> Then, you can pass an empty string as the identEsc argument to the
> extractor.



> Regards,

> Frédéric Jouault

Thanks for the tips, it works perfectly.

Regards
Guillaume
Re: [TCS] Problem with serializer [message #615791 is a reply to message #381957] Tue, 29 April 2008 09:01 Go to previous message
Frédéric Jouault is currently offline Frédéric JouaultFriend
Messages: 572
Registered: July 2009
Senior Member
Hi,

> It seems that the serializer from the uriSymbol primitiveTemplate is not
> taken in account !

You are correct.


> How can i resolve this ?

The best solution I can think of for the time being is to make <> parts
of the value (i.e., remove the ! after them in the lexer).
Then, you can pass an empty string as the identEsc argument to the
extractor.



Regards,

Frédéric Jouault
Re: [TCS] Problem with serializer [message #615800 is a reply to message #381962] Tue, 29 April 2008 13:44 Go to previous message
Guillaume Hillairet is currently offline Guillaume HillairetFriend
Messages: 97
Registered: July 2009
Member
Frédéric Jouault wrote:

> Hi,

> > It seems that the serializer from the uriSymbol primitiveTemplate is not
> > taken in account !

> You are correct.


> > How can i resolve this ?

> The best solution I can think of for the time being is to make <> parts
> of the value (i.e., remove the ! after them in the lexer).
> Then, you can pass an empty string as the identEsc argument to the
> extractor.



> Regards,

> Frédéric Jouault

Thanks for the tips, it works perfectly.

Regards
Guillaume
Previous Topic:[EVL]exists and unset references
Next Topic:[EVL] Printing collections
Goto Forum:
  


Current Time: Fri Apr 19 20:40:35 GMT 2024

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

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

Back to the top