Johannes Luber schreef: > 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.
Thanks, I will simply ignore them and wait for the fix. In practice, these symbols will probably not occur anyway. H. -- Hendrik Maryns http://tcl.sfs.uni-tuebingen.de/~hendrik/ ================== Ask smart questions, get good answers: http://www.catb.org/~esr/faqs/smart-questions.html
signature.asc
Description: OpenPGP digital signature
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
