rpc_parse.h revision 1897
11897Swollman/* 21897Swollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 31897Swollman * unrestricted use provided that this legend is included on all tape 41897Swollman * media and as a part of the software program in whole or part. Users 51897Swollman * may copy or modify Sun RPC without charge, but are not authorized 61897Swollman * to license or distribute it to anyone else except as part of a product or 71897Swollman * program developed by the user. 81897Swollman * 91897Swollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 101897Swollman * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 111897Swollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 121897Swollman * 131897Swollman * Sun RPC is provided with no support and without any obligation on the 141897Swollman * part of Sun Microsystems, Inc. to assist in its use, correction, 151897Swollman * modification or enhancement. 161897Swollman * 171897Swollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 181897Swollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 191897Swollman * OR ANY PART THEREOF. 201897Swollman * 211897Swollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 221897Swollman * or profits or other special, indirect and consequential damages, even if 231897Swollman * Sun has been advised of the possibility of such damages. 241897Swollman * 251897Swollman * Sun Microsystems, Inc. 261897Swollman * 2550 Garcia Avenue 271897Swollman * Mountain View, California 94043 281897Swollman * 291897Swollman * from: @(#)rpc_parse.h 1.3 87/03/09 (C) 1987 SMI 301897Swollman * $Id: rpc_parse.h,v 1.1 1993/09/13 23:20:17 jtc Exp $ 311897Swollman */ 321897Swollman 331897Swollman/* 341897Swollman * rpc_parse.h, Definitions for the RPCL parser 351897Swollman * Copyright (C) 1987, Sun Microsystems, Inc. 361897Swollman */ 371897Swollman 381897Swollmanenum defkind { 391897Swollman DEF_CONST, 401897Swollman DEF_STRUCT, 411897Swollman DEF_UNION, 421897Swollman DEF_ENUM, 431897Swollman DEF_TYPEDEF, 441897Swollman DEF_PROGRAM 451897Swollman}; 461897Swollmantypedef enum defkind defkind; 471897Swollman 481897Swollmantypedef char *const_def; 491897Swollman 501897Swollmanenum relation { 511897Swollman REL_VECTOR, /* fixed length array */ 521897Swollman REL_ARRAY, /* variable length array */ 531897Swollman REL_POINTER, /* pointer */ 541897Swollman REL_ALIAS, /* simple */ 551897Swollman}; 561897Swollmantypedef enum relation relation; 571897Swollman 581897Swollmanstruct typedef_def { 591897Swollman char *old_prefix; 601897Swollman char *old_type; 611897Swollman relation rel; 621897Swollman char *array_max; 631897Swollman}; 641897Swollmantypedef struct typedef_def typedef_def; 651897Swollman 661897Swollman 671897Swollmanstruct enumval_list { 681897Swollman char *name; 691897Swollman char *assignment; 701897Swollman struct enumval_list *next; 711897Swollman}; 721897Swollmantypedef struct enumval_list enumval_list; 731897Swollman 741897Swollmanstruct enum_def { 751897Swollman enumval_list *vals; 761897Swollman}; 771897Swollmantypedef struct enum_def enum_def; 781897Swollman 791897Swollman 801897Swollmanstruct declaration { 811897Swollman char *prefix; 821897Swollman char *type; 831897Swollman char *name; 841897Swollman relation rel; 851897Swollman char *array_max; 861897Swollman}; 871897Swollmantypedef struct declaration declaration; 881897Swollman 891897Swollman 901897Swollmanstruct decl_list { 911897Swollman declaration decl; 921897Swollman struct decl_list *next; 931897Swollman}; 941897Swollmantypedef struct decl_list decl_list; 951897Swollman 961897Swollmanstruct struct_def { 971897Swollman decl_list *decls; 981897Swollman}; 991897Swollmantypedef struct struct_def struct_def; 1001897Swollman 1011897Swollman 1021897Swollmanstruct case_list { 1031897Swollman char *case_name; 1041897Swollman declaration case_decl; 1051897Swollman struct case_list *next; 1061897Swollman}; 1071897Swollmantypedef struct case_list case_list; 1081897Swollman 1091897Swollmanstruct union_def { 1101897Swollman declaration enum_decl; 1111897Swollman case_list *cases; 1121897Swollman declaration *default_decl; 1131897Swollman}; 1141897Swollmantypedef struct union_def union_def; 1151897Swollman 1161897Swollman 1171897Swollman 1181897Swollmanstruct proc_list { 1191897Swollman char *proc_name; 1201897Swollman char *proc_num; 1211897Swollman char *arg_type; 1221897Swollman char *arg_prefix; 1231897Swollman char *res_type; 1241897Swollman char *res_prefix; 1251897Swollman struct proc_list *next; 1261897Swollman}; 1271897Swollmantypedef struct proc_list proc_list; 1281897Swollman 1291897Swollman 1301897Swollmanstruct version_list { 1311897Swollman char *vers_name; 1321897Swollman char *vers_num; 1331897Swollman proc_list *procs; 1341897Swollman struct version_list *next; 1351897Swollman}; 1361897Swollmantypedef struct version_list version_list; 1371897Swollman 1381897Swollmanstruct program_def { 1391897Swollman char *prog_num; 1401897Swollman version_list *versions; 1411897Swollman}; 1421897Swollmantypedef struct program_def program_def; 1431897Swollman 1441897Swollmanstruct definition { 1451897Swollman char *def_name; 1461897Swollman defkind def_kind; 1471897Swollman union { 1481897Swollman const_def co; 1491897Swollman struct_def st; 1501897Swollman union_def un; 1511897Swollman enum_def en; 1521897Swollman typedef_def ty; 1531897Swollman program_def pr; 1541897Swollman } def; 1551897Swollman}; 1561897Swollmantypedef struct definition definition; 1571897Swollman 1581897Swollman/* @(#)rpc_parse.h 2.1 88/08/01 4.0 RPCSRC */ 1591897Swollmandefinition *get_definition(); 160