JSure is a fast, standalone Javascript checker.
OCaml JavaScript Ruby Shell
Latest commit f7c32e2 Apr 8, 2011 Berke Durak Implement -no-color option.
Failed to load latest commit information.
misc Updated options.rb Mar 7, 2008
tests Guess what, yet another float lexeme fix. Jan 16, 2009
.hgignore Added .hgignore. Jan 13, 2008
AUTHORS Credit. Dec 13, 2007
CHANGES Implement -no-color option. Apr 8, 2011
LICENSE Initial import. Dec 12, 2007
Makefile Fix parsing issues reported by Michael Dayah. Jan 16, 2009
README Changelog, and note in readme about semicolons. Jan 16, 2009
_tags Initial import. Dec 12, 2007
ansi.ml Implement -no-color option. Apr 8, 2011
ansi.mli Implement -no-color option. Apr 8, 2011
ast.ml Now handles octal and hexadecimal integer litterals, and uses int32s. Dec 19, 2007
cache.ml Initial import. Dec 12, 2007
check.ml Warn unused, undefined variables. Mar 20, 2009
conduit.ml Initial import. Dec 12, 2007
conduit.mli Initial import. Dec 12, 2007
convert.ml Now handles octal and hexadecimal integer litterals, and uses int32s. Dec 19, 2007
ecma-262.pdf Initial import. Dec 12, 2007
ecma.peg Guess what, yet another float lexeme fix. Jan 16, 2009
ecmalexer.lex Initial import. Dec 12, 2007
ecmarex.peg Initial import. Dec 12, 2007
eval.ml Now handles octal and hexadecimal integer litterals, and uses int32s. Dec 19, 2007
excerpt.ml Implement -no-color option. Apr 8, 2011
fake_ansi.ml Implement -no-color option. Apr 8, 2011
forbidden.properties Initial import. Dec 12, 2007
generate.ml Now handles octal and hexadecimal integer litterals, and uses int32s. Dec 19, 2007
jsure.ml Implement -no-color option. Apr 8, 2011
levenshtein.ml Initial import. Dec 12, 2007
liner.ml Also display source excerpt on syntax errors. Dec 20, 2007
manual.txt Initial import. Dec 12, 2007
minefield.ml Initial import. Dec 12, 2007
myocamlbuild.ml Included README and binaries. Jan 13, 2008
opt.ml Add -undefined-variables Dec 17, 2007
pffpsf.ml Initial import. Dec 12, 2007
process.ml Implement -no-color option. Apr 8, 2011
qwerty.ml Initial import. Dec 12, 2007
source.ml Also display source excerpt on syntax errors. Dec 20, 2007
test_ecma.ml Initial import. Dec 12, 2007
version.ml Implement -no-color option. Apr 8, 2011

README

Installation instructions
=========================

* Pre-compiled binaries for Linux are available in bin/
* To compile Jsure:
  - Get, build and install Aurochs from http://aurochs.fr/
  - make
  - PREFIX=/usr/local make install

Important note
==============
I have recently discovered that the Javascript grammar allows you to omit
semicolons in most circumstances.  Actually, it is more on the order
of tolerating forgotten semicolons than "allowing" their omission, because the
parser described in the ECMA specification is supposed to backtrack and retry
when it doesn't find an expected semicolon.  Of course this (1) supposes
a particular parsing method and (2) makes the suggested parser run slowly.

Unfortunately I would need to completely rewrite my Javascript grammar
(and possibly make hacks to Aurochs) to support the omission of semicolons.

I think omitting semicolons is very bad practice.  For one thing, it
makes the source more ambiguous and harder to read.  For another thing,
it departs from common C and Java syntactic conventions.  Fortunately,
it seems that only a handful of people systematically omit semicolons.

I'm saying a handful but I have only seen one such case:  someone whose
Javascript looked like

  function GetLen_(G) { var K, L, C = ""	// Get good margin
    G.Len.value = K = L = Math.max(G.Len.value, 1)
    while (--K) C += " " ; G.Result.value = C + "|"
    return L }

I guess people who'll use Jsure are not in the business of obfuscating
their source (there are tools for that), so I'll leave semicolons mandatory.