summaryrefslogtreecommitdiff
path: root/igen/lexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'igen/lexer.h')
-rw-r--r--igen/lexer.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/igen/lexer.h b/igen/lexer.h
new file mode 100644
index 0000000..ba81cb1
--- /dev/null
+++ b/igen/lexer.h
@@ -0,0 +1,46 @@
+#ifndef LEXER_H
+#define LEXER_H
+
+typedef enum atom atom;
+typedef struct lexeme lexeme;
+
+enum atom {
+ ATOM_LBRACK,
+ ATOM_RBRACK,
+ ATOM_SLASH,
+ ATOM_PLUS,
+ ATOM_MINUS,
+ ATOM_ASTR,
+ ATOM_PRCNT,
+ ATOM_AMPR,
+ ATOM_PIPE,
+ ATOM_CARROT,
+ ATOM_HASH,
+ ATOM_COL,
+ ATOM_SCOL,
+ ATOM_SPACE,
+ ATOM_USCORE,
+ ATOM_EQUAL,
+ ATOM_DOT,
+ ATOM_QMARK,
+ ATOM_BANG,
+ ATOM_LT,
+ ATOM_GT,
+ ATOM_PERCENT,
+ ATOM_COMMA,
+ ATOM_BSLASH,
+ ATOM_QUOTE,
+ ATOM_SQUOTE,
+ ATOM_TAB,
+ ATOM_NLINE,
+ ATOM_ALPHA,
+ ATOM_NUM,
+ ATOM_NONE,
+ NUM_ATOMS
+};
+
+struct lexeme {
+};
+
+extern int lex(char *str, int dbg);
+#endif