added meta
This commit is contained in:
parent
0a29ae3749
commit
6039e16258
|
@ -0,0 +1,20 @@
|
|||
(** META file representation *)
|
||||
|
||||
type t =
|
||||
{ name : string
|
||||
; sub : t list
|
||||
; defs : def list
|
||||
}
|
||||
|
||||
and kind = Set | Add
|
||||
|
||||
and def =
|
||||
{ kind : kind
|
||||
; var : string
|
||||
; predicates : predicate list
|
||||
}
|
||||
|
||||
and predicate =
|
||||
| Pos of string
|
||||
| Neg of string
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{ 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 }
|
Loading…
Reference in New Issue