Home | History | Annotate | Line # | Download | only in rpcgen
rpc_parse.h revision 1.6
      1  1.6  christos /*	$NetBSD: rpc_parse.h,v 1.6 2015/05/09 21:44:47 christos Exp $	*/
      2  1.1     glass /*
      3  1.1     glass  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
      4  1.1     glass  * unrestricted use provided that this legend is included on all tape
      5  1.1     glass  * media and as a part of the software program in whole or part.  Users
      6  1.1     glass  * may copy or modify Sun RPC without charge, but are not authorized
      7  1.1     glass  * to license or distribute it to anyone else except as part of a product or
      8  1.3        pk  * program developed by the user or with the express written consent of
      9  1.3        pk  * Sun Microsystems, Inc.
     10  1.3        pk  *
     11  1.1     glass  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
     12  1.1     glass  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
     13  1.1     glass  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
     14  1.3        pk  *
     15  1.1     glass  * Sun RPC is provided with no support and without any obligation on the
     16  1.1     glass  * part of Sun Microsystems, Inc. to assist in its use, correction,
     17  1.1     glass  * modification or enhancement.
     18  1.3        pk  *
     19  1.1     glass  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
     20  1.1     glass  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
     21  1.1     glass  * OR ANY PART THEREOF.
     22  1.3        pk  *
     23  1.1     glass  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
     24  1.1     glass  * or profits or other special, indirect and consequential damages, even if
     25  1.1     glass  * Sun has been advised of the possibility of such damages.
     26  1.3        pk  *
     27  1.1     glass  * Sun Microsystems, Inc.
     28  1.1     glass  * 2550 Garcia Avenue
     29  1.1     glass  * Mountain View, California  94043
     30  1.1     glass  */
     31  1.1     glass 
     32  1.3        pk /*      @(#)rpc_parse.h  1.3  90/08/29  (C) 1987 SMI   */
     33  1.3        pk 
     34  1.1     glass /*
     35  1.1     glass  * rpc_parse.h, Definitions for the RPCL parser
     36  1.1     glass  */
     37  1.1     glass 
     38  1.1     glass enum defkind {
     39  1.1     glass 	DEF_CONST,
     40  1.1     glass 	DEF_STRUCT,
     41  1.1     glass 	DEF_UNION,
     42  1.1     glass 	DEF_ENUM,
     43  1.1     glass 	DEF_TYPEDEF,
     44  1.1     glass 	DEF_PROGRAM
     45  1.1     glass };
     46  1.1     glass typedef enum defkind defkind;
     47  1.1     glass 
     48  1.5  dholland typedef const char *const_def;
     49  1.1     glass 
     50  1.1     glass enum relation {
     51  1.1     glass 	REL_VECTOR,	/* fixed length array */
     52  1.1     glass 	REL_ARRAY,	/* variable length array */
     53  1.1     glass 	REL_POINTER,	/* pointer */
     54  1.1     glass 	REL_ALIAS,	/* simple */
     55  1.1     glass };
     56  1.1     glass typedef enum relation relation;
     57  1.1     glass 
     58  1.1     glass struct typedef_def {
     59  1.5  dholland 	const char *old_prefix;
     60  1.5  dholland 	const char *old_type;
     61  1.1     glass 	relation rel;
     62  1.5  dholland 	const char *array_max;
     63  1.1     glass };
     64  1.1     glass typedef struct typedef_def typedef_def;
     65  1.1     glass 
     66  1.1     glass struct enumval_list {
     67  1.5  dholland 	const char *name;
     68  1.5  dholland 	const char *assignment;
     69  1.1     glass 	struct enumval_list *next;
     70  1.1     glass };
     71  1.1     glass typedef struct enumval_list enumval_list;
     72  1.1     glass 
     73  1.1     glass struct enum_def {
     74  1.1     glass 	enumval_list *vals;
     75  1.1     glass };
     76  1.1     glass typedef struct enum_def enum_def;
     77  1.1     glass 
     78  1.1     glass struct declaration {
     79  1.5  dholland 	const char *prefix;
     80  1.5  dholland 	const char *type;
     81  1.5  dholland 	const char *name;
     82  1.1     glass 	relation rel;
     83  1.5  dholland 	const char *array_max;
     84  1.1     glass };
     85  1.1     glass typedef struct declaration declaration;
     86  1.1     glass 
     87  1.1     glass struct decl_list {
     88  1.1     glass 	declaration decl;
     89  1.1     glass 	struct decl_list *next;
     90  1.1     glass };
     91  1.1     glass typedef struct decl_list decl_list;
     92  1.1     glass 
     93  1.1     glass struct struct_def {
     94  1.1     glass 	decl_list *decls;
     95  1.1     glass };
     96  1.1     glass typedef struct struct_def struct_def;
     97  1.1     glass 
     98  1.1     glass struct case_list {
     99  1.5  dholland 	const char *case_name;
    100  1.3        pk 	int contflag;
    101  1.1     glass 	declaration case_decl;
    102  1.1     glass 	struct case_list *next;
    103  1.1     glass };
    104  1.1     glass typedef struct case_list case_list;
    105  1.1     glass 
    106  1.1     glass struct union_def {
    107  1.1     glass 	declaration enum_decl;
    108  1.1     glass 	case_list *cases;
    109  1.1     glass 	declaration *default_decl;
    110  1.1     glass };
    111  1.1     glass typedef struct union_def union_def;
    112  1.1     glass 
    113  1.3        pk struct arg_list {
    114  1.3        pk 	char *argname; /* name of struct for arg*/
    115  1.3        pk 	decl_list *decls;
    116  1.3        pk };
    117  1.3        pk 
    118  1.3        pk typedef struct arg_list arg_list;
    119  1.1     glass 
    120  1.1     glass struct proc_list {
    121  1.5  dholland 	const char *proc_name;
    122  1.5  dholland 	const char *proc_num;
    123  1.3        pk 	arg_list args;
    124  1.3        pk 	int arg_num;
    125  1.5  dholland 	const char *res_type;
    126  1.5  dholland 	const char *res_prefix;
    127  1.1     glass 	struct proc_list *next;
    128  1.1     glass };
    129  1.1     glass typedef struct proc_list proc_list;
    130  1.1     glass 
    131  1.1     glass struct version_list {
    132  1.5  dholland 	const char *vers_name;
    133  1.5  dholland 	const char *vers_num;
    134  1.1     glass 	proc_list *procs;
    135  1.1     glass 	struct version_list *next;
    136  1.1     glass };
    137  1.1     glass typedef struct version_list version_list;
    138  1.1     glass 
    139  1.1     glass struct program_def {
    140  1.5  dholland 	const char *prog_num;
    141  1.1     glass 	version_list *versions;
    142  1.1     glass };
    143  1.1     glass typedef struct program_def program_def;
    144  1.1     glass 
    145  1.1     glass struct definition {
    146  1.5  dholland 	const char *def_name;
    147  1.1     glass 	defkind def_kind;
    148  1.1     glass 	union {
    149  1.1     glass 		const_def co;
    150  1.1     glass 		struct_def st;
    151  1.1     glass 		union_def un;
    152  1.1     glass 		enum_def en;
    153  1.1     glass 		typedef_def ty;
    154  1.1     glass 		program_def pr;
    155  1.1     glass 	} def;
    156  1.1     glass };
    157  1.1     glass typedef struct definition definition;
    158  1.1     glass 
    159  1.6  christos definition *get_definition(void);
    160  1.3        pk 
    161  1.3        pk struct bas_type
    162  1.3        pk {
    163  1.5  dholland   const char *name;
    164  1.3        pk   int length;
    165  1.3        pk   struct bas_type *next;
    166  1.3        pk };
    167  1.3        pk 
    168  1.3        pk typedef struct bas_type bas_type;
    169