aboutsummaryrefslogtreecommitdiff
path: root/src/include/lexer.h
diff options
context:
space:
mode:
authorc+12023-10-21 09:42:04 -0400
committerc+12023-10-21 09:42:04 -0400
commit5a502944d161f6e3d972e94e244993c730e8a91a (patch)
treeeed819600bdec825159a16a4c931a62f86abd335 /src/include/lexer.h
parent6fc8f91e0d96ae4b4ee59ea562574cc04fdf8abf (diff)
invented numbers.
Diffstat (limited to 'src/include/lexer.h')
-rw-r--r--src/include/lexer.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/include/lexer.h b/src/include/lexer.h
index 83ace59..d83e35f 100644
--- a/src/include/lexer.h
+++ b/src/include/lexer.h
@@ -18,14 +18,14 @@ typedef struct LEXER_STRUC {
LEXER_STATE_REG,
/* definition tag */
LEXER_STATE_TAG,
- /* escaped character in string */
- LEXER_STATE_ESC,
/* string */
LEXER_STATE_STR,
- /* definition */
- LEXER_STATE_DEF,
- /* call */
- LEXER_STATE_CAL
+ /* escaped character in string */
+ LEXER_STATE_STR_ESC,
+ /* integer */
+ LEXER_STATE_INT,
+ /* keyword */
+ LEXER_STATE_KWD,
} state;
/* the linked list of tokens generated */
@@ -52,19 +52,19 @@ void lexer_add_current_char(lexer_t* lexer, int type);
void lexer_add_current_char_to_last_token(lexer_t* lexer, int type);
/* handle regular state */
-void lexer_do_reg(lexer_t*);
+void lexer_do_reg(lexer_t* lexer);
/* handle definition tag state*/
-void lexer_do_tag(lexer_t*);
-/* handle character state */
-void lexer_do_chr(lexer_t*);
+void lexer_do_tag(lexer_t* lexer);
+/* TODO: handle character state */
+void lexer_do_chr(lexer_t* lexer);
/* handle string state */
-void lexer_do_str(lexer_t*);
-/* handle definition state */
-void lexer_do_def(lexer_t*);
-/* handle call state */
-void lexer_do_cal(lexer_t*);
+void lexer_do_str(lexer_t* lexer);
+/* handle integer */
+void lexer_do_int(lexer_t* lexer);
+/* handle keywords */
+void lexer_do_kwd(lexer_t* lexer);
/* run lexer */
-void lexer_run(lexer_t*);
+void lexer_run(lexer_t* lexer);
#endif