14e115012SGarrett Wollman /* 24e115012SGarrett Wollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 34e115012SGarrett Wollman * unrestricted use provided that this legend is included on all tape 44e115012SGarrett Wollman * media and as a part of the software program in whole or part. Users 54e115012SGarrett Wollman * may copy or modify Sun RPC without charge, but are not authorized 64e115012SGarrett Wollman * to license or distribute it to anyone else except as part of a product or 74e115012SGarrett Wollman * program developed by the user. 84e115012SGarrett Wollman * 94e115012SGarrett Wollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 104e115012SGarrett Wollman * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 114e115012SGarrett Wollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 124e115012SGarrett Wollman * 134e115012SGarrett Wollman * Sun RPC is provided with no support and without any obligation on the 144e115012SGarrett Wollman * part of Sun Microsystems, Inc. to assist in its use, correction, 154e115012SGarrett Wollman * modification or enhancement. 164e115012SGarrett Wollman * 174e115012SGarrett Wollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 184e115012SGarrett Wollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 194e115012SGarrett Wollman * OR ANY PART THEREOF. 204e115012SGarrett Wollman * 214e115012SGarrett Wollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 224e115012SGarrett Wollman * or profits or other special, indirect and consequential damages, even if 234e115012SGarrett Wollman * Sun has been advised of the possibility of such damages. 244e115012SGarrett Wollman * 254e115012SGarrett Wollman * Sun Microsystems, Inc. 264e115012SGarrett Wollman * 2550 Garcia Avenue 274e115012SGarrett Wollman * Mountain View, California 94043 284e115012SGarrett Wollman */ 29ff49530fSBill Paul #pragma ident "@(#)rpc_scan.h 1.11 94/05/15 SMI" 30ff49530fSBill Paul 31ff49530fSBill Paul /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 32ff49530fSBill Paul /* All Rights Reserved */ 33ff49530fSBill Paul 34ff49530fSBill Paul /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ 35ff49530fSBill Paul /* The copyright notice above does not evidence any */ 36ff49530fSBill Paul /* actual or intended publication of such source code. */ 37ff49530fSBill Paul 38ff49530fSBill Paul 39ff49530fSBill Paul 40ff49530fSBill Paul /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 41ff49530fSBill Paul * PROPRIETARY NOTICE (Combined) 42ff49530fSBill Paul * 43ff49530fSBill Paul * This source code is unpublished proprietary information 44ff49530fSBill Paul * constituting, or derived under license from AT&T's UNIX(r) System V. 45ff49530fSBill Paul * In addition, portions of such source code were derived from Berkeley 46ff49530fSBill Paul * 4.3 BSD under license from the Regents of the University of 47ff49530fSBill Paul * California. 48ff49530fSBill Paul * 49ff49530fSBill Paul * 50ff49530fSBill Paul * 51ff49530fSBill Paul * Copyright Notice 52ff49530fSBill Paul * 53ff49530fSBill Paul * Notice of copyright on this source code product does not indicate 54ff49530fSBill Paul * publication. 55ff49530fSBill Paul * 56ff49530fSBill Paul * (c) 1986,1987,1988.1989 Sun Microsystems, Inc 57ff49530fSBill Paul * (c) 1983,1984,1985,1986,1987,1988,1989 AT&T. 58ff49530fSBill Paul * All rights reserved. 59ff49530fSBill Paul */ 60ff49530fSBill Paul 61ff49530fSBill Paul /* @(#)rpc_scan.h 1.3 90/08/29 (C) 1987 SMI */ 624e115012SGarrett Wollman 634e115012SGarrett Wollman /* 644e115012SGarrett Wollman * rpc_scan.h, Definitions for the RPCL scanner 654e115012SGarrett Wollman */ 664e115012SGarrett Wollman 674e115012SGarrett Wollman /* 684e115012SGarrett Wollman * kinds of tokens 694e115012SGarrett Wollman */ 704e115012SGarrett Wollman enum tok_kind { 714e115012SGarrett Wollman TOK_IDENT, 72ff49530fSBill Paul TOK_CHARCONST, 734e115012SGarrett Wollman TOK_STRCONST, 744e115012SGarrett Wollman TOK_LPAREN, 754e115012SGarrett Wollman TOK_RPAREN, 764e115012SGarrett Wollman TOK_LBRACE, 774e115012SGarrett Wollman TOK_RBRACE, 784e115012SGarrett Wollman TOK_LBRACKET, 794e115012SGarrett Wollman TOK_RBRACKET, 804e115012SGarrett Wollman TOK_LANGLE, 814e115012SGarrett Wollman TOK_RANGLE, 824e115012SGarrett Wollman TOK_STAR, 834e115012SGarrett Wollman TOK_COMMA, 844e115012SGarrett Wollman TOK_EQUAL, 854e115012SGarrett Wollman TOK_COLON, 864e115012SGarrett Wollman TOK_SEMICOLON, 874e115012SGarrett Wollman TOK_CONST, 884e115012SGarrett Wollman TOK_STRUCT, 894e115012SGarrett Wollman TOK_UNION, 904e115012SGarrett Wollman TOK_SWITCH, 914e115012SGarrett Wollman TOK_CASE, 924e115012SGarrett Wollman TOK_DEFAULT, 934e115012SGarrett Wollman TOK_ENUM, 944e115012SGarrett Wollman TOK_TYPEDEF, 954e115012SGarrett Wollman TOK_INT, 964e115012SGarrett Wollman TOK_SHORT, 974e115012SGarrett Wollman TOK_LONG, 98ff49530fSBill Paul TOK_HYPER, 994e115012SGarrett Wollman TOK_UNSIGNED, 1004e115012SGarrett Wollman TOK_FLOAT, 1014e115012SGarrett Wollman TOK_DOUBLE, 102ff49530fSBill Paul TOK_QUAD, 1034e115012SGarrett Wollman TOK_OPAQUE, 1044e115012SGarrett Wollman TOK_CHAR, 1054e115012SGarrett Wollman TOK_STRING, 1064e115012SGarrett Wollman TOK_BOOL, 1074e115012SGarrett Wollman TOK_VOID, 1084e115012SGarrett Wollman TOK_PROGRAM, 1094e115012SGarrett Wollman TOK_VERSION, 1104e115012SGarrett Wollman TOK_EOF 1114e115012SGarrett Wollman }; 1124e115012SGarrett Wollman typedef enum tok_kind tok_kind; 1134e115012SGarrett Wollman 1144e115012SGarrett Wollman /* 1154e115012SGarrett Wollman * a token 1164e115012SGarrett Wollman */ 1174e115012SGarrett Wollman struct token { 1184e115012SGarrett Wollman tok_kind kind; 1194e115012SGarrett Wollman char *str; 1204e115012SGarrett Wollman }; 1214e115012SGarrett Wollman typedef struct token token; 1224e115012SGarrett Wollman 1234e115012SGarrett Wollman 1244e115012SGarrett Wollman /* 1254e115012SGarrett Wollman * routine interface 1264e115012SGarrett Wollman */ 1274e115012SGarrett Wollman void scan(); 1284e115012SGarrett Wollman void scan2(); 1294e115012SGarrett Wollman void scan3(); 1304e115012SGarrett Wollman void scan_num(); 1314e115012SGarrett Wollman void peek(); 1324e115012SGarrett Wollman int peekscan(); 1334e115012SGarrett Wollman void get_token(); 134