Paper: Parsing JavaScript by counting character pairs

Sam Tobin-Hochstadt samth at ccs.neu.edu
Wed Jan 16 04:58:00 PST 2013


On Wed, Jan 16, 2013 at 4:42 AM, gaz Heyes <gazheyes at gmail.com> wrote:
>
> Parsing JavaScript by counting character pairs
> ==============================================
>
> Abstract
> --------
>
> The traditional way to parse JavaScript is using a lexer and converting
> characters to tokens first and then use those tokens to define the grammar.
> The paper describes a unique way of parsing JavaScript allowing tokenization
> on the fly and obtaining the current state by using pairs of characters and
> their positions when the last state occurred. This paper challenges the
> accepted norm of parsing and hopes to introduce new ideas and improve how
> fast JavaScript engines can execute code.

This sounds similar in the abstract to the way Lisp systems work, with
a "reader" that comes before parsing and builds a simple structure
based on (), "", and []. This has been implemented in JS by Tim Disney
for his sweet.js project [1], but I don't think they have parsing
speed in mind there.

Sam

[1] http://sweetjs.org/


More information about the es-discuss mailing list