Archive

Posts Tagged ‘parsing’

jParser and jTokenizer released

November 14th, 2009 12 comments

After nearly two years I’ve finally gotten around to releasing my PHP JavaScript parser, although documentation is still thin on the ground.

The library has been split in two:

  1. jTokenizer – A JavaScript tokenizer designed to mimic the PHP tokenizer.
  2. jParser - The fully blown JavaScript syntactical parser which generates a parse tree.

Read more…

jParser grammar

February 26th, 2009 No comments

I’ve been asked how I generate the JavaScript parse table for jParser, so I’m posting the grammar file here for anyone else who’s interested.

↓ JavaScript grammar file for jParser

Read more…

JavaScript Obfuscator and Minifier

June 14th, 2008 2 comments

This tool is based on a full JavaScript parser that is part of a much bigger plan. I won’t go into that just yet, but along the way I’m going to be releasing useful tools like this as they come about. It’s useful to have some short term goals to keep up morale and ensure that the framework is working well.

> Try it here: Obfuscate and minify your JavaScript code

Read more…

JParser now with Unicode support

June 8th, 2008 No comments

I’ve updated my JavaScript parser to include full Unicode support.
Check out the test interfaces for:
» Full parser;
» Code highlighting.

Read more…

JavaScript Syntax Nuances

June 7th, 2008 No comments

If you learn a programming language it is unlikely that you will read the formal language specification that defines all the laws of the syntax. You may never read it at all. It is more useful to learn by example, or at least topic-by-topic. However, a mere ten years after writing my first few lines of JavaScript, I read the ECMAScript standard and it threw up some things I did not know.

There are many things that you can write in JavaScript that are perfectly valid syntax, but that you probably never will write. Here are a few that raised an eyebrow or two.

Read more…