[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SimpleC back end example.



fidel viegas wrote:
> 
> Hi, folks!
> I've recently downloaded the SableCC framework and I'm still getting used to
> it. What I would like to know is :
> In the following example :
> Expr =
>   {Factor} Factor |
>   ...;
> why do we call {Factor} an alternative ?

We need a vocabulary to name things precisely.  In the thesis, I have
used the
term "production" to indicate a term of the form:
  prod = ... | ... | ...;
and I used the term "alternative" to name each [...] component in the
above term.

So, strictly speaking, {Factor} is NOT an alternative; it is the "name"
of the alternative "{Factor} Factor".

The alternative name is used in conjunction with the production name to
create the name of the related AST node type: AFactorExpr.

> Another thing is that I would like to see an example of a back end for the
> SimpleC grammar. It does not matter what machine.

I have contributed the front-end, as well as the points-to analysis:-) 
Any volunteer to contribute a back-end?

Etienne
-- 
----------------------------------------------------------------------
Etienne M. Gagnon, M.Sc.                     e-mail: egagnon@j-meg.com
Author of SableCC:                 http://www.sable.mcgill.ca/sablecc/
----------------------------------------------------------------------