Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
README | D | 07-May-2024 | 2.4 KiB | 52 | 42 | |
antlr3.properties | D | 07-May-2024 | 2.3 KiB | 59 | 54 | |
build.xml | D | 07-May-2024 | 5.3 KiB | 154 | 110 | |
license.txt | D | 07-May-2024 | 301 | 11 | 9 |
README
1### DEPENDENCIES ### 2 3Prerequisites: 4 * Java JRE 1.6 or greater. 5 * Apache Ant 1.7.0 or greater; see http://ant.apache.org/manual/install.html 6 7Before building the JavaScript target you will need to download a few third 8party open source libraries: 9 10 * ant-contrib: Download ant-contrib here: http://downloads.sourceforge.net/ant-contrib/ant-contrib-1.0b3-bin.zip?modtime=1162486738&big_mirror=0 11 * Unzip the downloaded file. 12 * Move ant-contrib-1.0b3.jar from the unzipped directory to runtime/JavaScript/third/ 13 14 * closure compiler: Download here: http://closure-compiler.googlecode.com/files/compiler-latest.zip 15 * Unzip the downloaded file. 16 * Move compiler.jar from the unzipped directory to runtime/JavaScript/third/ 17 18 * jsdoc-toolkit: Download the latest release from here: http://code.google.com/p/jsdoc-toolkit/downloads/list 19 * Unzip the downloaded file. 20 * Move the unzipped folder to runtime/JavaScript/third/jsdoc-toolkit 21 22 * jsunit: Download here: https://sourceforge.net/project/showfiles.php?group_id=28041&package_id=19823&release_id=404277 23 * Unzip the downloaded file. 24 * Move the unzipped folder to runtime/JavaScript/tests/jsunit 25 26### BUILD ### 271) In a shell cd to runtime/JavaScript/build. 282) Run 'ant'. This will build the JavaScript runtime libraries into the 29 runtime/JavaScript/lib folder. 30 31### TESTS ### 32Compile Tests: 331) Build the Antlr tool itself (see main Antlr documentation for details). 34 This is most easily done by cd'ing to the root of the antlr code and running 35 'mvn -Dmaven.test.skip=true package assembly:assembly'. If using a 36 different build method, update runtime/JavaScript/build/antlr3.properties to 37 point to the alternative jar. 382) In a shell cd to runtime/JavaScript/build. 393) Run 'ant compile-tests'. This can take a while. Warnings (but not errors) 40 issued during this step are expected. (We test the JS runtime against 41 grammars that have recoverable problems.) 42 43Run Tests: 441) Compile the tests using the directions above. 452) Open runtime/JavaScript/tests/jsunit/testRunner.html in a browser. Note 46 that some browsers (notably, Firefox 3.5) will have trouble with this page 47 when opened with the 'file://' protocol. To circumvent this issue, start 48 and access the page through a lightweight http server (e.g. Mongoose). 493) Select the file runtime/JavaScript/tests/functional/all.html (or any other 50 test html file). 514) Hit 'Run' and (hopefully ;) watch the pretty green bar grow. 52