BSD 4_3_Net_2 release
[unix-history] / usr / src / lib / librpc / rpcgen / rpc_scan.h
CommitLineData
af359dea 1/* @(#)rpc_scan.h 2.1 88/08/01 4.0 RPCSRC */
cfbe44a4
KM
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.
9 *
10 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
11 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
12 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
13 *
14 * Sun RPC is provided with no support and without any obligation on the
15 * part of Sun Microsystems, Inc. to assist in its use, correction,
16 * modification or enhancement.
17 *
18 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
19 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
20 * OR ANY PART THEREOF.
21 *
22 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
23 * or profits or other special, indirect and consequential damages, even if
24 * Sun has been advised of the possibility of such damages.
25 *
26 * Sun Microsystems, Inc.
27 * 2550 Garcia Avenue
28 * Mountain View, California 94043
29 */
af359dea 30/* @(#)rpc_scan.h 1.3 87/03/09 (C) 1987 SMI */
cfbe44a4
KM
31
32/*
af359dea
C
33 * rpc_scan.h, Definitions for the RPCL scanner
34 * Copyright (C) 1987, Sun Microsystems, Inc.
cfbe44a4
KM
35 */
36
af359dea
C
37/*
38 * kinds of tokens
39 */
40enum tok_kind {
41 TOK_IDENT,
42 TOK_STRCONST,
43 TOK_LPAREN,
44 TOK_RPAREN,
45 TOK_LBRACE,
46 TOK_RBRACE,
47 TOK_LBRACKET,
48 TOK_RBRACKET,
49 TOK_LANGLE,
50 TOK_RANGLE,
51 TOK_STAR,
52 TOK_COMMA,
53 TOK_EQUAL,
54 TOK_COLON,
55 TOK_SEMICOLON,
56 TOK_CONST,
57 TOK_STRUCT,
58 TOK_UNION,
59 TOK_SWITCH,
60 TOK_CASE,
61 TOK_DEFAULT,
62 TOK_ENUM,
63 TOK_TYPEDEF,
64 TOK_INT,
65 TOK_SHORT,
66 TOK_LONG,
67 TOK_UNSIGNED,
68 TOK_FLOAT,
69 TOK_DOUBLE,
70 TOK_OPAQUE,
71 TOK_CHAR,
72 TOK_STRING,
73 TOK_BOOL,
74 TOK_VOID,
75 TOK_PROGRAM,
76 TOK_VERSION,
77 TOK_EOF
cfbe44a4 78};
af359dea 79typedef enum tok_kind tok_kind;
cfbe44a4 80
95f51977 81/*
af359dea 82 * a token
95f51977 83 */
af359dea
C
84struct token {
85 tok_kind kind;
86 char *str;
cfbe44a4 87};
af359dea 88typedef struct token token;
95f51977 89
cfbe44a4 90
af359dea
C
91/*
92 * routine interface
93 */
94void scanprint();
95void scan();
96void scan2();
97void scan3();
98void scan_num();
99void peek();
100int peekscan();
101void get_token();