|
|
|
|
Re: Using "weird" character literals [message #759948 is a reply to message #759910] |
Wed, 30 November 2011 16:32 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Vlad,
the grammar is persisted as XMI 1.0 for runtime purposes. However, XMI
1.0 does not allow to escape characters.
The parser should look good, though.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 30.11.11 15:45, schrieb Vlad Dumitrescu:
> Hi,
>
> Yes, I tried with \u0001 too and the result is similar.
>
> Actually, I notice that not even '\b' works. It seems that some
> generation step doesn't escape these non-printable characters correctly?
> '\u0080' works fine, for example, so it's probably only those under 0x20
> except \n \t \r.
>
> regards,
> Vlad
>
|
|
|
|
|
|
Re: Using "weird" character literals [message #805063 is a reply to message #805047] |
Thu, 23 February 2012 09:40 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
I remember we tried to set the output to XML 1.1 by default but it
caused error in other locations. So I assume it's better you better
stick to your workaround.
Am 23.02.12 10:20, schrieb Vlad Dumitrescu:
> Hi,
>
> I'll revive this question, because I still have to handle files that
> contain stray control characters and maybe others would stumble on the
> problem - and the answer is easier than I thought.
>
> Since XML 1.0 doesn't allow encoding control characters and I couldn't
> find a way to make it output XML 1.1, I realized that I can instead use
> the following whitespace definition that doesn't require entering the
> forbidden characters (since I am only concerned with ISO-8859-1 documents):
>
>
> terminal WS:
> (!('!'..'~'|'\u00a0'..'\u00ff'))+
> ;
>
>
> best regards,
> Vlad
>
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
Powered by
FUDForum. Page generated in 0.04259 seconds