about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTLex.h
blob: f0b6875e1fb4052e2749ff2467687dcfe0db9ffb (plain) (blame)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*                         LEXICAL ANALYSOR (MAINLY FOR CONFIG FILES)

 */

#ifndef HTLEX_H
#define HTLEX_H

#ifndef HTUTILS_H
#include <HTUtils.h>
#endif
 
typedef enum {
    LEX_NONE,		/* Internally used      */
    LEX_EOF,		/* End of file          */
    LEX_REC_SEP,	/* Record separator     */
    LEX_FIELD_SEP,	/* Field separator      */
    LEX_ITEM_SEP,	/* List item separator  */
    LEX_OPEN_PAREN,	/* Group start tag      */
    LEX_CLOSE_PAREN,	/* Group end tag        */
    LEX_AT_SIGN,	/* Address qualifier    */
    LEX_ALPH_STR,	/* Alphanumeric string  */
    LEX_TMPL_STR	/* Template string      */
} LexItem;

extern char HTlex_buffer[];	/* Read lexical string          */
extern int HTlex_line;		/* Line number in source file   */

/*

Get Next Lexical Item

   If returns LEX_ALPH_STR or LEX_TMPL_STR the string is in global buffer lex_buffer.

 */

PUBLIC LexItem lex PARAMS((FILE * fp));
/*

Push Back Latest Item

 */

PUBLIC void unlex PARAMS((LexItem lex_item));
/*

Get the Name for Lexical Item

 */

PUBLIC char *lex_verbose PARAMS((LexItem lex_item));
/*

 */

#endif /* not HTLEX_H */