Misplaced Pages

Coco/R

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Compiler generator

"Coco-2" redirects here. For the 8-bit home computer, see TRS-80 Color Computer.
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
The topic of this article may not meet Misplaced Pages's notability guidelines for products and services. Please help to demonstrate the notability of the topic by citing reliable secondary sources that are independent of the topic and provide significant coverage of it beyond a mere trivial mention. If notability cannot be shown, the article is likely to be merged, redirected, or deleted.
Find sources: "Coco/R" – news · newspapers · books · scholar · JSTOR (February 2020) (Learn how and when to remove this message)
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Coco/R" – news · newspapers · books · scholar · JSTOR (February 2020) (Learn how and when to remove this message)
(Learn how and when to remove this message)
Coco/R
Original author(s)Hanspeter Mössenböck and others
Initial release2005
PlatformCross-platform
TypeParser/scanner generator
LicenseGPL2
Websitessw.jku.at/Research/Projects/Coco/

Coco/R is a compiler generator that takes wirth syntax notation grammars of a source language and generates a scanner and a parser for that language.

The scanner works as a deterministic finite automaton. It supports Unicode characters in UTF-8 encoding and can be made case-sensitive or case-insensitive. It can also recognize tokens based on their right-hand-side context. In addition to terminal symbols the scanner can also recognize pragmas, which are tokens that are not part of the syntax but can occur anywhere in the input stream (e.g. compiler directives or end-of-line characters).

The parser uses recursive descent; LL(1) conflicts can be resolved by either a multi-symbol lookahead or by semantic checks. Thus the class of accepted grammars is LL(k) for an arbitrary k. Fuzzy parsing is supported by so-called ANY symbols that match complementary sets of tokens. Semantic actions are written in the same language as the generated scanner and parser. The parser's error handling can be tuned by specifying synchronization points and "weak symbols" in the grammar. Coco/R checks the grammar for completeness, consistency, non-redundancy as well as for LL(1) conflicts.

There are versions of Coco/R for Java, C#, C++, Pascal, Modula-2, Modula-3, Delphi, VB.NET, Python, Ruby and other programming languages. The latest versions from the University of Linz are those for C#, Java and C++. For the Java version, there is an Eclipse plug-in and for C#, a Visual Studio plug-in. There are also sample grammars for Java and C#.

Coco/R was originally developed at the ETHZ and moved with Hanspeter Mössenböck to University of Linz when he got his appointment there. Coco/R is distributed under the terms of a slightly relaxed GNU General Public License.

See also

References

  1. In the manual, however, it is referred as L-attributed Extended Backus–Naur Form syntax (EBNF).
  1. ^ Mössenböck, Hanspeter; Kepler, Johannes. "The Compiler Generator Coco/R User Manual" (PDF). Johannes Kepler University Linz, Institute of System Software. Archived (PDF) from the original on 2012-06-19.

Bibliography

External links

Category: