ocamlbuild: Allow '\' to escape a new line in _tags.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@8934 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
21e8e9a210
commit
b78c7f0cc9
|
@ -28,6 +28,7 @@ let empty = { plus_flags = []; minus_flags = []; plus_tags = []; minus_tags = []
|
||||||
|
|
||||||
let newline = ('\n' | '\r' | "\r\n")
|
let newline = ('\n' | '\r' | "\r\n")
|
||||||
let space = [' ' '\t' '\012']
|
let space = [' ' '\t' '\012']
|
||||||
|
let space_or_esc_nl = (space | '\\' newline)
|
||||||
let blank = newline | space
|
let blank = newline | space
|
||||||
let not_blank = [^' ' '\t' '\012' '\n' '\r']
|
let not_blank = [^' ' '\t' '\012' '\n' '\r']
|
||||||
let not_space_nor_comma = [^' ' '\t' '\012' ',']
|
let not_space_nor_comma = [^' ' '\t' '\012' ',']
|
||||||
|
@ -116,7 +117,7 @@ and conf_value pos err x = parse
|
||||||
| (_ | eof) { raise (Error(Printf.sprintf "Bad value in configuration line at line %d (from %s)" pos err)) }
|
| (_ | eof) { raise (Error(Printf.sprintf "Bad value in configuration line at line %d (from %s)" pos err)) }
|
||||||
|
|
||||||
and conf_values pos err x = parse
|
and conf_values pos err x = parse
|
||||||
| space* ',' space* { conf_values pos err (conf_value pos err x lexbuf) lexbuf }
|
| space_or_esc_nl* ',' space_or_esc_nl* { conf_values pos err (conf_value pos err x lexbuf) lexbuf }
|
||||||
| (newline | eof) { x }
|
| (newline | eof) { x }
|
||||||
| (_ | eof) { raise (Error(Printf.sprintf "Bad values in configuration line at line %d (from %s)" pos err)) }
|
| (_ | eof) { raise (Error(Printf.sprintf "Bad values in configuration line at line %d (from %s)" pos err)) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue