aaronp-zomg 1.0.2.20080827232412
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +25 -0
- data/Manifest.txt +238 -0
- data/README.txt +59 -0
- data/Rakefile +43 -0
- data/bin/omfg +56 -0
- data/lib/scanner.rex +169 -0
- data/lib/yacc.y +861 -0
- data/lib/zomg.rb +22 -0
- data/lib/zomg/idl.rb +14 -0
- data/lib/zomg/idl/nodes/attribute.rb +15 -0
- data/lib/zomg/idl/nodes/binary.rb +19 -0
- data/lib/zomg/idl/nodes/constant.rb +15 -0
- data/lib/zomg/idl/nodes/interface.rb +13 -0
- data/lib/zomg/idl/nodes/interface_header.rb +14 -0
- data/lib/zomg/idl/nodes/member.rb +14 -0
- data/lib/zomg/idl/nodes/node.rb +54 -0
- data/lib/zomg/idl/nodes/operation.rb +17 -0
- data/lib/zomg/idl/nodes/parameter.rb +18 -0
- data/lib/zomg/idl/nodes/typedef.rb +13 -0
- data/lib/zomg/idl/nodes/union.rb +14 -0
- data/lib/zomg/idl/parser.rb +54 -0
- data/lib/zomg/idl/visitable.rb +15 -0
- data/lib/zomg/idl/visitors/duhr.rb +24 -0
- data/lib/zomg/idl/visitors/ruby_sexp.rb +204 -0
- data/lib/zomg/idl/visitors/sexp.rb +274 -0
- data/lib/zomg/version.rb +3 -0
- data/test/assets/array/array1.idl +60 -0
- data/test/assets/array/array2.idl +38 -0
- data/test/assets/array/array3.idl +8 -0
- data/test/assets/array/array4.idl +7 -0
- data/test/assets/array/array5.idl +80 -0
- data/test/assets/attribute/grid_0attribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_0methods.idl +19 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_1methods.idl +19 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_2methods.idl +17 -0
- data/test/assets/attribute/grid_1ROattribs_1methods.idl +16 -0
- data/test/assets/attribute/grid_1ROattribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_1attribs_1methods.idl +17 -0
- data/test/assets/attribute/grid_1attribs_2methods.idl +17 -0
- data/test/assets/attribute/grid_2ROattribs_0methods.idl +16 -0
- data/test/assets/attribute/grid_2ROattribs_1methods.idl +16 -0
- data/test/assets/attribute/grid_2ROattribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_2attribs_0methods.idl +19 -0
- data/test/assets/attribute/grid_2attribs_1methods.idl +19 -0
- data/test/assets/attribute/grid_2attribs_2methods.idl +19 -0
- data/test/assets/comment/c_style_comments.idl +63 -0
- data/test/assets/comment/comment1.idl +57 -0
- data/test/assets/comment/cpp_style_comments.idl +168 -0
- data/test/assets/comment/shortform.idl +0 -0
- data/test/assets/complex/TestCodeSets.idl +10 -0
- data/test/assets/complex/TestIntfContext.idl +13 -0
- data/test/assets/complex/TestIntfLongLong.idl +51 -0
- data/test/assets/complex/TestIntfWChar.idl +52 -0
- data/test/assets/complex/any1.idl +22 -0
- data/test/assets/complex/complex1.idl +495 -0
- data/test/assets/complex/complex2.idl +730 -0
- data/test/assets/complex/complex3.idl +181 -0
- data/test/assets/complex/complex4.idl +181 -0
- data/test/assets/complex/interop_wchar.idl +60 -0
- data/test/assets/constant/constant1.idl +37 -0
- data/test/assets/constant/constant2.idl +29 -0
- data/test/assets/constant/constant3.idl +50 -0
- data/test/assets/constant/constant4.idl +21 -0
- data/test/assets/constant/constant5.idl +65 -0
- data/test/assets/constant/constant6.idl +144 -0
- data/test/assets/constant/constant7.idl +30 -0
- data/test/assets/enum/enum1.idl +13 -0
- data/test/assets/exception/TestIntfExceptions.idl +69 -0
- data/test/assets/exception/TestIntfExceptionsExt_2_0.idl +34 -0
- data/test/assets/exception/TestIntfExceptionsExt_2_3.idl +24 -0
- data/test/assets/exception/ex1.idl +6 -0
- data/test/assets/exception/ex2.idl +18 -0
- data/test/assets/exception/ex3.idl +10 -0
- data/test/assets/exception/ex4.idl +20 -0
- data/test/assets/exception/sc.idl +0 -0
- data/test/assets/exception/simple1.idl +18 -0
- data/test/assets/exception/simple2.idl +25 -0
- data/test/assets/factory/factory1.idl +77 -0
- data/test/assets/factory/objref.idl +25 -0
- data/test/assets/forward/forward.idl +15 -0
- data/test/assets/forward/forward1.idl +13 -0
- data/test/assets/forward/fwd_incl1.idl +6 -0
- data/test/assets/forward/fwd_incl2.idl +7 -0
- data/test/assets/include/a.idl +23 -0
- data/test/assets/include/b.idl +16 -0
- data/test/assets/include/employee.idl +12 -0
- data/test/assets/include/include1.idl +10 -0
- data/test/assets/include/include2.idl +5 -0
- data/test/assets/include/manager.idl +10 -0
- data/test/assets/include/pragma.idl +41 -0
- data/test/assets/include/rookie.idl +13 -0
- data/test/assets/include/rookiemanager.idl +15 -0
- data/test/assets/include/sample.idl +58 -0
- data/test/assets/include/sample_incl.idl +406 -0
- data/test/assets/inherit/IDL1.idl +18 -0
- data/test/assets/inherit/IDL2.idl +18 -0
- data/test/assets/inherit/IDL3.idl +18 -0
- data/test/assets/inherit/IDL4.idl +17 -0
- data/test/assets/inherit/diamond_inheritance.idl +31 -0
- data/test/assets/inherit/inherit.idl +27 -0
- data/test/assets/limit/longidentifiers.idl +25 -0
- data/test/assets/limit/namelens.idl +26 -0
- data/test/assets/limit/tpztest.idl +21 -0
- data/test/assets/module/module1.idl +29 -0
- data/test/assets/module/module2.idl +34 -0
- data/test/assets/module/module3.idl +20 -0
- data/test/assets/module/module4.idl +15 -0
- data/test/assets/nested/nested1.idl +5 -0
- data/test/assets/nested/nested2.idl +11 -0
- data/test/assets/operations/Benchmark.idl +331 -0
- data/test/assets/operations/CCS.idl +82 -0
- data/test/assets/operations/TestIntf.idl +40 -0
- data/test/assets/operations/TestIntfBasic.idl +653 -0
- data/test/assets/operations/atomic.idl +40 -0
- data/test/assets/operations/dif2.idl +48 -0
- data/test/assets/operations/interface1.idl +16 -0
- data/test/assets/operations/parameters.idl +111 -0
- data/test/assets/operations/perf.idl +84 -0
- data/test/assets/operations/timer.idl +104 -0
- data/test/assets/preprocess/base_for_diamond_inheritance_with_macros.idl +17 -0
- data/test/assets/preprocess/basic_macro_marshalling.idl +54 -0
- data/test/assets/preprocess/diamond_inheritance_with_macros.idl +74 -0
- data/test/assets/preprocess/macro1.idl +52 -0
- data/test/assets/preprocess/preprocess1.idl +246 -0
- data/test/assets/preprocess/preprocess2.idl +3 -0
- data/test/assets/recursion/loop.idl +28 -0
- data/test/assets/recursion/recursion1.idl +47 -0
- data/test/assets/recursion/recursion2.idl +74 -0
- data/test/assets/scenarios/filestat.idl +69 -0
- data/test/assets/scenarios/gateway.idl +176 -0
- data/test/assets/scenarios/library.idl +20 -0
- data/test/assets/scenarios/phone.idl +24 -0
- data/test/assets/scenarios/ticketservice.idl +118 -0
- data/test/assets/scope/scope01.idl +58 -0
- data/test/assets/scope/scope02.idl +25 -0
- data/test/assets/scope/scope03.idl +22 -0
- data/test/assets/scope/scope04.idl +27 -0
- data/test/assets/scope/scope05.idl +30 -0
- data/test/assets/scope/scope06.idl +51 -0
- data/test/assets/scope/scope07.idl +20 -0
- data/test/assets/scope/scope08.idl +88 -0
- data/test/assets/scope/scope09.idl +21 -0
- data/test/assets/scope/scope10.idl +95 -0
- data/test/assets/scope/scope11.idl +62 -0
- data/test/assets/scope/scope12.idl +117 -0
- data/test/assets/scope/scope13.idl +117 -0
- data/test/assets/scope/scope14.idl +117 -0
- data/test/assets/scope/scope15.idl +117 -0
- data/test/assets/scope/scope16.idl +117 -0
- data/test/assets/scope/scope17.idl +117 -0
- data/test/assets/scope/scope18.idl +117 -0
- data/test/assets/scope/scope19.idl +117 -0
- data/test/assets/scope/scope20.idl +215 -0
- data/test/assets/scope/scope21.idl +215 -0
- data/test/assets/scope/scope22.idl +205 -0
- data/test/assets/scope/scope23.idl +261 -0
- data/test/assets/scope/scope24.idl +376 -0
- data/test/assets/scope/scope25.idl +266 -0
- data/test/assets/scope/scope26.idl +180 -0
- data/test/assets/scope/scope27.idl +184 -0
- data/test/assets/scope/scope28.idl +182 -0
- data/test/assets/scope/scope29.idl +182 -0
- data/test/assets/scope/scope30.idl +40 -0
- data/test/assets/scope/scope31.idl +33 -0
- data/test/assets/scope/scope32.idl +37 -0
- data/test/assets/scope/scope33.idl +50 -0
- data/test/assets/scope/scope34.idl +97 -0
- data/test/assets/scope/scope35.idl +72 -0
- data/test/assets/scope/scope36.idl +167 -0
- data/test/assets/scope/scope37.idl +57 -0
- data/test/assets/scope/scope38.idl +38 -0
- data/test/assets/scope/scope39.idl +38 -0
- data/test/assets/scope/scope40.idl +38 -0
- data/test/assets/scope/scope41.idl +24 -0
- data/test/assets/scope/scope42.idl +64 -0
- data/test/assets/scope/scope43.idl +66 -0
- data/test/assets/scope/scope44.idl +52 -0
- data/test/assets/sequence/sequence1.idl +24 -0
- data/test/assets/sequence/sequence2.idl +9 -0
- data/test/assets/simple/basictypes1.idl +80 -0
- data/test/assets/simple/basictypes2.idl +197 -0
- data/test/assets/simple/basictypes3.idl +23 -0
- data/test/assets/simple/basictypes4.idl +73 -0
- data/test/assets/simple/basictypes5.idl +29 -0
- data/test/assets/simple/basictypes6.idl +63 -0
- data/test/assets/simple/simple1.idl +45 -0
- data/test/assets/simple/simple2.idl +61 -0
- data/test/assets/simple/simple3.idl +36 -0
- data/test/assets/string/string1.idl +11 -0
- data/test/assets/string/string2.idl +29 -0
- data/test/assets/struct/struct1.idl +20 -0
- data/test/assets/struct/struct2.idl +21 -0
- data/test/assets/struct/struct3.idl +42 -0
- data/test/assets/struct/struct4.idl +57 -0
- data/test/assets/struct/struct5.idl +71 -0
- data/test/assets/typecode/orb.idl +0 -0
- data/test/assets/typecode/pseudo.idl +25 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideIF.idl +17 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideIF_noMO.idl +16 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideMO.idl +17 -0
- data/test/assets/typedef/shorthand_typedef_struct_outsideMO.idl +17 -0
- data/test/assets/typedef/typedef1.idl +8 -0
- data/test/assets/typedef/typedef2.idl +22 -0
- data/test/assets/typedef/typedef_struct_insideIF.idl +18 -0
- data/test/assets/typedef/typedef_struct_insideMO.idl +18 -0
- data/test/assets/typedef/typedef_struct_outsideMO.idl +18 -0
- data/test/assets/union/union1.idl +31 -0
- data/test/assets/union/union2.idl +22 -0
- data/test/assets/union/union3.idl +26 -0
- data/test/conversions/test_attribute.rb +46 -0
- data/test/conversions/test_enum.rb +25 -0
- data/test/conversions/test_exception.rb +24 -0
- data/test/conversions/test_forward_declaration.rb +22 -0
- data/test/conversions/test_interface.rb +30 -0
- data/test/conversions/test_module.rb +24 -0
- data/test/conversions/test_struct.rb +25 -0
- data/test/conversions/test_typedef.rb +22 -0
- data/test/conversions/test_union.rb +27 -0
- data/test/conversions/test_value_box_dcl.rb +22 -0
- data/test/helper.rb +23 -0
- data/test/simple/test_basictypes1.rb +87 -0
- data/test/simple/test_basictypes2.rb +18 -0
- data/test/simple/test_basictypes3.rb +32 -0
- data/test/simple/test_basictypes4.rb +25 -0
- data/test/simple/test_basictypes5.rb +17 -0
- data/test/simple/test_basictypes6.rb +19 -0
- data/test/simple/test_simple1.rb +40 -0
- data/test/simple/test_simple2.rb +48 -0
- data/test/simple/test_simple3.rb +20 -0
- data/test/test_array.rb +22 -0
- data/test/test_assets.rb +33 -0
- data/test/test_complex.rb +17 -0
- data/test/test_node.rb +16 -0
- data/test/test_parser.rb +17 -0
- data/test/test_scanner.rb +234 -0
- metadata +334 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains no attributes and 2 methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
//readonly attribute short height; // height of the grid
|
7
|
+
//readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
// IDL operations
|
10
|
+
|
11
|
+
// set the element [n,m] of the grid, to value:
|
12
|
+
void set(in short n, in short m, in long value);
|
13
|
+
|
14
|
+
// return element [n,m] of the grid:
|
15
|
+
long get(in short n, in short m);
|
16
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 1 read-only attribute, 1 attribute and no methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
readonly attribute short height; // height of the grid
|
7
|
+
|
8
|
+
//readonly attribute short width; // width of the grid
|
9
|
+
|
10
|
+
attribute short width; // width of the grid
|
11
|
+
|
12
|
+
// IDL operations
|
13
|
+
|
14
|
+
// set the element [n,m] of the grid, to value:
|
15
|
+
//void set(in short n, in short m, in long value);
|
16
|
+
|
17
|
+
// return element [n,m] of the grid:
|
18
|
+
//long get(in short n, in short m);
|
19
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 1 read-only attribute, 1 attribute and 1 method
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
readonly attribute short height; // height of the grid
|
7
|
+
|
8
|
+
//readonly attribute short width; // width of the grid
|
9
|
+
|
10
|
+
attribute short width; // width of the grid
|
11
|
+
|
12
|
+
// IDL operations
|
13
|
+
|
14
|
+
// set the element [n,m] of the grid, to value:
|
15
|
+
//void set(in short n, in short m, in long value);
|
16
|
+
|
17
|
+
// return element [n,m] of the grid:
|
18
|
+
long get(in short n, in short m);
|
19
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 1 read-only attribute, 1 attribute and 2 methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
readonly attribute short height; // height of the grid
|
7
|
+
//readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
attribute short width; // width of the grid
|
10
|
+
// IDL operations
|
11
|
+
|
12
|
+
// set the element [n,m] of the grid, to value:
|
13
|
+
void set(in short n, in short m, in long value);
|
14
|
+
|
15
|
+
// return element [n,m] of the grid:
|
16
|
+
long get(in short n, in short m);
|
17
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 1 read-only attribute and 1 method
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
//readonly attribute short height; // height of the grid
|
7
|
+
readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
// IDL operations
|
10
|
+
|
11
|
+
// set the element [n,m] of the grid, to value:
|
12
|
+
//void set(in short n, in short m, in long value);
|
13
|
+
|
14
|
+
// return element [n,m] of the grid:
|
15
|
+
long get(in short n, in short m);
|
16
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 1 read-only attribute and 2 methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
//readonly attribute short height; // height of the grid
|
7
|
+
readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
// IDL operations
|
10
|
+
|
11
|
+
// set the element [n,m] of the grid, to value:
|
12
|
+
void set(in short n, in short m, in long value);
|
13
|
+
|
14
|
+
// return element [n,m] of the grid:
|
15
|
+
long get(in short n, in short m);
|
16
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 1 attribute and 1 method
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
//readonly attribute short height; // height of the grid
|
7
|
+
//readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
attribute short width; // width of the grid
|
10
|
+
// IDL operations
|
11
|
+
|
12
|
+
// set the element [n,m] of the grid, to value:
|
13
|
+
//void set(in short n, in short m, in long value);
|
14
|
+
|
15
|
+
// return element [n,m] of the grid:
|
16
|
+
long get(in short n, in short m);
|
17
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 1 attribute and 2 methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
//readonly attribute short height; // height of the grid
|
7
|
+
//readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
attribute short width; // width of the grid
|
10
|
+
// IDL operations
|
11
|
+
|
12
|
+
// set the element [n,m] of the grid, to value:
|
13
|
+
void set(in short n, in short m, in long value);
|
14
|
+
|
15
|
+
// return element [n,m] of the grid:
|
16
|
+
long get(in short n, in short m);
|
17
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 2 read-only attributes and no methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
readonly attribute short height; // height of the grid
|
7
|
+
readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
// IDL operations
|
10
|
+
|
11
|
+
// set the element [n,m] of the grid, to value:
|
12
|
+
//void set(in short n, in short m, in long value);
|
13
|
+
|
14
|
+
// return element [n,m] of the grid:
|
15
|
+
//long get(in short n, in short m);
|
16
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 2 read-only attributes and 1 method
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
readonly attribute short height; // height of the grid
|
7
|
+
readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
// IDL operations
|
10
|
+
|
11
|
+
// set the element [n,m] of the grid, to value:
|
12
|
+
//void set(in short n, in short m, in long value);
|
13
|
+
|
14
|
+
// return element [n,m] of the grid:
|
15
|
+
long get(in short n, in short m);
|
16
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 2 read-only attributes and 2 methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
readonly attribute short height; // height of the grid
|
7
|
+
readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
// IDL operations
|
10
|
+
|
11
|
+
// set the element [n,m] of the grid, to value:
|
12
|
+
void set(in short n, in short m, in long value);
|
13
|
+
|
14
|
+
// return element [n,m] of the grid:
|
15
|
+
long get(in short n, in short m);
|
16
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 2 attributes and no methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
//readonly attribute short height; // height of the grid
|
7
|
+
//readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
attribute short height; // height of the grid
|
10
|
+
attribute short width; // width of the grid
|
11
|
+
|
12
|
+
// IDL operations
|
13
|
+
|
14
|
+
// set the element [n,m] of the grid, to value:
|
15
|
+
//void set(in short n, in short m, in long value);
|
16
|
+
|
17
|
+
// return element [n,m] of the grid:
|
18
|
+
//long get(in short n, in short m);
|
19
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 2 attributes and 1 method
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
//readonly attribute short height; // height of the grid
|
7
|
+
//readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
attribute short height; // height of the grid
|
10
|
+
attribute short width; // width of the grid
|
11
|
+
|
12
|
+
// IDL operations
|
13
|
+
|
14
|
+
// set the element [n,m] of the grid, to value:
|
15
|
+
//void set(in short n, in short m, in long value);
|
16
|
+
|
17
|
+
// return element [n,m] of the grid:
|
18
|
+
long get(in short n, in short m);
|
19
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Description : Orbix's Grid IDL
|
2
|
+
// Comments : Contains 2 attributes and 2 methods
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
interface Grid {
|
6
|
+
//readonly attribute short height; // height of the grid
|
7
|
+
//readonly attribute short width; // width of the grid
|
8
|
+
|
9
|
+
attribute short height; // height of the grid
|
10
|
+
attribute short width; // width of the grid
|
11
|
+
|
12
|
+
// IDL operations
|
13
|
+
|
14
|
+
// set the element [n,m] of the grid, to value:
|
15
|
+
void set(in short n, in short m, in long value);
|
16
|
+
|
17
|
+
// return element [n,m] of the grid:
|
18
|
+
long get(in short n, in short m);
|
19
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
/*
|
2
|
+
TO-TEST:
|
3
|
+
|
4
|
+
#typedef struct
|
5
|
+
|
6
|
+
#include
|
7
|
+
|
8
|
+
#ifndef
|
9
|
+
|
10
|
+
#include
|
11
|
+
|
12
|
+
#pragma
|
13
|
+
|
14
|
+
#if
|
15
|
+
|
16
|
+
attribute
|
17
|
+
|
18
|
+
readonly attribute
|
19
|
+
|
20
|
+
void oneway()
|
21
|
+
|
22
|
+
inheritance-diamond
|
23
|
+
|
24
|
+
*/
|
25
|
+
|
26
|
+
#ifndef _c_style_comments_
|
27
|
+
#define _c_style_comments_
|
28
|
+
|
29
|
+
interface MainGrid {
|
30
|
+
|
31
|
+
void getofMainGrid(in short n);
|
32
|
+
long setofMainGrid(in short n);
|
33
|
+
|
34
|
+
readonly attribute short length; // length of the gridmain
|
35
|
+
readonly attribute short breadth; // breadth of the gridmain
|
36
|
+
};
|
37
|
+
|
38
|
+
|
39
|
+
interface BaseGrid : MainGrid {
|
40
|
+
void getofBaseGrid(in short n);
|
41
|
+
long setofBaseGrid(in short n);
|
42
|
+
};
|
43
|
+
|
44
|
+
|
45
|
+
interface GridBase : MainGrid {
|
46
|
+
readonly attribute short base;
|
47
|
+
};
|
48
|
+
|
49
|
+
interface Grid : BaseGrid, GridBase {
|
50
|
+
readonly attribute short height; // height of the grid
|
51
|
+
readonly attribute short width; // width of the grid
|
52
|
+
|
53
|
+
// IDL operations
|
54
|
+
|
55
|
+
// set the element [n,m] of the grid, to value:
|
56
|
+
void set(in short n, in short m, in long value);
|
57
|
+
|
58
|
+
// return element [n,m] of the grid:
|
59
|
+
long get(in short n, in short m);
|
60
|
+
};
|
61
|
+
|
62
|
+
|
63
|
+
#endif // _c_style_comments_
|
@@ -0,0 +1,57 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
/* This is a simple C style comment line */
|
4
|
+
|
5
|
+
// This is a simple C++ style comment line
|
6
|
+
|
7
|
+
/* This is another simple C style comment line */
|
8
|
+
|
9
|
+
// This is another simple C++ style comment line
|
10
|
+
|
11
|
+
typedef long Apple;
|
12
|
+
|
13
|
+
/* Comments do not nest /* /* /* /* */
|
14
|
+
|
15
|
+
typedef long Banana;
|
16
|
+
|
17
|
+
// The // characters have no special meaning inside an existing //
|
18
|
+
|
19
|
+
typedef long Carrots;
|
20
|
+
|
21
|
+
// The /* characters have no special meaning inside an existing //
|
22
|
+
|
23
|
+
typedef long Lemon;
|
24
|
+
|
25
|
+
// The */ characters have no special meaning inside an existing //
|
26
|
+
|
27
|
+
typedef long BlackCherry;
|
28
|
+
|
29
|
+
/* The // characters have no special meaning inside an existing /* */
|
30
|
+
|
31
|
+
typedef long Starfruit;
|
32
|
+
|
33
|
+
/* The /* characters have no special meaning inside an existing /* */
|
34
|
+
|
35
|
+
typedef long Rhubarb;
|
36
|
+
|
37
|
+
/*
|
38
|
+
Comments
|
39
|
+
may
|
40
|
+
include
|
41
|
+
newlines
|
42
|
+
|
43
|
+
*/
|
44
|
+
|
45
|
+
interface idlServer{
|
46
|
+
|
47
|
+
void PassionFruit(
|
48
|
+
in Apple p1,
|
49
|
+
in Banana p2,
|
50
|
+
in Carrots p3,
|
51
|
+
in Lemon p4,
|
52
|
+
in BlackCherry p5,
|
53
|
+
in Starfruit p6,
|
54
|
+
in Rhubarb p7);
|
55
|
+
|
56
|
+
};
|
57
|
+
|
@@ -0,0 +1,168 @@
|
|
1
|
+
// TEST: c++ style comments
|
2
|
+
//
|
3
|
+
|
4
|
+
// TEST: #define
|
5
|
+
//
|
6
|
+
#define DEFTEST
|
7
|
+
|
8
|
+
// TEST: #ifdef
|
9
|
+
//
|
10
|
+
#ifdef DEFTEST
|
11
|
+
|
12
|
+
// TEST: #ifndef
|
13
|
+
//
|
14
|
+
#ifndef FIRST_DEF
|
15
|
+
|
16
|
+
#define SECOND_DEF
|
17
|
+
|
18
|
+
#ifdef SECOND_DEF
|
19
|
+
|
20
|
+
#ifdef NON_EXISTENT
|
21
|
+
#define JUNK_DEF
|
22
|
+
// TEST: defined(<>)
|
23
|
+
#elif defined (JUNK_DEF)
|
24
|
+
// TEST: !defined(<>)
|
25
|
+
#elif !defined (SECOND_DEF)
|
26
|
+
// TEST: #else
|
27
|
+
#else
|
28
|
+
#define THIRD_DEF
|
29
|
+
#endif
|
30
|
+
|
31
|
+
// TEST: #undef
|
32
|
+
//
|
33
|
+
#undef SECOND_DEF
|
34
|
+
|
35
|
+
#ifndef SECOND_DEF
|
36
|
+
|
37
|
+
#ifdef THIRD_DEF
|
38
|
+
|
39
|
+
// TEST: #if
|
40
|
+
#if 0
|
41
|
+
This code will not be compiled
|
42
|
+
#elif 1
|
43
|
+
|
44
|
+
// TEST: #include (simple)
|
45
|
+
//
|
46
|
+
#include "shortform.idl"
|
47
|
+
|
48
|
+
// TEST: C-style comments
|
49
|
+
//
|
50
|
+
/*
|
51
|
+
*basic .idl contains the following
|
52
|
+
|
53
|
+
// TEST: typedef short-form
|
54
|
+
//
|
55
|
+
typedef struct mystruct1
|
56
|
+
{
|
57
|
+
short x;
|
58
|
+
long y;
|
59
|
+
string z;
|
60
|
+
} struct_short_form;
|
61
|
+
*/
|
62
|
+
|
63
|
+
|
64
|
+
// TEST: CPP-style comments with preprocessor directives
|
65
|
+
//"#include",
|
66
|
+
//"#define",
|
67
|
+
//"#ifdef",
|
68
|
+
//"#ifndef",
|
69
|
+
//"#if",
|
70
|
+
//"#else",
|
71
|
+
//"#elif",
|
72
|
+
//"#endif",
|
73
|
+
//"#undef",
|
74
|
+
//"#pragma"
|
75
|
+
//
|
76
|
+
|
77
|
+
// TEST: C-style comments with preprocessor directives
|
78
|
+
/*
|
79
|
+
"#include",
|
80
|
+
"#define",
|
81
|
+
"#ifdef",
|
82
|
+
"#ifndef",
|
83
|
+
"#if",
|
84
|
+
"#else",
|
85
|
+
"#elif",
|
86
|
+
"#endif",
|
87
|
+
"#undef",
|
88
|
+
"#pragma"
|
89
|
+
*/
|
90
|
+
|
91
|
+
// TEST: #if
|
92
|
+
//
|
93
|
+
#if !defined (MACRO1)
|
94
|
+
#define MACRO1 interface
|
95
|
+
#elif
|
96
|
+
#define MACRO1 JUNK
|
97
|
+
#endif
|
98
|
+
|
99
|
+
#if defined (MACRO1)
|
100
|
+
#define MACRO2 MainGrid
|
101
|
+
#endif
|
102
|
+
|
103
|
+
//
|
104
|
+
interface MainGrid {
|
105
|
+
//
|
106
|
+
//MACRO1 MACRO2 {
|
107
|
+
void getofMainGrid(in short n);
|
108
|
+
long setofMainGrid(inout short n);
|
109
|
+
|
110
|
+
readonly attribute short length; // length of the gridmain
|
111
|
+
attribute short breadth; // breadth of the gridmain
|
112
|
+
|
113
|
+
exception exMG { string reason;};
|
114
|
+
};
|
115
|
+
|
116
|
+
|
117
|
+
interface BaseGrid : MainGrid {
|
118
|
+
void getofBaseGrid(in short n);
|
119
|
+
long setofBaseGrid(in short n);
|
120
|
+
|
121
|
+
readonly attribute short roAtrBG ; // length of the gridmain
|
122
|
+
attribute short atrBG; // breadth of the gridmain
|
123
|
+
|
124
|
+
exception exBG { string reason;};
|
125
|
+
};
|
126
|
+
|
127
|
+
|
128
|
+
interface GridBase : MainGrid {
|
129
|
+
exception exGB { string reason;};
|
130
|
+
|
131
|
+
readonly attribute short roAtrGB ; // length of the gridmain
|
132
|
+
attribute short atrGB; // breadth of the gridmain
|
133
|
+
|
134
|
+
void getofGridBase(in short n);
|
135
|
+
long setofGridBase(in short n);
|
136
|
+
};
|
137
|
+
|
138
|
+
interface Grid : BaseGrid, GridBase {
|
139
|
+
exception exG { string reason;};
|
140
|
+
exception exH { string reason;};
|
141
|
+
|
142
|
+
readonly attribute short height; // height of the grid
|
143
|
+
readonly attribute short width; // width of the grid
|
144
|
+
|
145
|
+
// IDL operations
|
146
|
+
// set the element [n,m] of the grid, to value:
|
147
|
+
void set(in short n, in short m, in long value) raises (exG);
|
148
|
+
|
149
|
+
// return element [n,m] of the grid:
|
150
|
+
long get(in short n, in short m) raises (exG, exH);
|
151
|
+
};
|
152
|
+
|
153
|
+
// TEST: #pragma
|
154
|
+
//
|
155
|
+
//#pragma ID Grid "IDL:MyGrid:1.0"
|
156
|
+
|
157
|
+
#pragma version Grid 2.0
|
158
|
+
|
159
|
+
#pragma prefix "IDL2REPO-TEST"
|
160
|
+
|
161
|
+
// TEST: #ENDIF
|
162
|
+
//
|
163
|
+
#endif //#if 0
|
164
|
+
#endif // #ifdef THIRD_DEF
|
165
|
+
#endif // #ifndef SECOND_DEF
|
166
|
+
#endif // #ifdef SECOND_DEF
|
167
|
+
#endif // #ifndef FIRST_DEF
|
168
|
+
#endif // #ifdef DEFTEST
|