xref: /freebsd/sys/ddb/db_lex.h (revision 380a989b3223d455375b4fae70fd0b9bdd43bafb)
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  *	$Id: db_lex.h,v 1.10 1998/06/27 15:40:56 dfr Exp $
27  */
28 
29 #ifndef _DDB_DB_LEX_H_
30 #define	_DDB_DB_LEX_H_
31 
32 /*
33  *	Author: David B. Golub, Carnegie Mellon University
34  *	Date:	7/90
35  */
36 /*
37  * Lexical analyzer.
38  */
39 void	db_flush_lex __P((void));
40 int	db_read_line __P((void));
41 int	db_read_token __P((void));
42 void	db_unread_token __P((int t));
43 
44 extern db_expr_t	db_tok_number;
45 #define	TOK_STRING_SIZE		120
46 extern char	db_tok_string[TOK_STRING_SIZE];
47 
48 #define	tEOF		(-1)
49 #define	tEOL		1
50 #define	tNUMBER		2
51 #define	tIDENT		3
52 #define	tPLUS		4
53 #define	tMINUS		5
54 #define	tDOT		6
55 #define	tSTAR		7
56 #define	tSLASH		8
57 #define	tEQ		9
58 #define	tLPAREN		10
59 #define	tRPAREN		11
60 #define	tPCT		12
61 #define	tHASH		13
62 #define	tCOMMA		14
63 #define	tDITTO		15
64 #define	tDOLLAR		16
65 #define	tEXCL		17
66 #define	tSHIFT_L	18
67 #define	tSHIFT_R	19
68 #define	tDOTDOT		20
69 
70 #endif /* !_DDB_DB_LEX_H_ */
71