Roger Meier | 5b9693c | 2012-02-28 19:32:55 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | * or more contributor license agreements. See the NOTICE file |
| 4 | * distributed with this work for additional information |
| 5 | * regarding copyright ownership. The ASF licenses this file |
| 6 | * to you under the Apache License, Version 2.0 (the |
| 7 | * "License"); you may not use this file except in compliance |
| 8 | * with the License. You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, |
| 13 | * software distributed under the License is distributed on an |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | * KIND, either express or implied. See the License for the |
| 16 | * specific language governing permissions and limitations |
| 17 | * under the License. |
| 18 | */ |
| 19 | |
Jens Geyer | d5436f5 | 2014-10-03 19:50:38 +0200 | [diff] [blame] | 20 | // make sure generated code does not produce name collisions with predefined keywords |
Roger Meier | 5b9693c | 2012-02-28 19:32:55 +0000 | [diff] [blame] | 21 | |
| 22 | |
| 23 | |
| 24 | typedef i32 Cardinal |
| 25 | typedef string message |
| 26 | typedef list< map< Cardinal, message>> program |
| 27 | |
| 28 | struct unit { |
| 29 | 1: Cardinal downto; |
| 30 | 2: program procedure; |
| 31 | } |
| 32 | |
| 33 | typedef set< unit> units |
| 34 | |
| 35 | exception exception1 { |
| 36 | 1: program message; |
| 37 | 2: unit array; |
| 38 | } |
| 39 | |
| 40 | service constructor { |
| 41 | unit Create(1: Cardinal asm; 2: message inherited) throws (1: exception1 label); |
| 42 | units Destroy(); |
| 43 | } |
| 44 | |
| 45 | const Cardinal downto = +1 |
| 46 | const Cardinal published = -1 |
| 47 | |
| 48 | enum keywords { |
| 49 | record = 1, |
| 50 | repeat = 2, |
| 51 | deprecated = 3 |
| 52 | } |
| 53 | |
| 54 | |
Jens Geyer | 078281d | 2017-09-08 22:09:52 +0200 | [diff] [blame] | 55 | struct Struct_lists { |
| 56 | 1: list<Struct_simple> init; |
| 57 | 2: list<Struct_simple> struc; |
| 58 | 3: list<Struct_simple> field; |
| 59 | 4: list<Struct_simple> field_; |
| 60 | 5: list<Struct_simple> tracker; |
| 61 | 6: list<Struct_simple> Self; |
| 62 | } |
| 63 | |
| 64 | struct Struct_structs { |
| 65 | 1: Struct_simple init; |
| 66 | 2: Struct_simple struc; |
| 67 | 3: Struct_simple field; |
| 68 | 4: Struct_simple field_; |
| 69 | 5: Struct_simple tracker; |
| 70 | 6: Struct_simple Self; |
| 71 | } |
| 72 | |
| 73 | struct Struct_simple { |
| 74 | 1: bool init; |
| 75 | 2: bool struc; |
| 76 | 3: bool field; |
| 77 | 4: bool field_; |
| 78 | 5: bool tracker; |
| 79 | 6: bool Self; |
| 80 | } |
| 81 | |
| 82 | struct Struct_strings { |
| 83 | 1: string init; |
| 84 | 2: string struc; |
| 85 | 3: string field; |
| 86 | 4: string field_; |
| 87 | 5: string tracker; |
| 88 | 6: string Self; |
| 89 | } |
| 90 | |
| 91 | struct Struct_binary { |
| 92 | 1: binary init; |
| 93 | 2: binary struc; |
| 94 | 3: binary field; |
| 95 | 4: binary field_; |
| 96 | 5: binary tracker; |
| 97 | 6: binary Self; |
| 98 | } |
| 99 | |
Roger Meier | 5b9693c | 2012-02-28 19:32:55 +0000 | [diff] [blame] | 100 | |