We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Original bug ID: 7063 Reporter: kosik Status: closed (set by @diml on 2016-12-07T17:25:06Z) Resolution: suspended Priority: low Severity: minor Version: 4.02.3 Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
In some cases camlp4 reports very odd line-numbers when there is an error.
When I compile the attached file:
ocamlfind c -g -c -syntax camlp4o -package mikmatch_str main.ml
I get the following error:
File "main.ml", line 8, characters 7-8: Parse error: [regexp] expected after "=" (in [str_item]) File "main.ml", line 1: Error: Error while running external preprocessor Command line: camlp4 '-I' '/home/me/.opam/4.02.3/lib/ocaml/camlp4' '-I' '/home/me/.opam/4.02.3/lib/ocaml' '-I' '/home/me/.opam/4.02.3/lib/ocaml' '-I' '/home/me/.opam/4.02.3/lib/mikmatch_str' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'str.cma' 'unix.cma' 'pa_mikmatch_str.cma' 'main.ml' > /tmp/ocamlppca2754
There, camlp4 tells me that something is wrong on line 8, column 7 which is very far from the actual error (line 30, column 54).
In this case, it seems that the reported line number with the error and the line with the actual error can be arbitrarily far.
This can be a source of frustration for programmers.
The attached file is very artificial, but I stumbled upon this with a real program I am working on.
The text was updated successfully, but these errors were encountered:
Comment author: @damiendoligez
Issue moved to: camlp4/camlp4#102
Sorry, something went wrong.
No branches or pull requests
Original bug ID: 7063
Reporter: kosik
Status: closed (set by @diml on 2016-12-07T17:25:06Z)
Resolution: suspended
Priority: low
Severity: minor
Version: 4.02.3
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Bug description
In some cases camlp4 reports very odd line-numbers when there is an error.
Steps to reproduce
When I compile the attached file:
ocamlfind c -g -c -syntax camlp4o -package mikmatch_str main.ml
I get the following error:
File "main.ml", line 8, characters 7-8:
Parse error: [regexp] expected after "=" (in [str_item])
File "main.ml", line 1:
Error: Error while running external preprocessor
Command line: camlp4 '-I' '/home/me/.opam/4.02.3/lib/ocaml/camlp4' '-I' '/home/me/.opam/4.02.3/lib/ocaml' '-I' '/home/me/.opam/4.02.3/lib/ocaml' '-I' '/home/me/.opam/4.02.3/lib/mikmatch_str' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'str.cma' 'unix.cma' 'pa_mikmatch_str.cma' 'main.ml' > /tmp/ocamlppca2754
There, camlp4 tells me that something is wrong on line 8, column 7
which is very far from the actual error (line 30, column 54).
In this case, it seems that the reported line number with the error
and the line with the actual error can be arbitrarily far.
This can be a source of frustration for programmers.
The attached file is very artificial, but I stumbled upon this with a real program I am working on.
File attachments
The text was updated successfully, but these errors were encountered: