URL:
https://svn.lrde.epita.fr/svn/scool/branches/scool-ng
ChangeLog:
2008-09-24 Maxime van Noppen <yabo(a)lrde.epita.fr>
Add reference files for classes
* class/c++_ast/empty.aterm,
* class/c++_ast/empty_accessblocks.aterm,
* class/c++_ast/empty_private.aterm,
* class/c++_ast/empty_protected.aterm,
* class/c++_ast/empty_public.aterm,
* class/c++_ast/member_001.aterm,
* class/c++_ast/member_002.aterm,
* class/c++_ast/method_001.aterm,
* class/c++_ast/method_002.aterm,
* class/c++_ast/method_003.aterm,
* class/c++_ast/method_004.aterm,
* class/c++_ast/method_005.aterm: Use a list to store parameters.
* class/c++_src/empty.cc: New.
* class/c++_src/empty_accessblocks.cc: New.
* class/c++_src/empty_private.cc: New.
* class/c++_src/empty_protected.cc: New.
* class/c++_src/empty_public.cc: New.
* class/c++_src/member_001.cc: New.
* class/c++_src/member_002.cc: New.
* class/c++_src/method_001.cc: New.
* class/c++_src/method_002.cc: New.
* class/c++_src/method_003.cc: New.
* class/c++_src/method_004.cc: New.
* class/c++_src/method_005.cc: New.
c++_ast/empty.aterm | 2 +-
c++_ast/empty_accessblocks.aterm | 2 +-
c++_ast/empty_private.aterm | 2 +-
c++_ast/empty_protected.aterm | 2 +-
c++_ast/empty_public.aterm | 2 +-
c++_ast/member_001.aterm | 2 +-
c++_ast/member_002.aterm | 2 +-
c++_ast/method_001.aterm | 2 +-
c++_ast/method_002.aterm | 2 +-
c++_ast/method_003.aterm | 2 +-
c++_ast/method_004.aterm | 2 +-
c++_ast/method_005.aterm | 2 +-
c++_src/empty.cc | 4 ++++
c++_src/empty_accessblocks.cc | 7 +++++++
c++_src/empty_private.cc | 5 +++++
c++_src/empty_protected.cc | 5 +++++
c++_src/empty_public.cc | 5 +++++
c++_src/member_001.cc | 6 ++++++
c++_src/member_002.cc | 7 +++++++
c++_src/method_001.cc | 9 +++++++++
c++_src/method_002.cc | 9 +++++++++
c++_src/method_003.cc | 13 +++++++++++++
c++_src/method_004.cc | 13 +++++++++++++
c++_src/method_005.cc | 14 ++++++++++++++
24 files changed, 109 insertions(+), 12 deletions(-)
Index: branches/scool-ng/tests/class/c++_ast/empty_private.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/empty_private.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/empty_private.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxPrivate([])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxPrivate([])])])
Index: branches/scool-ng/tests/class/c++_ast/member_002.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/member_002.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/member_002.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Point2d"),[],[CxxPublic([CxxDecl(CxxType("int"),CxxId("x")),CxxDecl(CxxType("int"),CxxId("y"))])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Point2d"),[],[CxxPublic([CxxDecl(CxxType("int"),CxxId("x")),CxxDecl(CxxType("int"),CxxId("y"))])])])
Index: branches/scool-ng/tests/class/c++_ast/empty_public.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/empty_public.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/empty_public.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxPublic([])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxPublic([])])])
Index: branches/scool-ng/tests/class/c++_ast/empty_accessblocks.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/empty_accessblocks.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/empty_accessblocks.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxPublic([]),CxxProtected([]),CxxPrivate([])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxPublic([]),CxxProtected([]),CxxPrivate([])])])
Index: branches/scool-ng/tests/class/c++_ast/empty.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/empty.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/empty.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[])])
Index: branches/scool-ng/tests/class/c++_ast/method_001.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_001.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/method_001.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/method_002.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_002.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/method_002.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/method_003.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_003.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/method_003.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))]),CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))]),CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/method_004.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_004.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/method_004.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))]),CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))]),CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/method_005.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/method_005.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/method_005.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])]),CxxPrivate([CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxPublic([CxxFun([],CxxType("int"),CxxId("test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("42")))])]),CxxPrivate([CxxFun([],CxxType("int"),CxxId("another_test"),[],[CxxExpStm(CxxKeyword("return",CxxInt("51")))])])])])
Index: branches/scool-ng/tests/class/c++_ast/empty_protected.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/empty_protected.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/empty_protected.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Foo"),[],[CxxProtected([])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Foo"),[],[CxxProtected([])])])
Index: branches/scool-ng/tests/class/c++_ast/member_001.aterm
===================================================================
--- branches/scool-ng/tests/class/c++_ast/member_001.aterm (revision 99)
+++ branches/scool-ng/tests/class/c++_ast/member_001.aterm (revision 100)
@@ -1 +1 @@
-CxxProgram([CxxClassDecl((CxxType("typename"),"T"),CxxId("Point1d"),[],[CxxPublic([CxxDecl(CxxType("int"),CxxId("x"))])])])
+CxxProgram([CxxClassDecl([(CxxType("typename"),"T")],CxxId("Point1d"),[],[CxxPublic([CxxDecl(CxxType("int"),CxxId("x"))])])])
Index: branches/scool-ng/tests/class/c++_src/empty_public.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/empty_public.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/empty_public.cc (revision 100)
@@ -0,0 +1,5 @@
+template < typename T >
+class Foo
+{
+ public:
+};
Index: branches/scool-ng/tests/class/c++_src/empty_accessblocks.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/empty_accessblocks.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/empty_accessblocks.cc (revision 100)
@@ -0,0 +1,7 @@
+template < typename T >
+class Foo
+{
+ public:
+ protected:
+ private:
+};
Index: branches/scool-ng/tests/class/c++_src/empty.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/empty.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/empty.cc (revision 100)
@@ -0,0 +1,4 @@
+template < typename T >
+class Foo
+{
+};
Index: branches/scool-ng/tests/class/c++_src/method_001.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_001.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/method_001.cc (revision 100)
@@ -0,0 +1,9 @@
+template < typename T >
+class Foo
+{
+ public:
+ int test()
+ {
+ return 42;
+ }
+};
Index: branches/scool-ng/tests/class/c++_src/method_002.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_002.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/method_002.cc (revision 100)
@@ -0,0 +1,9 @@
+template < typename T >
+class Foo
+{
+ public:
+ int test()
+ {
+ return 42;
+ }
+};
Index: branches/scool-ng/tests/class/c++_src/method_003.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_003.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/method_003.cc (revision 100)
@@ -0,0 +1,13 @@
+template < typename T >
+class Foo
+{
+ public:
+ int test()
+ {
+ return 42;
+ }
+ int another_test()
+ {
+ return 51;
+ }
+};
Index: branches/scool-ng/tests/class/c++_src/method_004.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_004.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/method_004.cc (revision 100)
@@ -0,0 +1,13 @@
+template < typename T >
+class Foo
+{
+ public:
+ int test()
+ {
+ return 42;
+ }
+ int another_test()
+ {
+ return 51;
+ }
+};
Index: branches/scool-ng/tests/class/c++_src/method_005.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/method_005.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/method_005.cc (revision 100)
@@ -0,0 +1,14 @@
+template < typename T >
+class Foo
+{
+ public:
+ int test()
+ {
+ return 42;
+ }
+ private:
+ int another_test()
+ {
+ return 51;
+ }
+};
Index: branches/scool-ng/tests/class/c++_src/empty_protected.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/empty_protected.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/empty_protected.cc (revision 100)
@@ -0,0 +1,5 @@
+template < typename T >
+class Foo
+{
+ protected:
+};
Index: branches/scool-ng/tests/class/c++_src/member_001.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/member_001.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/member_001.cc (revision 100)
@@ -0,0 +1,6 @@
+template < typename T >
+class Point1d
+{
+ public:
+ int x;
+};
Index: branches/scool-ng/tests/class/c++_src/empty_private.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/empty_private.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/empty_private.cc (revision 100)
@@ -0,0 +1,5 @@
+template < typename T >
+class Foo
+{
+ private:
+};
Index: branches/scool-ng/tests/class/c++_src/member_002.cc
===================================================================
--- branches/scool-ng/tests/class/c++_src/member_002.cc (revision 0)
+++ branches/scool-ng/tests/class/c++_src/member_002.cc (revision 100)
@@ -0,0 +1,7 @@
+template < typename T >
+class Point2d
+{
+ public:
+ int x;
+ int y;
+};
--
\__/ \__/
(00) Maxime `yabo` van Noppen (00)
___) \ Epita 2009 / (___
(_____/ \_____)