xref: /netbsd-src/sys/ddb/db_lex.h (revision cda4f8f6ee55684e8d311b86c99ea59191e6b74f)
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@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  * $Id: db_lex.h,v 1.2 1993/05/20 03:39:19 cgd Exp $
28  *
29  * HISTORY
30  * $Log: db_lex.h,v $
31  * Revision 1.2  1993/05/20 03:39:19  cgd
32  * add explicit rcs id
33  *
34  * Revision 1.1.1.1  1993/03/21  09:46:26  cgd
35  * initial import of 386bsd-0.1 sources
36  *
37  * Revision 1.1  1992/03/25  21:45:15  pace
38  * Initial revision
39  *
40  * Revision 2.3  91/02/05  17:06:41  mrt
41  * 	Changed to new Mach copyright
42  * 	[91/01/31  16:18:28  mrt]
43  *
44  * Revision 2.2  90/08/27  21:51:16  dbg
45  * 	Add 'dotdot' token.
46  * 	[90/08/22            dbg]
47  * 	Export db_flush_lex.
48  * 	[90/08/07            dbg]
49  * 	Created.
50  * 	[90/07/25            dbg]
51  *
52  */
53 /*
54  *	Author: David B. Golub, Carnegie Mellon University
55  *	Date:	7/90
56  */
57 /*
58  * Lexical analyzer.
59  */
60 extern int	db_read_line();
61 extern void	db_flush_line();
62 extern int	db_read_char();
63 extern void	db_unread_char(/* char c */);
64 extern int	db_read_token();
65 extern void	db_unread_token(/* int t */);
66 extern void	db_flush_lex();
67 
68 extern int	db_tok_number;
69 #define	TOK_STRING_SIZE		120
70 extern char	db_tok_string[TOK_STRING_SIZE];
71 extern int	db_radix;
72 
73 #define	tEOF		(-1)
74 #define	tEOL		1
75 #define	tNUMBER		2
76 #define	tIDENT		3
77 #define	tPLUS		4
78 #define	tMINUS		5
79 #define	tDOT		6
80 #define	tSTAR		7
81 #define	tSLASH		8
82 #define	tEQ		9
83 #define	tLPAREN		10
84 #define	tRPAREN		11
85 #define	tPCT		12
86 #define	tHASH		13
87 #define	tCOMMA		14
88 #define	tDITTO		15
89 #define	tDOLLAR		16
90 #define	tEXCL		17
91 #define	tSHIFT_L	18
92 #define	tSHIFT_R	19
93 #define	tDOTDOT		20
94 
95 
96 
97 
98