dune/src/meta_lexer.mll

16 lines
387 B
OCaml
Raw Normal View History

2016-11-12 11:48:24 +00:00
{ open Meta_parser }
rule token = parse
| [' ' '\t']* { token lexbuf }
| '#' [^ '\r' '\n']* { token lexbuf }
| ("\n" | "\r\n") { Lexing.new_line lexbuf; token lexbuf }
| ['A'-'Z' 'a'-'z' '0'-'9' '_' '.']+ as s { NAME s }
| '"' ([^'"']* as s) '"' { STRING s }
| '-' { MINUS }
| '(' { LPAREN }
| ')' { RPAREN }
| ',' { COMMA }
| '=' { EQUAL }
| "+=" { PLUS_EQUAL }