1 /* @(#)rpc_parse.h 1.3 90/08/29
3 * Copyright (c) 2010, Oracle America, Inc.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following
12 * disclaimer in the documentation and/or other materials
13 * provided with the distribution.
14 * * Neither the name of the "Oracle America, Inc." nor the names of its
15 * contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * rpc_parse.h, Definitions for the RPCL parser
42 typedef enum defkind defkind;
44 typedef const char *const_def;
47 REL_VECTOR, /* fixed length array */
48 REL_ARRAY, /* variable length array */
49 REL_POINTER, /* pointer */
50 REL_ALIAS /* simple */
52 typedef enum relation relation;
55 const char *old_prefix;
58 const char *array_max;
60 typedef struct typedef_def typedef_def;
64 const char *assignment;
65 struct enumval_list *next;
67 typedef struct enumval_list enumval_list;
72 typedef struct enum_def enum_def;
79 const char *array_max;
81 typedef struct declaration declaration;
85 struct decl_list *next;
87 typedef struct decl_list decl_list;
92 typedef struct struct_def struct_def;
95 const char *case_name;
97 declaration case_decl;
98 struct case_list *next;
100 typedef struct case_list case_list;
103 declaration enum_decl;
105 declaration *default_decl;
107 typedef struct union_def union_def;
110 const char *argname; /* name of struct for arg*/
114 typedef struct arg_list arg_list;
117 const char *proc_name;
118 const char *proc_num;
121 const char *res_type;
122 const char *res_prefix;
123 struct proc_list *next;
125 typedef struct proc_list proc_list;
127 struct version_list {
128 const char *vers_name;
129 const char *vers_num;
131 struct version_list *next;
133 typedef struct version_list version_list;
136 const char *prog_num;
137 version_list *versions;
139 typedef struct program_def program_def;
142 const char *def_name;
153 typedef struct definition definition;
155 definition *get_definition(void);
162 struct bas_type *next;
165 typedef struct bas_type bas_type;