lexer.h 854 Bytes
Newer Older
dcw's avatar
dcw committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 *                        LEXER FOR THE
 *                        ===== === ===
 *
 *                  DATA DECLARATION BUILDER
 *                  ==== =========== =======
 *
 *      This module is the lexer used by the parser to
 *      interprete the high level data declarations.
 */


/* ----------------- Exported defns     ---------------- */

typedef enum {
        tERROR, tEOF, tSEMI, tID, tEQ, tOR,
dcw's avatar
dcw committed
17
        tOPENBR, tCOMMA, tCLOSEBR, tSTR, tNUM,
18 19
	tEXPORT, tGLOBAL, tBEGIN, tOPENCURLY,
	tCLOSECURLY, tTYPE, tMINUS,
dcw's avatar
dcw committed
20 21 22 23 24 25 26
} TOKEN;



/* ----------------- Exported variables ---------------- */

extern char lexidval[];
27
extern int  lexintval;
dcw's avatar
dcw committed
28 29 30 31 32 33
extern int  lineno;
extern FILE *lexfile;


/* ----------------- Public procedures  ---------------- */

dcw's avatar
dcw committed
34
extern void ungettok( void );
Duncan White's avatar
Duncan White committed
35
extern TOKEN nexttok( void );
36
extern bool readnextline( char * line );