[antlr-interest] Free / Open JSON Grammar?

David Holroyd dave at badgers-in-foil.co.uk
Wed May 23 03:12:44 PDT 2007


On Tue, May 22, 2007 at 04:50:47PM -0700, Randall R Schulz wrote:
> I was sure this would be settled with a quick Google search, but instead 
> I've come up dry.
> 
> 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 :)

Anyway, I hope that gives you a start.


ta,
dave

-- 
http://david.holroyd.me.uk/


More information about the antlr-interest mailing list