summaryrefslogtreecommitdiff
path: root/tests/parser/test-005.cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-08-22 11:31:35 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-08-22 11:31:35 +0200
commit66455ad2d34c46650a798738c53bb550d250ab04 (patch)
treeb0d6204841aff9e976f17b7f3319216994bcdcdd /tests/parser/test-005.cli
parent3820d1b1bc4fdd3e5516f27807c3e58ee72e4c20 (diff)
Document rules of the language covered by each test
Diffstat (limited to 'tests/parser/test-005.cli')
-rw-r--r--tests/parser/test-005.cli55
1 files changed, 52 insertions, 3 deletions
diff --git a/tests/parser/test-005.cli b/tests/parser/test-005.cli
index 84dc24f..9a43103 100644
--- a/tests/parser/test-005.cli
+++ b/tests/parser/test-005.cli
@@ -1,6 +1,55 @@
+// option-def, type-spec, fundamental-type-spec, option-name-seq,
+// option-name, initializer, initializer-expr
+//
class c
{
- bool -a;
- int -b;
- float -c;
+ bool --bool;
+ char --char;
+
+ int -i1;
+ unsigned int -i2;
+ int unsigned -i3;
+ long -i4;
+ long int -i5;
+ int long -i6;
+ unsigned long -i7;
+ long unsigned -i8;
+
+ unsigned long int -i9;
+ long unsigned int -i10;
+ int long unsigned -i11;
+ unsigned int long -i12;
+
+ short -i13;
+ unsigned short -i14;
+ short unsigned -i15;
+
+ char -i16;
+ signed char -i17;
+ char signed -i18;
+ unsigned char -i19;
+ char unsigned -i20;
+
+ double -d1;
+ long double -d2;
+ double long -d3;
+
+ foo -o1;
+ ::foo -o2;
+ ::foo<bar> -o3;
+ foo::bar -o4;
+ ::foo::bar -o5;
+ ::foo<bar>::baz -o6;
+ ::foo<bar>::baz< ::fox<2> > -o7;
+
+ bool -n1|--name1|/name1;
+ bool "-n2"|"--name2";
+
+ string -init1 = "string";
+ char -init2 = 'c';
+ int -init3 = -5;
+ bool -inti4 = true;
+ long -init5 = (2 * 4 - 5);
+ type -init6 = type::default_value;
+ type -init7 (abc, 2 - 1);
};