|
|
|
@ -29,8 +29,10 @@ let id_special_char = ['-' '$' '.' '_']
|
|
|
|
|
let id_char = lower | upper | id_special_char
|
|
|
|
|
let id = id_char (id_char | digit)*
|
|
|
|
|
|
|
|
|
|
(* definition of attribute group - not used for now *)
|
|
|
|
|
let attribute_junk = "attributes" [^ '\n']*
|
|
|
|
|
(* some top level constructs currently ignored *)
|
|
|
|
|
let declaration = "declare " [^ '\n']*
|
|
|
|
|
let attribute_group = "attributes " [^ '\n']*
|
|
|
|
|
|
|
|
|
|
let string_content = [^ '"']*
|
|
|
|
|
|
|
|
|
|
rule token = parse
|
|
|
|
@ -172,8 +174,10 @@ rule token = parse
|
|
|
|
|
| '!' '"' ([^ '"']* as str) '"' { METADATA_STRING str }
|
|
|
|
|
| "!{" { METADATA_NODE_BEGIN }
|
|
|
|
|
|
|
|
|
|
| declaration { token lexbuf }
|
|
|
|
|
|
|
|
|
|
(* attribute groups *)
|
|
|
|
|
| '#' (nonneg_int as i) { ATTRIBUTE_GROUP (int_of_string i) }
|
|
|
|
|
| attribute_junk { token lexbuf }
|
|
|
|
|
| attribute_group { token lexbuf }
|
|
|
|
|
|
|
|
|
|
| eof { EOF }
|
|
|
|
|