1 /* @(#)rpc_parse.h 1.3 90/08/29
4 * Copyright (c) 2010, Oracle America, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following
13 * disclaimer in the documentation and/or other materials
14 * provided with the distribution.
15 * * Neither the name of the "Oracle America, Inc." nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 * rpc_parse.h, Definitions for the RPCL parser
43 typedef enum defkind defkind
;
45 typedef const char *const_def
;
48 REL_VECTOR
, /* fixed length array */
49 REL_ARRAY
, /* variable length array */
50 REL_POINTER
, /* pointer */
51 REL_ALIAS
/* simple */
53 typedef enum relation relation
;
56 const char *old_prefix
;
59 const char *array_max
;
61 typedef struct typedef_def typedef_def
;
65 const char *assignment
;
66 struct enumval_list
*next
;
68 typedef struct enumval_list enumval_list
;
73 typedef struct enum_def enum_def
;
80 const char *array_max
;
82 typedef struct declaration declaration
;
86 struct decl_list
*next
;
88 typedef struct decl_list decl_list
;
93 typedef struct struct_def struct_def
;
96 const char *case_name
;
98 declaration case_decl
;
99 struct case_list
*next
;
101 typedef struct case_list case_list
;
104 declaration enum_decl
;
106 declaration
*default_decl
;
108 typedef struct union_def union_def
;
111 const char *argname
; /* name of struct for arg*/
115 typedef struct arg_list arg_list
;
118 const char *proc_name
;
119 const char *proc_num
;
122 const char *res_type
;
123 const char *res_prefix
;
124 struct proc_list
*next
;
126 typedef struct proc_list proc_list
;
128 struct version_list
{
129 const char *vers_name
;
130 const char *vers_num
;
132 struct version_list
*next
;
134 typedef struct version_list version_list
;
137 const char *prog_num
;
138 version_list
*versions
;
140 typedef struct program_def program_def
;
143 const char *def_name
;
154 typedef struct definition definition
;
156 definition
*get_definition(void);
163 struct bas_type
*next
;
166 typedef struct bas_type bas_type
;