Skip to Content Java Solaris Communities Partners My Sun Sun Store United States Worldwide

»  1992
»  1993
»  1994
»  1995
»  1996
»  1997
»  1998
»  1999
»  2000
»  2001
»  2002
»  2003
»  2004
»  2005
»  2006

Mango: A Parser Generator for Self

Author(s):
Ole Agesen
Report Number: Date Published: Available Formats:
TR-94-27 June 1994 Portable Document Format (PDF)
Postscript (PS)
Request Hard Copy
Abstract

Mango is a parser generator that is included in Release 3.0 of the Self system. Mango goes beyond LEX/YACC in several aspects. First, Mango grammars are structured, thus easier to read and map onto parse trees. Second, Mango parsers automatically build parse trees rather than merely provide hooks for calling low-level reduce actions during parsing. Third, Mango automatically maintains invariance of the structure of parse trees, even while grammars are transformed to enable LR parsing. Fourth, Mango and the parsers it generates are completely integrated in the Self object world. In particular, a parser is an object. Unlike YACC, several independent parsers can co-exist in a single program.

We show how to generate a Mango parser and how to use it by means of an example: a simple expression language. Furthermore, we show how to add semantic properties to the parse trees that the Mango parser produces.

Mango is a realistic tool. A parser for full ANSI C was built with Mango.

Would you recommend this Sun site to a friend or colleague?
Contact About Sun News Employment Privacy Terms of Use Trademarks Copyright 1994-2008 Sun Microsystems, Inc.