Hello,
I have the following rule:
Pcaml.expr: LEVEL "expr1" [
[
|"|" ; t = STRING ; "|" -> expand_full_term loc t true
that allows me to process stuff like:
let fxy = | "f(X,Y)." | in
However when I parse "f(X,Y).", an error may also occur. I would like to
indicate where within this string an error occurs. Unfortunately I have
the following problem:
let fxy = | "f(X,Y,)." | in
^ ^
1 2
camlp4 only keeps the location of (1). It then takes the string from (2)
and gives me that for processing, however the loc is *not* updated to
(2). I can therefore not use the parsing error position within the
string as an offset.
It also seems that the same happens for the LIST0/1 constructs. How can
I figure out how many white spaces exist between (1) and (2)? If this is
not possible is there any other way around this?
TIA,
Hugo Ferreira.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html
-~----------~----~----~----~------~----~------~--~---