Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: question on java lang spec chapter 3.3 (unicode char lexing) Date: Thu, 3 Jan 2013 21:14:27 +0000 (UTC) Organization: UK Free Software Network Lines: 27 Message-ID: References: <0f28108e-6d35-43a1-a9df-b6c5636fb0ec@googlegroups.com> <50e4d730$0$288$14726298@news.sunsite.dk> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1357247667 4445 84.45.235.129 (3 Jan 2013 21:14:27 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Thu, 3 Jan 2013 21:14:27 +0000 (UTC) User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Xref: csiph.com comp.lang.java.programmer:20929 On Wed, 02 Jan 2013 19:56:13 -0500, Arne Vajhøj wrote: > On 1/2/2013 2:17 PM, Roedy Green wrote: >> On Wed, 2 Jan 2013 00:20:12 -0800 (PST), "Aryeh M. Friedman" >> wrote, quoted or indirectly quoted someone >> who said : >> >>> (\uXXXX) >> >> The only places you encounter such escapes are in Java source and >> possibly resource bundles. > > Well - since he is writing a lexer for Java then ... > ...which, being lazy, I would not do from scratch. Instead, I'd use the Java version of the Coco/R package, which generates the lexer and parser as Java source within a framework. Unlike some similar tools, you're almost encouraged to rewrite the framework to suit your requirements. This is quite short and written in standard Java, so modifying it is very easy. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |