summaryrefslogtreecommitdiffstats
path: root/WWW/Library/Implementation/HTLex.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:37:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:37:15 +0000
commitae5d181b854d3ccb373b6bc01b4869e44ff4d87a (patch)
tree91f59efb48c56a84cc798e012fccb667b63d3fee /WWW/Library/Implementation/HTLex.h
parentInitial commit. (diff)
downloadlynx-f590bfa5adb468fe111703a0e5ed3514fce3712e.tar.xz
lynx-f590bfa5adb468fe111703a0e5ed3514fce3712e.zip
Adding upstream version 2.9.0dev.12.upstream/2.9.0dev.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'WWW/Library/Implementation/HTLex.h')
-rw-r--r--WWW/Library/Implementation/HTLex.h64
1 files changed, 64 insertions, 0 deletions
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 <HTUtils.h>
+#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 */