Rie - Compiler Fromtend Generation System

Rie is a compiler generator based on attribute grammars.

The class of attribute grammars for which attributes can be evaluated in a single pass during parsing without making a parse tree is called one-pass attribute grammars. This class is worth attention since most modern programming languages are now designed using the one-pass processing techniques. Among one-pass attribute grammars, LR-attributed grammar, which is the class of attribute grammars for which attributes can be evaluated during LR parsing, can be regarded as one of the largest classes concerning translation power.

Rie is based on a variant of LR-attributed grammar where optimization of attribute evaluation is achieved by introducing a kind of equivalence relation among inherited attributes. This class is called ECLR-attributed grammar, where EC stands for equivalence class.

From user's viewpoint, Rie can be regarded as an extension of Yacc (or Bison), a compiler generator running on the Unix operating system. The description format is made similar to that of Yacc. So, it is easy for readers familiar with Yacc to write Rie descriptions. The syntax analysis part of the generated compiler is based on LALR(1) grammar with disambiguating rules. The base language of the semantic part is the programming language C, and types, data structures and functions supported by C can be used in semantic rules. Collaborating with the Unix tools such as Lex is quite easy.

Since the system is completely written in C, it can be easily transported to other machines. Rie is currently running on many machines, mainly on Unix operating systems.


Sassa, M., Ishizuka, H. and Nakata, I.:
Rie, a Compiler Generator Based on a One-Pass Attribute Grammar (in Japanese), Computer Software , Vol. 10, No. 3, pp. 20-36, 1993.

Sassa,M., Ishizuka,H. and Nakata,I.:
Rie, a Compiler Generator Based on a One-pass-type Attribute Grammar, Software- Practice and Experience , Vol. 25, No. 3, pp. 229-250, (Mar. 1995).

The source and manual are available from: ftp://ftp.is.titech.ac.jp/pub/Rie