Home
General
Staff
Contact
Partners
Alumni
Research
Areas
Projects
Papers
Books
Reports
Teaching
Lectures
Exams
B.Projects
M.Theses
PhD Theses
Go Abroad
Misc
Library
Seminars
Gallery
Links
Search
Webmaster
|
The Compiler Generator Coco/R
Hanspeter Mössenböck,
Markus Löberbauer,
Albrecht Wöß, University of Linz
Last update: Jan 12, 2010
Documentation |
Coco/R for C#,
Java,
C++,
F#,
VB.Net,
Oberon,
other languages |
Contributions |
Cookbook |
Tools |
Mailing list |
Bugzilla
Coco/R is a compiler generator, which takes an attributed grammar
of a source language and generates a scanner and a parser for this
language. The scanner works as a deterministic finite automaton.
The parser uses recursive descent. LL(1) conflicts can be resolved
by a multi-symbol lookahead or by semantic checks. Thus the class
of accepted grammars is LL(k) for an arbitrary k.
There are versions of Coco/R for different languages (see below).
The latest versions from the University of Linz are those for C#,
Java and C++, which can be downloaded from this site.
An older (non-reentrant) version of Coco/R for C# and Java can be obtained from
here.
Coco/R is distributed under the terms of the
GNU General Public License
(slightly extended).
New:
If you used Coco/R for a project that might also be of interest to others,
please send us a link to a Web page describing the project. We will put those
references online here.
license.txt
|
GNU General Public License (slightly extended)
|
UserManual.pdf
|
language specification and user guide
|
DataStructures.pdf
|
description of the data structures in Coco/R (for those who want to
understand the implementation of Coco/R)
|
TestSuite.zip
|
a test suite for Coco/R (see readme.pdf)
|
JMLC'03 paper
|
LL(1) Conflict Resolution in a Recursive Descent Compiler Generator
|
Tutorial
|
Powerpoint slides of a Coco/R tutorial given at JMLC'06
|
Coco.exe
|
the executable
|
Scanner.frame
|
the frame file from which the scanner is generated
|
Parser.frame
|
the frame file from which the parser is generated
|
CocoSourcesCS.zip
|
the sources (put them in a subdirectory and run build.bat)
|
log.html
|
change log
|
Samples |
|
Taste.zip
|
the sources of the sample compiler (Taste) described in the user manual.
|
CSharp.ATG
|
a sample ATG for C# (a template) that produces a complete scanner and parser for C# source code.
Add your own semantic actions to customize your parser. (last update 2005-06-29)
|
CSParser.cs
|
the source code for the main class of a simple sample C# parser
that uses the scanner and parser generated from the above CSharp.ATG.
It only reports the number of syntax errors found in any parsed C# source.
|
CSharp2.ATG
|
a sample ATG for C# 2.0 (C# Language Specification Working Draft 2.7, Jun, 2004)
that produces a complete scanner and parser for C# 2.0 source code.
Add your own semantic actions to customize your parser. (last update 2007-03-20)
|
CS2Parser.cs
|
the source code for the main class of a simple sample C# parser
that uses the scanner and parser generated from the above CSharp2.ATG.
It only reports the number of syntax errors found in any parsed C# 2.0 source.
|
CSharp3.atg
|
a sample ATG for C# 3.0 (C# Language Specification Version 3.0, 2007)
that produces a complete scanner and parser for C# 3.0 source code.
Add your own semantic actions to customize your parser. Attention, to
use this grammar the default Scanner.frame and Parser.frame must be updated as described
in the top of the grammar. (last update 2009-09-07)
|
Alternative packaging |
|
coco-cs.deb
|
Coco/R as a debian package.
|
coco-cs.tar.gz
|
Coco/R as an tar.gz package, with automake configuration (thanks to Romain Tartière).
|
Coco.jar
|
an archive containing all classes of Coco/R
|
Scanner.frame
|
the frame file from which the scanner is generated
|
Parser.frame
|
the frame file from which the parser is generated
|
CocoSourcesJava.zip
|
the sources (put them in a subdirectory and run build.bat)
|
log.html
|
change log
|
Eclipse Plug-in
|
Integration into the development environment Eclipse
|
Samples |
|
Java.ATG
|
a sample ATG for Java 1.4 (a template) that produces a complete scanner and parser
for Java source code.
Add your own semantic actions to customize your parser.
|
JavaParser.java
|
the source code for the main class of a simple sample Java parser
that uses the scanner and parser generated from the above Java.ATG.
It only reports the number of syntax errors found in any parsed Java source.
|
JavaGrammar.html
|
HTML documentation of the Java grammar used in Java.ATG.
|
Alternative packaging |
|
coco-java.deb
|
Coco/R as a debian package.
|
ported and maintained by Markus Löberbauer and Csaba Balazs
Coco.exe
|
the executable
|
Scanner.frame
|
the frame file from which the scanner is generated
|
Parser.frame
|
the frame file from which the parser is generated
|
CocoSourcesCPP.zip
|
the sources (put them in a subdirectory and run build.bat)
|
log.html
|
change log
|
Samples |
|
Taste.zip
|
the sources of the sample compiler (Taste) described in the user manual.
|
Alternative packaging |
|
coco-cpp.deb
|
Coco/R as a debian package.
|
ported and maintained by Alexandre Pereira
ported and maintained by Adrian Devries
Coco.exe
|
the executable
|
Scanner.frame
|
the frame file from which the scanner is generated
|
Parser.frame
|
the frame file from which the parser is generated
|
CocoSourcesVB.zip
|
the sources (put them in a subdirectory and run build.cmd)
|
log.html
|
change log
|
Samples |
|
Taste.zip
|
the sources of the sample compiler (Taste) described in the user manual.
|
Coco.Cod
|
Oberon archive with the sources of Coco/R; this version is not further developed and
differs from the C# and Java versions. It is also non-reentrant.
|
These versions were ported from the original version of Coco/R
and have a slightly different input language and functionality.
Many projects use Coco/R to parse data e.g. logs, configurations, and user input. Here
we list some great projects doing so. If you used Coco/R for a project that might also
be of interest to others, please send us a link to a Web page describing the project.
Tool and produceer | One sentence summary |
VaP
by
PEC - Petschacher Consulting
|
VaP is a tool for civil engineering and more to calculate
statistical metrics, and make analysis thereof.
|
CocoXml by Charles Wang
|
Implementation of Coco/R in C, and
Coco/R generated XML tag syntax parser.
|
Book
There is an excellent book about using Coco/R for compiler construction:
Pat Terry:
Compiling with C# and Java
Pearson, 2005
We provide a release and changes mailing list
for Coco/R and related stuff.
There you can find changes in Coco/R and interesting stuff around Coco/R like
the C# or Java grammar. Start of the mailing list 2005-08-16.
|