Commit a1eec067 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-06-08 12:12:10 by afrisch] _ is not an identifier / label

Original author: afrisch
Date: 2005-06-08 12:12:10+00:00
parent b77cdbf9
......@@ -378,7 +378,7 @@ EXTEND
tag: [ [ a = [ IDENT | keyword ] -> exp loc (Atom (ident a)) ] ];
tag_type: [
[ IDENT "_" -> mk loc (Internal (Types.atom Atoms.any))
[ "_" -> mk loc (Internal (Types.atom Atoms.any))
| a = [ IDENT | keyword ] -> mk loc (Cst (Atom (ident a)))
| t = ANY_IN_NS -> mk loc (NsT (ident t))
]
......@@ -577,7 +577,7 @@ EXTEND
let fields =
[ label "get", (get_fun, None); label "set", (set_fun, None) ] in
mk loc (Record (false, fields))
| IDENT "_" -> mk loc (Internal Types.any)
| "_" -> mk loc (Internal Types.any)
| "("; a = IDENT; ":="; c = expr; ")" ->
mk loc (Constant (ident a,c))
| "!"; a = IDENT ->
......
......@@ -45,7 +45,7 @@ let parse_char lexbuf base i =
let regexp ncname_char =
xml_letter | xml_digit | [ '-' '_' ] | xml_combining_char | xml_extender | "\\."
let regexp ncname = (xml_letter | '_' ) ncname_char*
let regexp ncname = (xml_letter ncname_char*) | ('_' ncname_char+)
let regexp qname = (ncname ':')? ncname
......@@ -74,7 +74,7 @@ let rec token = lexer
return lexbuf ("INT", L.utf8_lexeme lexbuf)
| [ "<>=.,:;+-*/@&{}[]()|?`!" ]
| "->" | "::" | ";;" | "--" | "//" | "/@" | ":=" | "\\" | "++"
| "<=" | ">=" | "<<" | ">>" | "||" | "&&" | "**"
| "<=" | ">=" | "<<" | ">>" | "||" | "&&" | "**" | "_"
| ".."
| ["?+*"] "?" | "#" ->
return lexbuf ("", L.utf8_lexeme lexbuf)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment