aboutsummaryrefslogtreecommitdiff
path: root/tests/cxx/parser/polyrecur/test-pimpl.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-02-11 17:18:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-02-11 17:18:30 +0200
commit49d8e39f9a42ff1963c5df0f6e9ed903d66f2eb0 (patch)
tree17cb3577baa07e30720788e059399f7c07c22a37 /tests/cxx/parser/polyrecur/test-pimpl.hxx
parentbcf2ac66e6c21d75f4e76b8e0bc2e3c6d64886b8 (diff)
Fix recursive polymorphic parsing in C++/Parser
New test: cxx/parser/polyrecur.
Diffstat (limited to 'tests/cxx/parser/polyrecur/test-pimpl.hxx')
-rw-r--r--tests/cxx/parser/polyrecur/test-pimpl.hxx117
1 files changed, 117 insertions, 0 deletions
diff --git a/tests/cxx/parser/polyrecur/test-pimpl.hxx b/tests/cxx/parser/polyrecur/test-pimpl.hxx
new file mode 100644
index 0000000..fa6e206
--- /dev/null
+++ b/tests/cxx/parser/polyrecur/test-pimpl.hxx
@@ -0,0 +1,117 @@
+// file : tests/cxx/parser/polyrecur/test-pimpl.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2006-2011 Code Synthesis Tools CC
+// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
+
+#ifndef TEST_PIMPL_HXX
+#define TEST_PIMPL_HXX
+
+#include "test-pskel.hxx"
+
+namespace test
+{
+ class root_pimpl: public root_pskel
+ {
+ public:
+ virtual void
+ pre ();
+
+ virtual void
+ expression ();
+
+ virtual void
+ post_root ();
+ };
+
+ class expression_pimpl: public expression_pskel
+ {
+ public:
+ virtual void
+ pre ();
+
+ virtual void
+ post_expression ();
+ };
+
+ class recursive_pimpl: public recursive_pskel
+ {
+ public:
+ recursive_pimpl (): recursive_pskel (&base_impl_) {}
+
+ virtual void
+ pre ();
+
+ virtual void
+ expression ();
+
+ virtual void
+ post_expression ();
+
+ virtual void
+ post_recursive ();
+
+ expression_pimpl base_impl_;
+ };
+
+ class value_pimpl: public value_pskel
+ {
+ public:
+ value_pimpl (): value_pskel (&base_impl_) {}
+
+ virtual void
+ pre ();
+
+ virtual void
+ constant (int);
+
+ virtual void
+ post_expression ();
+
+ virtual void
+ post_value ();
+
+ expression_pimpl base_impl_;
+ };
+
+ class value_a_pimpl: public value_a_pskel
+ {
+ public:
+ value_a_pimpl (): value_a_pskel (&base_impl_) {}
+
+ virtual void
+ pre ();
+
+ virtual void
+ post_expression ();
+
+ virtual void
+ post_value ();
+
+ virtual void
+ post_value_a ();
+
+ value_pimpl base_impl_;
+ };
+
+ class value_b_pimpl: public value_b_pskel
+ {
+ public:
+ value_b_pimpl (): value_b_pskel (&base_impl_) {}
+
+ virtual void
+ pre ();
+
+ virtual void
+ post_expression ();
+
+ virtual void
+ post_value ();
+
+ virtual void
+ post_value_b ();
+
+ value_pimpl base_impl_;
+ };
+}
+
+#endif // TEST_PIMPL_HXX