jb -- Parser and Lexer Generation for Java
Last Updated: 7 November 2000
Latest Version: jb-7.0
[ Description
| Retrieving
| Change Log
| Mailing List
| Acknowledgments ]
The jb system allows
Java (tm) parsers to be generated using the Gnu Bison parser generator system.
The parser is written using the standard Bison language,
but the action parts are written in Java.
Jb takes the mixed C-Java file output by Bison and scans it to extract
the parse tables, constants, and actions (in Java). Jb then scans
various template files specified by the user and inserts the
extracted information at specified points in the templates.
In addition to generating parsers,
jb provides three methods of generating corresponding lexers.
- Flex -- the jb system (starting with version 3.0) can also
take lexers generated using the Gnu flex generator and
translate them to execute in Java; this is accomplished with a
program called jf that operates in a manner analogous to jb.
- yylex.generic -- A generic ad-hoc lexer that can be modified
to produce lexers for typical programming languages.
- yytokenizer.generic -- A wrapper for the Java StreamTokenizer
Class.
SERL
Various versions of jb can be obtained from
the Software Engineering Research Laboratory (SERL) software download
web page:
http://www.cs.colorado.edu/serl/software
FTP
Various versions of jb are available at
the University of Colorado anonymous ftp site
(ftp://ftp.cs.colorado.edu/pub/cs/distribs/serl/).
Within that site,
the following ftp references are symbolic links to the latest versions of jb.
- Source:
- ftp://ftp.cs.colorado.edu/pub/cs/distribs/serl/jb.tar
- Information file:
- ftp://ftp.cs.colorado.edu/pub/cs/distribs/serl/jb.txt
Other Locations
The jb system has been listed at the following web sites.
Dependencies:
- Bison --
Jb has been tested with bison version 1.24 and 1.25.
Other versions probably will work as well as long as the
bison output parser is not wildly changed, but jb will issue
a warning when using other versions.
Bison can be obtained
through the Gnu web page
(http://www.gnu.org).
- Flex -- Jb has been tested with flex version 2.5.2 and 2.5.3.
Flex can be obtained
through the Gnu web page
(http://www.gnu.org).
- Java -- As of Jb version 6, jb produces code targeted only at
Java version 1.1.5 or later.
- Starwave Regular Expression Package -- I use this package (version 1.10)
to provide regular expression support.
This package was produced by Jonathan Payne (jpayne@starwave.com).
and is included in the jb distribution.
If you are interested in receiving occasional mailings
about this system, please send your preferred email address
to the contact address below and mentioning the name of this system.
This work is sponsored by
the Defense Advanced Research Projects Agency
and
the Air Force Material Command, Rome Laboratory,
under Contract Number F30602-00-2-0608.
URL for this web page:
http://www.cs.colorado.edu/serl/misc/jb.html
Author: Dennis Heimbigner
<dennis@cs.colorado.edu>