Tom Copeland's Recent Posts

RSS Feeds

« Nicer CPD report screenshots | Main | NullPointerException waiting to happen »

A new JavaCC grammar for EcmaScript

It looks like the Dojo folks (actually, some AOL people) have put together a new JavaCC grammar for EcmaScript; there's a blog entry, the grammar itself, and I generated a nicely linked HTML view of the grammar thanks to JavaCC's pretty-printer, JJDoc.  It's a pretty hefty grammar with a bunch of productions, and it looks like they did a nice job using the JJTree node descriptors to suppress unnecessary nodes - see CaseClause for an example of that. 

Since I've been working on a JavaCC book I've been trying to track new grammars; seems like they're starting to pop up a bit more often nowadays.  It'd be nice to have a JavaCC grammar for all the languages on the Fistful of Languages blog; someday maybe!

Incidentally, I wonder how hard it'd be to extend JJDoc to display the token definitions somehow?  Seems like that'd be handy information to have in that HTML page.  And sometime I'd like to add a new JJDoc option to let it use a stylesheet; that would be a pretty simple change but could allow the HTML to be much more concise and probably look nicer too.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451d3c069e200e550765afa8833

Listed below are links to weblogs that reference A new JavaCC grammar for EcmaScript:

Comments

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.