Enhanced version of the Rats! Packrat parser generator
Java HTML
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
kmw-rats-ant
kmw-rats-doc
kmw-rats-gen
kmw-rats-rt
.gitignore
ChangeLog.txt
LICENSE.txt
README.md
pom.xml

README.md

kmw-rats

About

This is a modified version of Rats! - a Java Packrat Parser generator - published by Robert Grim as part of his xtc (eXTensible Compiler) project.

Our code is based on version 2.4.0 (2014-08-17) of Rats!, which we have obtained from here. All changes made to this original code base are listed in ChangeLog.txt. Both the original software and our modifications are licensed under a GPL2 License. For details see LICENSE.txt.

Purpose

The purpose of this project is to enhance the runtime architecture of the Rats-generated Java packrat parser. The problem with the original version is, that all generated parser code is thrown into a single Java class file. For large grammars this can lead to an unmanagable size of the generated parser source.
Oracle Labs - Project Fortress for instance, one of the more prominent users of Rats!, generates a single 2MB parser source file out of some 30 grammar modules.

On the other hand Rats! already supports modular grammar definitions, in fact one of its distinguishing features. So why, we have asked ourselfs, not leverage this capability for a modular runtime architecure, and divide the generated code into managable parser code modules? It's not that complicated after all...