Select the types of activity you want to include in your feed.
Support continuation characters in ocamltest
Allows strings to be entered on multiple lines by permitting backslash to escape the newline sequence and optionally a backslash to escape a space at the start of the following line.
···5454 comment_start_pos := [Lexing.lexeme_start_p lexbuf];
5555 comment lexbuf
5656 }
5757- | "\"" [^'"']* "\""
5858- { let s = Lexing.lexeme lexbuf in
5959- let string_length = (String.length s) -2 in
6060- let s' = String.sub s 1 string_length in
6161- STRING s'
6262- }
5757+ | '"'
5858+ { STRING (string "" lexbuf) }
6359 | _
6460 {
6561 let pos = Lexing.lexeme_start_p lexbuf in
···7066 file line column (Lexing.lexeme lexbuf) in
7167 lexer_error message
7268 }
6969+(* Backslashes are ignored in strings except at the end of lines where they
7070+ cause the newline to be ignored. After an escaped newline, any blank
7171+ characters at the start of the line are ignored and optionally one blank
7272+ character may be escaped with a backslash.
7373+7474+ In particular, this means that the following:
7575+script = "some-directory\\
7676+ \ foo"
7777+ is interpreted as the OCaml string "some-directory\\ foo".
7878+ *)
7979+and string acc = parse
8080+ | [^ '\\' '"' ]+
8181+ { string (acc ^ Lexing.lexeme lexbuf) lexbuf }
8282+ | '\\' newline blank* ('\\' (blank as blank))?
8383+ { let space =
8484+ match blank with None -> "" | Some blank -> String.make 1 blank
8585+ in
8686+ string (acc ^ space) lexbuf }
8787+ | '\\'
8888+ {string (acc ^ "\\") lexbuf}
8989+ | '"'
9090+ {acc}
7391and comment = parse
7492 | "(*"
7593 {