Description
Copper is a Java-based integrated scanner and parser generator developed by the Minnesota Extensible Language Tools (MELT) research group at the University of Minnesota with assistance from the National Science Foundation, IBM, the McKnight Foundation, and Adventium Labs. It serves as the parsing back-end of Silver, another MELT tool.
Copper employs the LALR(1) parsing algorithm in conjunction with a modified scanning algorithm, context-aware scanning, which uses parsing context to resolve lexical ambiguities. This allows for more declarative parser specifications, especially of embedded and extensible languages.
It also provides an analysis for use with extensible languages. The pass/fail analysis is applied independently to each language extension, and any combination of passing extensions is guaranteed to compile without parse-table conflicts. This lets any end-user pick and choose extensions in the same manner as libraries.
Downloads and documentation
This site offers the following downloads:
- JARs for Copper versions 0.6.0 and greater (see CHANGELOG.md for detailed Copper version information).
- Copper's source code, including example parser specifications
- A user manual (in online and PDF formats) intended for those who use Copper directly.
- Javadoc for the APIs of Copper's parser compiler and parsers, intended primarily for developers who wish to use Copper as a back-end.
MELT's Copper website contains:
Papers
- Van Wyk, E. and Schwerdfeger, A. Context-Aware Scanning for Parsing Extensible Languages. In Proceedings of the Intl. Conf. on Generative Programming and Component Engineering (GPCE). ACM Press, October 2007.
- Schwerdfeger, A. and Van Wyk, E. Verifiable Composition of Deterministic Grammars. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM Press, June 2009.
- Schwerdfeger, A. and Van Wyk, E. Verifiable Parse Table Composition for Deterministic Parsing. In Proceedings of the International Conference on Software Language Engineering. LNCS, Springer-Verlag, February 2010.
- Schwerdfeger, A. Context-Aware Scanning and Determinism-Preserving Grammar Composition, in Theory and Practice. Ph.D. thesis, University of Minnesota, July 2010.