db_lex.h revision 1.1 1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution (at) CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie the
24 * rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: db_lex.h,v $
29 * Revision 1.1 1993/03/21 09:45:37 cgd
30 * Initial revision
31 *
32 * Revision 1.1 1992/03/25 21:45:15 pace
33 * Initial revision
34 *
35 * Revision 2.3 91/02/05 17:06:41 mrt
36 * Changed to new Mach copyright
37 * [91/01/31 16:18:28 mrt]
38 *
39 * Revision 2.2 90/08/27 21:51:16 dbg
40 * Add 'dotdot' token.
41 * [90/08/22 dbg]
42 * Export db_flush_lex.
43 * [90/08/07 dbg]
44 * Created.
45 * [90/07/25 dbg]
46 *
47 */
48 /*
49 * Author: David B. Golub, Carnegie Mellon University
50 * Date: 7/90
51 */
52 /*
53 * Lexical analyzer.
54 */
55 extern int db_read_line();
56 extern void db_flush_line();
57 extern int db_read_char();
58 extern void db_unread_char(/* char c */);
59 extern int db_read_token();
60 extern void db_unread_token(/* int t */);
61 extern void db_flush_lex();
62
63 extern int db_tok_number;
64 #define TOK_STRING_SIZE 120
65 extern char db_tok_string[TOK_STRING_SIZE];
66 extern int db_radix;
67
68 #define tEOF (-1)
69 #define tEOL 1
70 #define tNUMBER 2
71 #define tIDENT 3
72 #define tPLUS 4
73 #define tMINUS 5
74 #define tDOT 6
75 #define tSTAR 7
76 #define tSLASH 8
77 #define tEQ 9
78 #define tLPAREN 10
79 #define tRPAREN 11
80 #define tPCT 12
81 #define tHASH 13
82 #define tCOMMA 14
83 #define tDITTO 15
84 #define tDOLLAR 16
85 #define tEXCL 17
86 #define tSHIFT_L 18
87 #define tSHIFT_R 19
88 #define tDOTDOT 20
89
90
91
92
93