Ratatosk - a parser and scanner generator for Gofer 
Author Message
 Ratatosk - a parser and scanner generator for Gofer

       _/_/_/               _/           _/                  _/
      _/    _/             _/           _/                  _/
     _/    _/           _/_/_/       _/_/_/                _/
    _/_/_/       _/_/_/  _/   _/_/_/  _/   _/_/    _/_/   _/  _/
   _/    _/    _/   _/  _/  _/   _/  _/  _/   _/ _/      _/ _/
  _/     _/   _/   _/  _/  _/   _/  _/  _/   _/  _/_/   _/_/
 _/      _/  _/   _/  _/  _/   _/  _/  _/   _/     _/  _/  _/
_/       _/   _/_/_/  _/   _/_/_/  _/   _/_/   _/_/   _/    _/

        A Parser Generator and Scanner Generator for Gofer


Announcing Ratatosk version 0.1.

Ratatosk started as an exercise to learn to use Gofer, but grew to be
a usable system for generating parsers and scanners to use with Gofer
programs.

The parser generator generates SLR parsers from a context free syntax,
and allows semantic "actions" to be used. The generated parsers will
backtrack over shift/reduce and reduce/reduce conflicts, so non-SLR
languages can be parsed, at the cost of some extra run-time. You will,
however, get warnings about any conflicts found while generating a
parser.

The scanner generator takes a sequence of token declarations using
regular expressions and generates a DFA-based scanner suitable for use
with the generated parsers. The scanners counts line numbers for error
reporting.

The parsers generated by Ratatosk will typically be much faster than
parsers using parser combinators (20-25 times faster in some examples
we have tried). However, they will also be much larger. Another
problem is type-checking. The standard allocation of type variables
for Gofers type checking is not large enough to type-check parsers
generated by Ratatosk for medium to large grammars, so you might have
to recompile Gofer with a larger allocation of type variables.

The scanners generated by Ratatosk will usually compare reasonably
well speed-wise with simple hand-written scanners, and very well with
scanners using parser combinators. However, the scanners tend to get
big and have the same problem with type variables as the generated
parsers.

Ratatosk is available by anonymous ftp from ftp.diku.dk in the
directory pub/diku/dists, in the file Ratatosk.tar.Z. Unpack this by

        uncompress < Ratatosk.tar.Z | tar xvpf -

which creates a directory Ratatosk, containing the system.

The package contains a manual, sources for the parser generator and
scanner generator and some example files, including files for
bootstrapping the system.

Any questions and suggestions can be emailed to




Mon, 22 Jan 1996 20:11:24 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Parser Generator/Scanner Generator for Scheme?

2. Looking for a Parser/Scanner Generator

3. Scanner, Parser Generator Critique

4. critique of scanner and parser generators (Long)

5. critique of scanner and parser generators

6. Wanted: parser-generator/lexical-analyser-generator outputting Scheme

7. Scanner and Parser for IBMST

8. Coco/Rb LL(1) Recursive-decent scanner/parser

9. need help in writing scanner/parser

10. scanner/parser

11. SQL-Parser/Scanner, Cobol2SASConverter

12. LISP Scanner + Parser

 

 
Powered by phpBB® Forum Software