Open Source Projects


Mouse: from Parsing Expressions to a practical parser

Parsing Expression Grammar (PEG) is a way to specify recursive-descent parsers with limited backtracking. The use of backtracking lifts the LL(1) restriction usually imposed by top-down parsers. In addition, PEG can define parsers with integrated lexing.

Mouse is a tool to transcribe PEG into an executable parser written in Java. Unlike some existing PEG generators (e.g., Rats!), Mouse does not produce a storage-hungry "packrat parser", but a collection of transparent recursive procedures. An integral feature of Mouse is the mechanism for specifying semantics (also in Java). This makes Mouse a convenient tool if one needs an ad-hoc language processor. Being written in Java, the processor is operating-system independent.

Starting with Version 2.0, Mouse supports left recursion. It uses the method of recursive ascent, explained here.

Included in the package is PEG Explorer, an interactive tool to investigate the effects of limited backtracking in PEG.

Project page (opens in a separate window).
Explorer page (opens in a separate window).
Sample grammars for Java and C.

Download user's manual / tutorial (PDF file).
Download the entire package (gzipped TAR file).


 

Computing with Units

Units is a program for computations on values expressed in terms of different measurement units. An advanced calculator that takes care of the units.

It is perhaps a bit outdated with all calculator applications for smartphones, but it contains an extensive units data base compiled by the original author Adrian Mariano.

Project page (opens in a separate window).

Download Units JAR file.
Download the complete package (gzipped TAR file).

 


Latest change 2021-04-27