Sun May 12 11:16:58 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc/history.git] / sunrpc / rpc_parse.h
blobb53cc56ff833192ac00c6e126ce9c022e24da3c4
1 /*
2 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
3 * unrestricted use provided that this legend is included on all tape
4 * media and as a part of the software program in whole or part. Users
5 * may copy or modify Sun RPC without charge, but are not authorized
6 * to license or distribute it to anyone else except as part of a product or
7 * program developed by the user.
8 *
9 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
10 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
11 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
13 * Sun RPC is provided with no support and without any obligation on the
14 * part of Sun Microsystems, Inc. to assist in its use, correction,
15 * modification or enhancement.
17 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
18 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
19 * OR ANY PART THEREOF.
21 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
22 * or profits or other special, indirect and consequential damages, even if
23 * Sun has been advised of the possibility of such damages.
25 * Sun Microsystems, Inc.
26 * 2550 Garcia Avenue
27 * Mountain View, California 94043
29 /* @(#)rpc_parse.h 1.3 87/03/09 (C) 1987 SMI */
32 * rpc_parse.h, Definitions for the RPCL parser
33 * Copyright (C) 1987, Sun Microsystems, Inc.
36 enum defkind {
37 DEF_CONST,
38 DEF_STRUCT,
39 DEF_UNION,
40 DEF_ENUM,
41 DEF_TYPEDEF,
42 DEF_PROGRAM
44 typedef enum defkind defkind;
46 typedef char *const_def;
48 enum relation {
49 REL_VECTOR, /* fixed length array */
50 REL_ARRAY, /* variable length array */
51 REL_POINTER, /* pointer */
52 REL_ALIAS, /* simple */
54 typedef enum relation relation;
56 struct typedef_def {
57 char *old_prefix;
58 char *old_type;
59 relation rel;
60 char *array_max;
62 typedef struct typedef_def typedef_def;
65 struct enumval_list {
66 char *name;
67 char *assignment;
68 struct enumval_list *next;
70 typedef struct enumval_list enumval_list;
72 struct enum_def {
73 enumval_list *vals;
75 typedef struct enum_def enum_def;
78 struct declaration {
79 char *prefix;
80 char *type;
81 char *name;
82 relation rel;
83 char *array_max;
85 typedef struct declaration declaration;
88 struct decl_list {
89 declaration decl;
90 struct decl_list *next;
92 typedef struct decl_list decl_list;
94 struct struct_def {
95 decl_list *decls;
97 typedef struct struct_def struct_def;
100 struct case_list {
101 char *case_name;
102 declaration case_decl;
103 struct case_list *next;
105 typedef struct case_list case_list;
107 struct union_def {
108 declaration enum_decl;
109 case_list *cases;
110 declaration *default_decl;
112 typedef struct union_def union_def;
116 struct proc_list {
117 char *proc_name;
118 char *proc_num;
119 char *arg_type;
120 char *arg_prefix;
121 char *res_type;
122 char *res_prefix;
123 struct proc_list *next;
125 typedef struct proc_list proc_list;
128 struct version_list {
129 char *vers_name;
130 char *vers_num;
131 proc_list *procs;
132 struct version_list *next;
134 typedef struct version_list version_list;
136 struct program_def {
137 char *prog_num;
138 version_list *versions;
140 typedef struct program_def program_def;
142 struct definition {
143 char *def_name;
144 defkind def_kind;
145 union {
146 const_def co;
147 struct_def st;
148 union_def un;
149 enum_def en;
150 typedef_def ty;
151 program_def pr;
152 } def;
154 typedef struct definition definition;
156 /* @(#)rpc_parse.h 2.1 88/08/01 4.0 RPCSRC */
157 definition *get_definition();