[antlr-interest] Free / Open JSON Grammar?

Randall R Schulz rschulz at sonic.net
Wed May 23 06:47:32 PDT 2007


David,

On Wednesday 23 May 2007 03:12, David Holroyd wrote:
> On Tue, May 22, 2007 at 04:50:47PM -0700, Randall R Schulz wrote:
> > ...
> >
> > Does anyone know of or have to offer an ANTLR grammar (preferably
> > for ANTLR v3) for JSON?
> >
> > Alternatively, a JavaScript / ECMAScript grammar from which I could
> > extract the literal data decoding productions would suffice.
>
> I've got a grammar aimed at implementing ECMAScript4.
>
> See the objectLiteral rule:
> 
http://svn.badgers-in-foil.co.uk/metaas/trunk/src/main/antlr/org/asdt/core/internal/antlr/AS3.g3
>
> NB This is a grammar that I stole from another project, and I can no
> longer remember which bits I've checked against the spec, and which I
> haven't :)

That shouldn't be a big problem, since if I use it, it will be in a form 
stripped down to the point of recognizing only the JSON data exchange 
format.


> Anyway, I hope that gives you a start.

Thanks. That should do nicely.


> ta,
> dave


Randall Schulz


More information about the antlr-interest mailing list