The language-javascript package

[Tags: bsd3, library]

Parses Javascript into an Abstract Syntax Tree (AST). Initially intended as frontend to hjsmin.

Note: Version 0.5.0 breaks compatibility with prior versions, the AST has been reworked to allow round trip processing of JavaScript.

[Skip to ReadMe]


Versions0.0.1, 0.0.2, 0.0.3, 0.1.0, 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.4.10, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.5.11, 0.5.12, 0.5.13,,,,,,,,,,,,,,,,,
Change logNone available
Dependenciesarray (>=0.3), base (==4.*), blaze-builder (>=0.2), bytestring (>=0.9.1), containers (>=0.2), mtl (>=1.1), text (>=1.2), utf8-string (>=0.3.7 && <2) [details]
Copyright(c) 2010-2015 Alan Zimmerman, 2015 Erik de Castro Lopo
AuthorAlan Zimmerman
MaintainerErik de Castro Lopo <>
Home page
Bug tracker
Source repositoryhead: git clone
UploadedSun Mar 27 00:58:06 UTC 2016 by ErikDeCastroLopo
DistributionsArch:, Debian:, Fedora:0.5.13, FreeBSD:, LTSHaskell:, NixOS:, Stackage:
Downloads31785 total (80 in last 30 days)
0 []
StatusDocs available [build log]
Last success reported on 2016-03-27 [all 1 reports]




Maintainers' corner

For package maintainers and hackage trustees

Readme for language-javascript-

Parser for JavaScript

Build Status

Based (loosely) on language-python

Two Versions

There are currently two versions:

How to build


cabal clean && cabal configure && cabal build


cabal clean && cabal configure -fbuildtests && cabal build

Running the tests


To debug the grammar

happy -iparse.txt -g -a  -d src/Language/JavaScript/Parser/Grammar5.y

This generates src/Language/JavaScript/Parser/Grammar5.hs, delete this when done with the debug version

UTF8/Unicode version

Alex 3.0 now supports unicode natively, and has been included as a dependency in the cabal file.

Note: The generation of the lexical analyser has been separated out, to remove the install-time dependency on Alex. If any changes need to be made to the lexer, the Lexer.x source lies in src-dev, and the script will invoke Alex with the appropriate directories.