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 | |
| 55 | |