-
Notifications
You must be signed in to change notification settings - Fork 0
/
keytoktab.h
36 lines (28 loc) · 1.51 KB
/
keytoktab.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/**********************************************************************/
/* constants & public functions */
/**********************************************************************/
#ifndef KEYTOK_H
#define KEYTOK_H
/**********************************************************************/
/* constants */
/**********************************************************************/
#define nfound -1
typedef enum tvalues { tstart=257,
id, number, assign, predef, tempty, undef, error, typ,
tend,
kstart,
program, input, output, var,
begin, end, boolean, integer, real,
kend
} toktyp;
/**********************************************************************/
/* PUBLIC METHODS for this OBJECT (EXPORTED) */
/**********************************************************************/
void p_toktab(); /* display token/keyword tables */
toktyp lex2tok(char * fplex); /* convert a lexeme to a token */
toktyp key2tok(char * fplex); /* convert a keyword to a token */
char * tok2lex(toktyp ftok); /* convert a token to a lexeme */
#endif
/**********************************************************************/
/* end of definitions */
/**********************************************************************/