Menu

Tree [c93f21] default tip /
 History

Read Only access


File Date Author Commit
 _setup 2012-04-28 Jan Max Meyer Jan Max Meyer [dc592f] Changed license terms from Artistic License to ...
 doc 2008-11-20 beachcoder beachcoder [5635dd] This is the new version 0.30 of JS/CC. Please s...
 samples 2008-12-29 beachcoder beachcoder [afb58b] Rewritten parser drivers with new Parser Contro...
 src 2015-01-05 shatunov shatunov [c93f21] forgot driver in last commit :(
 webenv 2012-04-28 Jan Max Meyer Jan Max Meyer [dc592f] Changed license terms from Artistic License to ...
 CHANGES 2012-04-28 Jan Max Meyer Jan Max Meyer [dc592f] Changed license terms from Artistic License to ...
 LICENSE 2012-04-28 Jan Max Meyer Jan Max Meyer [dc592f] Changed license terms from Artistic License to ...
 README 2012-04-28 Jan Max Meyer Jan Max Meyer [dc592f] Changed license terms from Artistic License to ...
 TODO 2012-04-28 Jan Max Meyer Jan Max Meyer [dc592f] Changed license terms from Artistic License to ...
 jscc.js 2012-04-28 Jan Max Meyer Jan Max Meyer [dc592f] Changed license terms from Artistic License to ...

Read Me

JS/CC LALR(1) Parser Generator
Copyright (C) 2007-2012 by Phorward Software Technologies, Jan Max Meyer
http://jscc.phorward-software.com ++ contact<<AT>>phorward-software<<DOT>>com
--------------------------------------------------------------------------------

INTRODUCION:

JS/CC is the first available parser development system for JavaScript
and ECMAScript-derivates. It has been developed, both, with the
intention of building a productive compiler development system and
with the intention of creating an easy-to-use academic environment for
people interested in how parse table generation is done generally in
bottom-up parsing.

JS/CC brings a lex/yacc-like toolchain into the world of ECMAScript.

LICENSE:

JS/CC is initially written by Jan Max Meyer (Phorward Software Technologies)
with contributions by Louis P. Santillan and Sergiy Shatunov.  JS/CC is
released under the terms and conditions of the 3-clause BSD license.
The file src/v8/v8sh.cc is based on Google's V8 shell.cc and is released under
the terms and conditions of the New BSD License (see file header for details).

REQUIREMENTS:

To use JS/CC, you need either Mozilla/Rhino, Mozilla/Spidermonkey, Microsoft
Windows Script Host, Microsoft JScript.NET, Google V8, or an ordinary
ECMAScript compatible web browser!

Both the Mozilla implementations under Linux are now the assumed default
platforms.

To get additional help and howtos on the various platforms and how to build
JS/CC there, look into the Makefile.<platform> file within the src directory.

A list of the supported platforms and their namings.

	rhino       - Mozilla/Rhino
	sm          - Mozilla/Spidermonkey
	jscript     - Microsoft JScript
	              (both for Windows Script Host and .NET platform)
	v8          - Google V8
	webenv      - Platform-independent, browser-based web environment

_jscc_<platform>.js in the src directory is a bootstrap version of JS/CC to
build JS/CC using itself as parser generator. You can replace these boot-
strappers by using "bootstrap" as make target in the according Makefile.
These bootstrap versions are useful for making changes to the internals of
JS/CC for the same or another platform and then having your local JS/CC
rebuild that new JS/CC.

ABOUT:

JS/CC is a platform-independent software that unions both: A regular
expression-based lexical analyzer generator matching individual tokens from
the input character stream and a LALR(1) parser generator, computing the parse
tables for a given context-free grammar specification to build a stand-alone,
working parser. The context-free grammar fed to JS/CC is defined in a
Backus-Naur-Form-based meta language, and allows the insertion of individual
semantic code to be evaluated on a rule's reduction. JS/CC itself has been
entirely written in JavaScript so it can be executed in many different ways:
as platform-independent, browser-based JavaScript embedded on a Website, as
a Windows Script Host Application, as a compiled JScript.NET executable,
as a Mozilla/Rhino or Mozilla/Spidermonkey interpreted application, or a
V8 shell script on Windows, *nix, Linux and Mac OSX. However, for productive
execution, it is recommended to use the command-line versions.
These versions are capable of assembling a complete compiler from a JS/CC
parser specification, which is then stored to a .js JavaScript source file.

To use JS/CC and for understanding its internals and behavior, some knowledge
of context-free grammars, bottom-up parsing techniques and compiler
construction theory, in general, is assumed.

BUILDING:

The makefiles in src/ support 3 targets for a given platform.  So, for the
rhino platform, you would issue the following commands:

To build JS/CC:
	make -f Makefile.rhino

To rebuild JS/CC from the bootstrap files:
	make -f Makefile.rhino bootstrap

To clean up the JS/CC before issuing one of the above:
	make -f Makefile.rhino clean

USAGE:

In general, using JS/CC uses the following command line:
<js engine> jscc.js -v -o <output.file.js> -p <prefix> -t driver_<platform>.js_ <input.js.par>

For example, when using rhino, issue the following:
rhino jscc.js -v -o rhino_out.js -p rhino -t driver_rhino.js_ rhino_input.js.par