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