Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

JSure is a fast, standalone Javascript checker.

branch: master

Implement -no-color option.

latest commit f7c32e2160
Berke Durak authored April 08, 2011
Octocat-spinner-32 misc Updated options.rb March 07, 2008
Octocat-spinner-32 tests Guess what, yet another float lexeme fix. January 16, 2009
Octocat-spinner-32 .hgignore Added .hgignore. January 13, 2008
Octocat-spinner-32 AUTHORS Credit. December 13, 2007
Octocat-spinner-32 CHANGES Implement -no-color option. April 08, 2011
Octocat-spinner-32 LICENSE Initial import. December 12, 2007
Octocat-spinner-32 Makefile Fix parsing issues reported by Michael Dayah. January 16, 2009
Octocat-spinner-32 README Changelog, and note in readme about semicolons. January 16, 2009
Octocat-spinner-32 _tags Initial import. December 12, 2007
Octocat-spinner-32 ansi.ml Implement -no-color option. April 08, 2011
Octocat-spinner-32 ansi.mli Implement -no-color option. April 08, 2011
Octocat-spinner-32 ast.ml Now handles octal and hexadecimal integer litterals, and uses int32s. December 19, 2007
Octocat-spinner-32 cache.ml Initial import. December 12, 2007
Octocat-spinner-32 check.ml Warn unused, undefined variables. March 20, 2009
Octocat-spinner-32 conduit.ml Initial import. December 12, 2007
Octocat-spinner-32 conduit.mli Initial import. December 12, 2007
Octocat-spinner-32 convert.ml Now handles octal and hexadecimal integer litterals, and uses int32s. December 19, 2007
Octocat-spinner-32 ecma-262.pdf Initial import. December 12, 2007
Octocat-spinner-32 ecma.peg Guess what, yet another float lexeme fix. January 16, 2009
Octocat-spinner-32 ecmalexer.lex Initial import. December 12, 2007
Octocat-spinner-32 ecmarex.peg Initial import. December 12, 2007
Octocat-spinner-32 eval.ml Now handles octal and hexadecimal integer litterals, and uses int32s. December 19, 2007
Octocat-spinner-32 excerpt.ml Implement -no-color option. April 08, 2011
Octocat-spinner-32 fake_ansi.ml Implement -no-color option. April 08, 2011
Octocat-spinner-32 forbidden.properties Initial import. December 12, 2007
Octocat-spinner-32 generate.ml Now handles octal and hexadecimal integer litterals, and uses int32s. December 19, 2007
Octocat-spinner-32 jsure.ml Implement -no-color option. April 08, 2011
Octocat-spinner-32 levenshtein.ml Initial import. December 12, 2007
Octocat-spinner-32 liner.ml Also display source excerpt on syntax errors. December 20, 2007
Octocat-spinner-32 manual.txt Initial import. December 12, 2007
Octocat-spinner-32 minefield.ml Initial import. December 12, 2007
Octocat-spinner-32 myocamlbuild.ml Included README and binaries. January 13, 2008
Octocat-spinner-32 opt.ml Add -undefined-variables December 18, 2007
Octocat-spinner-32 pffpsf.ml Initial import. December 12, 2007
Octocat-spinner-32 process.ml Implement -no-color option. April 08, 2011
Octocat-spinner-32 qwerty.ml Initial import. December 12, 2007
Octocat-spinner-32 source.ml Also display source excerpt on syntax errors. December 20, 2007
Octocat-spinner-32 test_ecma.ml Initial import. December 12, 2007
Octocat-spinner-32 version.ml Implement -no-color option. April 08, 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.
Something went wrong with that request. Please try again.