diff options
author | 2015-09-10 10:40:49 +0200 | |
---|---|---|
committer | 2015-09-10 10:40:49 +0200 | |
commit | 77101ea44d88983ec399c8662b81f9392d92110b (patch) | |
tree | 9e9c648a477a9efae0abe6c7d7e1994a1ec1c1d7 | |
parent | 2834cf72add1459d7460e3c1757e7352a1ff7466 (diff) |
Fixing the XML lexer definition of names to match the standard.
-rw-r--r-- | lib/xml_lexer.mll | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/xml_lexer.mll b/lib/xml_lexer.mll index f6943dd13..0b541ee04 100644 --- a/lib/xml_lexer.mll +++ b/lib/xml_lexer.mll @@ -88,7 +88,8 @@ let error lexbuf e = let newline = ['\n'] let break = ['\r'] let space = [' ' '\t'] -let identchar = ['A'-'Z' 'a'-'z' '_' '0'-'9' ':' '-'] +let identchar = ['A'-'Z' 'a'-'z' '_' '0'-'9' ':' '-' '.'] +let ident = ['A'-'Z' 'a'-'z' '_' ':'] identchar+ let entitychar = ['A'-'Z' 'a'-'z'] let pcchar = [^ '\r' '\n' '<' '>' '&'] @@ -226,7 +227,7 @@ and entity = parse { raise (Error EUnterminatedEntity) } and ident_name = parse - | identchar+ + | ident { lexeme lexbuf } | _ | eof { error lexbuf EIdentExpected } @@ -252,7 +253,7 @@ and attributes = parse } and attribute = parse - | identchar+ + | ident { lexeme lexbuf } | _ | eof { error lexbuf EAttributeNameExpected } |