Up-to-date documentation

View: New views
5 Messages — Rating Filter:   Alert me  

Up-to-date documentation

by xolotl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there anything as thorough as the thesis for the current version of
SableCC?

Thanks,

-- O.L.


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

Re: Up-to-date documentation

by Etienne M. Gagnon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Olivier,

SableCC 3.2 is mostly SableCC 2.x (which is documented in my M.Sc. thesis) with 2 additional features:
  1. CST to AST grammar-specified transformations.
  2. Generation of Java 1.5+ code (using parametric types for lists).
Tree transformations are somewhat described in Komivi (Kevin) Agbakpem's M.Sc. thesis, in French:
 Yet, I would recommend reading the following document, which provides shorter explanations in English:
As for the parametric types, they are not documented, yet, they are an obvious translation of Java 1.4- into 1.5+.

Hoping this helps,

Etienne

Olivier Lefevre a écrit :
Is there anything as thorough as the thesis for the current version of 
SableCC?
  

-- 
Etienne M. Gagnon, Ph.D.
SableCC:                                            http://sablecc.org
SableVM:                                            http://sablevm.org


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

signature.asc (265 bytes) Download Attachment

Re: Up-to-date documentation

by xolotl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>    1. CST to AST grammar-specified transformations.

These are very similar to ANTLR's rewrite rules, correct?

-- O.L.


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion


Re: Up-to-date documentation

by Etienne M. Gagnon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When Kevin did his work, ANTLR did only have a syntax to retain some tokens/rules in a tree, not to transform the tree. It is possible that ANTLR has added a new syntax, later, as Terrence Par came to visit us at UQAM and we shared a few ideas and had a lot of fun. I haven't kept up to date with its latest development, so I can't assert anything.

By transforming the tree, I mean, changing it such as :

CST
 program = declaration* {-> new program([declaration.variable],[declaration.function])};

 declaration {-> variable, function}=
  {function} function {-> Null, function} |
  {variable} variable {-> variable, Null};

AST
  program =
   variable* function*;

See how the CST allows declarations in any order, yet the AST has variables first.
 
Etienne

Olivier Lefevre a écrit :
   1. CST to AST grammar-specified transformations.
    

These are very similar to ANTLR's rewrite rules, correct?
  

-- 
Etienne M. Gagnon, Ph.D.
SableCC:                                            http://sablecc.org
SableVM:                                            http://sablevm.org


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion

signature.asc (265 bytes) Download Attachment

Re: Up-to-date documentation

by xolotl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Etienne M. Gagnon wrote:
> When Kevin did his work, ANTLR did only have a syntax to /retain/ some
> tokens/rules in a tree

Yes, that's the old tree operators. They're still here.

> not to /transform/ the tree. It is possible that ANTLR has added a new syntax

It has. I can't compare in detail but the idea is the same: where operators
won't suffice, rewrite rules let you perform more radical transformations.

-- O.L.


_______________________________________________
SableCC-Discussion mailing list
SableCC-Discussion@...
http://lists.sablecc.org/listinfo/sablecc-discussion