snowball 0.1.21 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +1 -3
- data/{lib/snowball → bin}/roll.js +0 -0
- data/lib/snowball/roller.rb +1 -1
- data/lib/snowball/version.rb +1 -1
- data/node_modules/.bin/browserify +161 -0
- data/node_modules/.bin/cake +7 -0
- data/node_modules/.bin/coffee +7 -0
- data/node_modules/.bin/jade +168 -0
- data/node_modules/browserify/.travis.yml +4 -0
- data/node_modules/browserify/LICENSE +63 -0
- data/node_modules/browserify/README.markdown +172 -0
- data/node_modules/browserify/bin/cmd.js +161 -0
- data/node_modules/browserify/builtins/__browserify_process.js +55 -0
- data/node_modules/browserify/builtins/assert.js +314 -0
- data/node_modules/browserify/builtins/child_process.js +2 -0
- data/node_modules/browserify/builtins/events.js +178 -0
- data/node_modules/browserify/builtins/fs.js +1 -0
- data/node_modules/browserify/builtins/https.js +1 -0
- data/node_modules/browserify/builtins/net.js +1 -0
- data/node_modules/browserify/builtins/path.js +175 -0
- data/node_modules/browserify/builtins/querystring.js +250 -0
- data/node_modules/browserify/builtins/stream.js +119 -0
- data/node_modules/browserify/builtins/string_decoder.js +161 -0
- data/node_modules/browserify/builtins/sys.js +1 -0
- data/node_modules/browserify/builtins/timers.js +39 -0
- data/node_modules/browserify/builtins/tls.js +1 -0
- data/node_modules/browserify/builtins/tty.js +2 -0
- data/node_modules/browserify/builtins/url.js +604 -0
- data/node_modules/browserify/builtins/util.js +351 -0
- data/node_modules/browserify/example/debug/browserify.js +219 -0
- data/node_modules/browserify/example/debug/build.sh +3 -0
- data/node_modules/browserify/example/debug/index.html +7 -0
- data/node_modules/browserify/example/debug/js/entry.js +2 -0
- data/node_modules/browserify/example/debug/js/thrower.js +3 -0
- data/node_modules/browserify/example/debug/server.js +9 -0
- data/node_modules/browserify/example/simple-build/browserify.js +368 -0
- data/node_modules/browserify/example/simple-build/build.sh +3 -0
- data/node_modules/browserify/example/simple-build/index.html +9 -0
- data/node_modules/browserify/example/simple-build/js/bar.js +3 -0
- data/node_modules/browserify/example/simple-build/js/entry.js +5 -0
- data/node_modules/browserify/example/simple-build/js/foo.js +5 -0
- data/node_modules/browserify/example/simple-build/server.js +9 -0
- data/node_modules/browserify/example/test/b.js +5 -0
- data/node_modules/browserify/example/test/bar.js +3 -0
- data/node_modules/browserify/example/test/foo.js +3 -0
- data/node_modules/browserify/example/test/m.js +3 -0
- data/node_modules/browserify/example/test/n.js +3 -0
- data/node_modules/browserify/example/using-http/bundle.js +813 -0
- data/node_modules/browserify/example/using-http/entry.js +25 -0
- data/node_modules/browserify/example/using-http/index.html +9 -0
- data/node_modules/browserify/example/using-http/server.js +28 -0
- data/node_modules/browserify/index.js +202 -0
- data/node_modules/browserify/lib/watch.js +75 -0
- data/node_modules/browserify/lib/wrap.js +580 -0
- data/node_modules/browserify/lib/wrappers.js +10 -0
- data/node_modules/browserify/node_modules/buffer-browserify/.npmignore +1 -0
- data/node_modules/browserify/node_modules/buffer-browserify/README.md +11 -0
- data/node_modules/browserify/node_modules/buffer-browserify/buffer_ieee754.js +84 -0
- data/node_modules/browserify/node_modules/buffer-browserify/index.js +1317 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/README.md +14 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/lib/b64.js +84 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/package.json +30 -0
- data/node_modules/browserify/node_modules/buffer-browserify/node_modules/base64-js/test/runner.js +50 -0
- data/node_modules/browserify/node_modules/buffer-browserify/package.json +46 -0
- data/node_modules/browserify/node_modules/buffer-browserify/test/buffer.js +218 -0
- data/node_modules/browserify/node_modules/commondir/README.markdown +45 -0
- data/node_modules/browserify/node_modules/commondir/example/base.js +3 -0
- data/node_modules/browserify/node_modules/commondir/example/dir.js +3 -0
- data/node_modules/browserify/node_modules/commondir/index.js +29 -0
- data/node_modules/browserify/node_modules/commondir/package.json +47 -0
- data/node_modules/browserify/node_modules/commondir/test/dirs.js +66 -0
- data/node_modules/browserify/node_modules/crypto-browserify/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/bundle.js +637 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/index.html +12 -0
- data/node_modules/browserify/node_modules/crypto-browserify/example/test.js +4 -0
- data/node_modules/browserify/node_modules/crypto-browserify/index.js +74 -0
- data/node_modules/browserify/node_modules/crypto-browserify/md5.js +384 -0
- data/node_modules/browserify/node_modules/crypto-browserify/package.json +33 -0
- data/node_modules/browserify/node_modules/crypto-browserify/readme.markdown +20 -0
- data/node_modules/browserify/node_modules/crypto-browserify/rng.js +37 -0
- data/node_modules/browserify/node_modules/crypto-browserify/sha.js +210 -0
- data/node_modules/browserify/node_modules/crypto-browserify/test/simple.js +35 -0
- data/node_modules/browserify/node_modules/deputy/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/deputy/README.markdown +55 -0
- data/node_modules/browserify/node_modules/deputy/example/cache.js +5 -0
- data/node_modules/browserify/node_modules/deputy/index.js +46 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.npmignore +2 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/examples/pow.js +6 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/index.js +82 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/package.json +34 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/readme.markdown +63 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/chmod.js +38 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/clobber.js +37 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/race.js +41 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/rel.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return.js +25 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/return_sync.js +24 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/root.js +18 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/sync.js +32 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask.js +28 -0
- data/node_modules/browserify/node_modules/deputy/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/node_modules/browserify/node_modules/deputy/package.json +47 -0
- data/node_modules/browserify/node_modules/deputy/test/cache.js +58 -0
- data/node_modules/browserify/node_modules/detective/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/detective/README.markdown +66 -0
- data/node_modules/browserify/node_modules/detective/example/strings.js +6 -0
- data/node_modules/browserify/node_modules/detective/example/strings_src.js +3 -0
- data/node_modules/browserify/node_modules/detective/index.js +60 -0
- data/node_modules/browserify/node_modules/detective/node_modules/.bin/esparse +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/LICENSE.BSD +19 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/README.md +74 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/json2.js +487 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/style.css +164 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/bin/esparse.js +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/changes +92 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/cm +696 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/checkenv.js +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.html +82 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/collector.js +170 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.html +106 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/functiontrace.js +123 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.css +82 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/parse.html +352 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/precedence.html +225 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.html +120 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/demo/rewrite.js +71 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/esprima.js +3577 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/index.html +103 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/package.json +42 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.html +58 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/benchmarks.js +328 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.html +140 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compare.js +270 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.html +40 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/compat.js +239 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.footer.html +3 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.header.html +37 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/coverage.html +3617 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/index.html +36 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/reflect.js +403 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/run.js +66 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/test.js +16659 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/node_modules/browserify/node_modules/detective/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/node_modules/browserify/node_modules/detective/package.json +47 -0
- data/node_modules/browserify/node_modules/detective/test/both.js +11 -0
- data/node_modules/browserify/node_modules/detective/test/chained.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/files/both.js +4 -0
- data/node_modules/browserify/node_modules/detective/test/files/chained.js +5 -0
- data/node_modules/browserify/node_modules/detective/test/files/nested.js +22 -0
- data/node_modules/browserify/node_modules/detective/test/files/skip.js +7 -0
- data/node_modules/browserify/node_modules/detective/test/files/strings.js +13 -0
- data/node_modules/browserify/node_modules/detective/test/files/word.js +13 -0
- data/node_modules/browserify/node_modules/detective/test/nested.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/skip.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/strings.js +9 -0
- data/node_modules/browserify/node_modules/detective/test/word.js +12 -0
- data/node_modules/browserify/node_modules/http-browserify/.npmignore +1 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/main.js +14 -0
- data/node_modules/browserify/node_modules/http-browserify/example/get/server.js +12 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/main.js +18 -0
- data/node_modules/browserify/node_modules/http-browserify/example/headers/server.js +15 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/data.json +139 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/main.js +13 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.npmignore +2 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 +15 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT +24 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js +13 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js +189 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE +24 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown +11 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js +26 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js +30 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js +379 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json +36 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json +167 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json +180 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js +54 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js +38 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json +40 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown +145 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js +22 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js +44 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json +4030 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js +39 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js +69 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js +42 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js +35 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js +28 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js +47 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js +35 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js +29 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js +41 -0
- data/node_modules/browserify/node_modules/http-browserify/example/json-stream/server.js +10 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/main.js +16 -0
- data/node_modules/browserify/node_modules/http-browserify/example/post/server.js +19 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/index.html +9 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/main.js +16 -0
- data/node_modules/browserify/node_modules/http-browserify/example/streaming/server.js +21 -0
- data/node_modules/browserify/node_modules/http-browserify/index.js +59 -0
- data/node_modules/browserify/node_modules/http-browserify/lib/request.js +128 -0
- data/node_modules/browserify/node_modules/http-browserify/lib/response.js +119 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/index.js +48 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/package.json +30 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/readme.md +31 -0
- data/node_modules/browserify/node_modules/http-browserify/node_modules/concat-stream/test.js +34 -0
- data/node_modules/browserify/node_modules/http-browserify/package.json +46 -0
- data/node_modules/browserify/node_modules/http-browserify/readme.markdown +128 -0
- data/node_modules/browserify/node_modules/nub/README.markdown +23 -0
- data/node_modules/browserify/node_modules/nub/index.js +64 -0
- data/node_modules/browserify/node_modules/nub/package.json +46 -0
- data/node_modules/browserify/node_modules/nub/test/by.js +51 -0
- data/node_modules/browserify/node_modules/nub/test/nub.js +46 -0
- data/node_modules/browserify/node_modules/resolve/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/resolve/LICENSE +18 -0
- data/node_modules/browserify/node_modules/resolve/README.markdown +47 -0
- data/node_modules/browserify/node_modules/resolve/index.js +106 -0
- data/node_modules/browserify/node_modules/resolve/package.json +45 -0
- data/node_modules/browserify/node_modules/resolve/test/core.js +12 -0
- data/node_modules/browserify/node_modules/resolve/test/filter.js +15 -0
- data/node_modules/browserify/node_modules/resolve/test/mock.js +64 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver.js +157 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/foo.js +1 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/mug.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/node_modules/browserify/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/node_modules/browserify/node_modules/syntax-error/.travis.yml +4 -0
- data/node_modules/browserify/node_modules/syntax-error/LICENSE +18 -0
- data/node_modules/browserify/node_modules/syntax-error/example/check.js +12 -0
- data/node_modules/browserify/node_modules/syntax-error/example/src.js +9 -0
- data/node_modules/browserify/node_modules/syntax-error/index.js +54 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/.bin/esparse +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/.travis.yml +5 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/LICENSE.BSD +19 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/README.md +74 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.css +112 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/codemirror.js +2972 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/codemirror/javascript.js +360 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/json2.js +487 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/style.css +164 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-min.js +12 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview-sprite.gif +0 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/treeview.css +7 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/assets/yui/yahoo-dom-event.js +14 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/bin/esparse.js +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/changes +92 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/cm +696 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/checkenv.js +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.html +82 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/collector.js +170 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.html +106 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/functiontrace.js +123 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.css +82 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/parse.html +352 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/precedence.html +225 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.html +120 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/demo/rewrite.js +71 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/esprima.js +3577 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/index.html +103 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/package.json +42 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/Tokenizer.js +646 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/XMLHttpRequest.js +509 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ZeParser.js +2185 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/backbone-0.5.3.js +1158 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/benchmark.js +3261 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/escodegen.js +906 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/esmorph.js +240 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.0.0.js +6579 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/ext-core-3.1.0.js +10255 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.6.4.js +9046 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery-1.7.1.js +9266 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jquery.mobile-1.0.js +6951 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsdefs.js +731 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jslex.js +588 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/jsparse.js +1921 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.3.2.js +5952 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/mootools-1.4.1.js +6297 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/parse-js.js +1342 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/platform.js +878 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.6.1.js +4874 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/prototype-1.7.0.0.js +6082 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/3rdparty/underscore-1.2.3.js +981 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.html +58 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/benchmarks.js +328 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.html +140 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compare.js +270 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.html +40 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/compat.js +239 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.footer.html +3 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.header.html +37 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/coverage.html +3617 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/index.html +36 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/reflect.js +403 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/run.js +66 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/test/test.js +16659 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/generate-unicode-regex.py +164 -0
- data/node_modules/browserify/node_modules/syntax-error/node_modules/esprima/tools/update-coverage.sh +28 -0
- data/node_modules/browserify/node_modules/syntax-error/package.json +49 -0
- data/node_modules/browserify/node_modules/syntax-error/readme.markdown +87 -0
- data/node_modules/browserify/node_modules/syntax-error/test/check.js +17 -0
- data/node_modules/browserify/node_modules/syntax-error/test/sources/check.js +9 -0
- data/node_modules/browserify/node_modules/vm-browserify/README.markdown +103 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/bundle.js +473 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/entry.js +6 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/index.html +9 -0
- data/node_modules/browserify/node_modules/vm-browserify/example/run/server.js +6 -0
- data/node_modules/browserify/node_modules/vm-browserify/index.js +85 -0
- data/node_modules/browserify/node_modules/vm-browserify/package.json +43 -0
- data/node_modules/browserify/node_modules/vm-browserify/testling/run.js +22 -0
- data/node_modules/browserify/node_modules/vm-browserify/testling/test.sh +11 -0
- data/node_modules/browserify/package.json +78 -0
- data/node_modules/browserify/test/alias.js +58 -0
- data/node_modules/browserify/test/backbone.js +21 -0
- data/node_modules/browserify/test/bin.js +39 -0
- data/node_modules/browserify/test/buffer.js +99 -0
- data/node_modules/browserify/test/bundle.js +32 -0
- data/node_modules/browserify/test/cache.js +28 -0
- data/node_modules/browserify/test/coffee.js +39 -0
- data/node_modules/browserify/test/coffee/bar.js +1 -0
- data/node_modules/browserify/test/coffee/baz.coffee +1 -0
- data/node_modules/browserify/test/coffee/entry.coffee +1 -0
- data/node_modules/browserify/test/coffee/foo.coffee +1 -0
- data/node_modules/browserify/test/coffee/index.coffee +5 -0
- data/node_modules/browserify/test/coffee/nested/nested.coffee +2 -0
- data/node_modules/browserify/test/comment.js +17 -0
- data/node_modules/browserify/test/comment/main.js +2 -0
- data/node_modules/browserify/test/crypto.js +37 -0
- data/node_modules/browserify/test/dnode.js +27 -0
- data/node_modules/browserify/test/dollar.js +19 -0
- data/node_modules/browserify/test/dollar/dollar/index.js +7 -0
- data/node_modules/browserify/test/entry.js +36 -0
- data/node_modules/browserify/test/entry/main.js +1 -0
- data/node_modules/browserify/test/entry/one.js +1 -0
- data/node_modules/browserify/test/entry/two.js +1 -0
- data/node_modules/browserify/test/error_code.js +24 -0
- data/node_modules/browserify/test/error_code/src.js +2 -0
- data/node_modules/browserify/test/export.js +52 -0
- data/node_modules/browserify/test/export/entry.js +1 -0
- data/node_modules/browserify/test/field.js +64 -0
- data/node_modules/browserify/test/field/miss.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-miss/package.json +4 -0
- data/node_modules/browserify/test/field/node_modules/z-object/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-object/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-object/package.json +6 -0
- data/node_modules/browserify/test/field/node_modules/z-string/browser.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-string/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-string/package.json +4 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/browser/a.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/browser/b.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/main.js +1 -0
- data/node_modules/browserify/test/field/node_modules/z-sub/package.json +4 -0
- data/node_modules/browserify/test/field/object.js +1 -0
- data/node_modules/browserify/test/field/string.js +1 -0
- data/node_modules/browserify/test/field/sub.js +1 -0
- data/node_modules/browserify/test/global.js +19 -0
- data/node_modules/browserify/test/global/main.js +2 -0
- data/node_modules/browserify/test/jade.js +35 -0
- data/node_modules/browserify/test/json.js +17 -0
- data/node_modules/browserify/test/json/beep.json +4 -0
- data/node_modules/browserify/test/json/main.js +1 -0
- data/node_modules/browserify/test/maxlisteners.js +8 -0
- data/node_modules/browserify/test/module.js +22 -0
- data/node_modules/browserify/test/multi_entry.js +20 -0
- data/node_modules/browserify/test/multi_entry/a.js +2 -0
- data/node_modules/browserify/test/multi_entry/b.js +2 -0
- data/node_modules/browserify/test/multi_entry/c.js +3 -0
- data/node_modules/browserify/test/multi_ignore.js +23 -0
- data/node_modules/browserify/test/node_modules/beep/index.js +1 -0
- data/node_modules/browserify/test/require_cache.js +18 -0
- data/node_modules/browserify/test/retarget.js +27 -0
- data/node_modules/browserify/test/seq.js +47 -0
- data/node_modules/browserify/test/subdep.js +26 -0
- data/node_modules/browserify/test/subdep/index.js +1 -0
- data/node_modules/browserify/test/subdep/package.json +6 -0
- data/node_modules/browserify/test/util.js +48 -0
- data/node_modules/browserify/test/watch.js +91 -0
- data/node_modules/browserify/test/watch/a.js +1 -0
- data/node_modules/browserify/test/wrap.js +43 -0
- data/node_modules/browserify/test/wrap/a.js +2 -0
- data/node_modules/browserify/test/wrap/c.js +1 -0
- data/node_modules/browserify/test/wrap/node_modules/b/main.js +1 -0
- data/node_modules/browserify/test/wrap/node_modules/b/package.json +3 -0
- data/node_modules/browserify/test/wrap/node_modules/skipmetoo/index.js +1 -0
- data/node_modules/browserify/test/wrap/skipme.js +1 -0
- data/node_modules/browserify/test/wrap/x.js +0 -0
- data/node_modules/browserify/testling/README.markdown +29 -0
- data/node_modules/browserify/testling/test.sh +37 -0
- data/node_modules/browserify/testling/tick.js +9 -0
- data/node_modules/browserify/testling/timers.js +50 -0
- data/node_modules/browserify/testling/util.js +24 -0
- data/node_modules/browserify/v2.markdown +41 -0
- data/node_modules/browserify/wrappers/alias.js +1 -0
- data/node_modules/browserify/wrappers/body.js +2 -0
- data/node_modules/browserify/wrappers/body_debug.js +2 -0
- data/node_modules/browserify/wrappers/entry.js +3 -0
- data/node_modules/browserify/wrappers/entry_debug.js +3 -0
- data/node_modules/browserify/wrappers/package.js +3 -0
- data/node_modules/browserify/wrappers/prelude.js +196 -0
- data/node_modules/coffee-script/.npmignore +11 -0
- data/node_modules/coffee-script/CNAME +1 -0
- data/node_modules/coffee-script/CONTRIBUTING.md +9 -0
- data/node_modules/coffee-script/LICENSE +22 -0
- data/node_modules/coffee-script/README +51 -0
- data/node_modules/coffee-script/Rakefile +78 -0
- data/node_modules/coffee-script/bin/cake +7 -0
- data/node_modules/coffee-script/bin/coffee +7 -0
- data/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/node_modules/coffee-script/lib/coffee-script/cake.js +113 -0
- data/node_modules/coffee-script/lib/coffee-script/coffee-script.js +171 -0
- data/node_modules/coffee-script/lib/coffee-script/command.js +502 -0
- data/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/node_modules/coffee-script/lib/coffee-script/helpers.js +88 -0
- data/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/node_modules/coffee-script/lib/coffee-script/nodes.js +2971 -0
- data/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/node_modules/coffee-script/lib/coffee-script/repl.js +276 -0
- data/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/node_modules/coffee-script/package.json +50 -0
- data/node_modules/jade-runtime/.npmignore +15 -0
- data/node_modules/jade-runtime/README.md +8 -0
- data/node_modules/jade-runtime/globals.js +32 -0
- data/node_modules/jade-runtime/index.js +2 -0
- data/node_modules/jade-runtime/jade-runtime.js +181 -0
- data/node_modules/jade-runtime/package.json +18 -0
- data/node_modules/jade/.npmignore +14 -0
- data/node_modules/jade/LICENSE +22 -0
- data/node_modules/jade/Readme.md +1299 -0
- data/node_modules/jade/bin/jade +168 -0
- data/node_modules/jade/index.js +4 -0
- data/node_modules/jade/jade.js +3586 -0
- data/node_modules/jade/jade.md +510 -0
- data/node_modules/jade/jade.min.js +2 -0
- data/node_modules/jade/lib/compiler.js +654 -0
- data/node_modules/jade/lib/doctypes.js +18 -0
- data/node_modules/jade/lib/filters.js +97 -0
- data/node_modules/jade/lib/inline-tags.js +28 -0
- data/node_modules/jade/lib/jade.js +253 -0
- data/node_modules/jade/lib/lexer.js +774 -0
- data/node_modules/jade/lib/nodes/attrs.js +77 -0
- data/node_modules/jade/lib/nodes/block-comment.js +33 -0
- data/node_modules/jade/lib/nodes/block.js +122 -0
- data/node_modules/jade/lib/nodes/case.js +43 -0
- data/node_modules/jade/lib/nodes/code.js +35 -0
- data/node_modules/jade/lib/nodes/comment.js +32 -0
- data/node_modules/jade/lib/nodes/doctype.js +29 -0
- data/node_modules/jade/lib/nodes/each.js +35 -0
- data/node_modules/jade/lib/nodes/filter.js +35 -0
- data/node_modules/jade/lib/nodes/index.js +20 -0
- data/node_modules/jade/lib/nodes/literal.js +32 -0
- data/node_modules/jade/lib/nodes/mixin.js +36 -0
- data/node_modules/jade/lib/nodes/node.js +25 -0
- data/node_modules/jade/lib/nodes/tag.js +95 -0
- data/node_modules/jade/lib/nodes/text.js +36 -0
- data/node_modules/jade/lib/parser.js +714 -0
- data/node_modules/jade/lib/runtime.js +174 -0
- data/node_modules/jade/lib/self-closing.js +19 -0
- data/node_modules/jade/lib/utils.js +49 -0
- data/node_modules/jade/node_modules/commander/.npmignore +4 -0
- data/node_modules/jade/node_modules/commander/.travis.yml +4 -0
- data/node_modules/jade/node_modules/commander/History.md +107 -0
- data/node_modules/jade/node_modules/commander/Makefile +7 -0
- data/node_modules/jade/node_modules/commander/Readme.md +262 -0
- data/node_modules/jade/node_modules/commander/index.js +2 -0
- data/node_modules/jade/node_modules/commander/lib/commander.js +1026 -0
- data/node_modules/jade/node_modules/commander/package.json +39 -0
- data/node_modules/jade/node_modules/mkdirp/.npmignore +2 -0
- data/node_modules/jade/node_modules/mkdirp/.travis.yml +4 -0
- data/node_modules/jade/node_modules/mkdirp/LICENSE +21 -0
- data/node_modules/jade/node_modules/mkdirp/README.markdown +61 -0
- data/node_modules/jade/node_modules/mkdirp/examples/pow.js +6 -0
- data/node_modules/jade/node_modules/mkdirp/index.js +82 -0
- data/node_modules/jade/node_modules/mkdirp/package.json +37 -0
- data/node_modules/jade/node_modules/mkdirp/test/chmod.js +38 -0
- data/node_modules/jade/node_modules/mkdirp/test/clobber.js +37 -0
- data/node_modules/jade/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/node_modules/jade/node_modules/mkdirp/test/perm.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/node_modules/jade/node_modules/mkdirp/test/race.js +41 -0
- data/node_modules/jade/node_modules/mkdirp/test/rel.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/return.js +25 -0
- data/node_modules/jade/node_modules/mkdirp/test/return_sync.js +24 -0
- data/node_modules/jade/node_modules/mkdirp/test/root.js +18 -0
- data/node_modules/jade/node_modules/mkdirp/test/sync.js +32 -0
- data/node_modules/jade/node_modules/mkdirp/test/umask.js +28 -0
- data/node_modules/jade/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/node_modules/jade/package.json +53 -0
- data/node_modules/jade/runtime.js +179 -0
- data/node_modules/jade/runtime.min.js +1 -0
- data/node_modules/jade/test.jade +7 -0
- data/node_modules/jade/testing/head.jade +5 -0
- data/node_modules/jade/testing/index.jade +1 -0
- data/node_modules/jade/testing/index.js +14 -0
- data/node_modules/jade/testing/layout.jade +10 -0
- data/node_modules/jade/testing/user.jade +7 -0
- data/node_modules/jade/testing/user.js +27 -0
- data/node_modules/optimist/.travis.yml +4 -0
- data/node_modules/optimist/LICENSE +21 -0
- data/node_modules/optimist/README.markdown +487 -0
- data/node_modules/optimist/example/bool.js +10 -0
- data/node_modules/optimist/example/boolean_double.js +7 -0
- data/node_modules/optimist/example/boolean_single.js +7 -0
- data/node_modules/optimist/example/default_hash.js +8 -0
- data/node_modules/optimist/example/default_singles.js +7 -0
- data/node_modules/optimist/example/divide.js +8 -0
- data/node_modules/optimist/example/line_count.js +20 -0
- data/node_modules/optimist/example/line_count_options.js +29 -0
- data/node_modules/optimist/example/line_count_wrap.js +29 -0
- data/node_modules/optimist/example/nonopt.js +4 -0
- data/node_modules/optimist/example/reflect.js +2 -0
- data/node_modules/optimist/example/short.js +3 -0
- data/node_modules/optimist/example/string.js +11 -0
- data/node_modules/optimist/example/usage-options.js +19 -0
- data/node_modules/optimist/example/xup.js +10 -0
- data/node_modules/optimist/index.js +475 -0
- data/node_modules/optimist/node_modules/wordwrap/.npmignore +1 -0
- data/node_modules/optimist/node_modules/wordwrap/README.markdown +70 -0
- data/node_modules/optimist/node_modules/wordwrap/example/center.js +10 -0
- data/node_modules/optimist/node_modules/wordwrap/example/meat.js +3 -0
- data/node_modules/optimist/node_modules/wordwrap/index.js +76 -0
- data/node_modules/optimist/node_modules/wordwrap/package.json +45 -0
- data/node_modules/optimist/node_modules/wordwrap/test/break.js +30 -0
- data/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +63 -0
- data/node_modules/optimist/node_modules/wordwrap/test/wrap.js +31 -0
- data/node_modules/optimist/package.json +55 -0
- data/node_modules/optimist/test/_.js +71 -0
- data/node_modules/optimist/test/_/argv.js +2 -0
- data/node_modules/optimist/test/_/bin.js +3 -0
- data/node_modules/optimist/test/parse.js +420 -0
- data/node_modules/optimist/test/usage.js +292 -0
- data/snowball.gemspec +1 -2
- metadata +601 -21
- data/extconf.rb +0 -9
@@ -0,0 +1,103 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Esprima</title>
|
6
|
+
<link rel="stylesheet" type="text/css" href="assets/style.css"/>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div class="container">
|
10
|
+
|
11
|
+
<div class="topbar">
|
12
|
+
<ul class="nav">
|
13
|
+
<li><a href="index.html">← Home</a></li>
|
14
|
+
<li><a href="http://github.com/ariya/esprima">Code</a></li>
|
15
|
+
<li><a href="http://wiki.esprima.org">Documentation</a></li>
|
16
|
+
<li><a href="http://issues.esprima.org">Issues</a></li>
|
17
|
+
</ul>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<h1>Esprima <small>ECMAScript parsing infrastructure for multipurpose analysis</small></h1>
|
21
|
+
|
22
|
+
<div class="main">
|
23
|
+
<p>Esprima (<a href="http://esprima.org">esprima.org</a>) is an educational
|
24
|
+
<a href="http://www.ecma-international.org/publications/standards/Ecma-262.htm">ECMAScript</a>
|
25
|
+
(also popularly known as <a href="http://en.wikipedia.org/wiki/JavaScript">JavaScript</a>)
|
26
|
+
parsing infrastructure for multipurpose analysis. It is also written in ECMAScript.</p>
|
27
|
+
|
28
|
+
<p>Esprima serves as a good basis for various tools such as source modification
|
29
|
+
(<a href="https://github.com/ariya/esmorph">Esmorph</a>), coverage analyzer
|
30
|
+
(<a href="https://github.com/itay/node-cover">node-cover</a> and
|
31
|
+
<a href="https://github.com/coveraje/coveraje">coveraje</a>),
|
32
|
+
source-to-source compiler (<a href="https://github.com/Yoric/Marv-the-Tinker">Marv</a>),
|
33
|
+
syntax formatter (<a href="https://github.com/fawek/codepainter">Code Painter</a>),
|
34
|
+
and code generator (<a href="https://github.com/Constellation/escodegen">escodegen</a>).
|
35
|
+
</p>
|
36
|
+
|
37
|
+
<p>Esprima can be used in a web browser:</p>
|
38
|
+
|
39
|
+
<pre><script src="esprima.js"><script></pre>
|
40
|
+
|
41
|
+
<p>or in a Node.js application via the package manager:</p>
|
42
|
+
|
43
|
+
<pre>npm install esprima</pre>
|
44
|
+
|
45
|
+
<p>Esprima parser output is compatible with Mozilla (SpiderMonkey)
|
46
|
+
<a href="https://developer.mozilla.org/en/SpiderMonkey/Parser_API">Parser API</a>.</p>
|
47
|
+
|
48
|
+
<p>A very simple example:</p>
|
49
|
+
|
50
|
+
<pre>esprima.parse('var answer=42').body[0].declarations[0].init</pre>
|
51
|
+
|
52
|
+
<p>produces the following object:</p>
|
53
|
+
|
54
|
+
<pre>{ type: 'Literal', value: 42 }</pre>
|
55
|
+
|
56
|
+
<p>Esprima is still in the development, for now please check
|
57
|
+
<a href="http://wiki.esprima.org">the wiki documentation</a>.</p>
|
58
|
+
|
59
|
+
<p>Since it is not comprehensive nor complete, refer to the
|
60
|
+
<a href="http://issues.esprima.org">issue tracker</a> for
|
61
|
+
<a href="http://code.google.com/p/esprima/issues/list?q=Defect">known problems</a>
|
62
|
+
and <a href="http://code.google.com/p/esprima/issues/list?q=Enhancement">future plans</a>.
|
63
|
+
Esprima is supported on <a href="http://code.google.com/p/esprima/wiki/BrowserCompatibility">many browsers</a>:
|
64
|
+
IE 6+, Firefox 1+, Safari 3+, Chrome 1+, and Opera 8+.</p>
|
65
|
+
|
66
|
+
<p>Feedback and contribution are welcomed! Please join the
|
67
|
+
<a href="http://groups.google.com/group/esprima">mailing list</a> and read the
|
68
|
+
<a href="http://code.google.com/p/esprima/wiki/ContributionGuide">contribution guide</a>
|
69
|
+
for further info.</p>
|
70
|
+
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<div class="sidebar">
|
74
|
+
<h3>Useful demos</h3>
|
75
|
+
<ul>
|
76
|
+
<li><a href="demo/parse.html">Code parser</a></li>
|
77
|
+
<li><a href="demo/precedence.html">Operator precedence</a></li>
|
78
|
+
<li><a href="demo/collector.html">Regex collector</a></li>
|
79
|
+
<li><a href="demo/functiontrace.html">Function tracing</a></li>
|
80
|
+
<li><a href="demo/rewrite.html">Source rewrite</a></li>
|
81
|
+
</ul>
|
82
|
+
<h3>Harness tests</h3>
|
83
|
+
<ul>
|
84
|
+
<li><a href="test/index.html">Unit tests</a></li>
|
85
|
+
<li><a href="test/compat.html">Compatibility tests</a></li>
|
86
|
+
<li><a href="test/coverage.html">Coverage analysis</a></li>
|
87
|
+
</ul>
|
88
|
+
<h3>Need for speed</h3>
|
89
|
+
<ul>
|
90
|
+
<li><a href="test/benchmarks.html">Benchmarks suite</a></li>
|
91
|
+
<li><a href="test/compare.html">Speed comparison</a></li>
|
92
|
+
</ul>
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<br clear="all"/>
|
96
|
+
|
97
|
+
<div class="footer"><strong>Esprima</strong> is created by
|
98
|
+
<a href="http://ariya.ofilabs.com/about" target="_blank">Ariya Hidayat</a>. Follow <a href="http://twitter.com/ariyahidayat">@ariyahidayat</a> on Twitter.
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
<a href="http://github.com/ariya/esprima"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/e6bef7a091f5f3138b8cd40bc3e114258dd68ddf/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub"></a>
|
102
|
+
</body>
|
103
|
+
</html>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
{
|
2
|
+
"name": "esprima",
|
3
|
+
"description": "ECMAScript parsing infrastructure for multipurpose analysis",
|
4
|
+
"homepage": "http://esprima.org",
|
5
|
+
"main": "esprima.js",
|
6
|
+
"bin": {
|
7
|
+
"esparse": "./bin/esparse.js"
|
8
|
+
},
|
9
|
+
"version": "0.9.9",
|
10
|
+
"engines": {
|
11
|
+
"node": ">=0.4.0"
|
12
|
+
},
|
13
|
+
"maintainers": [
|
14
|
+
{
|
15
|
+
"name": "Ariya Hidayat",
|
16
|
+
"email": "ariya.hidayat@gmail.com",
|
17
|
+
"url": "http://ariya.ofilabs.com"
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"repository": {
|
21
|
+
"type": "git",
|
22
|
+
"url": "http://github.com/ariya/esprima.git"
|
23
|
+
},
|
24
|
+
"licenses": [
|
25
|
+
{
|
26
|
+
"type": "BSD",
|
27
|
+
"url": "http://github.com/ariya/esprima/raw/master/LICENSE.BSD"
|
28
|
+
}
|
29
|
+
],
|
30
|
+
"scripts": {
|
31
|
+
"test": "node test/run.js",
|
32
|
+
"benchmark": "node test/benchmarks.js",
|
33
|
+
"benchmark-quick": "node test/benchmarks.js quick"
|
34
|
+
},
|
35
|
+
"readme": "Esprima ([esprima.org](http://esprima.org)) is an educational\n[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)\n(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript))\nparsing infrastructure for multipurpose analysis. It is also written in ECMAScript.\n\nEsprima serves as a good basis for various tools such as source\nmodification ([Esmorph](https://github.com/ariya/esmorph)), coverage analyzer\n([node-cover](https://github.com/itay/node-cover) and\n[coveraje](https://github.com/coveraje/coveraje)),\nsource-to-source compiler ([Marv](https://github.com/Yoric/Marv-the-Tinker)),\nsyntax formatter ([Code Painter](https://github.com/fawek/codepainter)),\nand code generator ([escodegen](https://github.com/Constellation/escodegen)).\n\nEsprima can be used in a web browser:\n\n <script src=\"esprima.js\"></script>\n\nor in a Node.js application via the package manager:\n\n npm install esprima\n\nEsprima parser output is compatible with Mozilla (SpiderMonkey)\n[Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API).\n\nA very simple example:\n\n esprima.parse('var answer=42').body[0].declarations[0].init\n\nproduces the following object:\n\n { type: 'Literal', value: 42 }\n\nEsprima is still in the development, for now please check\n[the wiki documentation](http://wiki.esprima.org).\n\nSince it is not comprehensive nor complete, refer to the\n[issue tracker](http://issues.esprima.org) for\n[known problems](http://code.google.com/p/esprima/issues/list?q=Defect)\nand [future plans](http://code.google.com/p/esprima/issues/list?q=Enhancement).\nEsprima is supported on [many browsers](http://code.google.com/p/esprima/wiki/BrowserCompatibility):\nIE 6+, Firefox 1+, Safari 3+, Chrome 1+, and Opera 8+.\n\nFeedback and contribution are welcomed! Please join the\n[mailing list](http://groups.google.com/group/esprima) and read the\n[contribution guide](http://code.google.com/p/esprima/wiki/ContributionGuide)\nfor further info.\n\n\n### License\n\nCopyright (C) 2012, 2011 [Ariya Hidayat](http://ariya.ofilabs.com/about)\n (twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)) and other contributors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n",
|
36
|
+
"readmeFilename": "README.md",
|
37
|
+
"bugs": {
|
38
|
+
"url": "https://github.com/ariya/esprima/issues"
|
39
|
+
},
|
40
|
+
"_id": "esprima@0.9.9",
|
41
|
+
"_from": "esprima@0.9.9"
|
42
|
+
}
|
data/node_modules/browserify/node_modules/detective/node_modules/esprima/test/3rdparty/Tokenizer.js
ADDED
@@ -0,0 +1,646 @@
|
|
1
|
+
if (typeof exports !== 'undefined') {
|
2
|
+
var window = {Unicode: require('./unicodecategories').Unicode};
|
3
|
+
exports.Tokenizer = Tokenizer;
|
4
|
+
}
|
5
|
+
|
6
|
+
/*!
|
7
|
+
* Tokenizer for JavaScript / ECMAScript 5
|
8
|
+
* (c) Peter van der Zee, qfox.nl
|
9
|
+
*/
|
10
|
+
|
11
|
+
/**
|
12
|
+
* @param {Object} inp
|
13
|
+
*/
|
14
|
+
function Tokenizer(inp){
|
15
|
+
this.inp = inp||'';
|
16
|
+
// replace all other line terminators with \n (leave \r\n in tact though). we should probably remove the shadowInp when finished...
|
17
|
+
// only replace \r if it is not followed by a \n else \r\n would become \n\n causing a double newline where it is just a single
|
18
|
+
this.shadowInp = (inp||'').replace(Tokenizer.regexNormalizeNewlines, '\n');
|
19
|
+
this.pos = 0;
|
20
|
+
this.line = 0;
|
21
|
+
this.column = 0;
|
22
|
+
this.cache = {};
|
23
|
+
|
24
|
+
this.errorStack = [];
|
25
|
+
|
26
|
+
this.wtree = [];
|
27
|
+
this.btree = [];
|
28
|
+
|
29
|
+
// this.regexWhiteSpace = Tokenizer.regexWhiteSpace;
|
30
|
+
this.regexLineTerminator = Tokenizer.regexLineTerminator; // used in fallback
|
31
|
+
this.regexAsciiIdentifier = Tokenizer.regexAsciiIdentifier;
|
32
|
+
this.hashAsciiIdentifier = Tokenizer.hashAsciiIdentifier;
|
33
|
+
// this.regexHex = Tokenizer.regexHex;
|
34
|
+
this.hashHex = Tokenizer.hashHex
|
35
|
+
this.regexUnicodeEscape = Tokenizer.regexUnicodeEscape;
|
36
|
+
this.regexIdentifierStop = Tokenizer.regexIdentifierStop;
|
37
|
+
this.hashIdentifierStop = Tokenizer.hashIdentifierStop;
|
38
|
+
// this.regexPunctuators = Tokenizer.regexPunctuators;
|
39
|
+
this.regexNumber = Tokenizer.regexNumber;
|
40
|
+
this.regexNewline = Tokenizer.regexNewline;
|
41
|
+
|
42
|
+
this.regexBig = Tokenizer.regexBig;
|
43
|
+
this.regexBigAlt = Tokenizer.regexBigAlt;
|
44
|
+
|
45
|
+
this.tokenCount = 0;
|
46
|
+
this.tokenCountNoWhite = 0;
|
47
|
+
|
48
|
+
this.Unicode = window.Unicode;
|
49
|
+
|
50
|
+
// if the Parser throws an error. it will set this property to the next match
|
51
|
+
// at the time of the error (which was not what it was expecting at that point)
|
52
|
+
// and pass on an "error" match. the error should be scooped on the stack and
|
53
|
+
// this property should be returned, without looking at the input...
|
54
|
+
this.errorEscape = null;
|
55
|
+
};
|
56
|
+
|
57
|
+
Tokenizer.prototype = {
|
58
|
+
inp:null,
|
59
|
+
shadowInp:null,
|
60
|
+
pos:null,
|
61
|
+
line:null,
|
62
|
+
column:null,
|
63
|
+
cache:null,
|
64
|
+
errorStack:null,
|
65
|
+
|
66
|
+
wtree: null, // contains whitespace (spaces, comments, newlines)
|
67
|
+
btree: null, // does not contain any whitespace tokens.
|
68
|
+
|
69
|
+
regexLineTerminator:null,
|
70
|
+
regexAsciiIdentifier:null,
|
71
|
+
hashAsciiIdentifier:null,
|
72
|
+
hashHex:null,
|
73
|
+
regexUnicodeEscape:null,
|
74
|
+
regexIdentifierStop:null,
|
75
|
+
hashIdentifierStop:null,
|
76
|
+
regexNumber:null,
|
77
|
+
regexNewline:null,
|
78
|
+
regexBig:null,
|
79
|
+
regexBigAlt:null,
|
80
|
+
tokenCount:null,
|
81
|
+
tokenCountNoWhite:null,
|
82
|
+
|
83
|
+
Unicode:null,
|
84
|
+
|
85
|
+
// storeCurrentAndFetchNextToken(bool, false, false true) to get just one token
|
86
|
+
storeCurrentAndFetchNextToken: function(noRegex, returnValue, stack, _dontStore){
|
87
|
+
var regex = !noRegex; // TOFIX :)
|
88
|
+
var pos = this.pos;
|
89
|
+
var inp = this.inp;
|
90
|
+
var shadowInp = this.shadowInp;
|
91
|
+
var matchedNewline = false;
|
92
|
+
do {
|
93
|
+
if (!_dontStore) {
|
94
|
+
++this.tokenCount;
|
95
|
+
stack.push(returnValue);
|
96
|
+
// did the parent Parser throw up?
|
97
|
+
if (this.errorEscape) {
|
98
|
+
returnValue = this.errorEscape;
|
99
|
+
this.errorEscape = null;
|
100
|
+
return returnValue;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
_dontStore = false;
|
104
|
+
|
105
|
+
if (pos >= inp.length) {
|
106
|
+
returnValue = {start:inp.length,stop:inp.length,name:12/*EOF*/};
|
107
|
+
break;
|
108
|
+
}
|
109
|
+
var returnValue = null;
|
110
|
+
|
111
|
+
var start = pos;
|
112
|
+
var chr = inp[pos];
|
113
|
+
|
114
|
+
// 1 ws 2 lt 3 scmt 4 mcmt 5/6 str 7 nr 8 rx 9 punc
|
115
|
+
//if (true) {
|
116
|
+
// substring method (I think this is faster..)
|
117
|
+
var part2 = inp.substring(pos,pos+4);
|
118
|
+
var part = this.regexBig.exec(part2);
|
119
|
+
//} else {
|
120
|
+
// // non-substring method (lastIndex)
|
121
|
+
// // this method does not need a substring to apply it
|
122
|
+
// this.regexBigAlt.lastIndex = pos;
|
123
|
+
// var part = this.regexBigAlt.exec(inp);
|
124
|
+
//}
|
125
|
+
|
126
|
+
if (part[1]) { //this.regexWhiteSpace.test(chr)) { // SP, TAB, VT, FF, NBSP, BOM (, TOFIX: USP)
|
127
|
+
++pos;
|
128
|
+
returnValue = {start:start,stop:pos,name:9/*WHITE_SPACE*/,line:this.line,col:this.column,isWhite:true};
|
129
|
+
++this.column;
|
130
|
+
} else if (part[2]) { //this.regexLineTerminator.test(chr)) { // LF, CR, LS, PS
|
131
|
+
var end = pos+1;
|
132
|
+
if (chr=='\r' && inp[pos+1] == '\n') ++end; // support crlf=>lf
|
133
|
+
returnValue = {start:pos,stop:end,name:10/*LINETERMINATOR*/,line:this.line,col:this.column,isWhite:true};
|
134
|
+
pos = end;
|
135
|
+
// mark newlines for ASI
|
136
|
+
matchedNewline = true;
|
137
|
+
++this.line;
|
138
|
+
this.column = 0;
|
139
|
+
returnValue.hasNewline = 1;
|
140
|
+
} else if (part[3]) { //chr == '/' && inp[pos+1] == '/') {
|
141
|
+
pos = shadowInp.indexOf('\n',pos);
|
142
|
+
if (pos == -1) pos = inp.length;
|
143
|
+
returnValue = {start:start,stop:pos,name:7/*COMMENT_SINGLE*/,line:this.line,col:this.column,isComment:true,isWhite:true};
|
144
|
+
this.column = returnValue.stop;
|
145
|
+
} else if (part[4]) { //chr == '/' && inp[pos+1] == '*') {
|
146
|
+
var newpos = inp.indexOf('*/',pos);
|
147
|
+
if (newpos == -1) {
|
148
|
+
newpos = shadowInp.indexOf('\n', pos);
|
149
|
+
if (newpos < 0) pos += 2;
|
150
|
+
else pos = newpos;
|
151
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,value:inp.substring(start, pos),line:this.line,col:this.column,isComment:true,isWhite:true,tokenError:true,error:Tokenizer.Error.UnterminatedMultiLineComment};
|
152
|
+
this.errorStack.push(returnValue);
|
153
|
+
} else {
|
154
|
+
pos = newpos+2;
|
155
|
+
returnValue = {start:start,stop:pos,name:8/*COMMENT_MULTI*/,value:inp.substring(start, pos),line:this.line,col:this.column,isComment:true,isWhite:true};
|
156
|
+
|
157
|
+
// multi line comments are also reason for asi, but only if they contain at least one newline (use shadow input, because all line terminators would be valid...)
|
158
|
+
var shadowValue = shadowInp.substring(start, pos);
|
159
|
+
var i = 0, hasNewline = 0;
|
160
|
+
while (i < (i = shadowValue.indexOf('\n', i+1))) {
|
161
|
+
++hasNewline;
|
162
|
+
}
|
163
|
+
if (hasNewline) {
|
164
|
+
matchedNewline = true;
|
165
|
+
returnValue.hasNewline = hasNewline;
|
166
|
+
this.line += hasNewline;
|
167
|
+
this.column = 0;
|
168
|
+
} else {
|
169
|
+
this.column = returnValue.stop;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
} else if (part[5]) { //chr == "'") {
|
173
|
+
// old method
|
174
|
+
//console.log("old method");
|
175
|
+
|
176
|
+
var hasNewline = 0;
|
177
|
+
do {
|
178
|
+
// process escaped characters
|
179
|
+
while (pos < inp.length && inp[++pos] == '\\') {
|
180
|
+
if (shadowInp[pos+1] == '\n') ++hasNewline;
|
181
|
+
++pos;
|
182
|
+
}
|
183
|
+
if (this.regexLineTerminator.test(inp[pos])) {
|
184
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,value:inp.substring(start, pos),isString:true,tokenError:true,error:Tokenizer.Error.UnterminatedDoubleStringNewline};
|
185
|
+
this.errorStack.push(returnValue);
|
186
|
+
break;
|
187
|
+
}
|
188
|
+
} while (pos < inp.length && inp[pos] != "'");
|
189
|
+
if (returnValue) {} // error
|
190
|
+
else if (inp[pos] != "'") {
|
191
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,value:inp.substring(start, pos),isString:true,tokenError:true,error:Tokenizer.Error.UnterminatedDoubleStringOther};
|
192
|
+
this.errorStack.push(returnValue);
|
193
|
+
} else {
|
194
|
+
++pos;
|
195
|
+
returnValue = {start:start,stop:pos,name:5/*STRING_SINGLE*/,isPrimitive:true,isString:true};
|
196
|
+
if (hasNewline) {
|
197
|
+
returnValue.hasNewline = hasNewline;
|
198
|
+
this.line += hasNewline;
|
199
|
+
this.column = 0;
|
200
|
+
} else {
|
201
|
+
this.column += (pos-start);
|
202
|
+
}
|
203
|
+
}
|
204
|
+
} else if (part[6]) { //chr == '"') {
|
205
|
+
var hasNewline = 0;
|
206
|
+
// TODO: something like this: var regexmatch = /([^\']|$)+/.match();
|
207
|
+
do {
|
208
|
+
// process escaped chars
|
209
|
+
while (pos < inp.length && inp[++pos] == '\\') {
|
210
|
+
if (shadowInp[pos+1] == '\n') ++hasNewline;
|
211
|
+
++pos;
|
212
|
+
}
|
213
|
+
if (this.regexLineTerminator.test(inp[pos])) {
|
214
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,value:inp.substring(start, pos),isString:true,tokenError:true,error:Tokenizer.Error.UnterminatedSingleStringNewline};
|
215
|
+
this.errorStack.push(returnValue);
|
216
|
+
break;
|
217
|
+
}
|
218
|
+
} while (pos < inp.length && inp[pos] != '"');
|
219
|
+
if (returnValue) {}
|
220
|
+
else if (inp[pos] != '"') {
|
221
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,value:inp.substring(start, pos),isString:true,tokenError:true,error:Tokenizer.Error.UnterminatedSingleStringOther};
|
222
|
+
this.errorStack.push(returnValue);
|
223
|
+
} else {
|
224
|
+
++pos;
|
225
|
+
returnValue = {start:start,stop:pos,name:6/*STRING_DOUBLE*/,isPrimitive:true,isString:true};
|
226
|
+
if (hasNewline) {
|
227
|
+
returnValue.hasNewline = hasNewline;
|
228
|
+
this.line += hasNewline;
|
229
|
+
this.column = 0;
|
230
|
+
} else {
|
231
|
+
this.column += (pos-start);
|
232
|
+
}
|
233
|
+
}
|
234
|
+
} else if (part[7]) { //(chr >= '0' && chr <= '9') || (chr == '.' && inp[pos+1] >= '0' && inp[pos+1] <= '9')) {
|
235
|
+
var nextPart = inp.substring(pos, pos+30);
|
236
|
+
var match = nextPart.match(this.regexNumber);
|
237
|
+
if (match[2]) { // decimal
|
238
|
+
var value = match[2];
|
239
|
+
var parsingOctal = value[0] == '0' && value[1] && value[1] != 'e' && value[1] != 'E' && value[1] != '.';
|
240
|
+
if (parsingOctal) {
|
241
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,isNumber:true,isOctal:true,tokenError:true,error:Tokenizer.Error.IllegalOctalEscape,value:value};
|
242
|
+
this.errorStack.push(returnValue);
|
243
|
+
} else {
|
244
|
+
returnValue = {start:start,stop:start+value.length,name:4/*NUMERIC_DEC*/,isPrimitive:true,isNumber:true,value:value};
|
245
|
+
}
|
246
|
+
} else if (match[1]) { // hex
|
247
|
+
var value = match[1];
|
248
|
+
returnValue = {start:start,stop:start+value.length,name:3/*NUMERIC_HEX*/,isPrimitive:true,isNumber:true,value:value};
|
249
|
+
} else {
|
250
|
+
throw 'unexpected parser errror... regex fail :(';
|
251
|
+
}
|
252
|
+
|
253
|
+
if (value.length < 300) {
|
254
|
+
pos += value.length;
|
255
|
+
} else {
|
256
|
+
// old method of parsing numbers. only used for extremely long number literals (300+ chars).
|
257
|
+
// this method does not require substringing... just memory :)
|
258
|
+
var tmpReturnValue = this.oldNumberParser(pos, chr, inp, returnValue, start, Tokenizer);
|
259
|
+
pos = tmpReturnValue[0];
|
260
|
+
returnValue = tmpReturnValue[1];
|
261
|
+
}
|
262
|
+
} else if (regex && part[8]) { //chr == '/') { // regex cannot start with /* (would be multiline comment, and not make sense anyways). but if it was /* then an earlier if would have eated it. so we only check for /
|
263
|
+
var twinfo = []; // matching {[( info
|
264
|
+
var found = false;
|
265
|
+
var parens = [];
|
266
|
+
var nonLethalError = null;
|
267
|
+
while (++pos < inp.length) {
|
268
|
+
chr = shadowInp[pos];
|
269
|
+
// parse RegularExpressionChar
|
270
|
+
if (chr == '\n') {
|
271
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,tokenError:true,errorHasContent:true,error:Tokenizer.Error.UnterminatedRegularExpressionNewline};
|
272
|
+
this.errorStack.push(returnValue);
|
273
|
+
break; // fail
|
274
|
+
} else if (chr == '/') {
|
275
|
+
found = true;
|
276
|
+
break;
|
277
|
+
} else if (chr == '?' || chr == '*' || chr == '+') {
|
278
|
+
nonLethalError = Tokenizer.Error.NothingToRepeat;
|
279
|
+
} else if (chr == '^') {
|
280
|
+
if (
|
281
|
+
inp[pos-1] != '/' &&
|
282
|
+
inp[pos-1] != '|' &&
|
283
|
+
inp[pos-1] != '(' &&
|
284
|
+
!(inp[pos-3] == '(' && inp[pos-2] == '?' && (inp[pos-1] == ':' || inp[pos-1] == '!' || inp[pos-1] == '='))
|
285
|
+
) {
|
286
|
+
nonLethalError = Tokenizer.Error.StartOfMatchShouldBeAtStart;
|
287
|
+
}
|
288
|
+
} else if (chr == '$') {
|
289
|
+
if (inp[pos+1] != '/' && inp[pos+1] != '|' && inp[pos+1] != ')') nonLethalError = Tokenizer.Error.DollarShouldBeEnd;
|
290
|
+
} else if (chr == '}') {
|
291
|
+
nonLethalError = Tokenizer.Error.MissingOpeningCurly;
|
292
|
+
} else { // it's a "character" (can be group or class), something to match
|
293
|
+
// match parenthesis
|
294
|
+
if (chr == '(') {
|
295
|
+
parens.push(pos-start);
|
296
|
+
} else if (chr == ')') {
|
297
|
+
if (parens.length == 0) {
|
298
|
+
nonLethalError = {start:start,stop:pos,name:14/*error*/,tokenError:true,error:Tokenizer.Error.RegexNoOpenGroups};
|
299
|
+
} else {
|
300
|
+
var twin = parens.pop();
|
301
|
+
var now = pos-start;
|
302
|
+
twinfo[twin] = now;
|
303
|
+
twinfo[now] = twin;
|
304
|
+
}
|
305
|
+
}
|
306
|
+
// first process character class
|
307
|
+
if (chr == '[') {
|
308
|
+
var before = pos-start;
|
309
|
+
while (++pos < inp.length && shadowInp[pos] != '\n' && inp[pos] != ']') {
|
310
|
+
// only newline is not allowed in class range
|
311
|
+
// anything else can be escaped, most of it does not have to be escaped...
|
312
|
+
if (inp[pos] == '\\') {
|
313
|
+
if (shadowInp[pos+1] == '\n') break;
|
314
|
+
else ++pos; // skip next char. (mainly prohibits ] to be picked up as closing the group...)
|
315
|
+
}
|
316
|
+
}
|
317
|
+
if (inp[pos] != ']') {
|
318
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,tokenError:true,error:Tokenizer.Error.ClosingClassRangeNotFound};
|
319
|
+
this.errorStack.push(returnValue);
|
320
|
+
break;
|
321
|
+
} else {
|
322
|
+
var after = pos-start;
|
323
|
+
twinfo[before] = after;
|
324
|
+
twinfo[after] = before;
|
325
|
+
}
|
326
|
+
} else if (chr == '\\' && shadowInp[pos+1] != '\n') {
|
327
|
+
// is ok anywhere in the regex (match next char literally, regardless of its otherwise special meaning)
|
328
|
+
++pos;
|
329
|
+
}
|
330
|
+
|
331
|
+
// now process repeaters (+, ? and *)
|
332
|
+
|
333
|
+
// non-collecting group (?:...) and positive (?=...) or negative (?!...) lookahead
|
334
|
+
if (chr == '(') {
|
335
|
+
if (inp[pos+1] == '?' && (inp[pos+2] == ':' || inp[pos+2] == '=' || inp[pos+2] == '!')) {
|
336
|
+
pos += 2;
|
337
|
+
}
|
338
|
+
}
|
339
|
+
// matching "char"
|
340
|
+
else if (inp[pos+1] == '?') ++pos;
|
341
|
+
else if (inp[pos+1] == '*' || inp[pos+1] == '+') {
|
342
|
+
++pos;
|
343
|
+
if (inp[pos+1] == '?') ++pos; // non-greedy match
|
344
|
+
} else if (inp[pos+1] == '{') {
|
345
|
+
pos += 1;
|
346
|
+
var before = pos-start;
|
347
|
+
// quantifier:
|
348
|
+
// - {n}
|
349
|
+
// - {n,}
|
350
|
+
// - {n,m}
|
351
|
+
if (!/[0-9]/.test(inp[pos+1])) {
|
352
|
+
nonLethalError = Tokenizer.Error.QuantifierRequiresNumber;
|
353
|
+
}
|
354
|
+
while (++pos < inp.length && /[0-9]/.test(inp[pos+1]));
|
355
|
+
if (inp[pos+1] == ',') {
|
356
|
+
++pos;
|
357
|
+
while (pos < inp.length && /[0-9]/.test(inp[pos+1])) ++pos;
|
358
|
+
}
|
359
|
+
if (inp[pos+1] != '}') {
|
360
|
+
nonLethalError = Tokenizer.Error.QuantifierRequiresClosingCurly;
|
361
|
+
} else {
|
362
|
+
++pos;
|
363
|
+
var after = pos-start;
|
364
|
+
twinfo[before] = after;
|
365
|
+
twinfo[after] = before;
|
366
|
+
if (inp[pos+1] == '?') ++pos; // non-greedy match
|
367
|
+
}
|
368
|
+
}
|
369
|
+
}
|
370
|
+
}
|
371
|
+
// if found=false, fail right now. otherwise try to parse an identifiername (that's all RegularExpressionFlags is..., but it's constructed in a stupid fashion)
|
372
|
+
if (!found || returnValue) {
|
373
|
+
if (!returnValue) {
|
374
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,tokenError:true,error:Tokenizer.Error.UnterminatedRegularExpressionOther};
|
375
|
+
this.errorStack.push(returnValue);
|
376
|
+
}
|
377
|
+
} else {
|
378
|
+
// this is the identifier scanner, for now
|
379
|
+
do ++pos;
|
380
|
+
while (pos < inp.length && this.hashAsciiIdentifier[inp[pos]]); /*this.regexAsciiIdentifier.test(inp[pos])*/
|
381
|
+
|
382
|
+
if (parens.length) {
|
383
|
+
// nope, this is still an error, there was at least one paren that did not have a matching twin
|
384
|
+
if (parens.length > 0) returnValue = {start:start,stop:pos,name:14/*error*/,tokenError:true,error:Tokenizer.Error.RegexOpenGroup};
|
385
|
+
this.errorStack.push(returnValue);
|
386
|
+
} else if (nonLethalError) {
|
387
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,errorHasContent:true,tokenError:true,error:nonLethalError};
|
388
|
+
this.errorStack.push(returnValue);
|
389
|
+
} else {
|
390
|
+
returnValue = {start:start,stop:pos,name:1/*REG_EX*/,isPrimitive:true};
|
391
|
+
}
|
392
|
+
}
|
393
|
+
returnValue.twinfo = twinfo;
|
394
|
+
} else {
|
395
|
+
// note: operators need to be ordered from longest to smallest. regex will take care of the rest.
|
396
|
+
// no need to worry about div vs regex. if looking for regex, earlier if will have eaten it
|
397
|
+
//var result = this.regexPunctuators.exec(inp.substring(pos,pos+4));
|
398
|
+
|
399
|
+
// note: due to the regex, the single forward slash might be caught by an earlier part of the regex. so check for that.
|
400
|
+
var result = part[8] || part[9];
|
401
|
+
if (result) {
|
402
|
+
//result = result[1];
|
403
|
+
returnValue = {start:pos,stop:pos+=result.length,name:11/*PUNCTUATOR*/,value:result};
|
404
|
+
} else {
|
405
|
+
var found = false;
|
406
|
+
// identifiers cannot start with a number. but if the leading string would be a number, another if would have eaten it already for numeric literal :)
|
407
|
+
while (pos < inp.length) {
|
408
|
+
var c = inp[pos];
|
409
|
+
|
410
|
+
if (this.hashAsciiIdentifier[c]) ++pos; //if (this.regexAsciiIdentifier.test(c)) ++pos;
|
411
|
+
else if (c == '\\' && this.regexUnicodeEscape.test(inp.substring(pos,pos+6))) pos += 6; // this is like a \uxxxx
|
412
|
+
// ok, now test unicode ranges...
|
413
|
+
// basically this hardly ever happens so there's little risk of this hitting performance
|
414
|
+
// however, if you do happen to have used them, it's not a problem. the parser will support it :)
|
415
|
+
else if (this.Unicode) { // the unicode is optional.
|
416
|
+
// these chars may not be part of identifier. i want to try to prevent running the unicode regexes here...
|
417
|
+
if (this.hashIdentifierStop[c] /*this.regexIdentifierStop.test(c)*/) break;
|
418
|
+
// for most scripts, the code wont reach here. which is good, because this is going to be relatively slow :)
|
419
|
+
var Unicode = this.Unicode; // cache
|
420
|
+
if (!(
|
421
|
+
// these may all occur in an identifier... (pure a specification compliance thing :)
|
422
|
+
Unicode.Lu.test(c) || Unicode.Ll.test(c) || Unicode.Lt.test(c) || Unicode.Lm.test(c) ||
|
423
|
+
Unicode.Lo.test(c) || Unicode.Nl.test(c) || Unicode.Mn.test(c) || Unicode.Mc.test(c) ||
|
424
|
+
Unicode.Nd.test(c) || Unicode.Pc.test(c) || Unicode.sp.test(c)
|
425
|
+
)) break; // end of match.
|
426
|
+
// passed, next char
|
427
|
+
++pos;
|
428
|
+
} else break; // end of match.
|
429
|
+
|
430
|
+
found = true;
|
431
|
+
}
|
432
|
+
|
433
|
+
if (found) {
|
434
|
+
returnValue = {start:start,stop:pos,name:2/*IDENTIFIER*/,value:inp.substring(start,pos)};
|
435
|
+
if (returnValue.value == 'undefined' || returnValue.value == 'null' || returnValue.value == 'true' || returnValue.value == 'false') returnValue.isPrimitive = true;
|
436
|
+
} else {
|
437
|
+
if (inp[pos] == '`') {
|
438
|
+
returnValue = {start:start,stop:pos+1,name:14/*error*/,tokenError:true,error:Tokenizer.Error.BacktickNotSupported};
|
439
|
+
this.errorStack.push(returnValue);
|
440
|
+
} else if (inp[pos] == '\\') {
|
441
|
+
if (inp[pos+1] == 'u') {
|
442
|
+
returnValue = {start:start,stop:pos+1,name:14/*error*/,tokenError:true,error:Tokenizer.Error.InvalidUnicodeEscape};
|
443
|
+
this.errorStack.push(returnValue);
|
444
|
+
} else {
|
445
|
+
returnValue = {start:start,stop:pos+1,name:14/*error*/,tokenError:true,error:Tokenizer.Error.InvalidBackslash};
|
446
|
+
this.errorStack.push(returnValue);
|
447
|
+
}
|
448
|
+
} else {
|
449
|
+
returnValue = {start:start,stop:pos+1,name:14/*error*/,tokenError:true,error:Tokenizer.Error.Unknown,value:c};
|
450
|
+
this.errorStack.push(returnValue);
|
451
|
+
// try to skip this char. it's not going anywhere.
|
452
|
+
}
|
453
|
+
++pos;
|
454
|
+
}
|
455
|
+
}
|
456
|
+
}
|
457
|
+
|
458
|
+
if (returnValue) {
|
459
|
+
// note that ASI's are slipstreamed in here from the parser since the tokenizer cant determine that
|
460
|
+
// if this part ever changes, make sure you change that too :)
|
461
|
+
returnValue.tokposw = this.wtree.length;
|
462
|
+
this.wtree.push(returnValue);
|
463
|
+
if (!returnValue.isWhite) {
|
464
|
+
returnValue.tokposb = this.btree.length;
|
465
|
+
this.btree.push(returnValue);
|
466
|
+
}
|
467
|
+
}
|
468
|
+
|
469
|
+
|
470
|
+
} while (stack && returnValue && returnValue.isWhite); // WHITE_SPACE LINETERMINATOR COMMENT_SINGLE COMMENT_MULTI
|
471
|
+
++this.tokenCountNoWhite;
|
472
|
+
|
473
|
+
this.pos = pos;
|
474
|
+
|
475
|
+
if (matchedNewline) returnValue.newline = true;
|
476
|
+
return returnValue;
|
477
|
+
},
|
478
|
+
addTokenToStreamBefore: function(token, match){
|
479
|
+
var wtree = this.wtree;
|
480
|
+
var btree = this.btree;
|
481
|
+
if (match.name == 12/*asi*/) {
|
482
|
+
token.tokposw = wtree.length;
|
483
|
+
wtree.push(token);
|
484
|
+
token.tokposb = btree.length;
|
485
|
+
btree.push(token);
|
486
|
+
} else {
|
487
|
+
token.tokposw = match.tokposw;
|
488
|
+
wtree[token.tokposw] = token;
|
489
|
+
match.tokposw += 1;
|
490
|
+
wtree[match.tokposw] = match;
|
491
|
+
|
492
|
+
if (match.tokposb) {
|
493
|
+
token.tokposb = match.tokposb;
|
494
|
+
btree[token.tokposb] = token;
|
495
|
+
match.tokposb += 1;
|
496
|
+
btree[match.tokposb] = match;
|
497
|
+
}
|
498
|
+
}
|
499
|
+
},
|
500
|
+
oldNumberParser: function(pos, chr, inp, returnValue, start, Tokenizer){
|
501
|
+
++pos;
|
502
|
+
// either: 0x 0X 0 .3
|
503
|
+
if (chr == '0' && (inp[pos] == 'x' || inp[pos] == 'X')) {
|
504
|
+
// parsing hex
|
505
|
+
while (++pos < inp.length && this.hashHex[inp[pos]]); // this.regexHex.test(inp[pos]));
|
506
|
+
returnValue = {start:start,stop:pos,name:3/*NUMERIC_HEX*/,isPrimitive:true,isNumber:true};
|
507
|
+
} else {
|
508
|
+
var parsingOctal = chr == '0' && inp[pos] >= '0' && inp[pos] <= '9';
|
509
|
+
// parsing dec
|
510
|
+
if (chr != '.') { // integer part
|
511
|
+
while (pos < inp.length && inp[pos] >= '0' && inp[pos] <= '9') ++pos;
|
512
|
+
if (inp[pos] == '.') ++pos;
|
513
|
+
}
|
514
|
+
// decimal part
|
515
|
+
while (pos < inp.length && inp[pos] >= '0' && inp[pos] <= '9') ++pos;
|
516
|
+
// exponent part
|
517
|
+
if (inp[pos] == 'e' || inp[pos] == 'E') {
|
518
|
+
if (inp[++pos] == '+' || inp[pos] == '-') ++pos;
|
519
|
+
var expPosBak = pos;
|
520
|
+
while (pos < inp.length && inp[pos] >= '0' && inp[pos] <= '9') ++pos;
|
521
|
+
if (expPosBak == pos) {
|
522
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,tokenError:true,error:Tokenizer.Error.NumberExponentRequiresDigits};
|
523
|
+
this.errorStack.push(returnValue);
|
524
|
+
}
|
525
|
+
}
|
526
|
+
if (returnValue.name != 14/*error*/) {
|
527
|
+
if (parsingOctal) {
|
528
|
+
returnValue = {start:start,stop:pos,name:14/*error*/,isNumber:true,isOctal:true,tokenError:true,error:Tokenizer.Error.IllegalOctalEscape};
|
529
|
+
this.errorStack.push(returnValue);
|
530
|
+
console.log("foo")
|
531
|
+
} else {
|
532
|
+
returnValue = {start:start,stop:pos,name:4/*NUMERIC_DEC*/,isPrimitive:true,isNumber:true};
|
533
|
+
}
|
534
|
+
}
|
535
|
+
}
|
536
|
+
return [pos, returnValue];
|
537
|
+
},
|
538
|
+
tokens: function(arrx){
|
539
|
+
arrx = arrx || [];
|
540
|
+
var n = 0;
|
541
|
+
var last;
|
542
|
+
var stack = [];
|
543
|
+
while ((last = this.storeCurrentAndFetchNextToken(!arrx[n++], false, false, true)) && last.name != 12/*EOF*/) stack.push(last);
|
544
|
+
return stack;
|
545
|
+
},
|
546
|
+
fixValues: function(){
|
547
|
+
this.wtree.forEach(function(t){
|
548
|
+
if (!t.value) t.value = this.inp.substring(t.start, t.stop);
|
549
|
+
},this);
|
550
|
+
}
|
551
|
+
};
|
552
|
+
|
553
|
+
//#ifdef TEST_SUITE
|
554
|
+
Tokenizer.escape = function(s){
|
555
|
+
return s.replace(/\n/g,'\\n').replace(/\t/g,'\\t').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/\uFFFF/g, '\\uFFFF').replace(/\s/g, function(s){
|
556
|
+
// replace whitespace as is...
|
557
|
+
var ord = s.charCodeAt(0).toString(16);
|
558
|
+
switch (ord.length) {
|
559
|
+
case 1: ord = '000'+ord; break;
|
560
|
+
case 2: ord = '00'+ord; break;
|
561
|
+
case 3: ord = '0'+ord; break;
|
562
|
+
}
|
563
|
+
return '\\u'+ord;
|
564
|
+
});
|
565
|
+
};
|
566
|
+
Tokenizer.testSuite = function(arr){
|
567
|
+
var out = document.createElement('pre');
|
568
|
+
document.body.appendChild(out);
|
569
|
+
var debug = function(){
|
570
|
+
var f = document.createElement('div');
|
571
|
+
f.innerHTML = Array.prototype.slice.call(arguments).join(' ');
|
572
|
+
out.appendChild(f);
|
573
|
+
return arguments[0];
|
574
|
+
};
|
575
|
+
|
576
|
+
debug("Running test suite...",arr.length,"tests");
|
577
|
+
debug(' ');
|
578
|
+
var start = +new Date;
|
579
|
+
var ok = 0;
|
580
|
+
var fail = 0;
|
581
|
+
for (var i=0; i<arr.length; ++i) {
|
582
|
+
var test = arr[i], result;
|
583
|
+
var input = test[0];
|
584
|
+
var outputLen = test[1].length ? test[1][0] : test[1];
|
585
|
+
var regexHints = test[3] ? test[2] : null; // if flags, then len=4
|
586
|
+
var desc = test[3] || test[2];
|
587
|
+
|
588
|
+
var result = new Tokenizer(input).tokens(regexHints); // regexHints can be null, that's ok
|
589
|
+
if (result.length == outputLen) {
|
590
|
+
debug('<span class="green">Test '+i+' ok:</span>',desc);
|
591
|
+
++ok;
|
592
|
+
} else {
|
593
|
+
debug('<b class="red">Test failed:</span>',desc,'(found',result.length,'expected',outputLen+')'),console.log(desc, result);
|
594
|
+
++fail;
|
595
|
+
}
|
596
|
+
debug('<b>'+Tokenizer.escape(input)+'</b>');
|
597
|
+
debug('<br/>');
|
598
|
+
}
|
599
|
+
debug("Tokenizer test suite finished ("+(+new Date - start)+' ms). ok:'+ok+', fail:'+fail);
|
600
|
+
};
|
601
|
+
//#endif
|
602
|
+
|
603
|
+
Tokenizer.regexWhiteSpace = /[ \t\u000B\u000C\u00A0\uFFFF]/;
|
604
|
+
Tokenizer.regexLineTerminator = /[\u000A\u000D\u2028\u2029]/;
|
605
|
+
Tokenizer.regexAsciiIdentifier = /[a-zA-Z0-9\$_]/;
|
606
|
+
Tokenizer.hashAsciiIdentifier = {_:1,$:1,a:1,b:1,c:1,d:1,e:1,f:1,g:1,h:1,i:1,j:1,k:1,l:1,m:1,n:1,o:1,p:1,q:1,r:1,s:1,t:1,u:1,v:1,w:1,x:1,y:1,z:1,A:1,B:1,C:1,D:1,E:1,F:1,G:1,H:1,I:1,J:1,K:1,L:1,M:1,N:1,O:1,P:1,Q:1,R:1,S:1,T:1,U:1,V:1,W:1,X:1,Y:1,Z:1,0:1,1:1,2:1,3:1,4:1,5:1,6:1,7:1,8:1,9:1};
|
607
|
+
Tokenizer.regexHex = /[0-9A-Fa-f]/;
|
608
|
+
Tokenizer.hashHex = {0:1,1:1,2:1,3:1,4:1,5:1,6:1,7:1,8:1,9:1,a:1,b:1,c:1,d:1,e:1,f:1,A:1,B:1,C:1,D:1,E:1,F:1};
|
609
|
+
Tokenizer.regexUnicodeEscape = /u[0-9A-Fa-f]{4}/; // the \ is already checked at usage...
|
610
|
+
Tokenizer.regexIdentifierStop = /[\>\=\!\|\<\+\-\&\*\%\^\/\{\}\(\)\[\]\.\;\,\~\?\:\ \t\n\\\'\"]/;
|
611
|
+
Tokenizer.hashIdentifierStop = {'>':1,'=':1,'!':1,'|':1,'<':1,'+':1,'-':1,'&':1,'*':1,'%':1,'^':1,'/':1,'{':1,'}':1,'(':1,')':1,'[':1,']':1,'.':1,';':1,',':1,'~':1,'?':1,':':1,'\\':1,'\'':1,'"':1,' ':1,'\t':1,'\n':1};
|
612
|
+
Tokenizer.regexNewline = /\n/g;
|
613
|
+
//Tokenizer.regexPunctuators = /^(>>>=|===|!==|>>>|<<=|>>=|<=|>=|==|!=|\+\+|--|<<|>>|\&\&|\|\||\+=|-=|\*=|%=|\&=|\|=|\^=|\/=|\{|\}|\(|\)|\[|\]|\.|;|,|<|>|\+|-|\*|%|\||\&|\||\^|!|~|\?|:|=|\/)/;
|
614
|
+
Tokenizer.Unidocde = window.Unicode;
|
615
|
+
Tokenizer.regexNumber = /^(?:(0[xX][0-9A-Fa-f]+)|((?:(?:(?:(?:[0-9]+)(?:\.[0-9]*)?))|(?:\.[0-9]+))(?:[eE][-+]?[0-9]{1,})?))/;
|
616
|
+
Tokenizer.regexNormalizeNewlines = /(\u000D[^\u000A])|[\u2028\u2029]/;
|
617
|
+
|
618
|
+
// 1 ws 2 lt 3 scmt 4 mcmt 5/6 str 7 nr 8 rx 9 punc
|
619
|
+
Tokenizer.regexBig = /^([ \t\u000B\u000C\u00A0\uFFFF])?([\u000A\u000D\u2028\u2029])?(\/\/)?(\/\*)?(')?(")?(\.?[0-9])?(?:(\/)[^=])?(>>>=|===|!==|>>>|<<=|>>=|<=|>=|==|!=|\+\+|--|<<|>>|\&\&|\|\||\+=|-=|\*=|%=|\&=|\|=|\^=|\/=|\{|\}|\(|\)|\[|\]|\.|;|,|<|>|\+|-|\*|%|\||\&|\||\^|!|~|\?|:|=|\/)?/;
|
620
|
+
Tokenizer.regexBigAlt = /([ \t\u000B\u000C\u00A0\uFFFF])?([\u000A\u000D\u2028\u2029])?(\/\/)?(\/\*)?(')?(")?(\.?[0-9])?(?:(\/)[^=])?(>>>=|===|!==|>>>|<<=|>>=|<=|>=|==|!=|\+\+|--|<<|>>|\&\&|\|\||\+=|-=|\*=|%=|\&=|\|=|\^=|\/=|\{|\}|\(|\)|\[|\]|\.|;|,|<|>|\+|-|\*|%|\||\&|\||\^|!|~|\?|:|=|\/)?/g;
|
621
|
+
|
622
|
+
Tokenizer.Error = {
|
623
|
+
UnterminatedSingleStringNewline: {msg:'Newlines are not allowed in string literals'},
|
624
|
+
UnterminatedSingleStringOther: {msg:'Unterminated single string'},
|
625
|
+
UnterminatedDoubleStringNewline: {msg:'Newlines are not allowed in string literals'},
|
626
|
+
UnterminatedDoubleStringOther: {msg:'Unterminated double string'},
|
627
|
+
UnterminatedRegularExpressionNewline: {msg:'Newlines are not allowed in regular expressions'},
|
628
|
+
NothingToRepeat: {msg:'Used a repeat character (*?+) in a regex without something prior to it to match'},
|
629
|
+
ClosingClassRangeNotFound: {msg: 'Unable to find ] for class range'},
|
630
|
+
RegexOpenGroup: {msg: 'Open group did not find closing parenthesis'},
|
631
|
+
RegexNoOpenGroups: {msg: 'Closing parenthesis found but no group open'},
|
632
|
+
UnterminatedRegularExpressionOther: {msg:'Unterminated regular expression'},
|
633
|
+
UnterminatedMultiLineComment: {msg:'Unterminated multi line comment'},
|
634
|
+
UnexpectedIdentifier: {msg:'Unexpected identifier'},
|
635
|
+
IllegalOctalEscape: {msg:'Octal escapes are not valid'},
|
636
|
+
Unknown: {msg:'Unknown input'}, // if this happens, my parser is bad :(
|
637
|
+
NumberExponentRequiresDigits: {msg:'Numbers with exponents require at least one digit after the `e`'},
|
638
|
+
BacktickNotSupported: {msg:'The backtick is not used in js, maybe you copy/pasted from a fancy site/doc?'},
|
639
|
+
InvalidUnicodeEscape: {msg:'Encountered an invalid unicode escape, must be followed by exactly four hex numbers'},
|
640
|
+
InvalidBackslash: {msg:'Encountered a backslash where it not allowed'},
|
641
|
+
StartOfMatchShouldBeAtStart: {msg: 'The ^ signifies the start of match but was not found at a start'},
|
642
|
+
DollarShouldBeEnd: {msg: 'The $ signifies the stop of match but was not found at a stop'},
|
643
|
+
QuantifierRequiresNumber: {msg:'Quantifier curly requires at least one digit before the comma'},
|
644
|
+
QuantifierRequiresClosingCurly: {msg:'Quantifier curly requires to be closed'},
|
645
|
+
MissingOpeningCurly: {msg:'Encountered closing quantifier curly without seeing an opening curly'}
|
646
|
+
};
|