Hendrik Maryns schrieb:
> Hi all,
> 
> If one wants to specify exotic Unicode ranges, they go beyond \ufff.
> Feature request: allow longer ones, such as \u104a0 (Osmanian digit 0: 𐒠).
> This symbol is parsed unproblematically by javac , so you’ll have to
> adapt you Java parser as well, Terence!  (At least, Eclipse doesn’t
> complain, although it doesn’t render it properly.)
> 
> Probably, you want
> 
> fragment JavaIDDigit
>   : '\u0030'..'\u0039'
>   | '\u0660'..'\u0669'
>   | '\u06f0'..'\u06f9'
>   | '\u07c0'..'\u07c9'
>   | '\u0966'..'\u096f'
>   | '\u09e6'..'\u09ef'
>   | '\u0a66'..'\u0a6f'
>   | '\u0ae6'..'\u0aef'
>   | '\u0b66'..'\u0b6f'
>   | '\u0be6'..'\u0bef'
>   | '\u0c66'..'\u0c6f'
>   | '\u0ce6'..'\u0cef'
>   | '\u0d66'..'\u0d6f'
>   | '\u0e50'..'\u0e59'
>   | '\u0ed0'..'\u0ed9'
>   | '\u0f20'..'\u0f33'
>   | '\u1040'..'\u1049'
>   | '\u1369'..'\u1371'
>   | '\u17e0'..'\u17e9'
>   | '\u1810'..'\u1819'
>   | '\u1946'..'\u194f'
>   | '\u19d0'..'\u19d9'
>   | '\u1b50'..'\u1b59'
> //  | '\u104a0'..'\u104a9' osmanian, ANTLR bug!
> //  | '\u10a40'..'\u10a43'
> //  | '\u1d360'..'\u1d371'
>   ;
> 
> and I’m leaving out the mathematical digits here, didn’t test them with
> javac.  Similarly, you’ll have to expand Letter.
> 
> H.

If Java does handle characters above \uffff correctly (I've heard of
some problems) you can simulate \Uxxxxxxxx via assuming UTF-16 encoding
and explicitely parse surrogate characters. As those you are needing
seem to be on a single plane each, this should go somewhat economical.
Until Ter does finally add this feature my suggestion is probably the
only way.

Johannes
> 
> 
> ------------------------------------------------------------------------
> 
> 
> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
> 


List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to