xref: /freebsd/sys/ddb/db_lex.h (revision 6437fb2c0639b151ac98a8cad9d83f2094e3251a)
15b81b6b3SRodney W. Grimes /*
25b81b6b3SRodney W. Grimes  * Mach Operating System
35b81b6b3SRodney W. Grimes  * Copyright (c) 1991,1990 Carnegie Mellon University
45b81b6b3SRodney W. Grimes  * All Rights Reserved.
55b81b6b3SRodney W. Grimes  *
65b81b6b3SRodney W. Grimes  * Permission to use, copy, modify and distribute this software and its
75b81b6b3SRodney W. Grimes  * documentation is hereby granted, provided that both the copyright
85b81b6b3SRodney W. Grimes  * notice and this permission notice appear in all copies of the
95b81b6b3SRodney W. Grimes  * software, derivative works or modified versions, and any portions
105b81b6b3SRodney W. Grimes  * thereof, and that both notices appear in supporting documentation.
115b81b6b3SRodney W. Grimes  *
125b81b6b3SRodney W. Grimes  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
135b81b6b3SRodney W. Grimes  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
145b81b6b3SRodney W. Grimes  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
155b81b6b3SRodney W. Grimes  *
165b81b6b3SRodney W. Grimes  * Carnegie Mellon requests users of this software to return to
175b81b6b3SRodney W. Grimes  *
185b81b6b3SRodney W. Grimes  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
195b81b6b3SRodney W. Grimes  *  School of Computer Science
205b81b6b3SRodney W. Grimes  *  Carnegie Mellon University
215b81b6b3SRodney W. Grimes  *  Pittsburgh PA 15213-3890
225b81b6b3SRodney W. Grimes  *
235b81b6b3SRodney W. Grimes  * any improvements or extensions that they make and grant Carnegie the
245b81b6b3SRodney W. Grimes  * rights to redistribute these changes.
250edf66ecSRodney W. Grimes  *
266437fb2cSGarrett Wollman  *	$Id: db_lex.h,v 1.2 1993/10/16 16:47:19 rgrimes Exp $
275b81b6b3SRodney W. Grimes  */
280edf66ecSRodney W. Grimes 
296437fb2cSGarrett Wollman #ifndef _DDB_DB_LEX_H_
306437fb2cSGarrett Wollman #define _DDB_DB_LEX_H_ 1
316437fb2cSGarrett Wollman 
325b81b6b3SRodney W. Grimes /*
335b81b6b3SRodney W. Grimes  *	Author: David B. Golub, Carnegie Mellon University
345b81b6b3SRodney W. Grimes  *	Date:	7/90
355b81b6b3SRodney W. Grimes  */
365b81b6b3SRodney W. Grimes /*
375b81b6b3SRodney W. Grimes  * Lexical analyzer.
385b81b6b3SRodney W. Grimes  */
395b81b6b3SRodney W. Grimes extern int	db_read_line();
405b81b6b3SRodney W. Grimes extern void	db_flush_line();
415b81b6b3SRodney W. Grimes extern int	db_read_char();
425b81b6b3SRodney W. Grimes extern void	db_unread_char(/* char c */);
435b81b6b3SRodney W. Grimes extern int	db_read_token();
445b81b6b3SRodney W. Grimes extern void	db_unread_token(/* int t */);
455b81b6b3SRodney W. Grimes extern void	db_flush_lex();
465b81b6b3SRodney W. Grimes 
475b81b6b3SRodney W. Grimes extern int	db_tok_number;
485b81b6b3SRodney W. Grimes #define	TOK_STRING_SIZE		120
495b81b6b3SRodney W. Grimes extern char	db_tok_string[TOK_STRING_SIZE];
505b81b6b3SRodney W. Grimes extern int	db_radix;
515b81b6b3SRodney W. Grimes 
525b81b6b3SRodney W. Grimes #define	tEOF		(-1)
535b81b6b3SRodney W. Grimes #define	tEOL		1
545b81b6b3SRodney W. Grimes #define	tNUMBER		2
555b81b6b3SRodney W. Grimes #define	tIDENT		3
565b81b6b3SRodney W. Grimes #define	tPLUS		4
575b81b6b3SRodney W. Grimes #define	tMINUS		5
585b81b6b3SRodney W. Grimes #define	tDOT		6
595b81b6b3SRodney W. Grimes #define	tSTAR		7
605b81b6b3SRodney W. Grimes #define	tSLASH		8
615b81b6b3SRodney W. Grimes #define	tEQ		9
625b81b6b3SRodney W. Grimes #define	tLPAREN		10
635b81b6b3SRodney W. Grimes #define	tRPAREN		11
645b81b6b3SRodney W. Grimes #define	tPCT		12
655b81b6b3SRodney W. Grimes #define	tHASH		13
665b81b6b3SRodney W. Grimes #define	tCOMMA		14
675b81b6b3SRodney W. Grimes #define	tDITTO		15
685b81b6b3SRodney W. Grimes #define	tDOLLAR		16
695b81b6b3SRodney W. Grimes #define	tEXCL		17
705b81b6b3SRodney W. Grimes #define	tSHIFT_L	18
715b81b6b3SRodney W. Grimes #define	tSHIFT_R	19
725b81b6b3SRodney W. Grimes #define	tDOTDOT		20
735b81b6b3SRodney W. Grimes 
745b81b6b3SRodney W. Grimes 
755b81b6b3SRodney W. Grimes 
765b81b6b3SRodney W. Grimes 
776437fb2cSGarrett Wollman #endif /* _DDB_DB_LEX_H_ */
78