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