]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/zwgc/lexer.h
r4264@bucket (orig r254): kcr | 2008-01-20 22:11:44 -0500
[1ts-debian.git] / zephyr / zwgc / lexer.h
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It is one of the source files comprising zwgc, the Zephyr WindowGram
3  * client.
4  *
5  *      Created by:     Marc Horowitz <marc@athena.mit.edu>
6  *
7  *      $Id$
8  *
9  *      Copyright (c) 1989 by the Massachusetts Institute of Technology.
10  *      For copying and distribution information, see the file
11  *      "mit-copyright.h".
12  */
13
14
15 #include <zephyr/mit-copyright.h>
16
17 #ifndef lexer_MODULE
18 #define lexer_MODULE
19
20 #include <ctype.h>
21
22 /*
23  * is_identifier_char(c) - is c a character that could be part of
24  *                         an identifier?
25  *
26  * NOTE: this information is hardwired into yylex() in lexer.c!
27  */
28
29 #define  is_identifier_char(c)                    (isalnum(c) || (c)=='_')
30
31 /*
32  * The maximum # of significant letters in an identifier:
33  *
34  * Note: in order for all keywords to be recognized, this must be at least 20.
35  */
36
37 #define MAX_IDENTIFIER_LENGTH 128
38
39 /*
40  * yylineno - this holds the current line # we are on.  Updated automatically
41  *            by yylex.
42  */
43
44 extern int yylineno;
45
46 /*
47  * lex_open - this routine [re]initializes the lexer & prepares it to lex
48  *            a file.  Resets current line # to 1.
49  */
50
51 extern void lex_open(FILE *);
52
53 /*
54  * yylex - performs as per. the yacc manual's requirements
55  */
56
57 /* extern int yylex(); */
58
59 #endif