diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lexer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lexer.c b/src/lexer.c index 906af85..3b221b6 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -102,15 +102,15 @@ token_t lex_first_token(char** content) { return lex_first_int(content); } /* otherwise, check to see if a symbol has been matched */ - if (strcmp(s, "(") == 0) { + if (strcmp(s, "(") == 0 || strcmp(s, "[") == 0 || strcmp(s, "{") == 0) { free(s); return init_token(OPEN_PAREN, NULL); } - else if (strcmp(s, ")") == 0) { + else if (strcmp(s, ")") == 0 || strcmp(s, "]") == 0 || strcmp(s, "}") == 0) { free(s); return init_token(CLOSE_PAREN, NULL); } - else if (strcmp(s, "#") == 0) { + else if (strcmp(s, "#") == 0 || strcmp(s, "//") == 0) { free(s); return init_token(START_COMMENT, NULL); } @@ -118,11 +118,11 @@ token_t lex_first_token(char** content) { free(s); return init_token(INDENT, NULL); } - else if (strcmp(s, "?") == 0) { + else if (strcmp(s, "?") == 0 || strcmp(s, "x") == 0) { free(s); return init_token(CONTRADICTION, NULL); } - else if (strcmp(s, "|") == 0) { + else if (strcmp(s, "|") == 0 || strcmp(s, ":") == 0) { free(s); return init_token(JUSTIFICATION, NULL); } @@ -158,7 +158,7 @@ token_t lex_first_token(char** content) { free(s); return init_token(IMPLICATION, NULL); } - else if (strcmp(s, "<-") == 0) { + else if (strcmp(s, "<->") == 0) { free(s); return init_token(BI_IMPLICATION, NULL); } |
