[antlr-interest] Hex or Unicode char definition?
Andreas Volz
lists at brachttal.net
Tue Sep 15 09:51:27 PDT 2009
Am Sun, 13 Sep 2009 23:38:12 +0200 schrieb Andreas Volz:
> Hello,
>
> how is it possible to define chars as hex or unicode chars. e.g.:
>
> fragment ALPHA
> : 'a'..'z' | 'A'..'Z' | '.' | ',' | ' ' | '@'
>
> I have a syntax in rfc2234[1] format and there hex chars are defined.
> How should I transfer this to ANTLR? e.g.:
>
> CHAR = %x01-7F
> ; Any C0 Controls and Basic Latin, excluding NULL from
> ; Code Charts, pages 7-6 through 7-9 in [UNICODE]
>
> regards
> Andreas
>
> [1] http://tools.ietf.org/html/rfc2234
Could nobody answer this question? I also asked myself where is defined
which chars are really between 'A'..'Z'. Does this depend on the
locale? For locale char detection I would expect a solution to define
unicode chars for a parser rule.
regards
Andreas
More information about the antlr-interest
mailing list