From 510ed32cfbffa6148018869f5ade416505a450b3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 22:21:21 +0200 Subject: Adding upstream version 2.9.0rel.0. Signed-off-by: Daniel Baumann --- WWW/Library/Implementation/HTLex.h | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 WWW/Library/Implementation/HTLex.h (limited to 'WWW/Library/Implementation/HTLex.h') diff --git a/WWW/Library/Implementation/HTLex.h b/WWW/Library/Implementation/HTLex.h new file mode 100644 index 0000000..fde9034 --- /dev/null +++ b/WWW/Library/Implementation/HTLex.h @@ -0,0 +1,64 @@ +/* LEXICAL ANALYSOR (MAINLY FOR CONFIG FILES) + + */ + +#ifndef HTLEX_H +#define HTLEX_H + +#ifndef HTUTILS_H +#include +#endif + +#ifdef __cplusplus +extern "C" { +#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. + + */ + + extern LexItem lex(FILE *fp); + +/* + +Push Back Latest Item + + */ + + extern void unlex(LexItem lex_item); + +/* + +Get the Name for Lexical Item + + */ + + extern const char *lex_verbose(LexItem lex_item); + +/* + + */ + +#ifdef __cplusplus +} +#endif +#endif /* not HTLEX_H */ -- cgit v1.2.3