let parse_quotation_result parse loc quot pos_tag str =
try parse loc str
with
| Loc.Exc_located (iloc,
(Error.E ((n, pos_tag, Expanding, exc)))) ->
let ctx = ParsingResult (iloc, quot.q_contents) in
let exc1 = Error.E ((n, pos_tag, ctx, exc))
in raise (Loc.Exc_located (iloc, exc1))
| Loc.Exc_located (iloc, ((Error.E _ as exc))) ->
raise (Loc.Exc_located (iloc, exc))
| Loc.Exc_located (iloc, exc) ->
let ctx = ParsingResult (iloc, quot.q_contents) in
let exc1 = Error.E (((quot.q_name), pos_tag, ctx, exc))
in raise (Loc.Exc_located (iloc, exc1))