Elegant (3313/ele003)

Functional-like imperative language based on attribute grammars 


for Exploiting Lazy Evaluation for the Grammar Attributes of Non-Terminals

Elegant started as a compiler generator based on attributed grammars and has grown into a full programming language. Although it has been inspired by the abstraction mechanisms found in modern functional languages, Elegant is an imperative language that does not discourage side-effects.  


Structures:
Related languages
Elegant => RPL   Subsystem
Elegant => scangen   Subsystem

References:
  • Augusteijn, Lex "The elegant compiler generator system" In P. Deransart and M. Jourdan, editors, Attribute Grammars and their Applications, LNCS 461 p238–254 Springer Verlag, September 1990. view details
  • Jansen, P.; Augusteijn, L.; and Munk, H. "An introduction to elegant" Technical report, Philips Research Labratories, Eindhoven, the Netherlands, May 1997. view details
  • Augusteijn, A. "Definition of the programming language elegant" Technical Report D0335, ESPRIT-415, Philips Research Labratories, Eindhoven, the Netherlands, February 2000. view details Abstract: A language for the specification of an attribute grammar has been designed, which is called Elegant. Elegant can also be used as a general purpose programming language.
    Elegant o ers the facility to specify a compiler by means of an attribute grammar. Any non-cyclic attribute dependency relation is allowed. Attributes are implemented by lazy evaluation. Local as well as global attributes are available as user friendly extensions of the attribute grammar formalism. Context conditions can be defined as (condition, message) pairs. Elegant can generate LL(1), LALR(1) and back-tracking parsers. Elegant is an imperative language, ordering a modern type system, which incorporates sub-typing, parameterized types, polymorphic functions and a powerful novel technique for the
    analysis of types by means of pattern matching. Moreover, the paradigm of lazy evaluation is supported by the ability to handle unevaluated expressions explicitly and by the notion of a relation, which is a generalization of an attribute grammar.

    An Elegant specification can be compiled into C modules. The Elegant tool is part of the Elegant compiler generator system, which is a software package consisting of several tools
  • Augusteijn, A. "Front: a frond-end generator for elegant" Technical report, Philips Research Labratories, Eindhoven, the Netherlands, February 2000. view details Abstract: Front is a tool that compiles a front-end speci cation into:
    1. A scanner definition.
    2. A static semantics. This is a set of type declarations that model the structure of the language described.
    3. An attribute grammar. This grammar maps an input text onto a data structure as described in the static semantics.

    As input it accepts type declarations augmented with syntax annotations. These annotations list for each type its syntactic representation. In addition, there are annotation for scope rules and symbol-table handling. An example of the use of the Front tool is the Elegant syntax diagram generator Diagrams. The front-end of this tool is fully generated from an EBNF specification. Front being a compiler, it is also generated with itself, so is the Elegant scanner generator ScanGen.
  • Augusteijn, A. "The elegant scanner generator definition language scangen" Technical Report D0454, ESPRIT-415 subproject A, Philips Research Labratories, Eindhoven, the Netherlands, February 2000. view details
    Resources

    • Documentation package

      "
    • Tutorial
      pdf
    • Language definition
      pdf
    • The Front front-end generator
      pdf
    • Compiler sources

      "