diff options
Diffstat (limited to 'lib/lexer.mll')
-rw-r--r-- | lib/lexer.mll | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/lexer.mll b/lib/lexer.mll index 769192b..fed77ab 100644 --- a/lib/lexer.mll +++ b/lib/lexer.mll @@ -8,6 +8,7 @@ let digit = ['0'-'9'] let frac = '.' digit* let exp = ['e' 'E'] ['-' '+']? digit+ let float = digit* frac? exp? +let int = digit+ let white = [' ' '\t']+ let newline = '\r' | '\n' | "\r\n" let id = ['a'-'z' 'A'-'Z' '-']* @@ -19,6 +20,10 @@ rule read = | id { IDENTIFIER (Lexing.lexeme lexbuf) } | "_uuidv4" { UUIDV4 } | "_name" { NAME } + | "_int" { INTSYMBOL } + | "<" { LBRACE } + | ">" { RBRACE } + | int { INT (Lexing.lexeme lexbuf |> int_of_string) } | white { read lexbuf } | ":" { COLON } | ";" { SEMICOLON } |