[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Environnemt Centaur
- Subject: Re: Environnemt Centaur
- From: td@babar.inria.fr (Thierry Despeyroux)
- Date: 23 Nov 92 08:57:39 GMT
Eric Bertelot (Eric.Bertelot@irisa.fr)
wants to port to Centaur an application developped with its
ancestor Mentor and ask some questions about the files generated by the
Metal compiler.
Grosso modo, the Metal compiler generates two files (in fact, more than that!):
the first one is a source file for yacc which contains some actions associated
to the metal (or yacc) rules. An action either emits the value of a token (an
identifier for exemple) or an integer which is a code that indicates what must
be done to construct the proper abstract syntax tree. The second file is a
table that explains what to do when a particular action code is received by
Mentor or Centaur. In Mentor, I think that this table was made of lists of
integers that was interpreted by Mentor. In Centaur this table has been replaced
by some Lisp code but the purpose is the same. This code is very simple for
most of the rules, but may be more complicated when the Metal "let" and "case"
constructs are used, implying pattern-matching.
The users do not have to manipulate these two files. If you want to port your
Mentor formalism to Centaur you must just modify the Metal source file (I
think that some minor changes in the syntax of Metal have been done) and to
write a new source file for lex, using the skeleton generated by Centaur
(.tokens.x) as explained in the Tutorial.
Thierry.
--
Send contributions and compliments to centaur@sophia.inria.fr. Registration and
administrative matters should be sent to centaur-request@sophia.inria.fr.
+---------------------------------------------------------------------------+
| Thierry Despeyroux | email: Thierry.Despeyroux@sophia.inria.fr |
| I.N.R.I.A. Sophia-Antipolis | phone: +33 93 65 77 07 fax: +33 93 65 77 66 |
+---------------------------------------------------------------------------+