GLAMMAR: text to text translator generator

Eric Vos ericv at phoibos.cs.kun.nl
Sat Dec 15 02:05:50 AEST 1990


Archive site: phoibos.cs.kun.nl  (131.174.81.1)
Archive directory: pub/GLASS/glammar.tar.Z

(Call for beta test sites)

       GLAMMAR  ---- text to text translator generator.

Now available for anonymous ftp on "phoibos.cs.kun.nl",
 at the University of Nijmegen (Netherlands).
Glammar is a powerful and efficient text to text translator generator
 for unix based systems.
Glammar descriptions are translated to C.
Applications range from front ends for compilers
to the description of natural languages.
Here is the introduction from the manual (+- 100 pages)  of the 
distribution (included in "dvi" format).


++++++++++++++++++
                 1.Glammar: Front end compiler compiler

  A number of tools have been developed specifically to help construct transla-
tors. These tools range from scanner and parser generators to complex systems ,
variously called compiler-generators, translator-writing systems or compiler 
compilers. They all require a specification of the source language and target 
machine to produce a compiler for the source language that produces code for 
the target machine. In Glammar, the description of both, the source language and
the associated target machine code, are specified in one same descriptive 
language. The primary advantage of glammar as a compiler compiler is its struct-
ural simplicity. There is no need for the user to make double, losely connected,
specifications, nor the need to program in the traditional imperative style.
  Glammar is perhaps better being defined as syntax-directed text to text \
translation tool or as a pattern transformation language. Usage is not limited 
to the development of (front ends for) compilers.


             2.EAG,  a language description language

  EAG is an acronym of Extended Affix Grammars.  These grammars are an
extension of context free grammars.  We assume the reader has at least some
basic knowledge of context-free grammars. The extensions are:

   (1)Affix expressions labeling nonterminals. This allows nonterminals to yield
      results. The results are composed of results of the members of a nontermi-
      nal together with constants and metanonterminals. Second affixes can be
      used for affix directed parsing which make it possible to describe context
      sensitive languages.
   (2)A metalevel.  The metalevel acts as an abstraction mechanism and
      concerning the Glammar lattice feature it can be used as a very efficient
      unification mechanism.


                   3. Should you use Glammar

  Glammar is most generally defined as a pattern transformation language.
Patterns and their transformations are specified together in one uniform 
descriptive language. A grammar defining a pattern need not to be regular, LL 
or LR.  It may even be ambiguous. For simple grammars a parser created by 
glammar is about as efficient as a YACC generated parser.  More complex ones 
usually have more C code in their YACC implementation and therefore gain some 
speed in comparison with Glammar .
  The best comparison is to PROLOG's Definite Claus Grammars. Some differ-
ences are that Glammar

    - uses flow symbols
    - has an automatic memorizing option (absolute necessary for linguistic
      grammars)
    - offers finite lattices as a metagrammar (with some well defined operators)
      for very fast unification and finally
    - treats backtracking quite different.
    - directly translates to C.

  Glammar is used extensively by people designing and testing grammars for
English, American and Spanish. Glammar is also used in several Esprit projects
at the KU Nijmegen. It is used to implement a parser for Comma (COMputable 
MAthematics) and has been used to implement Glass (General LAnguage for System 
Semantics).

++++++++++++++++++

Problems, bugs or comments can be reported to  ericv at cs.kun.nl

Enjoy,
 Eric Voss.



More information about the Alt.sources mailing list