summaryrefslogtreecommitdiff
path: root/Lexer.l
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2020-05-31 13:11:44 +0800
committerNagi5Yeq <wu@x-nagi.com>2020-05-31 13:11:44 +0800
commit4a5bc55769804d003d6cd9f8c16eefb76bb53d1b (patch)
tree365756351275152391a812440f6a76b9f92cc854 /Lexer.l
parentbd44c9eaef1f4dcbbd98d4489885566b6c7e5138 (diff)
full support of array, pointer and record stuffs
Diffstat (limited to 'Lexer.l')
-rw-r--r--Lexer.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lexer.l b/Lexer.l
index 39603e2..d3e6f29 100644
--- a/Lexer.l
+++ b/Lexer.l
@@ -28,7 +28,7 @@ namespace pcc {
decimal ([1-9][0-9]*)|0
octal 0[0-7]*
-hexadecimal 0[xX][0-9a-fA-F]
+hexadecimal 0[xX][0-9a-fA-F]+
integer {decimal}|{octal}|{hexadecimal}
@@ -120,6 +120,7 @@ white [\t\f\r ]
"string" {return Parser::make_STRING(loc);}
"array" {return Parser::make_ARRAY(loc);}
"of" {return Parser::make_OF(loc);}
+"record" {return Parser::make_RECORD(loc);}
"true" {return Parser::make_BOOLEAN_LITERAL(true, loc);}
"false" {return Parser::make_BOOLEAN_LITERAL(false, loc);}