URL:
https://svn.lrde.epita.fr/svn/scool/trunk
ChangeLog:
2007-07-05 Maxime van Noppen <maxime.van-noppen(a)lrde.epita.fr>
Merge main branch to trunk
* AUTHORS: New.
* ChangeLog: .
* Makefile.am: New.
* Makefile: Remove.
* NEWS: New.
* README: New.
* bin/scoolc: New.
* bootstrap: New.
* config/Makefile.am: New.
* config: New.
* configure.ac: New.
* src/Makefile.am: New.
* src/cxx-syn/Cxx.sdf: New.
* src/cxx-syn/CxxDecl.sdf: New.
* src/cxx-syn/CxxExp.sdf: New.
* src/cxx-syn/CxxFun.sdf: New.
* src/cxx-syn/CxxScope.sdf: New.
* src/cxx-syn/CxxStm.sdf: New.
* src/cxx-syn/CxxType.sdf: New.
* src/cxx-syn/Lexical.sdf: New.
* src/cxx-syn/Makefile.am: New.
* src/cxx-syn: New.
* src/parse-scool/parse-scool: New.
* src/pp-cxx/CxxDecl.meta: New.
* src/pp-cxx/CxxDecl.str: New.
* src/pp-cxx/CxxExp.str: New.
* src/pp-cxx/CxxFun.meta: New.
* src/pp-cxx/CxxFun.str: New.
* src/pp-cxx/CxxId.meta: New.
* src/pp-cxx/CxxId.str: New.
* src/pp-cxx/CxxProgram.meta: New.
* src/pp-cxx/CxxProgram.str: New.
* src/pp-cxx/CxxStm.meta: New.
* src/pp-cxx/CxxStm.str: New.
* src/pp-cxx/CxxType.meta: New.
* src/pp-cxx/CxxType.str: New.
* src/pp-cxx/Makefile.am: New.
* src/pp-cxx/pp-cxx.meta: New.
* src/pp-cxx/pp-cxx.str: New.
* src/pp-cxx: New.
* src/scl-syn/Decl.sdf: .
* src/scl-syn/Lexical.sdf: .
* src/scl-syn/Makefile.am: New.
* src/scl-syn/Type.sdf: .
* src/scoolt/Access.str: New.
* src/scoolt/Decl.str: New.
* src/scoolt/Exp.str: New.
* src/scoolt/Makefile.am: New.
* src/scoolt/Program.str: New.
* src/scoolt/Stm.str: New.
* src/scoolt/Tools.str: New.
* src/scoolt/Type.str: New.
* src/scoolt/scoolt.str: New.
* src/scoolt: New.
* tests/input/class_decl_1.scl: New.
* tests/input/class_decl_2.scl: New.
* tests/input/class_decl_3.scl: New.
* tests/input/class_decl_inh.scl: New.
* tests/input/class_decl_inh_abst.scl: New.
* tests/input/class_decl_inh_fin.scl: New.
* tests/input/class_members_1.scl: New.
* tests/input/class_predecl.scl: New.
* tests/input/class_predecl_inh.scl: New.
* tests/input/class_template_1.scl: New.
* tests/input/class_template_2.scl: New.
* tests/input/cons_decl_1.scl: New.
* tests/input/cons_decl_2.scl: New.
* tests/input/function_call_1.scl: New.
* tests/input/function_call_2.scl: New.
* tests/input/function_call_3.scl: New.
* tests/input/function_decl_1.scl: New.
* tests/input/function_decl_10.scl: New.
* tests/input/function_decl_2.scl: New.
* tests/input/function_decl_3.scl: New.
* tests/input/function_decl_4.scl: New.
* tests/input/function_decl_5.scl: New.
* tests/input/function_decl_6.scl: New.
* tests/input/function_decl_7.scl: New.
* tests/input/function_decl_8.scl: New.
* tests/input/function_decl_9.scl: New.
* tests/input/function_ftype_1.scl: New.
* tests/input/function_ftype_2.scl: New.
* tests/input/function_return_1.scl: New.
* tests/input/function_return_2.scl: New.
* tests/input/function_return_3.scl: New.
* tests/input/sample_1.scl: New.
* tests/input/sample_2.scl: New.
* tests/input/sample_3.scl: New.
* tests/input/sample_4.scl: New.
* tests/input/sample_container.scl: New.
* tests/input/var_decl_1.scl: New.
* tests/input/var_decl_2.scl: New.
* tests/input/var_decl_3.scl: New.
* tests/input/var_decl_4.scl: New.
* tests/input/var_decl_5.scl: New.
* tests/input/var_decl_6.scl: New.
* tests/input/var_decl_7.scl: New.
* tests/mouline.sh: .
* tests/parser/class_decl_1.ref: New.
* tests/parser/class_decl_2.ref: New.
* tests/parser/class_decl_3.ref: New.
* tests/parser/class_decl_inh.ref: New.
* tests/parser/class_decl_inh_abst.ref: New.
* tests/parser/class_decl_inh_fin.ref: New.
* tests/parser/class_members_1.ref: New.
* tests/parser/class_predecl.ref: New.
* tests/parser/class_predecl_inh.ref: New.
* tests/parser/class_template_1.ref: New.
* tests/parser/class_template_2.ref: New.
* tests/parser/command: .
* tests/parser/cons_decl_1.ref: New.
* tests/parser/cons_decl_2.ref: New.
* tests/parser/function_call_1.ref: New.
* tests/parser/function_call_2.ref: New.
* tests/parser/function_call_3.ref: New.
* tests/parser/function_decl_1.ref: New.
* tests/parser/function_decl_10.ref: New.
* tests/parser/function_decl_2.ref: New.
* tests/parser/function_decl_3.ref: New.
* tests/parser/function_decl_4.ref: New.
* tests/parser/function_decl_5.ref: New.
* tests/parser/function_decl_6.ref: New.
* tests/parser/function_decl_7.ref: New.
* tests/parser/function_decl_8.ref: New.
* tests/parser/function_decl_9.ref: New.
* tests/parser/function_ftype_1.ref: New.
* tests/parser/function_ftype_2.ref: New.
* tests/parser/function_return_1.ref: New.
* tests/parser/function_return_2.ref: New.
* tests/parser/function_return_3.ref: New.
* tests/parser/sample_1.ref: New.
* tests/parser/sample_2.ref: New.
* tests/parser/sample_3.ref: New.
* tests/parser/sample_4.ref: New.
* tests/parser/var_decl_1.ref: New.
* tests/parser/var_decl_2.ref: New.
* tests/parser/var_decl_3.ref: New.
* tests/parser/var_decl_4.ref: New.
* tests/parser/var_decl_5.ref: New.
* tests/parser/var_decl_6.ref: New.
* tests/transformer/class_decl_1.ref: New.
* tests/transformer/class_decl_2.ref: New.
* tests/transformer/class_decl_3.ref: New.
* tests/transformer/class_decl_abst.ref: New.
* tests/transformer/class_decl_inh.ref: New.
* tests/transformer/class_decl_inh_abst.ref: New.
* tests/transformer/class_decl_inh_fin.ref: New.
* tests/transformer/class_members_1.ref: New.
* tests/transformer/class_predecl.ref: New.
* tests/transformer/class_predecl_inh.ref: New.
* tests/transformer/class_template_1.ref: New.
* tests/transformer/class_template_2.ref: New.
* tests/transformer/command: New.
* tests/transformer/cons_decl_1.ref: New.
* tests/transformer/cons_decl_2.ref: New.
* tests/transformer/empty.ref: New.
* tests/transformer/function_decl_1.ref: New.
* tests/transformer/function_decl_10.ref: New.
* tests/transformer/function_decl_3.ref: New.
* tests/transformer/function_decl_4.ref: New.
* tests/transformer/function_decl_5.ref: New.
* tests/transformer/function_decl_6.ref: New.
* tests/transformer/function_decl_7.ref: New.
* tests/transformer/function_decl_8.ref: New.
* tests/transformer/function_decl_9.ref: New.
* tests/transformer/function_return_1.ref: New.
* tests/transformer/function_return_2.ref: New.
* tests/transformer/function_return_3.ref: New.
* tests/transformer/sample_1.ref: New.
* tests/transformer/sample_3.ref: New.
* tests/transformer/sample_4.ref: New.
* tests/transformer/var_decl_1.ref: New.
* tests/transformer/var_decl_2.ref: New.
* tests/transformer/var_decl_3.ref: New.
* tests/transformer/var_decl_5.ref: New.
* tests/transformer/var_decl_6.ref: New.
* tests/transformer: New.
AUTHORS | 2
Makefile.am | 10
bin/scoolc | 17
bootstrap | 7
config/Makefile.am | 15
configure.ac | 29 +
src/Makefile | 835 +++++++++++++++++++++++++++---
src/Makefile.am | 7
src/cxx-syn/Cxx.sdf | 12
src/cxx-syn/CxxDecl.sdf | 34 +
src/cxx-syn/CxxExp.sdf | 15
src/cxx-syn/CxxFun.sdf | 24
src/cxx-syn/CxxStm.sdf | 11
src/cxx-syn/CxxType.sdf | 14
src/cxx-syn/Lexical.sdf | 15
src/cxx-syn/Makefile.am | 19
src/parse-scool/parse-scool | 1
src/pp-cxx/CxxDecl.meta | 1
src/pp-cxx/CxxDecl.str | 90 +++
src/pp-cxx/CxxExp.str | 31 +
src/pp-cxx/CxxFun.meta | 1
src/pp-cxx/CxxFun.str | 69 ++
src/pp-cxx/CxxId.meta | 1
src/pp-cxx/CxxId.str | 12
src/pp-cxx/CxxProgram.meta | 1
src/pp-cxx/CxxProgram.str | 15
src/pp-cxx/CxxStm.meta | 1
src/pp-cxx/CxxStm.str | 8
src/pp-cxx/CxxType.meta | 1
src/pp-cxx/CxxType.str | 25
src/pp-cxx/Makefile.am | 21
src/pp-cxx/pp-cxx.meta | 1
src/pp-cxx/pp-cxx.str | 6
src/scl-syn/Decl.sdf | 8
src/scl-syn/Lexical.sdf | 7
src/scl-syn/Makefile.am | 19
src/scl-syn/Type.sdf | 2
src/scoolt/Access.str | 15
src/scoolt/Decl.str | 229 ++++++++
src/scoolt/Exp.str | 21
src/scoolt/Makefile.am | 21
src/scoolt/Program.str | 8
src/scoolt/Stm.str | 21
src/scoolt/Tools.str | 29 +
src/scoolt/Type.str | 32 +
src/scoolt/scoolt.str | 184 ++++++
tests/input/class_decl_1.scl | 1
tests/input/class_decl_2.scl | 15
tests/input/class_decl_3.scl | 12
tests/input/class_decl_inh.scl | 9
tests/input/class_decl_inh_abst.scl | 9
tests/input/class_decl_inh_fin.scl | 14
tests/input/class_members_1.scl | 6
tests/input/class_predecl.scl | 1
tests/input/class_predecl_inh.scl | 1
tests/input/class_template_1.scl | 3
tests/input/class_template_2.scl | 3
tests/input/cons_decl_1.scl | 1
tests/input/cons_decl_2.scl | 1
tests/input/function_call_1.scl | 4
tests/input/function_call_2.scl | 4
tests/input/function_call_3.scl | 1
tests/input/function_decl_1.scl | 2
tests/input/function_decl_10.scl | 1
tests/input/function_decl_2.scl | 1
tests/input/function_decl_3.scl | 1
tests/input/function_decl_4.scl | 3
tests/input/function_decl_5.scl | 2
tests/input/function_decl_6.scl | 3
tests/input/function_decl_7.scl | 4
tests/input/function_decl_8.scl | 1
tests/input/function_decl_9.scl | 1
tests/input/function_ftype_1.scl | 1
tests/input/function_ftype_2.scl | 1
tests/input/function_return_1.scl | 4
tests/input/function_return_2.scl | 4
tests/input/function_return_3.scl | 1
tests/input/sample_1.scl | 9
tests/input/sample_2.scl | 5
tests/input/sample_3.scl | 9
tests/input/sample_4.scl | 4
tests/input/sample_container.scl | 26
tests/input/var_decl_1.scl | 1
tests/input/var_decl_2.scl | 1
tests/input/var_decl_3.scl | 4
tests/input/var_decl_4.scl | 1
tests/input/var_decl_5.scl | 1
tests/input/var_decl_6.scl | 1
tests/input/var_decl_7.scl | 1
tests/mouline.sh | 116 +++-
tests/parser/class_decl_1.ref | 1
tests/parser/class_decl_2.ref | 1
tests/parser/class_decl_3.ref | 1
tests/parser/class_decl_inh.ref | 1
tests/parser/class_decl_inh_abst.ref | 1
tests/parser/class_decl_inh_fin.ref | 1
tests/parser/class_members_1.ref | 1
tests/parser/class_predecl.ref | 1
tests/parser/class_predecl_inh.ref | 1
tests/parser/class_template_1.ref | 1
tests/parser/class_template_2.ref | 1
tests/parser/command | 2
tests/parser/cons_decl_1.ref | 1
tests/parser/cons_decl_2.ref | 1
tests/parser/function_call_1.ref | 1
tests/parser/function_call_2.ref | 1
tests/parser/function_call_3.ref | 1
tests/parser/function_decl_1.ref | 1
tests/parser/function_decl_10.ref | 1
tests/parser/function_decl_2.ref | 1
tests/parser/function_decl_3.ref | 1
tests/parser/function_decl_4.ref | 1
tests/parser/function_decl_5.ref | 1
tests/parser/function_decl_6.ref | 1
tests/parser/function_decl_7.ref | 1
tests/parser/function_decl_8.ref | 1
tests/parser/function_decl_9.ref | 1
tests/parser/function_ftype_1.ref | 1
tests/parser/function_ftype_2.ref | 1
tests/parser/function_return_1.ref | 1
tests/parser/function_return_2.ref | 1
tests/parser/function_return_3.ref | 1
tests/parser/sample_1.ref | 1
tests/parser/sample_2.ref | 1
tests/parser/sample_3.ref | 1
tests/parser/sample_4.ref | 1
tests/parser/var_decl_1.ref | 1
tests/parser/var_decl_2.ref | 1
tests/parser/var_decl_3.ref | 1
tests/parser/var_decl_4.ref | 1
tests/parser/var_decl_5.ref | 1
tests/parser/var_decl_6.ref | 1
tests/transformer/class_decl_1.ref | 11
tests/transformer/class_decl_2.ref | 20
tests/transformer/class_decl_3.ref | 20
tests/transformer/class_decl_abst.ref | 1
tests/transformer/class_decl_inh.ref | 19
tests/transformer/class_decl_inh_abst.ref | 17
tests/transformer/class_decl_inh_fin.ref | 26
tests/transformer/class_members_1.ref | 13
tests/transformer/class_predecl.ref | 5
tests/transformer/class_predecl_inh.ref | 4
tests/transformer/class_template_1.ref | 7
tests/transformer/class_template_2.ref | 7
tests/transformer/command | 85 +++
tests/transformer/cons_decl_1.ref | 4
tests/transformer/cons_decl_2.ref | 4
tests/transformer/empty.ref | 2
tests/transformer/function_decl_1.ref | 6
tests/transformer/function_decl_10.ref | 7
tests/transformer/function_decl_3.ref | 4
tests/transformer/function_decl_4.ref | 6
tests/transformer/function_decl_5.ref | 6
tests/transformer/function_decl_6.ref | 7
tests/transformer/function_decl_7.ref | 8
tests/transformer/function_decl_8.ref | 8
tests/transformer/function_decl_9.ref | 8
tests/transformer/function_return_1.ref | 7
tests/transformer/function_return_2.ref | 7
tests/transformer/function_return_3.ref | 7
tests/transformer/sample_1.ref | 10
tests/transformer/sample_3.ref | 11
tests/transformer/sample_4.ref | 7
tests/transformer/var_decl_1.ref | 4
tests/transformer/var_decl_2.ref | 4
tests/transformer/var_decl_3.ref | 6
tests/transformer/var_decl_5.ref | 4
tests/transformer/var_decl_6.ref | 4
168 files changed, 2573 insertions(+), 87 deletions(-)
Index: trunk/Makefile (deleted)
===================================================================
Index: trunk/tests/input/class_members_1.scl
===================================================================
--- trunk/tests/input/class_members_1.scl (revision 0)
+++ trunk/tests/input/class_members_1.scl (revision 49)
@@ -0,0 +1,6 @@
+final Student : class =
+{
+ public {
+ var money : int;
+ }
+};
Index: trunk/tests/input/class_predecl_inh.scl
===================================================================
--- trunk/tests/input/class_predecl_inh.scl (revision 0)
+++ trunk/tests/input/class_predecl_inh.scl (revision 49)
@@ -0,0 +1 @@
+Foo : class < Bar;
Index: trunk/tests/input/sample_1.scl
===================================================================
--- trunk/tests/input/sample_1.scl (revision 0)
+++ trunk/tests/input/sample_1.scl (revision 49)
@@ -0,0 +1,9 @@
+
+f : () -> void =
+{
+ i : int16 = 3;
+ i := 4;
+
+ var j : int16 := 3;
+ j := 4;
+}
Index: trunk/tests/input/sample_2.scl
===================================================================
--- trunk/tests/input/sample_2.scl (revision 0)
+++ trunk/tests/input/sample_2.scl (revision 49)
@@ -0,0 +1,5 @@
+f : () -> void =
+{
+ var a : array[int16, 2];
+ var i : int16 := a.at(0);
+}
Index: trunk/tests/input/class_decl_inh_abst.scl
===================================================================
--- trunk/tests/input/class_decl_inh_abst.scl (revision 0)
+++ trunk/tests/input/class_decl_inh_abst.scl (revision 49)
@@ -0,0 +1,9 @@
+abstract Animal: class =
+{
+
+};
+
+Mammal : class < Animal =
+{
+
+};
Index: trunk/tests/input/class_predecl.scl
===================================================================
--- trunk/tests/input/class_predecl.scl (revision 0)
+++ trunk/tests/input/class_predecl.scl (revision 49)
@@ -0,0 +1 @@
+Foo : class;
Index: trunk/tests/input/sample_3.scl
===================================================================
--- trunk/tests/input/sample_3.scl (revision 0)
+++ trunk/tests/input/sample_3.scl (revision 49)
@@ -0,0 +1,9 @@
+f : () -> void =
+{
+ var i : int;
+ var j : int;
+
+ i := 0;
+ j := i;
+ i := j + i;
+}
Index: trunk/tests/input/function_return_1.scl
===================================================================
--- trunk/tests/input/function_return_1.scl (revision 0)
+++ trunk/tests/input/function_return_1.scl (revision 49)
@@ -0,0 +1,4 @@
+answer : () -> int =
+{
+ -> 42;
+}
Index: trunk/tests/input/sample_4.scl
===================================================================
--- trunk/tests/input/sample_4.scl (revision 0)
+++ trunk/tests/input/sample_4.scl (revision 49)
@@ -0,0 +1,4 @@
+sqrt : (arg : float) -> float =
+{
+ -> |[ std::sqrt(arg) ]|;
+}
Index: trunk/tests/input/function_return_2.scl
===================================================================
--- trunk/tests/input/function_return_2.scl (revision 0)
+++ trunk/tests/input/function_return_2.scl (revision 49)
@@ -0,0 +1,4 @@
+answer : (a : int, b : bool) -> int =
+{
+ -> 42;
+}
Index: trunk/tests/input/function_return_3.scl
===================================================================
--- trunk/tests/input/function_return_3.scl (revision 0)
+++ trunk/tests/input/function_return_3.scl (revision 49)
@@ -0,0 +1 @@
+answer : () -> int => 42;
Index: trunk/tests/input/cons_decl_1.scl
===================================================================
--- trunk/tests/input/cons_decl_1.scl (revision 0)
+++ trunk/tests/input/cons_decl_1.scl (revision 49)
@@ -0,0 +1 @@
+i : int;
Index: trunk/tests/input/cons_decl_2.scl
===================================================================
--- trunk/tests/input/cons_decl_2.scl (revision 0)
+++ trunk/tests/input/cons_decl_2.scl (revision 49)
@@ -0,0 +1 @@
+i : int = 3;
Index: trunk/tests/input/class_decl_1.scl
===================================================================
--- trunk/tests/input/class_decl_1.scl (revision 0)
+++ trunk/tests/input/class_decl_1.scl (revision 49)
@@ -0,0 +1 @@
+Foo: class = {};
Index: trunk/tests/input/class_decl_2.scl
===================================================================
--- trunk/tests/input/class_decl_2.scl (revision 0)
+++ trunk/tests/input/class_decl_2.scl (revision 49)
@@ -0,0 +1,15 @@
+point : class =
+{
+ public
+ {
+ x : () -> int =
+ {
+ -> x;
+ }
+ }
+ private
+ {
+ var x :int;
+ var y :int;
+ }
+};
Index: trunk/tests/input/class_decl_3.scl
===================================================================
--- trunk/tests/input/class_decl_3.scl (revision 0)
+++ trunk/tests/input/class_decl_3.scl (revision 49)
@@ -0,0 +1,12 @@
+point : class =
+{
+ public
+ {
+ x : () -> int => x;
+ }
+ private
+ {
+ var x :int;
+ var y :int;
+ }
+};
Index: trunk/tests/input/class_template_1.scl
===================================================================
--- trunk/tests/input/class_template_1.scl (revision 0)
+++ trunk/tests/input/class_template_1.scl (revision 49)
@@ -0,0 +1,3 @@
+A : [T : type] -> class =
+{
+}
Index: trunk/tests/input/class_template_2.scl
===================================================================
--- trunk/tests/input/class_template_2.scl (revision 0)
+++ trunk/tests/input/class_template_2.scl (revision 49)
@@ -0,0 +1,3 @@
+A : [T : type, B : bool] -> class =
+{
+}
Index: trunk/tests/input/class_decl_inh.scl
===================================================================
--- trunk/tests/input/class_decl_inh.scl (revision 0)
+++ trunk/tests/input/class_decl_inh.scl (revision 49)
@@ -0,0 +1,9 @@
+Bar: class =
+{
+
+};
+
+Foo : class < Bar =
+{
+
+};
Index: trunk/tests/input/function_decl_1.scl
===================================================================
--- trunk/tests/input/function_decl_1.scl (revision 0)
+++ trunk/tests/input/function_decl_1.scl (revision 49)
@@ -0,0 +1,2 @@
+f : (a: int, b : int) -> bool =
+{}
Index: trunk/tests/input/function_decl_2.scl
===================================================================
--- trunk/tests/input/function_decl_2.scl (revision 0)
+++ trunk/tests/input/function_decl_2.scl (revision 49)
@@ -0,0 +1 @@
+f : [i : int where i > 0]() -> int = {}
Index: trunk/tests/input/function_decl_3.scl
===================================================================
--- trunk/tests/input/function_decl_3.scl (revision 0)
+++ trunk/tests/input/function_decl_3.scl (revision 49)
@@ -0,0 +1 @@
+decl foo : () -> void;
Index: trunk/tests/input/function_decl_4.scl
===================================================================
--- trunk/tests/input/function_decl_4.scl (revision 0)
+++ trunk/tests/input/function_decl_4.scl (revision 49)
@@ -0,0 +1,3 @@
+decl foo : () -> void;
+decl foo : (arg1 : int) -> float;
+decl foo : (arg1 : toto, arg2 : ref double) -> char;
Index: trunk/tests/input/var_decl_1.scl
===================================================================
--- trunk/tests/input/var_decl_1.scl (revision 0)
+++ trunk/tests/input/var_decl_1.scl (revision 49)
@@ -0,0 +1 @@
+var i : int;
Index: trunk/tests/input/function_decl_5.scl
===================================================================
--- trunk/tests/input/function_decl_5.scl (revision 0)
+++ trunk/tests/input/function_decl_5.scl (revision 49)
@@ -0,0 +1,2 @@
+f : (a: int, b: ref int) -> bool =
+{}
Index: trunk/tests/input/function_call_1.scl
===================================================================
--- trunk/tests/input/function_call_1.scl (revision 0)
+++ trunk/tests/input/function_call_1.scl (revision 49)
@@ -0,0 +1,4 @@
+doit : () -> int =
+{
+ -> foo();
+}
\ No newline at end of file
Index: trunk/tests/input/var_decl_2.scl
===================================================================
--- trunk/tests/input/var_decl_2.scl (revision 0)
+++ trunk/tests/input/var_decl_2.scl (revision 49)
@@ -0,0 +1 @@
+var i : int := 42;
Index: trunk/tests/input/function_decl_6.scl
===================================================================
--- trunk/tests/input/function_decl_6.scl (revision 0)
+++ trunk/tests/input/function_decl_6.scl (revision 49)
@@ -0,0 +1,3 @@
+f : [T : type] () -> void =
+{
+}
Index: trunk/tests/input/function_call_2.scl
===================================================================
--- trunk/tests/input/function_call_2.scl (revision 0)
+++ trunk/tests/input/function_call_2.scl (revision 49)
@@ -0,0 +1,4 @@
+doit : () -> int =
+{
+ -> foo("bar", "baz");
+}
\ No newline at end of file
Index: trunk/tests/input/var_decl_3.scl
===================================================================
--- trunk/tests/input/var_decl_3.scl (revision 0)
+++ trunk/tests/input/var_decl_3.scl (revision 49)
@@ -0,0 +1,4 @@
+answer : int = 42;
+
+var i : int;
+var j : int := i;
Index: trunk/tests/input/function_decl_7.scl
===================================================================
--- trunk/tests/input/function_decl_7.scl (revision 0)
+++ trunk/tests/input/function_decl_7.scl (revision 49)
@@ -0,0 +1,4 @@
+f : [T : type] (a : int) -> void =
+{
+ -> 42;
+}
Index: trunk/tests/input/function_call_3.scl
===================================================================
--- trunk/tests/input/function_call_3.scl (revision 0)
+++ trunk/tests/input/function_call_3.scl (revision 49)
@@ -0,0 +1 @@
+i : int = pow[4](3);
Index: trunk/tests/input/var_decl_4.scl
===================================================================
--- trunk/tests/input/var_decl_4.scl (revision 0)
+++ trunk/tests/input/var_decl_4.scl (revision 49)
@@ -0,0 +1 @@
+var l : list[int];
Index: trunk/tests/input/function_decl_8.scl
===================================================================
--- trunk/tests/input/function_decl_8.scl (revision 0)
+++ trunk/tests/input/function_decl_8.scl (revision 49)
@@ -0,0 +1 @@
+f : [T : type] (a : int) -> void => 42;
Index: trunk/tests/input/var_decl_5.scl
===================================================================
--- trunk/tests/input/var_decl_5.scl (revision 0)
+++ trunk/tests/input/var_decl_5.scl (revision 49)
@@ -0,0 +1 @@
+var a : array[int, 42];
Index: trunk/tests/input/function_decl_9.scl
===================================================================
--- trunk/tests/input/function_decl_9.scl (revision 0)
+++ trunk/tests/input/function_decl_9.scl (revision 49)
@@ -0,0 +1 @@
+f : [T : type] (a : T) -> T => a + 42;
Index: trunk/tests/input/var_decl_6.scl
===================================================================
--- trunk/tests/input/var_decl_6.scl (revision 0)
+++ trunk/tests/input/var_decl_6.scl (revision 49)
@@ -0,0 +1 @@
+var a : buffer[int];
Index: trunk/tests/input/var_decl_7.scl
===================================================================
--- trunk/tests/input/var_decl_7.scl (revision 0)
+++ trunk/tests/input/var_decl_7.scl (revision 49)
@@ -0,0 +1 @@
+var a : test[int];
Index: trunk/tests/input/function_decl_10.scl
===================================================================
--- trunk/tests/input/function_decl_10.scl (revision 0)
+++ trunk/tests/input/function_decl_10.scl (revision 49)
@@ -0,0 +1 @@
+f : (a : int, b : double) -> double => a + b;
Index: trunk/tests/input/function_ftype_1.scl
===================================================================
--- trunk/tests/input/function_ftype_1.scl (revision 0)
+++ trunk/tests/input/function_ftype_1.scl (revision 49)
@@ -0,0 +1 @@
+var f : () -> void;
Index: trunk/tests/input/function_ftype_2.scl
===================================================================
--- trunk/tests/input/function_ftype_2.scl (revision 0)
+++ trunk/tests/input/function_ftype_2.scl (revision 49)
@@ -0,0 +1 @@
+var f : (int, bool) -> float;
Index: trunk/tests/input/sample_container.scl
===================================================================
--- trunk/tests/input/sample_container.scl (revision 0)
+++ trunk/tests/input/sample_container.scl (revision 49)
@@ -0,0 +1,26 @@
+// Container
+
+Container : class =
+{
+ public {
+ value_type : type;
+
+ iterator : type;
+ const_iterator : type;
+
+ reference : type;
+ const_reference : type;
+
+ size_type : type;
+
+ decl begin : () -> iterator;
+ decl begin : const () -> const_iterator;
+
+ decl end : () -> iterator;
+ decl end : const () -> const_iterator;
+
+ decl size : const () -> size_type;
+ decl empty : const () -> bool;
+ }
+};
+
Index: trunk/tests/input/class_decl_inh_fin.scl
===================================================================
--- trunk/tests/input/class_decl_inh_fin.scl (revision 0)
+++ trunk/tests/input/class_decl_inh_fin.scl (revision 49)
@@ -0,0 +1,14 @@
+Animal: class =
+{
+
+};
+
+Mammal : class < Animal =
+{
+
+};
+
+final Monkey : class < Mammal =
+{
+
+};
Index: trunk/tests/mouline.sh
===================================================================
--- trunk/tests/mouline.sh (revision 48)
+++ trunk/tests/mouline.sh (revision 49)
@@ -1,7 +1,4 @@
-function align
-{
- echo -e -n "\033[$1G"
-}
+#!/bin/sh
red="\033[33;00;31m"
bred="\033[33;01;31m"
@@ -12,31 +9,106 @@
blue="\033[33;00;34m"
bblue="\033[33;01;34m"
-alias echo="echo -e"
+print_diff=0
+gen_ref=0
+
+align ()
+{
+ echo -e -n "\033[$1G"
+}
-for dir in `dirname $0`/*; do
- if [ -d "$dir" ] && ! [ "x"`basename $dir` =
"xinput" ]; then
+prolog()
+{
align 2
- echo $bblue`basename $dir`
- for test in $dir/*.ref; do
- name=${test%.ref}
- name=${name#$dir/}
+ echo -e ${bblue}`basename ${1}`/
+}
+
+perform_test()
+{
+ test_name=`basename $1 .scl`
+ input=$1
+ ref=$2/${test_name}.ref
+ cmd=$2/command
+
align 6
- echo -n $yell$name
- align 26
- if [ "x$1" = "x--gen" ]; then
- `cat $dir/command` -i input/$name.scl > $test
- echo
+ echo -e -n ${yell}${test_name}
+ align 36
+
+ if [ $gen_ref -eq 1 ]; then
+ $cmd $input > $ref
+ else
+ if [ -r $ref ]; then
+ cmd_log=`$cmd $input 2> /dev/null`
+ diff_log=`printf "%s\n" "$cmd_log" | diff -u $ref -`
+ if [ "$diff_log" = "" ]; then
+ echo -e "$bblue[$bgreen ok $bblue]"
else
- if `dirname $0`/`cat $dir/command` -i `dirname $0`/input/$name.scl | diff - $test >
/dev/null 2> /dev/null; then
- echo "$bblue[$bgreen ok $bblue]"
+ echo -e "$bblue[$bred ko $bblue]"
+ if [ $print_diff -eq 1 ]; then
+ echo -e -n $red
+ echo "$diff_log"
+ echo -e
+ fi
+ fi
else
- echo "$bblue[$bred ko $bblue]"
- echo -n $red
- `dirname $0`/`cat $dir/command` -i `dirname $0`/input/$name.scl | diff - $test
- echo
+ echo -e "$bblue[$byell sk $bblue]"
+ echo -e -n $red
fi
fi
+}
+
+# Parse command line options
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -d | --diff)
+ print_diff=1
+ ;;
+
+ -g | --gen)
+ gen_ref=1
+ ;;
+
+ -*)
+ echo Unknown option : $1
+ exit 1
+ ;;
+
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+# If files are given on the command line, only check those tests
+cmd_line=0
+while [ $# -gt 0 ]
+do
+ cmd_line=1
+ prolog "$1"
+
+ for dir in `dirname $0`/*
+ do
+ align 4
+ if [ -d "$dir" ] && ! [ "`basename $dir`" =
"input" ]; then
+ echo -e ${red}`basename ${dir}`/
+ perform_test "$1" "$dir"
+ fi
+ done
+ shift
+done
+
+if [ $cmd_line -eq 1 ]; then
+ exit 0
+fi
+
+for dir in `dirname $0`/*
+do
+ if [ -d "$dir" ] && ! [ "`basename $dir`" =
"input" ]; then
+ prolog "$dir"
+ for input in `dirname $0`/input/*.scl; do
+ perform_test "$input" "$dir"
done
fi
done
Index: trunk/tests/transformer/sample_4.ref
===================================================================
--- trunk/tests/transformer/sample_4.ref (revision 0)
+++ trunk/tests/transformer/sample_4.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+float sqrt(float arg)
+{
+ return std::sqrt(arg);
+}
Index: trunk/tests/transformer/function_return_1.ref
===================================================================
--- trunk/tests/transformer/function_return_1.ref (revision 0)
+++ trunk/tests/transformer/function_return_1.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int answer()
+{
+ return 42;
+}
Index: trunk/tests/transformer/function_return_2.ref
===================================================================
--- trunk/tests/transformer/function_return_2.ref (revision 0)
+++ trunk/tests/transformer/function_return_2.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int answer(int a, bool b)
+{
+ return 42;
+}
Index: trunk/tests/transformer/class_decl_abst.ref
===================================================================
--- trunk/tests/transformer/class_decl_abst.ref (revision 0)
+++ trunk/tests/transformer/class_decl_abst.ref (revision 49)
@@ -0,0 +1 @@
+
Index: trunk/tests/transformer/function_return_3.ref
===================================================================
--- trunk/tests/transformer/function_return_3.ref (revision 0)
+++ trunk/tests/transformer/function_return_3.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int answer()
+{
+ return 42;
+}
Index: trunk/tests/transformer/cons_decl_1.ref
===================================================================
--- trunk/tests/transformer/cons_decl_1.ref (revision 0)
+++ trunk/tests/transformer/cons_decl_1.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+const int i;
Index: trunk/tests/transformer/cons_decl_2.ref
===================================================================
--- trunk/tests/transformer/cons_decl_2.ref (revision 0)
+++ trunk/tests/transformer/cons_decl_2.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+const int i = 3;
Index: trunk/tests/transformer/class_decl_1.ref
===================================================================
--- trunk/tests/transformer/class_decl_1.ref (revision 0)
+++ trunk/tests/transformer/class_decl_1.ref (revision 49)
@@ -0,0 +1,11 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Foo
+
+template < typename T >
+class Foo_: public stc::any<stc_find_exact(Foo_, T)>
+{
+};
+
+typedef Foo_<stc::itself> Foo;
Index: trunk/tests/transformer/class_decl_2.ref
===================================================================
--- trunk/tests/transformer/class_decl_2.ref (revision 0)
+++ trunk/tests/transformer/class_decl_2.ref (revision 49)
@@ -0,0 +1,20 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class point
+
+template < typename T >
+class point_: public stc::any<stc_find_exact(point_, T)>
+{
+ public:
+ int x()
+ {
+ return x;
+ }
+
+ private:
+ int x;
+ int y;
+};
+
+typedef point_<stc::itself> point;
Index: trunk/tests/transformer/class_decl_3.ref
===================================================================
--- trunk/tests/transformer/class_decl_3.ref (revision 0)
+++ trunk/tests/transformer/class_decl_3.ref (revision 49)
@@ -0,0 +1,20 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class point
+
+template < typename T >
+class point_: public stc::any<stc_find_exact(point_, T)>
+{
+ public:
+ int x()
+ {
+ return x;
+ }
+
+ private:
+ int x;
+ int y;
+};
+
+typedef point_<stc::itself> point;
Index: trunk/tests/transformer/class_template_1.ref
===================================================================
--- trunk/tests/transformer/class_template_1.ref (revision 0)
+++ trunk/tests/transformer/class_template_1.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+class A
+{
+};
Index: trunk/tests/transformer/class_template_2.ref
===================================================================
--- trunk/tests/transformer/class_template_2.ref (revision 0)
+++ trunk/tests/transformer/class_template_2.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T, bool B >
+class A
+{
+};
Index: trunk/tests/transformer/class_decl_inh.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh.ref (revision 0)
+++ trunk/tests/transformer/class_decl_inh.ref (revision 49)
@@ -0,0 +1,19 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Bar
+
+template < typename T >
+class Bar_: public stc::any<stc_find_exact(Bar_, T)>
+{
+};
+
+typedef Bar_<stc::itself> Bar;
+// Class Foo
+
+template < typename T >
+class Foo_: public Bar_<stc_find_exact(Foo_, T)>
+{
+};
+
+typedef Foo_<stc::itself> Foo;
Index: trunk/tests/transformer/function_decl_1.ref
===================================================================
--- trunk/tests/transformer/function_decl_1.ref (revision 0)
+++ trunk/tests/transformer/function_decl_1.ref (revision 49)
@@ -0,0 +1,6 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+bool f(int a, int b)
+{
+}
Index: trunk/tests/transformer/function_decl_3.ref
===================================================================
--- trunk/tests/transformer/function_decl_3.ref (revision 0)
+++ trunk/tests/transformer/function_decl_3.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+void foo();
Index: trunk/tests/transformer/empty.ref
===================================================================
--- trunk/tests/transformer/empty.ref (revision 0)
+++ trunk/tests/transformer/empty.ref (revision 49)
@@ -0,0 +1,2 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
Index: trunk/tests/transformer/var_decl_1.ref
===================================================================
--- trunk/tests/transformer/var_decl_1.ref (revision 0)
+++ trunk/tests/transformer/var_decl_1.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int i;
Index: trunk/tests/transformer/function_decl_4.ref
===================================================================
--- trunk/tests/transformer/function_decl_4.ref (revision 0)
+++ trunk/tests/transformer/function_decl_4.ref (revision 49)
@@ -0,0 +1,6 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+void foo();
+float foo(int arg1);
+char foo(const toto& arg1, double& arg2);
Index: trunk/tests/transformer/function_decl_5.ref
===================================================================
--- trunk/tests/transformer/function_decl_5.ref (revision 0)
+++ trunk/tests/transformer/function_decl_5.ref (revision 49)
@@ -0,0 +1,6 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+bool f(int a, int& b)
+{
+}
Index: trunk/tests/transformer/var_decl_2.ref
===================================================================
--- trunk/tests/transformer/var_decl_2.ref (revision 0)
+++ trunk/tests/transformer/var_decl_2.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int i = 42;
Index: trunk/tests/transformer/function_decl_6.ref
===================================================================
--- trunk/tests/transformer/function_decl_6.ref (revision 0)
+++ trunk/tests/transformer/function_decl_6.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+void f()
+{
+}
Index: trunk/tests/transformer/var_decl_3.ref
===================================================================
--- trunk/tests/transformer/var_decl_3.ref (revision 0)
+++ trunk/tests/transformer/var_decl_3.ref (revision 49)
@@ -0,0 +1,6 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+const int answer = 42;
+int i;
+int j = i;
Index: trunk/tests/transformer/function_decl_7.ref
===================================================================
--- trunk/tests/transformer/function_decl_7.ref (revision 0)
+++ trunk/tests/transformer/function_decl_7.ref (revision 49)
@@ -0,0 +1,8 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+void f(int a)
+{
+ return 42;
+}
Index: trunk/tests/transformer/function_decl_8.ref
===================================================================
--- trunk/tests/transformer/function_decl_8.ref (revision 0)
+++ trunk/tests/transformer/function_decl_8.ref (revision 49)
@@ -0,0 +1,8 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+void f(int a)
+{
+ return 42;
+}
Index: trunk/tests/transformer/command
===================================================================
--- trunk/tests/transformer/command (revision 0)
+++ trunk/tests/transformer/command (revision 49)
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+red="\033[33;00;31m"
+bred="\033[33;01;31m"
+green="\033[33;00;32m"
+bgreen="\033[33;01;32m"
+yell="\033[33;00;33m"
+byell="\033[33;01;33m"
+blue="\033[33;00;34m"
+bblue="\033[33;01;34m"
+
+step=0
+verb=0
+printsrc=0
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -s | --step)
+ step=1
+ ;;
+
+ -v | --verbose)
+ verb=1
+ ;;
+
+ -p | --print)
+ printsrc=1
+ ;;
+
+ -*)
+ echo Unknown option : $1
+ exit 1
+ ;;
+
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+base="`dirname $0`/../../src/"
+parser="$base/parse-scool/parse-scool $1"
+transformer="$base/scoolt/scoolt"
+printer="$base/pp-cxx/pp-cxx"
+cxxprinter="abox2text"
+
+if [ $printsrc -eq 1 ]; then
+ echo "----[ cat $1 ]----"
+ cat $1
+ echo
+fi
+
+if [ $step -eq 1 ]
+then
+ echo '----[' $parser ']----'
+ tmp=`$parser`
+ if [ $? -ne 0 ]; then exit $?; fi
+ printf "%s\n" "$tmp" | pp-aterm
+ echo
+
+ echo '----[' $transformer ']----'
+ tmp=`printf "%s\n" "$tmp" | $transformer`
+ if [ $? -ne 0 ]; then exit $?; fi
+ printf "%s\n" "$tmp" | pp-aterm
+ echo
+
+ echo '----[' $printer ']----'
+ tmp=`printf "%s\n" "$tmp" | $printer`
+ if [ $? -ne 0 ]; then exit $?; fi
+ printf "%s\n" "$tmp"
+ echo
+
+ echo '---[' $cxxprinter ']----'
+ tmp=`printf "%s\n" "$tmp" | $cxxprinter`
+ if [ $? -ne 0 ]; then exit $?; fi
+ printf "%s\n" "$tmp"
+ echo
+else
+ if [ $verb -eq 1 ]; then
+ printf "%s\n" "`$parser | $transformer | $printer |
$cxxprinter`"
+ else
+ printf "%s\n" "`$parser 2> err-log | $transformer 2>> err-log
| $printer 2>> err-log | $cxxprinter 2>> err-log`"
+ fi
+fi
Property changes on: trunk/tests/transformer/command
___________________________________________________________________
Name: svn:executable
+ *
Index: trunk/tests/transformer/var_decl_5.ref
===================================================================
--- trunk/tests/transformer/var_decl_5.ref (revision 0)
+++ trunk/tests/transformer/var_decl_5.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+int a[42];
Index: trunk/tests/transformer/function_decl_9.ref
===================================================================
--- trunk/tests/transformer/function_decl_9.ref (revision 0)
+++ trunk/tests/transformer/function_decl_9.ref (revision 49)
@@ -0,0 +1,8 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < class T >
+T f(const T& a)
+{
+ return a + 42;
+}
Index: trunk/tests/transformer/var_decl_6.ref
===================================================================
--- trunk/tests/transformer/var_decl_6.ref (revision 0)
+++ trunk/tests/transformer/var_decl_6.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+std::vector<int> a;
Index: trunk/tests/transformer/function_decl_10.ref
===================================================================
--- trunk/tests/transformer/function_decl_10.ref (revision 0)
+++ trunk/tests/transformer/function_decl_10.ref (revision 49)
@@ -0,0 +1,7 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+double f(int a, double b)
+{
+ return a + b;
+}
Index: trunk/tests/transformer/class_decl_inh_fin.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh_fin.ref (revision 0)
+++ trunk/tests/transformer/class_decl_inh_fin.ref (revision 49)
@@ -0,0 +1,26 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Animal
+
+template < typename T >
+class Animal_: public stc::any<stc_find_exact(Animal_, T)>
+{
+};
+
+typedef Animal_<stc::itself> Animal;
+// Class Mammal
+
+template < typename T >
+class Mammal_: public Animal_<stc_find_exact(Mammal_, T)>
+{
+};
+
+typedef Mammal_<stc::itself> Mammal;
+// Class Monkey
+
+class Monkey: public Mammal_<Monkey>
+{
+};
+
+typedef Monkey_<stc::itself> Monkey;
Index: trunk/tests/transformer/class_members_1.ref
===================================================================
--- trunk/tests/transformer/class_members_1.ref (revision 0)
+++ trunk/tests/transformer/class_members_1.ref (revision 49)
@@ -0,0 +1,13 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Student
+
+template < typename T >
+class Student_: public stc::any<stc_find_exact(Student_, T)>
+{
+ public:
+ int money;
+};
+
+typedef Student_<stc::itself> Student;
Index: trunk/tests/transformer/sample_1.ref
===================================================================
--- trunk/tests/transformer/sample_1.ref (revision 0)
+++ trunk/tests/transformer/sample_1.ref (revision 49)
@@ -0,0 +1,10 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+void f()
+{
+ const int16 i = 3;
+ i = 4;
+ int16 j = 3;
+ j = 4;
+}
Index: trunk/tests/transformer/class_predecl_inh.ref
===================================================================
--- trunk/tests/transformer/class_predecl_inh.ref (revision 0)
+++ trunk/tests/transformer/class_predecl_inh.ref (revision 49)
@@ -0,0 +1,4 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+class Foo: public Bar;
Index: trunk/tests/transformer/sample_3.ref
===================================================================
--- trunk/tests/transformer/sample_3.ref (revision 0)
+++ trunk/tests/transformer/sample_3.ref (revision 49)
@@ -0,0 +1,11 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+void f()
+{
+ int i;
+ int j;
+ i = 0;
+ j = i;
+ i = j + i;
+}
Index: trunk/tests/transformer/class_decl_inh_abst.ref
===================================================================
--- trunk/tests/transformer/class_decl_inh_abst.ref (revision 0)
+++ trunk/tests/transformer/class_decl_inh_abst.ref (revision 49)
@@ -0,0 +1,17 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+// Class Animal
+
+template < typename T >
+class Animal_: public stc::any<stc_find_exact(Animal_, T)>
+{
+};
+// Class Mammal
+
+template < typename T >
+class Mammal_: public Animal_<stc_find_exact(Mammal_, T)>
+{
+};
+
+typedef Mammal_<stc::itself> Mammal;
Index: trunk/tests/transformer/class_predecl.ref
===================================================================
--- trunk/tests/transformer/class_predecl.ref (revision 0)
+++ trunk/tests/transformer/class_predecl.ref (revision 49)
@@ -0,0 +1,5 @@
+#include <stc/any.hh>
+#include <stc/find_exact.hh>
+
+template < typename T >
+class Foo_;
Index: trunk/tests/parser/function_return_1.ref
===================================================================
--- trunk/tests/parser/function_return_1.ref (revision 0)
+++ trunk/tests/parser/function_return_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"answer",[],Var("int"),[Return(Int("42"))])])
Index: trunk/tests/parser/sample_4.ref
===================================================================
--- trunk/tests/parser/sample_4.ref (revision 0)
+++ trunk/tests/parser/sample_4.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"sqrt",[("arg",Var("float"))],Var("float"),[Return(Cxx("std::sqrt(arg)"))])])
Index: trunk/tests/parser/function_return_2.ref
===================================================================
--- trunk/tests/parser/function_return_2.ref (revision 0)
+++ trunk/tests/parser/function_return_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"answer",[("a",Var("int")),("b",Var("bool"))],Var("int"),[Return(Int("42"))])])
Index: trunk/tests/parser/function_return_3.ref
===================================================================
--- trunk/tests/parser/function_return_3.ref (revision 0)
+++ trunk/tests/parser/function_return_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"answer",[],Var("int"),ExpStm(Int("42")))])
Index: trunk/tests/parser/cons_decl_1.ref
===================================================================
--- trunk/tests/parser/cons_decl_1.ref (revision 0)
+++ trunk/tests/parser/cons_decl_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"i",None,Var("int"))])
Index: trunk/tests/parser/cons_decl_2.ref
===================================================================
--- trunk/tests/parser/cons_decl_2.ref (revision 0)
+++ trunk/tests/parser/cons_decl_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"i",Var("int"),Int("3"))])
Index: trunk/tests/parser/class_decl_1.ref
===================================================================
--- trunk/tests/parser/class_decl_1.ref (revision 0)
+++ trunk/tests/parser/class_decl_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Foo",Class,ClassVal([]))])
Index: trunk/tests/parser/class_decl_2.ref
===================================================================
--- trunk/tests/parser/class_decl_2.ref (revision 0)
+++ trunk/tests/parser/class_decl_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"point",Class,ClassVal([Accessblock(Public,[FunDec([],"x",[],Var("int"),[Return(Var("x"))])]),Accessblock(Private,[VarDec([],"x",Var("int")),VarDec([],"y",Var("int"))])]))])
Index: trunk/tests/parser/class_decl_3.ref
===================================================================
--- trunk/tests/parser/class_decl_3.ref (revision 0)
+++ trunk/tests/parser/class_decl_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"point",Class,ClassVal([Accessblock(Public,[FunDec([],"x",[],Var("int"),ExpStm(Var("x")))]),Accessblock(Private,[VarDec([],"x",Var("int")),VarDec([],"y",Var("int"))])]))])
Index: trunk/tests/parser/class_template_1.ref
===================================================================
--- trunk/tests/parser/class_template_1.ref (revision 0)
+++ trunk/tests/parser/class_template_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([StaticFunDec([],"A",[("T",Var("type"),None)],Class,[])])
Index: trunk/tests/parser/class_template_2.ref
===================================================================
--- trunk/tests/parser/class_template_2.ref (revision 0)
+++ trunk/tests/parser/class_template_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([StaticFunDec([],"A",[("T",Var("type"),None),("B",Var("bool"),None)],Class,[])])
Index: trunk/tests/parser/class_decl_inh.ref
===================================================================
--- trunk/tests/parser/class_decl_inh.ref (revision 0)
+++ trunk/tests/parser/class_decl_inh.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Bar",Class,ClassVal([])),ConstDec([],"Foo",Class(Var("Bar")),ClassVal([]))])
Index: trunk/tests/parser/function_decl_1.ref
===================================================================
--- trunk/tests/parser/function_decl_1.ref (revision 0)
+++ trunk/tests/parser/function_decl_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[("a",Var("int")),("b",Var("int"))],Var("bool"),[])])
Index: trunk/tests/parser/function_decl_2.ref
===================================================================
--- trunk/tests/parser/function_decl_2.ref (revision 0)
+++ trunk/tests/parser/function_decl_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("i",Var("int"),Some((Sup(Var("i"),Int("0")))))],[],Var("int"),[])])
Index: trunk/tests/parser/function_decl_3.ref
===================================================================
--- trunk/tests/parser/function_decl_3.ref (revision 0)
+++ trunk/tests/parser/function_decl_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec(["decl"],"foo",None,FunType([],Var("void")))])
Index: trunk/tests/parser/function_decl_4.ref
===================================================================
--- trunk/tests/parser/function_decl_4.ref (revision 0)
+++ trunk/tests/parser/function_decl_4.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec(["decl"],"foo",None,FunType([],Var("void"))),ConstDec(["decl"],"foo",None,FunType([FunArg("arg1",Var("int"))],Var("float"))),ConstDec(["decl"],"foo",None,FunType([FunArg("arg1",Var("toto")),FunArg("arg2",RefType(Var("double")))],Var("char")))])
Index: trunk/tests/parser/var_decl_1.ref
===================================================================
--- trunk/tests/parser/var_decl_1.ref (revision 0)
+++ trunk/tests/parser/var_decl_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"i",Var("int"))])
Index: trunk/tests/parser/function_decl_5.ref
===================================================================
--- trunk/tests/parser/function_decl_5.ref (revision 0)
+++ trunk/tests/parser/function_decl_5.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[("a",Var("int")),("b",RefType(Var("int")))],Var("bool"),[])])
Index: trunk/tests/parser/function_call_1.ref
===================================================================
--- trunk/tests/parser/function_call_1.ref (revision 0)
+++ trunk/tests/parser/function_call_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"doit",[],Var("int"),[Return(FunCall("foo",[]))])])
Index: trunk/tests/parser/var_decl_2.ref
===================================================================
--- trunk/tests/parser/var_decl_2.ref (revision 0)
+++ trunk/tests/parser/var_decl_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"i",Var("int"),Int("42"))])
Index: trunk/tests/parser/function_decl_6.ref
===================================================================
--- trunk/tests/parser/function_decl_6.ref (revision 0)
+++ trunk/tests/parser/function_decl_6.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("T",Var("type"),None)],[],Var("void"),[])])
Index: trunk/tests/parser/function_call_2.ref
===================================================================
--- trunk/tests/parser/function_call_2.ref (revision 0)
+++ trunk/tests/parser/function_call_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"doit",[],Var("int"),[Return(FunCall("foo",[String("\"bar\""),String("\"baz\"")]))])])
Index: trunk/tests/parser/var_decl_3.ref
===================================================================
--- trunk/tests/parser/var_decl_3.ref (revision 0)
+++ trunk/tests/parser/var_decl_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"answer",Var("int"),Int("42")),VarDec([],"i",Var("int")),VarDec([],"j",Var("int"),Var("i"))])
Index: trunk/tests/parser/function_decl_7.ref
===================================================================
--- trunk/tests/parser/function_decl_7.ref (revision 0)
+++ trunk/tests/parser/function_decl_7.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("T",Var("type"),None)],[("a",Var("int"))],Var("void"),[Return(Int("42"))])])
Index: trunk/tests/parser/function_call_3.ref
===================================================================
--- trunk/tests/parser/function_call_3.ref (revision 0)
+++ trunk/tests/parser/function_call_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"i",Var("int"),BiFunCall("pow",[Int("4")],[Int("3")]))])
Index: trunk/tests/parser/var_decl_4.ref
===================================================================
--- trunk/tests/parser/var_decl_4.ref (revision 0)
+++ trunk/tests/parser/var_decl_4.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"l",StaticFunCall("list",[Var("int")]))])
Index: trunk/tests/parser/command
===================================================================
--- trunk/tests/parser/command (revision 48)
+++ trunk/tests/parser/command (revision 49)
@@ -1 +1 @@
-../bin/parse-scool
\ No newline at end of file
+`dirname $0`/../../bin/parse-scool -i $1
Index: trunk/tests/parser/function_decl_8.ref
===================================================================
--- trunk/tests/parser/function_decl_8.ref (revision 0)
+++ trunk/tests/parser/function_decl_8.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("T",Var("type"),None)],[("a",Var("int"))],Var("void"),ExpStm(Int("42")))])
Index: trunk/tests/parser/var_decl_5.ref
===================================================================
--- trunk/tests/parser/var_decl_5.ref (revision 0)
+++ trunk/tests/parser/var_decl_5.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"a",StaticFunCall("array",[Var("int"),Int("42")]))])
Index: trunk/tests/parser/function_decl_9.ref
===================================================================
--- trunk/tests/parser/function_decl_9.ref (revision 0)
+++ trunk/tests/parser/function_decl_9.ref (revision 49)
@@ -0,0 +1 @@
+Program([BiFunDec([],"f",[("T",Var("type"),None)],[("a",Var("T"))],Var("T"),ExpStm(Sum(Var("a"),Int("42"))))])
Index: trunk/tests/parser/var_decl_6.ref
===================================================================
--- trunk/tests/parser/var_decl_6.ref (revision 0)
+++ trunk/tests/parser/var_decl_6.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"a",StaticFunCall("buffer",[Var("int")]))])
Index: trunk/tests/parser/function_decl_10.ref
===================================================================
--- trunk/tests/parser/function_decl_10.ref (revision 0)
+++ trunk/tests/parser/function_decl_10.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[("a",Var("int")),("b",Var("double"))],Var("double"),ExpStm(Sum(Var("a"),Var("b"))))])
Index: trunk/tests/parser/function_ftype_1.ref
===================================================================
--- trunk/tests/parser/function_ftype_1.ref (revision 0)
+++ trunk/tests/parser/function_ftype_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"f",FunType([],Var("void")))])
Index: trunk/tests/parser/function_ftype_2.ref
===================================================================
--- trunk/tests/parser/function_ftype_2.ref (revision 0)
+++ trunk/tests/parser/function_ftype_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([VarDec([],"f",FunType([Var("int"),Var("bool")],Var("float")))])
Index: trunk/tests/parser/class_decl_inh_fin.ref
===================================================================
--- trunk/tests/parser/class_decl_inh_fin.ref (revision 0)
+++ trunk/tests/parser/class_decl_inh_fin.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Animal",Class,ClassVal([])),ConstDec([],"Mammal",Class(Var("Animal")),ClassVal([])),ConstDec(["final"],"Monkey",Class(Var("Mammal")),ClassVal([]))])
Index: trunk/tests/parser/class_members_1.ref
===================================================================
--- trunk/tests/parser/class_members_1.ref (revision 0)
+++ trunk/tests/parser/class_members_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec(["final"],"Student",Class,ClassVal([Accessblock(Public,[VarDec([],"money",Var("int"))])]))])
Index: trunk/tests/parser/class_predecl_inh.ref
===================================================================
--- trunk/tests/parser/class_predecl_inh.ref (revision 0)
+++ trunk/tests/parser/class_predecl_inh.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Foo",None,Class(Var("Bar")))])
Index: trunk/tests/parser/sample_1.ref
===================================================================
--- trunk/tests/parser/sample_1.ref (revision 0)
+++ trunk/tests/parser/sample_1.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[],Var("void"),[ConstDec([],"i",Var("int16"),Int("3")),ExpStm(Affect(Var("i"),Int("4"))),VarDec([],"j",Var("int16"),Int("3")),ExpStm(Affect(Var("j"),Int("4")))])])
Index: trunk/tests/parser/sample_2.ref
===================================================================
--- trunk/tests/parser/sample_2.ref (revision 0)
+++ trunk/tests/parser/sample_2.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[],Var("void"),[VarDec([],"a",StaticFunCall("array",[Var("int16"),Int("2")])),VarDec([],"i",Var("int16"),MethodCall("a","at",[Int("0")]))])])
Index: trunk/tests/parser/class_decl_inh_abst.ref
===================================================================
--- trunk/tests/parser/class_decl_inh_abst.ref (revision 0)
+++ trunk/tests/parser/class_decl_inh_abst.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec(["abstract"],"Animal",Class,ClassVal([])),ConstDec([],"Mammal",Class(Var("Animal")),ClassVal([]))])
Index: trunk/tests/parser/class_predecl.ref
===================================================================
--- trunk/tests/parser/class_predecl.ref (revision 0)
+++ trunk/tests/parser/class_predecl.ref (revision 49)
@@ -0,0 +1 @@
+Program([ConstDec([],"Foo",None,Class)])
Index: trunk/tests/parser/sample_3.ref
===================================================================
--- trunk/tests/parser/sample_3.ref (revision 0)
+++ trunk/tests/parser/sample_3.ref (revision 49)
@@ -0,0 +1 @@
+Program([FunDec([],"f",[],Var("void"),[VarDec([],"i",Var("int")),VarDec([],"j",Var("int")),ExpStm(Affect(Var("i"),Int("0"))),ExpStm(Affect(Var("j"),Var("i"))),ExpStm(Affect(Var("i"),Sum(Var("j"),Var("i"))))])])
Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac (revision 0)
+++ trunk/configure.ac (revision 49)
@@ -0,0 +1,29 @@
+AC_PREREQ(2.59)
+
+AC_INIT([scool], 0.1, [yabo(a)lrde.epita.fr])
+
+# Auxiliary files
+AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_FILES(config/Makefile)
+
+AM_INIT_AUTOMAKE([1.9.5 dist-bzip2])
+
+XT_USE_XT_PACKAGES
+XT_PKG_ATERM
+XT_PKG_SDF
+XT_PKG_STRATEGOXT
+
+# Look for common programs
+AC_LANG_C
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+# Output Files
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ src/cxx-syn/Makefile
+ src/pp-cxx/Makefile
+ src/scl-syn/Makefile
+ src/scoolt/Makefile])
+AC_OUTPUT
Index: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS (revision 0)
+++ trunk/AUTHORS (revision 49)
@@ -0,0 +1,2 @@
+* mefyl <mefyl(a)lrde.epita.fr>
+* yabo <yabo(a)lrde.epita.fr>
Index: trunk/config/Makefile.am
===================================================================
--- trunk/config/Makefile.am (revision 0)
+++ trunk/config/Makefile.am (revision 49)
@@ -0,0 +1,15 @@
+MAINTAINERCLEANFILES = \
+ Makefile.in \
+ $(STANDARD_TOOLS)
+
+STANDARD_TOOLS = \
+ install-sh \
+ missing \
+ mkinstalldirs \
+ depcomp
+
+EXTRA_DIST = \
+ Makefile.xt \
+ autoxt.m4
+
+bootclean:
Index: trunk/src/pp-cxx/CxxProgram.meta
===================================================================
--- trunk/src/pp-cxx/CxxProgram.meta (revision 0)
+++ trunk/src/pp-cxx/CxxProgram.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxDecl.meta
===================================================================
--- trunk/src/pp-cxx/CxxDecl.meta (revision 0)
+++ trunk/src/pp-cxx/CxxDecl.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxFun.str
===================================================================
--- trunk/src/pp-cxx/CxxFun.str (revision 0)
+++ trunk/src/pp-cxx/CxxFun.str (revision 49)
@@ -0,0 +1,69 @@
+module CxxFun
+
+imports Cxx Box libstratego-lib CxxType CxxExp CxxStm CxxId
+
+rules
+
+ CxxTopLevelToAbox:
+ CxxFun(params, t, idf, args) ->
+ V vs=0
+ [
+ ~<CxxParamsToAbox> params
+ H hs=0
+ [
+ H hs=1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf ] "(" H hs=1 [
~*<CxxListToAbox(CxxArgDefToAbox|",")> args ] ")" ";"
+ ]
+ ]
+
+ CxxTopLevelToAbox:
+ CxxFun(params, t, idf, args, body) ->
+ V vs=0
+ [
+ ~<CxxParamsToAbox> params
+ H hs=0 [
+ H hs=1 [ ~<CxxTypeToAbox>t ~<CxxIdToAbox>idf] "(" H hs=1 [
~*<CxxListToAbox(CxxArgDefToAbox|",")> args ] ")"
+ ]
+ V vs=0 is=2
+ [
+ "{"
+ ~*<map(CxxStmToAbox <+ CxxTopLevelToAbox)>body
+ ]
+ "}"
+ ]
+
+ CxxTopLevelToAbox:
+ CxxTypedef(t, idf) ->
+ H hs=0 [ H hs=1 [ "typedef" ~<CxxTypeToAbox> t ~S(idf)] ";" ]
+
+ CxxArgDefToAbox:
+ (t, idf) ->
+ H hs = 1
+ [
+ ~<CxxTypeToAbox>t
+ ~<CxxIdToAbox>idf
+ ]
+
+ CxxListToAbox(sub|sep):
+ [e| [h|tail] ] ->
+ [
+ H hs=1 [
+ H hs=0 [
+ ~<sub>e
+ ~S(sep)
+ ]
+ ~<CxxListToAbox(sub|sep)> [h|tail]
+ ]
+ ]
+
+ CxxListToAbox(sub|sep):
+ [e| [] ] ->
+ [
+ H hs=0 [
+ ~<sub>e
+ ]
+ ]
+
+ CxxListToAbox(sub|sep):
+ [] ->
+ [ H [] ]
+
Index: trunk/src/pp-cxx/pp-cxx.str
===================================================================
--- trunk/src/pp-cxx/pp-cxx.str (revision 0)
+++ trunk/src/pp-cxx/pp-cxx.str (revision 49)
@@ -0,0 +1,6 @@
+module pp-cxx
+
+imports Cxx Box libstratego-lib CxxProgram
+
+strategies
+ pp-cxx = io-wrap(CxxProgramToAbox)
Index: trunk/src/pp-cxx/CxxId.str
===================================================================
--- trunk/src/pp-cxx/CxxId.str (revision 0)
+++ trunk/src/pp-cxx/CxxId.str (revision 49)
@@ -0,0 +1,12 @@
+module CxxId
+
+imports Cxx Box libstratego-lib
+
+rules
+
+ CxxIdToAbox:
+ x -> S(x)
+ where not(<?CxxScope(_, _)> x)
+
+ CxxIdToAbox:
+ CxxScope(idf1, idf2) -> H hs=0 [ ~<CxxIdToAbox>idf1 "::"
~<CxxIdToAbox>idf2 ]
Index: trunk/src/pp-cxx/CxxExp.str
===================================================================
--- trunk/src/pp-cxx/CxxExp.str (revision 0)
+++ trunk/src/pp-cxx/CxxExp.str (revision 49)
@@ -0,0 +1,31 @@
+module CxxExp
+
+imports Cxx Box libstratego-lib CxxId
+
+rules
+
+ CxxExpToAbox:
+ CxxInt(i) -> S(i)
+
+ CxxExpToStr:
+ CxxInt(i) -> i
+
+ CxxExpToStr:
+ CxxSum(e1, e2) -> <concat-strings> [<CxxExpToStr> e1, " + ",
<CxxExpToStr> e2]
+
+ CxxExpToStr:
+ x -> x
+ where <is-string> x
+
+ /*
+ * Handle the CxxKeyword ctor.
+ * TODO: Generalize the type of exp.
+ */
+ CxxExpToAbox:
+ CxxKeyword(idf, exp) -> S(<concat-strings> [idf, " ",
<CxxExpToStr> exp, ";"])
+
+ CxxExpToAbox:
+ CxxAffect(idf, exp) -> S(<concat-strings> [idf, " = ",
<CxxExpToStr> exp, ";"])
+
+ CxxExpToAbox:
+ x -> S(x)
Index: trunk/src/pp-cxx/CxxType.meta
===================================================================
--- trunk/src/pp-cxx/CxxType.meta (revision 0)
+++ trunk/src/pp-cxx/CxxType.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxStm.str
===================================================================
--- trunk/src/pp-cxx/CxxStm.str (revision 0)
+++ trunk/src/pp-cxx/CxxStm.str (revision 49)
@@ -0,0 +1,8 @@
+module CxxStm
+
+imports Cxx Box libstratego-lib CxxType CxxExp CxxId
+
+rules
+
+ CxxStmToAbox:
+ CxxExpStm(e) -> <CxxExpToAbox> e
Index: trunk/src/pp-cxx/CxxFun.meta
===================================================================
--- trunk/src/pp-cxx/CxxFun.meta (revision 0)
+++ trunk/src/pp-cxx/CxxFun.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxProgram.str
===================================================================
--- trunk/src/pp-cxx/CxxProgram.str (revision 0)
+++ trunk/src/pp-cxx/CxxProgram.str (revision 49)
@@ -0,0 +1,15 @@
+module CxxProgram
+
+imports Cxx Box libstratego-lib CxxDecl CxxFun
+
+rules
+
+ CxxProgramToAbox:
+ CxxProgram(l) ->
+ V vs=1 [
+ V vs=0 [
+ "#include <stc/any.hh>"
+ "#include <stc/find_exact.hh>"
+ ]
+ V vs=0 [ ~*<map(CxxTopLevelToAbox)> l ]
+ ]
Index: trunk/src/pp-cxx/CxxDecl.str
===================================================================
--- trunk/src/pp-cxx/CxxDecl.str (revision 0)
+++ trunk/src/pp-cxx/CxxDecl.str (revision 49)
@@ -0,0 +1,90 @@
+module CxxDecl
+
+imports Cxx Box libstratego-lib CxxType CxxExp CxxId
+
+rules
+
+ CxxTopLevelToAbox:
+ l ->
+ V vs=1 [
+ ~*<map(CxxTopLevelToAbox)>l
+ ]
+
+ CxxTopLevelToAbox:
+ CxxDecl(t, idf) -> H hs=0 [ H hs=1 [ ~<CxxTypeToAbox>t ~<CxxIdToAbox>idf
] ";"]
+
+ CxxTopLevelToAbox:
+ CxxDecl(t, idf, v) -> H hs=0 [ H hs=1 [ ~<CxxTypeToAbox>t
~<CxxIdToAbox>idf "=" ~<CxxExpToAbox> v] ";"]
+
+ CxxTopLevelToAbox:
+ CxxArrayDecl(t, idf, n) -> H hs=0 [ H hs=1 [ ~<CxxTypeToAbox> t
~<CxxIdToAbox> idf] "[" ~<CxxExpToAbox> n "]"
";" ]
+
+ CxxTopLevelToAbox:
+ CxxClassDecl(params, idf, parents) ->
+ V vs=0 [
+ ~<CxxParamsToAbox> params
+ H hs=0 [
+ H hs=1 [ "class" ~<CxxIdToAbox>idf ]
+ ~<CxxParentsToAbox>parents
+ ";"
+ ]
+ ]
+
+ CxxTopLevelToAbox:
+ CxxClassDecl(params, idf, parents) ->
+ V vs=0 [
+ ~<CxxParamsToAbox> params
+ H hs=0 [
+ H hs=1 [ "class" ~<CxxIdToAbox>idf ]
+ ~<CxxParentsToAbox>parents
+ ";"
+ ]
+ ]
+
+ CxxTopLevelToAbox:
+ CxxComment(txt) ->
+ H hs=1 [ "//" ~S(txt) ]
+
+// FIXME: MERGE!!!
+
+ CxxBodyToAbox:
+ CxxPublic(b) -> V is=2 [ "public:" V [ ~*<map(CxxTopLevelToAbox)> b
] ]
+
+ CxxBodyToAbox:
+ CxxProtected(b) -> V is=2 [ "private:" V [
~*<map(CxxTopLevelToAbox)> b ] ]
+
+ CxxBodyToAbox:
+ CxxPrivate(b) -> V is=2 [ "private:" V [ ~*<map(CxxTopLevelToAbox)>
b ] ]
+
+ CxxTopLevelToAbox:
+ CxxClassDecl(params, idf, parents, body) ->
+ V vs=0 [
+ ~<CxxParamsToAbox> params
+ H hs=0 [
+ H hs=1 [ "class" ~<CxxIdToAbox> idf ]
+ ~<CxxParentsToAbox> parents
+ ]
+ V vs=0 is=2 [ "{" V vs=1 [ ~*<map (CxxBodyToAbox)> body ] ]
+ H hs=0 [ "}" ";" ]
+ ]
+
+ CxxParamsToAbox:
+ [] -> H []
+
+ CxxParamsToAbox:
+ params -> H hs=1 [ "template" "<"
~<CxxListToAbox(CxxParamToAbox|",")> params ">" ]
+ where not(<?[]> params)
+
+ CxxParamToAbox:
+ (t, idf) -> H hs = 1 [ ~<CxxTypeToAbox> t ~<CxxIdToAbox> idf ]
+
+ CxxParentsToAbox:
+ [] -> H []
+
+ CxxParentsToAbox:
+ parents -> H hs=1 [ ":"
~<CxxListToAbox(CxxParentToAbox|",")>parents ]
+ where not(<?[]> parents)
+
+ CxxParentToAbox:
+ (modifier, t) ->
+ H hs=1 [ ~S(modifier) ~<CxxTypeToAbox>t ]
Index: trunk/src/pp-cxx/pp-cxx.meta
===================================================================
--- trunk/src/pp-cxx/pp-cxx.meta (revision 0)
+++ trunk/src/pp-cxx/pp-cxx.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/CxxId.meta
===================================================================
--- trunk/src/pp-cxx/CxxId.meta (revision 0)
+++ trunk/src/pp-cxx/CxxId.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/pp-cxx/Makefile.am
===================================================================
--- trunk/src/pp-cxx/Makefile.am (revision 0)
+++ trunk/src/pp-cxx/Makefile.am (revision 49)
@@ -0,0 +1,21 @@
+# Makefile.am -*-Makefile-*-
+
+MODULES = pp-cxx
+
+include $(top_srcdir)/config/Makefile.xt
+-include $(MODULES:=.c.dep)
+
+SCFLAGS = --main $* --verbose 0
+STRINCLUDES = -I $(top_builddir)/src/scl-syn \
+ -I $(top_builddir)/src/cxx-syn \
+ -I `dirname \`xtc get Stratego-Box.tbl\`` \
+ -I $(srcdir) \
+ -la stratego-lib
+
+libexec_PROGRAMS = pp-cxx
+
+nodist_pp_cxx_SOURCES = pp-cxx.c
+
+EXTRA_DIST = $(MODULES:=.str)
+
+CLEANFILES = $(MODULES:=.c) $(MODULES:=.c.dep)
Index: trunk/src/pp-cxx/CxxType.str
===================================================================
--- trunk/src/pp-cxx/CxxType.str (revision 0)
+++ trunk/src/pp-cxx/CxxType.str (revision 49)
@@ -0,0 +1,25 @@
+module CxxType
+
+imports Cxx Box libstratego-lib CxxId
+
+rules
+
+ CxxTypeToAbox:
+ CxxType(idf) -> <CxxIdToAbox> idf
+
+ CxxTypeToAbox:
+ CxxRefType(t) -> H hs=0 [ ~<CxxTypeToAbox> t "&" ]
+
+ CxxTypeToAbox:
+ CxxType(idf, params) -> H hs=0 [ ~<CxxIdToAbox> idf "<"
~<CxxListToAbox(CxxTypeToAbox|",")> params ">" ]
+
+ CxxTypeToAbox:
+ CxxConstType(t) -> H [ "const" ~<CxxTypeToAbox> t]
+
+ CxxTypeToAbox:
+ Typename -> S("typename")
+
+ /* These function are actually macros */
+
+ CxxTypeToAbox:
+ CxxFunCall(idf, args) -> H hs=0 [ ~<CxxIdToAbox>idf "(" H hs=1 [
~*<CxxListToAbox(CxxTypeToAbox <+ CxxExpToAbox|",")>args ]
")"]
Index: trunk/src/pp-cxx/CxxStm.meta
===================================================================
--- trunk/src/pp-cxx/CxxStm.meta (revision 0)
+++ trunk/src/pp-cxx/CxxStm.meta (revision 49)
@@ -0,0 +1 @@
+Meta([Syntax("Stratego-Box")])
Index: trunk/src/scoolt/Exp.str
===================================================================
--- trunk/src/scoolt/Exp.str (revision 0)
+++ trunk/src/scoolt/Exp.str (revision 49)
@@ -0,0 +1,21 @@
+module Exp
+
+imports libstratego-lib Cxx AsFix Scool
+
+rules
+
+ ExpToCxx:
+ Int(i) -> CxxInt(i)
+
+ ExpToCxx:
+ Var(v) -> v
+
+ ExpToCxx:
+ Sum(e1, e2) -> CxxSum(<ExpToCxx> e1, <ExpToCxx> e2)
+
+ ExpToCxx:
+ Affect(Var(v), e) -> CxxAffect(v, <ExpToCxx> e)
+ where <debug> e
+
+ ExpToCxx:
+ Cxx(s) -> s
Index: trunk/src/scoolt/Tools.str
===================================================================
--- trunk/src/scoolt/Tools.str (revision 0)
+++ trunk/src/scoolt/Tools.str (revision 49)
@@ -0,0 +1,29 @@
+module Tools
+
+imports libstratego-lib Cxx AsFix Scool
+
+rules
+
+ SclNewIdf:
+ idf -> <conc-strings> (idf, "_")
+
+ CxxTypeToIdf:
+ CxxType(idf) -> idf
+ where <is-string> idf
+
+strategies
+
+ NewCount =
+ rules(count_:- _)
+
+ Count =
+ if count_ => res then
+ rules(count_:- _)
+ ; rules(count_: _ -> <sum> (res, 1))
+ else
+ rules(count_: _ -> 1)
+ end
+ ; count_
+
+ GetCount =
+ count_ <+ !0
Index: trunk/src/scoolt/Access.str
===================================================================
--- trunk/src/scoolt/Access.str (revision 0)
+++ trunk/src/scoolt/Access.str (revision 49)
@@ -0,0 +1,15 @@
+module Access
+
+imports libstratego-lib Cxx Type Exp Stm Tools AsFix Scool
+
+rules
+
+ AccessToCxx:
+ Accessblock(Public, l) -> CxxPublic(<map (DeclToCxx)> l)
+
+ AccessToCxx:
+ Accessblock(Private, l) -> CxxPrivate(<map (DeclToCxx)> l)
+
+ AccessToCxx:
+ Accessblock(Protected, l) -> CxxProtected(<map (DeclToCxx)> l)
+
Index: trunk/src/scoolt/Type.str
===================================================================
--- trunk/src/scoolt/Type.str (revision 0)
+++ trunk/src/scoolt/Type.str (revision 49)
@@ -0,0 +1,32 @@
+module Type
+
+imports libstratego-lib Cxx AsFix Scool
+
+rules
+
+ IsScalar:
+ t -> t
+ where
+ (
+ <eq> (t, "char")
+ <+ <eq> (t, "bool")
+ <+ <eq> (t, "short")
+ <+ <eq> (t, "int")
+ <+ <eq> (t, "float")
+ <+ <eq> (t, "double")
+ )
+
+ TypeToCxx:
+ Var(x) -> CxxType(x)
+
+ TypeToCxx:
+ RefType(t) -> CxxRefType(<TypeToCxx> t)
+
+ // Constify + Referencify a type
+ TypeToConstRefCxx:
+ Var(t) -> CxxConstType(CxxRefType(CxxType(t)))
+ where
+ (
+ <is-string> t
+ ; <not (IsScalar)> t
+ )
Index: trunk/src/scoolt/Makefile.am
===================================================================
--- trunk/src/scoolt/Makefile.am (revision 0)
+++ trunk/src/scoolt/Makefile.am (revision 49)
@@ -0,0 +1,21 @@
+# Makefile.am -*-Makefile-*-
+
+MODULES = scoolt
+
+include $(top_srcdir)/config/Makefile.xt
+-include $(MODULES:=.c.dep)
+
+SCFLAGS = --main $* --verbose 0 --asfix
+STRINCLUDES = -I $(top_builddir)/src/scl-syn \
+ -I $(top_builddir)/src/cxx-syn \
+ -I `dirname \`xtc get Stratego-Box.tbl\`` \
+ -I $(srcdir) \
+ -la stratego-lib
+
+libexec_PROGRAMS = scoolt
+
+nodist_scoolt_SOURCES = scoolt.c
+
+EXTRA_DIST = $(MODULES:=.str)
+
+CLEANFILES = $(MODULES:=.c) $(MODULES:=.c.dep)
Index: trunk/src/scoolt/Stm.str
===================================================================
--- trunk/src/scoolt/Stm.str (revision 0)
+++ trunk/src/scoolt/Stm.str (revision 49)
@@ -0,0 +1,21 @@
+module Stm
+
+imports libstratego-lib Cxx Type Exp AsFix Scool
+
+rules
+
+ StmToCxx:
+ ExpStm(e) -> CxxExpStm(<ExpToCxx> e)
+ where <debug> e
+
+ /* Handle the 'return' statement */
+ StmToCxx:
+ Return(e) -> CxxExpStm(CxxKeyword("return", <ExpToCxx> e))
+
+ StmToCxx:
+ VarDec([], idf, t, i) -> <DeclToCxx> VarDec([], idf, t, i)
+ where <debug> idf
+
+ StmToCxx:
+ x -> <DeclToCxx> x
+ where <debug> x
Index: trunk/src/scoolt/scoolt.str
===================================================================
--- trunk/src/scoolt/scoolt.str (revision 0)
+++ trunk/src/scoolt/scoolt.str (revision 49)
@@ -0,0 +1,184 @@
+module scoolt
+
+imports libstratego-lib Cxx Program AsFix Scool
+
+strategies
+
+ scoolt = io-wrap(ProgramToCxx)
+
+
+
+/*
+ t-Program:
+ Program(l) -> Cxx(<collect-vtypes> l, <map(t-Decl)> l)
+
+
+
+ t-Decl:
+ VarDec(i, t) -> CxxVarDec(<t-Type> t, i)
+ where not(<?Var("type")> t)
+
+ t-Decl:
+ VarDec(i, t, v) -> CxxVarDec(<t-Type> t, i, <t-Exp> v)
+ where not(<?Var("type")> t)
+
+ t-Decl:
+ ConsDec(_, i, t) -> CxxVarDec(CxxConsType(<t-Type> t), i)
+ where not(<?Var("type")> t)
+
+ t-Decl:
+ ConsDec(_, i, t, v) -> CxxVarDec(CxxConsType(<t-Type> t), i, <t-Exp>
v)
+ where not(<?Var("type")> t)
+
+
+
+
+ t-Decl:
+ ConsDec(_, i, t) -> CxxEscape(<concat-strings> ["/", "/
virtual typedef /abstract/ ", i, ";"] )
+ where <?Var("type")> t
+
+ t-Decl: // FIXME : vvvvvv
+ ConsDec(_, i, t, Var(v)) -> CxxEscape(<concat-strings> ["/",
"/ virtual typedef ", v, " ", i, ";"] )
+ where <?Var("type")> t
+
+
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class, ClassVal(l)) ->
[CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic,
CxxTemplateType(CxxScope("stc", "any"), "E"),
<map(t-ABlock)> l), CxxTypedef(CxxTemplateType(newname, "itself"), name)]
where <conc-strings> (name, "_") => newname
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class(parent), ClassVal(l)) ->
[CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic,
CxxTemplateType(<t-r-Type> parent, "E"), <map(t-ABlock)> l),
CxxTypedef(CxxTemplateType(newname, "itself"), name)] where
<conc-strings> (name, "_") => newname;
<not(one(?"final"))> qualifiers
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class(parent)) ->
[CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic,
CxxTemplateType(<t-r-Type> parent, "E"), []),
CxxTypedef(CxxTemplateType(newname, "itself"), name)] where
<conc-strings> (name, "_") => newname;
<not(one(?"final"))> qualifiers
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class) -> [CxxClassDec([CxxTemplateArg("E")],
newname, CxxPublic, CxxTemplateType(CxxScope("stc", "any"),
"E"), []), CxxTypedef(CxxTemplateType(newname, "itself"), name)] where
<conc-strings> (name, "_") => newname
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class(parent), ClassVal(l)) ->
[CxxClassDec([CxxTemplateArg("E")], newname, CxxPublic,
CxxTemplateType(<t-r-Type> parent, "E"), <map(t-ABlock)> l),
CxxTypedef(CxxTemplateType(newname, "itself"), name)] where
<conc-strings> (name, "_") => newname
+
+
+
+ t-Decl:
+ ConsDec(qualifiers, name, Class(parent), ClassVal(l)) ->
+ [CxxClassDec (
+ newname,
+ CxxPublic,
+ CxxTemplateType(<t-r-Type> parent, newname),
+ <map(t-ABlock)> l
+ ),
+ CxxTypedef(newname, name)
+ ]
+ where <conc-strings> (name, "_") => newname;
<one(?"final")> qualifiers
+
+ t-ABlock:
+ Accessblock(acc, decs) -> CxxAccessBlock(<t-ASpecifier> acc,
<map(t-Decl)> decs)
+
+ t-ASpecifier:
+ Public -> CxxPublic
+
+ t-ASpecifier:
+ Private -> CxxPrivate
+
+ t-Decl:
+ FunDec(_, name, args, ret, body) -> CxxFunDec(<t-Type> ret, name,
<map(t-Arg)> args, <map(t-Stm + t-Decl)> body)
+
+
+ t-Decl:
+ BiFunDec(qualifiers, name, s-args, args, rettype, body) ->
+ CxxOverloadingCase( name,
+ CxxInt(index),
+ <t-StaticCond>s-args,
+ <t-Type>rettype,
+ <map(t-Arg)>args,
+ <map(t-Stm + t-Decl)>body
+ )
+ where
+ <one(?"overloading")> qualifiers
+ ; if not(<index-over> name) then
+// say(!"first"); debug
+ !1 => index
+ ; rules(index-over: name -> 2)
+ else
+// say(!"not first"); debug
+ <index-over> name => index
+ ; rules(index-over: name -> <add>(index, 1))
+ end
+
+
+
+ t-Arg:
+ (name, type, guard) -> <t-Arg> (name, type)
+
+ t-Arg:
+ (name, type) -> (<t-Type> type, name)
+
+
+
+ t-Type:
+ Var(n) -> n
+
+ t-r-Type:
+ Var(n) -> <conc-strings> (n, "_")
+
+ t-Exp:
+ Int(n) -> CxxInt(n)
+
+ t-Exp:
+ Mul(e1, e2) -> CxxMul(<t-Exp> e1, <t-Exp> e2)
+
+ t-Exp:
+ Var(n) -> CxxVar(n)
+
+ t-Exp:
+ Cpp(cxx) -> CxxEscape(cxx)
+
+ t-Stm:
+ Return(e) -> CxxReturn(<t-Exp> e)
+
+ t-Decl:
+ Cpp(cxx) -> CxxEscape(cxx)
+
+ t-StaticCond:
+ [] -> CxxStaticTrue
+
+ t-StaticCond:
+ [h|[]] -> <t-StaticCond> h
+
+ t-StaticCond:
+ [h|t] -> CxxStaticAnd(<t-StaticCond> h, <t-StaticCond> t)
+ where not(<?[]>t)
+
+ t-StaticCond:
+ (idf, type, Guard(guard)) -> <t-StaticCond> guard
+
+ t-StaticCond:
+ (idf, type) -> CxxStaticTrue
+
+ t-StaticCond:
+ Eq(e1, e2) -> CxxStaticEq(<t-Type> e1, <t-Type> e2)
+
+ t-StaticCond:
+ Or(e1, e2) -> CxxStaticOr(<t-StaticCond> e1, <t-StaticCond> e2)
+
+ t-StaticCond:
+ Inf(e1, e2) -> CxxStaticIsA(<t-Type> e1, <t-Type> e2)
+
+ t-StaticCond:
+ Var("true") -> CxxStaticTrue
+
+ t-StaticCond:
+ Var("false") -> CxxStaticFalse
+
+
+
+ strategies
+
+ collect-vtypes =
+ collect(?ConsDec(attr, _, Var("type")); where
(<one(?"decl")> attr) )
+ ; map(?ConsDec(_, <id>, _))
+ ; make-set
+
+
+*/
Index: trunk/src/scoolt/Decl.str
===================================================================
--- trunk/src/scoolt/Decl.str (revision 0)
+++ trunk/src/scoolt/Decl.str (revision 49)
@@ -0,0 +1,229 @@
+module Decl
+
+imports libstratego-lib Cxx Type Exp Stm Tools AsFix Scool Access
+
+rules
+
+ /*
+ * Variable declaration.
+ * Grammar: "var" idf ":" t ";"
+ */
+ DeclToCxx:
+ VarDec([], idf, t) -> CxxDecl(<TypeToCxx> t, idf)
+
+ /*
+ * Array declaration.
+ * Grammar: "var" idf ":" "array" "[" t
"," n "]" ";"
+ */
+ DeclToCxx:
+ VarDec([], idf, StaticFunCall(st, [t, n])) ->
+ <if <eq> ("array", st) then
+ ! CxxArrayDecl(<TypeToCxx> t, idf, <ExpToCxx> n)
+ else
+ say(<concat-strings> ["Unkown construction: ", st])
+ ; <exit> 1
+ end>
+
+ /*
+ * Buffer declaration.
+ * Grammar: "var" idf ":" "buffer" "[" t
"]" ";"
+ */
+ DeclToCxx:
+ VarDec([], idf, StaticFunCall(st, [t])) ->
+ <if <eq> ("buffer", st) then
+ ! CxxDecl(CxxType(CxxScope("std", "vector"), [<TypeToCxx>
t]), idf)
+ else
+ say(<concat-strings> ["Unkown construction: ", st])
+ ; <exit> 1
+ end>
+
+ /*
+ * Variable declaration with initialisation.
+ * Grammar: "var" idf ":" t ":=" v ";"
+ */
+ DeclToCxx:
+ VarDec([], idf, t, v) -> CxxDecl(<TypeToCxx> t, idf, <ExpToCxx> v)
+
+ UnVar:
+ Var(x) -> x
+
+ /*
+ * Constant declaration.
+ * Grammar: idf ":" t ";"
+ */
+ DeclToCxx:
+ ConstDec([], idf, cs, t) ->
+ <if <eq> ("type", <UnVar> t) then
+ ! CxxDecl(<TypeToCxx> t, idf)
+ else
+ ! CxxDecl(CxxConstType(<TypeToCxx> t), idf)
+ end>
+ where not(<?Class> t)
+
+ /*
+ * Constant declaration with initialisation.
+ * Grammar: idf ":" t "=" v ";"
+ */
+ DeclToCxx:
+ ConstDec([], idf, t, v) -> CxxDecl(CxxConstType(<TypeToCxx> t), idf,
<ExpToCxx> v)
+ where not(<?Class> t)
+
+ DeclToCxx:
+ ConstDec(["decl"], idf, cs, FunType(args, ret)) -> CxxFun([],
<TypeToCxx> ret, idf, <map (ArgDefToCxx)> args)
+
+ /*
+ * Root Class predeclaration
+ * Grammar: idf ":" "class" ";"
+ */
+ DeclToCxx:
+ ConstDec([], idf, cs, Class) ->
+ CxxClassDecl(
+ [(Typename, "T")],
+ nidf,
+ []
+ )
+ where <conc-strings> (idf, "_") => nidf
+
+ /*
+ * Root Class declaration
+ * Grammar: specs idf ":" "class" "=" "{" v
"}" ";"
+ */
+ DeclToCxx:
+ ConstDec(specs, idf, Class, ClassVal(v)) ->
+ <try(AddTypedef(|specs, idf)); AddClassComment(|idf)>
+ [
+ CxxClassDecl(
+ [(Typename, "T")],
+ nidf,
+ [
+ (
+ "public",
+ CxxType(CxxScope("stc", "any"),
[CxxFunCall("stc_find_exact", [CxxType(nidf), CxxType("T")])])
+ )
+ ],
+ <map (AccessToCxx)> v
+ //[]
+ )
+ ]
+ where <SclNewIdf>idf => nidf
+ ; rules(CxxTypeToStc(|T): CxxType(idf) -> CxxType(<SclNewIdf>idf, [T]))
+
+ /*
+ * Final Class declaration
+ * Grammar: final idf ":" "class" "=" "{" v
"}" ";"
+ */
+ DeclToCxx:
+ ConstDec(specs, idf, Class(p), v) ->
+ <try(AddTypedef(|specs, idf)); AddClassComment(|idf)>
+ [
+ CxxClassDecl(
+ params,
+ nidf,
+ [
+ (
+ "public",
+ parent
+ )
+ ],
+ [] // fixme
+ )
+ ]
+ where <TypeToCxx> p => cxxp
+ ; if
+ (
+ <one(?"final")> specs
+ ; !idf => nidf
+ ; <CxxTypeToStc(|CxxType(idf))>cxxp => parent
+ )
+ <+ (
+ <SclNewIdf>idf => nidf
+ ; <CxxTypeToStc(|CxxFunCall("stc_find_exact", [CxxType(nidf),
CxxType("T")]))>cxxp => parent
+ )
+ then
+ if <one(?"final")> specs then
+ rules(CxxTypeToStcError: CxxType(idf) -> <concat-strings> [idf,
" is final."])
+ ; ![] => params
+ else
+ rules(CxxTypeToStc(|T): CxxType(idf) -> CxxType(<SclNewIdf> idf,
[T]))
+ ; ![(Typename, "T")] => params
+ end
+ else
+ say(!<concat-strings> [idf, " cannot inherit from ",
<CxxTypeToIdf> cxxp])
+ ; if <CxxTypeToStcError> cxxp => error then
+ say(!error)
+ else
+ say(!<concat-strings> [<CxxTypeToIdf>cxxp, " does not
exist."])
+ end
+ end
+
+ /*
+ * Handle class declarations with inheritance
+ * Grammar: idf ":" "class" "<" parent ";"
+ */
+ DeclToCxx:
+ ConstDec([], idf, cs, Class(parent)) -> CxxClassDecl([], idf, [("public",
<TypeToCxx> parent)])
+ where <conc-strings> (idf, "_") => nidf
+
+ /*
+ * Handle functions
+ * Grammar: idf ":" "(" args ")" "->" t
"=" "{" body "}"
+ * TODO: Handle templates
+ */
+ DeclToCxx:
+ FunDec([], idf, args, t, body) -> CxxFun([], <TypeToCxx> t, idf,
<map(ArgDefToCxx)> args, <map(StmToCxx)> body)
+ //where <debug> body
+ //FunDec([], idf, args, t, body) -> <AddParameters(|<GetCount> 0)>
CxxFun([], <TypeToCxx> t, idf, nargs, <map(StmToCxx)>body)
+ //where <NewCount; map(ArgDefToCxx)>args => nargs
+ /*
+ * Handle functions
+ * Grammar: idf ":" "(" args ")" "->" t
"=>" Exp
+ * TODO: Handle templates
+ */
+ DeclToCxx:
+ FunDec([], idf, args, t, ExpStm(body)) -> CxxFun([], <TypeToCxx> t, idf,
<map(ArgDefToCxx)> args, [<StmToCxx> Return(body)])
+ //where <debug> body
+
+ DeclToCxx:
+ StaticFunDec(l, idf, params, Class(), body) -> CxxClassDecl(<map
(ParamToCxx)> params, idf, [], <map (AccessToCxx)> body)
+
+ DeclToCxx:
+ BiFunDec(l, idf, params, args, t, body) -> CxxFun(<map (ParamToCxx)> params,
<TypeToCxx> t, idf, <map (ArgDefToCxx)> args, <map (StmToCxx)> body)
+
+ DeclToCxx:
+ BiFunDec(l, idf, params, args, t, ExpStm(body)) -> CxxFun(<map (ParamToCxx)>
params, <TypeToCxx> t, idf, <map (ArgDefToCxx)> args, [<StmToCxx>
Return(body)])
+
+ ParamToCxx:
+ (idf, Var(t), wclause) ->
+ <if <eq> (t, "type") then
+ ! (CxxType("class"), idf)
+ else
+ ! (CxxType(t), idf)
+ end>
+
+ ArgDefToCxx:
+ (idf, t) -> (<TypeToConstRefCxx <+ TypeToCxx> t, idf)
+ //(idf, t) -> (<TypeToCxx; try(CxxTypeToStc(|CxxType(p-idf)))> t, idf)
+ //where <concat-strings; SclNewIdf> ["T", <Count; int-to-string>
0] => p-idf
+
+ ArgDefToCxx:
+ FunArg(idf, t) -> <ArgDefToCxx> (idf, t)
+
+ AddTypedef(|specs, idf):
+ [x] -> [x, CxxTypedef(CxxType(<SclNewIdf>idf,
[CxxType(CxxScope("stc", "itself"))]), idf)]
+ where <not(one(?"abstract"))> specs
+
+ AddClassComment(|idf):
+ l -> [CxxComment(<concat-strings> ["Class ", idf])|l]
+
+ AddParameters(|n):
+ CxxFun(p, t, idf, args, body) -> CxxFun(<Parameters(|n)> p, t, idf, args,
body)
+ //where <debug> n
+
+ Parameters(|n):
+ l -> <Parameters(|<subt>(n, 1))>[(Typename, idf)|l]
+ where <not(?0)> n
+ ; <concat-strings; SclNewIdf> ["T", <int-to-string> n]
=> idf
+
+ Parameters(|n):
+ l -> l
+ where <?0> n
Index: trunk/src/scoolt/Program.str
===================================================================
--- trunk/src/scoolt/Program.str (revision 0)
+++ trunk/src/scoolt/Program.str (revision 49)
@@ -0,0 +1,8 @@
+module Program
+
+imports libstratego-lib Cxx Decl AsFix Scool
+
+rules
+
+ ProgramToCxx:
+ Program(l) -> CxxProgram(<map(DeclToCxx)> l)
Index: trunk/src/parse-scool/parse-scool
===================================================================
--- trunk/src/parse-scool/parse-scool (revision 0)
+++ trunk/src/parse-scool/parse-scool (revision 49)
@@ -0,0 +1 @@
+sglri -p `dirname $0`/../scl-syn/Scool.tbl -i $1
Property changes on: trunk/src/parse-scool/parse-scool
___________________________________________________________________
Name: svn:executable
+ *
Index: trunk/src/scl-syn/Decl.sdf
===================================================================
--- trunk/src/scl-syn/Decl.sdf (revision 48)
+++ trunk/src/scl-syn/Decl.sdf (revision 49)
@@ -18,9 +18,11 @@
Qualifier* Id ":" Type "=" Exp ";" -> Decl
{cons("ConstDec")}
- Qualifier* Id ":" Type ";" -> Decl
+
+ Qualifier* Id ":" Constifier? Type ";" -> Decl
{cons("ConstDec")}
+ Qualifier* Id ":" "(" {(Id ":" Type) ","}*
")" "->" Type "=>" Stm -> Decl {
cons("FunDec") }
Qualifier* Id ":" "(" {(Id ":" Type) ","}*
")" "->" Type
"=" "{" Stm* "}" -> Decl
@@ -33,3 +35,7 @@
Qualifier* Id ":" "[" {(Id ":" Type ("where"
Exp)?) ","}* "]" "(" {(Id ":" Type)
","}* ")" "->" Type
"=" "{" Stm* "}" -> Decl
{cons("BiFunDec")}
+
+ Qualifier* Id ":" "[" {(Id ":" Type ("where"
Exp)?) ","}* "]" "(" {(Id ":" Type)
","}* ")" "->" Type
+ "=>" Stm -> Decl
+ {cons("BiFunDec")}
Index: trunk/src/scl-syn/Makefile.am
===================================================================
--- trunk/src/scl-syn/Makefile.am (revision 0)
+++ trunk/src/scl-syn/Makefile.am (revision 49)
@@ -0,0 +1,19 @@
+# Makefile.am -*-Makefile-*-
+
+MODULES = Scool
+SDFS = Class Decl Exp ExpOrType Lexical Scool Stm Type
+
+include $(top_srcdir)/config/Makefile.xt
+-include $(MODULES:=.dep)
+
+PGEN_FLAGS = -m $*
+SDF2RTG_FLAGS = -m $*
+SCFLAGS = -m $* --verbose 0
+
+pkgdata_DATA = $(MODULES:=.def) \
+ $(MODULES:=.tbl) \
+ $(MODULES:=.str) \
+ $(MODULES:=.rtree)
+
+EXTRA_DIST = $(SDFS:=.sdf) $(MODULES:=.sdf)
+CLEANFILES = $(pkgdata_DATA) $(MODULES:=.dep)
Index: trunk/src/scl-syn/Lexical.sdf
===================================================================
--- trunk/src/scl-syn/Lexical.sdf (revision 48)
+++ trunk/src/scl-syn/Lexical.sdf (revision 49)
@@ -1,7 +1,7 @@
module Lexical
exports
- sorts Id Int String Asterisk Slash BlockComment CommentPart Cxx RawCxx Qualifier
+ sorts Id Int String Asterisk Slash BlockComment CommentPart Cxx RawCxx Qualifier
Constifier
context-free syntax
@@ -30,6 +30,9 @@
"final" -> Qualifier
"overloading" -> Qualifier
"decl" -> Qualifier
+ "abstract" -> Qualifier
+
+ "const" -> Constifier
lexical restrictions
Id -/- [A-Za-z]
@@ -38,4 +41,4 @@
context-free restrictions
LAYOUT? -/- [\ \t\n]
-
+ LAYOUT? -/- [\/].[\/]
Index: trunk/src/scl-syn/Type.sdf
===================================================================
--- trunk/src/scl-syn/Type.sdf (revision 48)
+++ trunk/src/scl-syn/Type.sdf (revision 49)
@@ -10,6 +10,8 @@
context-free syntax
ExpOrType -> Type
+ Id ":" Type -> Type {non-assoc,cons("FunArg")}
+ "ref" Type -> Type {non-assoc,cons("RefType")}
"(" {Type ","}* ")" "->" Type ->
Type {cons("FunType")}
"[" {Type ","}* "]" "->" Type ->
Type {cons("StaticFunType")}
"[" {Type ","}* "]"
Index: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am (revision 0)
+++ trunk/src/Makefile.am (revision 49)
@@ -0,0 +1,7 @@
+# Makefile.am -*-Makefile-*-
+
+include $(top_srcdir)/config/Makefile.xt
+
+SUBDIRS = cxx-syn scl-syn pp-cxx scoolt
+
+BOOTCLEAN_SUBDIRS = $(SUBDIRS)
Index: trunk/src/cxx-syn/CxxType.sdf
===================================================================
--- trunk/src/cxx-syn/CxxType.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxType.sdf (revision 49)
@@ -0,0 +1,14 @@
+module CxxType
+
+imports
+ Lexical
+
+exports
+ sorts CxxType
+ context-free syntax
+
+ CxxId -> CxxType {cons("CxxType")}
+ CxxId "<" {CxxType ","}* ">" ->
CxxType {cons("CxxType")}
+ "const" CxxType -> CxxType {cons("CxxConstType")}
+ CxxType "&" -> CxxType {cons("CxxRefType")}
+
Index: trunk/src/cxx-syn/CxxStm.sdf
===================================================================
--- trunk/src/cxx-syn/CxxStm.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxStm.sdf (revision 49)
@@ -0,0 +1,11 @@
+module CxxStm
+
+imports
+ CxxType CxxExp CxxDecl
+
+exports
+ sorts CxxStm
+ context-free syntax
+
+ CxxDecl -> CxxStm
+ CxxExp -> CxxStm {cons("CxxExpStm")}
Index: trunk/src/cxx-syn/CxxDecl.sdf
===================================================================
--- trunk/src/cxx-syn/CxxDecl.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxDecl.sdf (revision 49)
@@ -0,0 +1,34 @@
+module CxxDecl
+
+imports
+ CxxType CxxExp Lexical
+
+exports
+ sorts CxxDecl CxxTopLevel
+ context-free syntax
+
+ CxxType CxxId ";" -> CxxDecl {cons("CxxDecl")}
+ CxxType CxxId ("[" CxxExp "]")? ";" ->
CxxDecl {cons("CxxArrayDecl")}
+
+ CxxType CxxId "=" CxxExp ";" ->
CxxDecl {cons("CxxDecl")}
+
+ "typedef" CxxType CxxId ";" ->
CxxDecl {cons("CxxTypedef")}
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
+ "class" CxxId ":" {(CxxAccessModifier CxxId) ","}*
";"
+ -> CxxDecl {cons("CxxClassDecl")}
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
+ "class" CxxId ":" {(CxxAccessModifier CxxId) ","}*
+ "{"
+ CxxDecl*
+ "}" ";"
+ -> CxxDecl {cons("CxxClassDecl")}
+
+ "typename" -> CxxType {cons("Typename")}
+
+ "//" CxxText -> CxxTopLevel {cons("CxxComment")}
+
+ "public" ":" CxxTopLevel* ->
CxxTopLevel {cons("CxxPublic")}
+ "protected" ":" CxxTopLevel* ->
CxxTopLevel {cons("CxxProtected")}
+ "private" ":" CxxTopLevel* ->
CxxTopLevel {cons("CxxPrivate")}
Index: trunk/src/cxx-syn/CxxFun.sdf
===================================================================
--- trunk/src/cxx-syn/CxxFun.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxFun.sdf (revision 49)
@@ -0,0 +1,24 @@
+module CxxFun
+
+imports
+ CxxType CxxExp Lexical CxxStm
+
+exports
+ sorts CxxTopLevel
+ context-free syntax
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
+ CxxType CxxId "(" {(CxxType CxxId) ","}* ")"
+ "{"
+ CxxStm*
+ "}"
+ -> CxxTopLevel {cons("CxxFun")}
+
+ "template" "<" {(CxxType CxxId) ","}* ">"
+ CxxType CxxId "(" {(CxxType CxxId) ","}* ")" ";"
-> CxxTopLevel {cons("CxxFun")}
+
+ CxxId ("<" {CxxType ","}* ">")? "("
{(CxxType CxxId) ","}* ")" ";" -> CxxTopLevel
{cons("CxxFunCall")}
+
+ CxxDecl -> CxxTopLevel
+
+ CxxTopLevel* -> CxxTopLevel
Index: trunk/src/cxx-syn/CxxScope.sdf
===================================================================
Index: trunk/src/cxx-syn/Makefile.am
===================================================================
--- trunk/src/cxx-syn/Makefile.am (revision 0)
+++ trunk/src/cxx-syn/Makefile.am (revision 49)
@@ -0,0 +1,19 @@
+# Makefile.am -*-Makefile-*-
+
+MODULES = Cxx
+SDFS = Cxx CxxDecl CxxExp CxxFun CxxScope CxxStm CxxType Lexical
+
+include $(top_srcdir)/config/Makefile.xt
+-include $(MODULES:=.dep)
+
+PGEN_FLAGS = -m $*
+SDF2RTG_FLAGS = -m $*
+SCFLAGS = -m $* --verbose 0
+
+pkgdata_DATA = $(MODULES:=.def) \
+ $(MODULES:=.tbl) \
+ $(MODULES:=.str) \
+ $(MODULES:=.rtree)
+
+EXTRA_DIST = $(SDFS:=.sdf) $(MODULES:=.sdf)
+CLEANFILES = $(pkgdata_DATA) $(MODULES:=.dep)
Index: trunk/src/cxx-syn/CxxExp.sdf
===================================================================
--- trunk/src/cxx-syn/CxxExp.sdf (revision 0)
+++ trunk/src/cxx-syn/CxxExp.sdf (revision 49)
@@ -0,0 +1,15 @@
+module CxxExp
+
+imports
+ Lexical
+
+exports
+ sorts CxxExp
+ context-free syntax
+
+ CxxInt -> CxxExp {cons("CxxInt")}
+ CxxId "(" {CxxExp ","}* ")" ->
CxxExp {cons("CxxFunCall")}
+
+ CxxId CxxExp ";" -> CxxExp {cons("CxxKeyword")}
+ CxxId "=" CxxExp ";" -> CxxExp {cons("CxxAffect")}
+ CxxExp "+" CxxExp -> CxxExp {cons("CxxSum")}
Index: trunk/src/cxx-syn/Lexical.sdf
===================================================================
--- trunk/src/cxx-syn/Lexical.sdf (revision 0)
+++ trunk/src/cxx-syn/Lexical.sdf (revision 49)
@@ -0,0 +1,15 @@
+module Lexical
+
+exports
+ sorts CxxId CxxInt CxxAccessModifier CxxText
+ lexical syntax
+
+ ~[]* -> CxxText
+ [a-zA-Z0-9]+ -> CxxId
+ [0-9]+ -> CxxInt
+ "private" -> CxxAccessModifier
+ "public" -> CxxAccessModifier
+ "protected" -> CxxAccessModifier
+
+ context-free syntax
+ CxxId "::" CxxId -> CxxId {cons("CxxScope")}
Index: trunk/src/cxx-syn/Cxx.sdf
===================================================================
--- trunk/src/cxx-syn/Cxx.sdf (revision 0)
+++ trunk/src/cxx-syn/Cxx.sdf (revision 49)
@@ -0,0 +1,12 @@
+module Cxx
+
+imports
+ CxxDecl CxxFun
+
+exports
+ sorts CxxProgram CxxTopLevel
+ context-free start-symbols CxxProgram
+ context-free syntax
+
+ CxxTopLevel -> CxxProgram {cons("CxxProgram")}
+
Index: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile (revision 48)
+++ trunk/src/Makefile (revision 49)
@@ -1,62 +1,775 @@
-SCLSDF = $(wildcard scl-syn/*.sdf)
-CXXSDF = $(wildcard cxx-syn/*.sdf)
-ALL = \
-scl-syn/Scool.def scl-syn/Scool.tbl scl-syn/Scool.str scl-syn/Scool.rtg \
-#cxx-syn/Cxx.def cxx-syn/Cxx.tbl cxx-syn/Cxx.rtg cxx-syn/Cxx.str \
-#scoolt/scoolt \
-#pp-cxx/pp-cxx \
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# src/Makefile. Generated from Makefile.in by configure.
-STRC = strc -la stratego-lib
-
-all: $(ALL)
-
-
-
-
-
-
-scl-syn/Scool.def: $(SCLSDF)
- pack-sdf -i scl-syn/Scool.sdf -o $@
-
-scl-syn/Scool.tbl: scl-syn/Scool.def
- sdf2table -i $< -o $@ -m Scool
-
-scl-syn/Scool.rtg: scl-syn/Scool.def
- sdf2rtg -i $< -m Scool -o $@
-
-scl-syn/Scool.str: scl-syn/Scool.rtg
- rtg2sig --module Scool -i $< -o $@
-
-
-
-
-
-cxx-syn/Cxx.def: $(CXXSDF)
- pack-sdf -i cxx-syn/Cxx.sdf -o $@
-
-cxx-syn/Cxx.tbl: cxx-syn/Cxx.def
- sdf2table -i $< -o $@ -m Cxx
-
-cxx-syn/Cxx.rtg: cxx-syn/Cxx.def
- sdf2rtg -i $< -m Cxx -o $@
-
-cxx-syn/Cxx.str: cxx-syn/Cxx.rtg
- rtg2sig --module Cxx -i $< -o $@
-
-
-
-
-scoolt/scoolt: scoolt/scoolt.str
- $(STRC) -i $< -I scl-syn -I cxx-syn
-
-
-
-
-pp-cxx/pp-cxx: pp-cxx/pp-cxx.str
- $(STRC) -I ~/.nix-profile/share/sdf/gpp -I cxx-syn -i $<
-
-
-
-
-clean:
- rm -rf $(ALL)
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Makefile.am -*-Makefile-*-
+
+###########################################################
+# File: Makefile.xt
+#
+# autoxt
+#
+# Description
+#
+# This Makefile provides support for compiling Stratego
+# programs and use of some other XT tools.
+#
+###########################################################
+#
+# Variables
+#
+
+pkgdatadir = $(datadir)/scool
+pkglibdir = $(libdir)/scool
+pkgincludedir = $(includedir)/scool
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/Makefile.xt
+am__append_1 = -DDEFAULT_XTC_REPOSITORY="\"$(REPOSITORY)\""
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/config/autoxt.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run aclocal-1.10
+AMTAR = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run tar
+AR = ar
+ASFIX_TOOLS = $(STRATEGOXT)
+ASF_LIBRARY = $(SDF)
+ATERM = /nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939
+ATERM_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+ATERM_FRONT = $(STRATEGOXT)
+ATERM_LIBS = -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lATerm
+ATERM_STRCFLAGS =
+ATERM_XTC =
+AUTOCONF = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run automake-1.10
+AWK = gawk
+BUILD_REPOSITORY = /home/yabo/dev/lrde/scool/trunk/BUILDTIME_XTC
+CC = /usr/bin/gcc32
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CONCRETE_SYNTAX = $(STRATEGOXT)
+CPP = /usr/bin/gcc32 -E
+CPPFLAGS =
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+C_TOOLS = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+C_TOOLS_CFLAGS =
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+C_TOOLS_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-lib
-lstratego-lib-native -lstratego-runtime -lm -lATerm
+C_TOOLS_STRCFLAGS = -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share/c-tools -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share/sdf/c-tools
+C_TOOLS_XTC =
+DEFS = -DPACKAGE_NAME=\"scool\" -DPACKAGE_TARNAME=\"scool\"
-DPACKAGE_VERSION=\"0.1\" -DPACKAGE_STRING=\"scool\ 0.1\"
-DPACKAGE_BUGREPORT=\"yabo(a)lrde.epita.fr\" -DPACKAGE=\"scool\"
-DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
+DEPDIR = .deps
+ECHO = echo
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /bin/grep -E
+EXEEXT =
+F77 = gfortran
+FFLAGS = -g -O2
+GPP = $(STRATEGOXT)
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS =
+LIBOBJS =
+LIBS =
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/yabo/dev/lrde/scool/trunk/config/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+OBJEXT = o
+PACKAGE = scool
+PACKAGE_BUGREPORT = yabo(a)lrde.epita.fr
+PACKAGE_NAME = scool
+PACKAGE_STRING = scool 0.1
+PACKAGE_TARNAME = scool
+PACKAGE_VERSION = 0.1
+PATH_SEPARATOR = :
+PGEN = $(SDF)
+PKG_CONFIG = /usr/bin/pkg-config
+PT_SUPPORT = $(SDF)
+RANLIB = ranlib
+REPOSITORY = ${datarootdir}/scool/XTC
+SCOMPILE = $(STRC)/bin/strc
+SDF = /nix/store/94msp5hiqhb82dh9k0jhzgdr9ld9n9r3-sdf2-bundle-2.4pre206999
+SDF_CFLAGS = -I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+SDF_FRONT = $(STRATEGOXT)
+SDF_LIBRARY = $(SDF)
+SDF_LIBS = -L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lATerm
+SDF_STRCFLAGS =
+SDF_TOOLS = $(STRATEGOXT)
+SDF_XTC =
+SED = /bin/sed
+SET_MAKE =
+SGLR = $(SDF)
+SHELL = /bin/sh
+SRTS = $(STRATEGO_RUNTIME)
+STRATEGOXT = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGOXT_CFLAGS =
+STRATEGOXT_LIBS =
+STRATEGOXT_STRCFLAGS =
+STRATEGOXT_XTC =
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share/strategoxt/XTC
+STRATEGO_ATERM = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_ATERM_CFLAGS =
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_ATERM_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-aterm
-lstratego-gpp -lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm
-lATerm
+STRATEGO_ATERM_STRCFLAGS = -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_ATERM_XTC =
+STRATEGO_FRONT = $(STRATEGOXT)
+STRATEGO_GPP = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_GPP_CFLAGS =
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_GPP_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-gpp
-lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_GPP_STRCFLAGS = -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_GPP_XTC =
+STRATEGO_LIB = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_LIBRARIES =
+STRATEGO_LIB_CFLAGS =
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+STRATEGO_LIB_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-lib
-lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_LIB_STRCFLAGS = -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share/stratego-libraries
-I /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_LIB_XTC =
+STRATEGO_REGULAR = $(STRATEGOXT)
+STRATEGO_RTG = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_RTG_CFLAGS =
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_RTG_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-rtg
-lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_RTG_STRCFLAGS = -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_RTG_XTC =
+STRATEGO_RUNTIME = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_RUNTIME_CFLAGS =
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+STRATEGO_RUNTIME_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-runtime -lm
-lATerm
+STRATEGO_RUNTIME_STRCFLAGS =
+STRATEGO_RUNTIME_XTC =
+STRATEGO_SGLR = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_SGLR_CFLAGS =
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_SGLR_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-sglr
-lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_SGLR_STRCFLAGS = -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_SGLR_XTC =
+STRATEGO_TOOL_DOC =
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_TOOL_DOC_CFLAGS =
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
+STRATEGO_TOOL_DOC_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-tool-doc
-lstratego-gpp -lstratego-sglr -lstratego-lib -lstratego-lib-native -lstratego-runtime -lm
-lATerm
+STRATEGO_TOOL_DOC_STRCFLAGS = -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_TOOL_DOC_XTC =
+STRATEGO_XTC = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+STRATEGO_XTC_CFLAGS =
-I/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/include
-I/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/include
+STRATEGO_XTC_LIBS =
-L/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/lib
-L/nix/store/0nsws8s9blgv5sq3n1sxr0wsfd1dbgys-aterm-2.5pre20939/lib -lstratego-xtc
-lstratego-lib -lstratego-lib-native -lstratego-runtime -lm -lATerm
+STRATEGO_XTC_STRCFLAGS = -I
/nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/share
+STRATEGO_XTC_XTC =
+STRC = $(STRATEGOXT)
+STRIP = strip
+STR_CFLAGS = -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function
-Wno-unused-parameter
+STR_LDFLAGS =
+VERSION = 0.1
+XML_FRONT = $(STRATEGOXT)
+XTC = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697
+XTC_CFLAGS =
+XTC_LIBS = $(STRATEGO_XTC_LIBS)
+XTC_PROG = /nix/store/fd1p042l65aaa440a4v5jl4rxjsxqx2b-strategoxt-0.17M3pre16697/bin/xtc
+XTC_STRCFLAGS = $(STRATEGO_XTC_STRCFLAGS)
+XTC_XTC =
+abs_builddir = /home/yabo/dev/lrde/scool/trunk/src
+abs_srcdir = /home/yabo/dev/lrde/scool/trunk/src
+abs_top_builddir = /home/yabo/dev/lrde/scool/trunk
+abs_top_srcdir = /home/yabo/dev/lrde/scool/trunk
+ac_ct_CC = /usr/bin/gcc32
+ac_ct_CXX = g++
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote =
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = $(SHELL) /home/yabo/dev/lrde/scool/trunk/config/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_builddir = ..
+top_srcdir = ..
+AM_CFLAGS = $(STR_CFLAGS) $(am__append_1)
+AM_LDFLAGS = $(STR_LDFLAGS)
+AM_CPPFLAGS = $(STRATEGO_LIB_CFLAGS) $(STRATEGO_RUNTIME_CFLAGS) $(ATERM_CFLAGS)
+LDADD = $(STRATEGO_LIB_LIBS) $(STRATEGO_RUNTIME_LIBS) $(ATERM_LIBS)
+
+# backwards compatibilty: prefer STRATEGO_LIB_LIBS and STRATEGO_RUNTIME_LIBS in new
code.
+SSL_LIBS = $(ATERM_LIBS) $(STRATEGO_XTC_LIBS) $(STRATEGO_LIB_LIBS)
$(STRATEGO_RUNTIME_LIBS) $(ATERM_LIBS)
+STRATEGORUNLIBS = $(STRATEGO_RUNTIME_LIBS)
+SUFFIXES = .str .cr .r .rtree .def .tbl .pp .sdf .rtg .rtg-nf .dfta
+PARSESTRATEGO = $(STRATEGO_FRONT)/bin/parse-stratego
+pkgconfigdir = $(libdir)/pkgconfig
+sdfdatadir = $(datadir)/sdf/$(PACKAGE)
+docdatadir = $(datadir)/doc/$(PACKAGE)
+
+###########################################################
+#
+# Makerules for XTC
+#
+XTCFLAGS = -I $(XTC)/share/xtc
+DREPOSITORY = $(DESTDIR)$(REPOSITORY)
+SUBDIRS = cxx-syn scl-syn pp-cxx scoolt
+BOOTCLEAN_SUBDIRS = $(SUBDIRS)
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .str .cr .r .rtree .def .tbl .pp .sdf .rtg .rtg-nf .dfta .c
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/Makefile.xt
$(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
$(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
$(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS)
tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS)
ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed
's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+#all-local:
+all-am: Makefile all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+#install-data-local:
+#install-exec-local:
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-recursive
+
+install-exec-am: install-exec-local
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am all-local check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive distclean \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-local \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+###########################################################
+#
+# Make rules for Stratego programs
+#
+
+.str.c :
+ $(SCOMPILE) $(STRINCLUDES) $(STRCFLAGS) $(SCFLAGS) -i $< -o $@ -c
+
+.str.rtree :
+ $(PARSESTRATEGO) $(STRINCLUDES) -i $< -o $@
+
+.rtree.c :
+ $(SCOMPILE) $(STRINCLUDES) $(STRCFLAGS) $(SCFLAGS) -i $< -o $@ -c
+
+bootclean-am: clean-am
+ -test -z "$(BOOTCLEANFILES)" || rm -f $(BOOTCLEANFILES)
+
+bootclean : bootclean-recursive
+
+bootclean-recursive :
+ @dot_seen=no; \
+ target=bootclean; \
+ list='$(BOOTCLEAN_SUBDIRS) .'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+###########################################################
+#
+# Makerules for SDF definitions
+#
+
+.sdf.def :
+ $(SDF_FRONT)/bin/pack-sdf $(SDFINCLUDES) -i $< -o $@ --dep $*.dep
+
+.def.tbl :
+ $(PGEN)/bin/sdf2table $(PGEN_FLAGS) -i $< -o $@
+
+###########################################################
+#
+# Makerules for GPP
+#
+
+%.pp.af : %.pp
+ $(GPP)/bin/parse-pp-table -i $< -o $@
+
+.def.pp :
+ @if [ ! -f ${srcdir}/$@ ]; then \
+ $(GPP)/bin/ppgen -i $< -o $@ ;\
+ else \
+ $(GPP)/bin/parse-pp-table -i ${srcdir}/$@ -o $@.af ;\
+ $(GPP)/bin/ppgen -t -i $< \
+ | $(GPP)/bin/pptable-diff --old $@.af 2>&1 || \
+ eval "echo '## pptable-diff error: $@ is not consistent
with syntax definition' >&2; exit 1";\
+ touch $@ ;\
+ $(RM) $@.af ;\
+ fi
+
+###########################################################
+#
+# Makerules for Stratego Regular
+#
+
+.def.rtg :
+ $(STRATEGO_REGULAR)/bin/sdf2rtg $(SDF2RTG_FLAGS) -i $< -o $@
+
+.rtg.str :
+ $(STRATEGO_REGULAR)/bin/rtg2sig --module `basename "$*"` -i $< -o $@
+
+.rtg.rtg-nf :
+ $(STRATEGO_REGULAR)/bin/parse-rtg -i $< | \
+ $(STRATEGO_REGULAR)/libexec/rtg-reduce | \
+ $(STRATEGO_REGULAR)/libexec/rtg-group -o $@
+
+.rtg.dfta :
+ $(STRATEGO_REGULAR)/bin/rtg2dfta -i $< -o $@
+
+relname:
+ echo -n $(distdir) > relname
+
+install-data-local::
+ $(mkinstalldirs) `dirname $(DREPOSITORY)`
+ @for file in fordummy $(XTC_IMPORT) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) import $$file ; \
+ echo $(XTC_PROG) -r $(DREPOSITORY) import $$file ; \
+ done
+ @for file in fordummy $(pkgdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(pkgdatadir) -V $(VERSION) -t `basename
$$file` ; \
+ done
+ @for file in fordummy $(nobase_pkgdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(pkgdatadir) -V $(VERSION) -t $$file ; \
+ done
+ @for file in fordummy $(sdfdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(sdfdatadir) -V $(VERSION) -t `basename
$$file` ; \
+ done
+ @for file in fordummy $(nobase_sdfdata_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(sdfdatadir) -V $(VERSION) -t $$file ; \
+ done
+ @for file in fordummy $(data_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(datadir) -V $(VERSION) -t `basename
$$file` ; \
+ done
+ @for file in fordummy $(nobase_data_DATA) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(datadir) -V $(VERSION) -t $$file ; \
+ done
+ @echo "Data registered in repository $(DREPOSITORY): $(data_DATA)
$(nobase_data_DATA) $(pkgdata_DATA) $(nobase_pkgdata_DATA) $(sdfdata_DATA)
$(nobase_sdfdata_DATA)"
+
+install-exec-local::
+ $(mkinstalldirs) `dirname $(DREPOSITORY)`
+ @for file in fordummy $(bin_PROGRAMS) $(bin_SCRIPTS) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(bindir) -V $(VERSION) -t `basename $$file
$(EXEEXT)` ; \
+ done
+ @for file in fordummy $(libexec_PROGRAMS) $(libexec_SCRIPTS) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(DREPOSITORY) register -l $(libexecdir) -V $(VERSION) -t `basename
$$file $(EXEEXT)` ; \
+ done
+ @echo "Tools registered in repository $(DREPOSITORY): $(bin_PROGRAMS)
$(bin_SCRIPTS) $(libexec_PROGRAMS) $(libexec_SCRIPTS)"
+
+all-local::
+ @for file in fordummy $(XTC_IMPORT) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ $(XTC_PROG) -r $(BUILD_REPOSITORY) import $$file ; \
+ echo $(XTC_PROG) -r $(BUILD_REPOSITORY) import $$file ; \
+ done
+ @for file in fordummy $(data_DATA) $(pkgdata_DATA) $(sdfdata_DATA) $(bin_SCRIPTS)
$(libexec_SCRIPTS); do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ if test -f "$$file"; then d="`pwd`"; else
d="/home/yabo/dev/lrde/scool/trunk/src"; fi; \
+ $(XTC_PROG) -r $(BUILD_REPOSITORY) register -l "$$d" -V $(VERSION) -t
`basename $$file` ; \
+ done
+ @for file in fordummy $(nobase_data_DATA) $(nobase_pkgdata_DATA) $(nobase_sdfdata_DATA)
; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ if test -f "$$file"; then d="`pwd`"; else
d="/home/yabo/dev/lrde/scool/trunk/src"; fi; \
+ $(XTC_PROG) -r $(BUILD_REPOSITORY) register -l "$$d" -V $(VERSION) -t $$file
; \
+ done
+ @for file in fordummy $(bin_PROGRAMS) $(libexec_PROGRAMS) ; do \
+ if [ "$$file" = "fordummy" ]; then continue; fi; \
+ if test -f "$$file"; then d="`pwd`"; else
d="/home/yabo/dev/lrde/scool/trunk/src"; fi; \
+ $(XTC_PROG) -r $(BUILD_REPOSITORY) register -l "$$d" -V $(VERSION) -t
`basename $$file $(EXEEXT)` ; \
+ done
+ @echo "Tools registered in repository $(BUILD_REPOSITORY): $(bin_PROGRAMS)
$(bin_SCRIPTS) $(libexec_PROGRAMS) $(libexec_SCRIPTS)"
+ @echo "Data registered in repository $(BUILD_REPOSITORY): $(data_DATA)
$(nobase_data_DATA) $(pkgdata_DATA) $(nobase_pkgdata_DATA) $(sdfdata_DATA)
$(nobase_sdfdata_DATA)"
+
+###########################################################
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: trunk/bin/scoolc
===================================================================
--- trunk/bin/scoolc (revision 0)
+++ trunk/bin/scoolc (revision 49)
@@ -0,0 +1,17 @@
+#!/bin/sh
+# -*- sh -*-
+
+if [ "$1" = "--cxx" ]; then
+ shift
+ if [ $# -gt 0 ]; then
+ parse-scool -i $1 | scoolt | pp-cxx | abox2text
+ else
+ parse-scool | scoolt | pp-cxx | abox2text
+ fi
+else
+ if [ $# -gt 0 ]; then
+ parse-scool -i $1 | scoolt | pp-cxx | abox2text | g++ -c -x c++ - -I $SCOOLC_ROOT/static
-I $SCOOLC_ROOT/metalic
+ else
+ parse-scool | scoolt | pp-cxx | abox2text | g++ -c -x c++ - -I $SCOOLC_ROOT/static -I
$SCOOLC_ROOT/metalic
+ fi
+fi
Property changes on: trunk/bin/scoolc
___________________________________________________________________
Name: svn:executable
+ *
Index: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am (revision 0)
+++ trunk/Makefile.am (revision 49)
@@ -0,0 +1,10 @@
+# Makefile.am -*-Makefile-*-
+
+include $(top_srcdir)/config/Makefile.xt
+
+XTC_IMPORT = $(STRATEGOXT)/share/strategoxt/XTC \
+ $(GENERIC_TOOLS_XTC)
+CLEANFILES = XTC
+BOOTCLEAN_SUBDIRS = $(SUBDIRS)
+ACLOCAL_AMFLAGS = -I config
+SUBDIRS = . config src
Index: trunk/NEWS
===================================================================
Index: trunk/README
===================================================================
Index: trunk/bootstrap
===================================================================
--- trunk/bootstrap (revision 0)
+++ trunk/bootstrap (revision 49)
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+here=`pwd`
+cd config
+ autoxt
+cd $here
+autoreconf -f -i --verbose
Property changes on: trunk/bootstrap
___________________________________________________________________
Name: svn:executable
+ *
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ Président de Prologin \_____)