[e-lang] TermL vs JSON: "\/"

Kevin Reid kpreid at mac.com
Thu Jan 15 08:49:38 CST 2009


On Jan 15, 2009, at 0:00, Mark Miller wrote:

> On Wed, Jan 14, 2009 at 8:06 PM, David-Sarah Hopwood
> <david.hopwood at industrial-designers.co.uk> wrote:
>> Kevin Reid wrote:
>>> Should \/ be permitted in all other BaseLexer-derived languages?
>>
>> Which languages are those exactly? It seems harmless for languages
>> where '\/' is not already defined to mean something else, which is
>> unlikely.
>
> E, Orc-in-E, and TermL. The Orc-in-E is proof of concept, and is not
> meant to rigorously conform to any Orc spec, so I think it's fine for
> now.

OK to commit a change adding \/ to BaseLexer, then?

Do you know of any JSON parsing test suite?

> But if we did want variation between languages, we could change
> BaseLexer#charConstantInternal() from private to protected and
> override it in the language-specific subclasses.

charConstantInternal has some complexity to it unrelated to escapes; I  
would suggest extracting only the body of if ('\\' == myChar).

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list