Coco / R

from Wikipedia, the free encyclopedia
Coco / R
Basic data

Maintainer Institute for System Software, Johannes Kepler University Linz
category Parser generator
License GNU GPL
http://ssw.jku.at/Coco/

Coco / R is a parser generator that generates a scanner and a parser for this language from an L-attributed EBNF grammar of a source language.

The scanner works as a finite automaton . It supports Unicode characters in UTF-8 encoding and can be configured to be case-insensitive. The recognition of symbols can be made dependent on their right context. In addition to terminal symbols, the scanner can also process pragmas ; H. Symbols that do not belong to the syntax of the language, but can appear anywhere in the input stream (e.g. compiler directives or line end characters).

The parser works according to the method of recursive descent . LL (1) conflicts can be resolved by anticipating several symbols or by semantic checks. Thus the class of accepted grammars is LL (k) for any k. Fuzzy parsing can be achieved using an ANY symbol that describes complementary sets of symbols. Semantic actions are described in the language of the generated scanner and parser. Error handling in the generated parser can be refined by specifying synchronization points and "weak terminal symbols". The grammar is also checked for completeness, consistency, freedom from redundancy and its LL (1) property.

There are versions of Coco / R for most modern languages ​​( Java , C # , C ++ , Pascal , Modula-2 , Delphi , VB.NET , Python , Ruby, and others). An Eclipse plug-in is available for the Java version . Grammars for C # and Java are available for download.

Coco / R was developed at the University of Linz and is under a variant of the GNU General Public License .

See also

literature

Web links