[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LPEG code for JavaScript grammar?
- From: David Given <dg@...>
- Date: Fri, 04 Apr 2008 00:55:33 +0100
Duck wrote:
> I suppose I mean "a grammar for the language specified in
> ECMA-262 ECMAScript Language Specification 3rd edition" :-)
>
> A big ask, I know, but...does LPEG code for this exist? If not, does
> anyone have a PEG grammar in some textual form which might be converted
> fairly simply into an LPEG-based equivalent?
[...]
IIRC Javascript has some rather peculiar rules when it comes to
replacing missing semicolons that may make it hard to parse. Certainly,
a while back I tried putting together a yacc grammar for it and
basically ended up having to give up.
If anyone had an LPEG grammar, though, I'd love to use it...
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
Attachment:
signature.asc
Description: OpenPGP digital signature