Sync usage with man page.
[netbsd-mini2440.git] / usr.bin / rpcgen / rpc_parse.h
blob0780252517844fade18152f22b60cc1711642435
1 /* $NetBSD: rpc_parse.h,v 1.3 1995/06/11 21:50:00 pk Exp $ */
2 /*
3 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
4 * unrestricted use provided that this legend is included on all tape
5 * media and as a part of the software program in whole or part. Users
6 * may copy or modify Sun RPC without charge, but are not authorized
7 * to license or distribute it to anyone else except as part of a product or
8 * program developed by the user or with the express written consent of
9 * Sun Microsystems, Inc.
11 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
12 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
13 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
15 * Sun RPC is provided with no support and without any obligation on the
16 * part of Sun Microsystems, Inc. to assist in its use, correction,
17 * modification or enhancement.
19 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
20 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
21 * OR ANY PART THEREOF.
23 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
24 * or profits or other special, indirect and consequential damages, even if
25 * Sun has been advised of the possibility of such damages.
27 * Sun Microsystems, Inc.
28 * 2550 Garcia Avenue
29 * Mountain View, California 94043
32 /* @(#)rpc_parse.h 1.3 90/08/29 (C) 1987 SMI */
35 * rpc_parse.h, Definitions for the RPCL parser
38 enum defkind {
39 DEF_CONST,
40 DEF_STRUCT,
41 DEF_UNION,
42 DEF_ENUM,
43 DEF_TYPEDEF,
44 DEF_PROGRAM
46 typedef enum defkind defkind;
48 typedef char *const_def;
50 enum relation {
51 REL_VECTOR, /* fixed length array */
52 REL_ARRAY, /* variable length array */
53 REL_POINTER, /* pointer */
54 REL_ALIAS, /* simple */
56 typedef enum relation relation;
58 struct typedef_def {
59 char *old_prefix;
60 char *old_type;
61 relation rel;
62 char *array_max;
64 typedef struct typedef_def typedef_def;
66 struct enumval_list {
67 char *name;
68 char *assignment;
69 struct enumval_list *next;
71 typedef struct enumval_list enumval_list;
73 struct enum_def {
74 enumval_list *vals;
76 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;
87 struct decl_list {
88 declaration decl;
89 struct decl_list *next;
91 typedef struct decl_list decl_list;
93 struct struct_def {
94 decl_list *decls;
96 typedef struct struct_def struct_def;
98 struct case_list {
99 char *case_name;
100 int contflag;
101 declaration case_decl;
102 struct case_list *next;
104 typedef struct case_list case_list;
106 struct union_def {
107 declaration enum_decl;
108 case_list *cases;
109 declaration *default_decl;
111 typedef struct union_def union_def;
113 struct arg_list {
114 char *argname; /* name of struct for arg*/
115 decl_list *decls;
118 typedef struct arg_list arg_list;
120 struct proc_list {
121 char *proc_name;
122 char *proc_num;
123 arg_list args;
124 int arg_num;
125 char *res_type;
126 char *res_prefix;
127 struct proc_list *next;
129 typedef struct proc_list proc_list;
131 struct version_list {
132 char *vers_name;
133 char *vers_num;
134 proc_list *procs;
135 struct version_list *next;
137 typedef struct version_list version_list;
139 struct program_def {
140 char *prog_num;
141 version_list *versions;
143 typedef struct program_def program_def;
145 struct definition {
146 char *def_name;
147 defkind def_kind;
148 union {
149 const_def co;
150 struct_def st;
151 union_def un;
152 enum_def en;
153 typedef_def ty;
154 program_def pr;
155 } def;
157 typedef struct definition definition;
159 definition *get_definition __P((void));
161 struct bas_type
163 char *name;
164 int length;
165 struct bas_type *next;
168 typedef struct bas_type bas_type;