let get_lines_indentation ?(indent_spec=default_indent) s =
  let lexbuf = Lexing.from_string s in
  blocks := [];
  line_indentations := [];
  next_token_is_first := true;
  set_indent 0;
  cst_indent := indent_spec;
  try ignore(token lexbuf);
      `Success (List.rev !line_indentations);
  with Error (e,loc) -> `Failure (e,loc,(List.rev !line_indentations))