Permalink
Browse files

[fix] utils/emacs-mode: fixed the compiler-error line parsing

  • Loading branch information...
1 parent 92a3160 commit bcc18a65ac20815c65ba15183f84d3a64c6847e6 Louis Gesbert committed Jul 8, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 utils/emacs/opa-mode.el
View
12 utils/emacs/opa-mode.el
@@ -563,11 +563,13 @@
(make-local-variable 'compilation-error-alist)
(setq compilation-error-regexp-alist
'(
- ;this first regexp corresponds to the deprecated syntax, should be removed
- ("[Ii]n \"?\\([^ \"]*?\\)\"? \\[\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\):\\([0-9]+\\) [^]]*\\]" 1 (2 . 4) (3 . 5) 1)
- ;this one corrsponds to FilePos.to_string
- ;it presents the advantage that it does also match Ocaml errors and back-traces
- ("[Ff]ile \"?\\([^ \"]*?\\)\"?, line \\([0-9]+\\), characters \\([0-9]+\\)-\\([0-9]+\\)" 1 2 (3 . 4) 1)
+ ;the format of syntax errors (to be unified)
+ ("In \\(.+\\) \\[\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\):\\([0-9]+\\) | global chars=[0-9]+-[0-9]+\\]" 1 (2 . 4) (3 . 5) 1)
+
+ ;this fallback one presents the advantage that it does also match Ocaml errors and back-traces
+ ("[Ff]ile \\\"?\\([^ \\\"]*?\\)\\\"?, line \\([0-9]+\\), characters \\([0-9]+\\)-\\([0-9]+\\)" 1 2 (3 . 4) 1)
+ ;corresponds to FilePos.to_string
+ ("[Ff]ile \\\"?\\([^ \\\"]*?\\)\\\"?, line [0-9]+, characters [0-9]+-[0-9]+, (\\([0-9]+\\):\\([0-9]+\\)-\\([0-9]+\\):\\([0-9]+\\) | [0-9]+-[0-9]+)" 1 (2 . 4) (3 . 5) 1)
)
)
(set (make-local-variable 'compilation-first-column) 1)

0 comments on commit bcc18a6

Please sign in to comment.