hello Paul,

please look at my answer below to someones jikes-parsing problem.
Maybe it would be useful if JDE contains a test similar the one i wrote
below to check if the variable 'compilation-error-regexp-alist'
is set correct for jikes and javac (This test could be done easily
with two example error-message of both compilers).
If the value is incorrect JDE could automatically add the needed regexp.

What do you think?

Klaus

>When an error occurs, javac produces messages in a format like
>   Test.java:5: cannot resolve symbol
>while the output of jikes is like
>   Test.java:5:5:5:7: Error: Type Bla was not found.

>The problem are the numbers following the line number: After executing
>next-error a second time, emacs is asking:
>   Find this error in: (default 5) ~/tmp/

For me compiling with jikes and the option +E works. I´m using Emacs >= 20.5 onto
Windows NT and Solaris 2.6 and JDE 2.2.6.2.

Maybe your variable 'compilation-error-regexp-alist' is set incorrect. You can check it
with this little test i hacked quickly:

(defun jikes-test ()
  (interactive)
  (let ((tmp-list compilation-error-regexp-alist)
        ;; the following is a sample error-output from jikes +E
        (str "AdapterAdministration.java:27:25:27:29: Error: Type 
de/hvb/ha/adapter/Strin was not found")
        (counter 0)
        elem found)
    (while (and tmp-list (not found))
      (setq counter (1+ counter))
      (setq elem (car tmp-list))
      (setq tmp-list (cdr tmp-list))
      (when (string-match (car elem) str)
        (message "%d. Regexp of compilation-error-regexp-alist matched, File: %s, 
Line: %s"
                 counter
                 (match-string (nth 1 elem) str)
                 (match-string (nth 2 elem) str))
        (setq found t)))
    (if (not found)
        (message "Not found"))))

Hust put this into your .emacs file and reload it, then call jikes-test.
If your compilation-error-regexp-alist is set correct the following message should 
appear:
"1. Regexp of compilation-error-regexp-alist matched, File: 
AdapterAdministration.java, Line: 27"
(Maybe the number of the matching regexp can be different).

If the message "Not found" appears, your velaue is incorrect.

Here is the value of compilation-error-regexp-alist i use (it´s the default one of 
Emacs
>= 20.5!):

(("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)?\\([a-zA-Z]?:?[^:(  \n]*[^:(        \n0-9][^:(     
 \n]*\\)[:(][    ]*\\([0-9]+\\)\\([)     ]\\|:\\(\\([0-9]+:\\)\\|[0-9]*[^:0-9]\\)\\)" 
2 3 6)
 ("\\(\\([a-zA-Z]:\\)?[^:(      \n]+\\)(\\([0-9]+\\)) : \\(error\\|warning\\) 
C[0-9]+:" 1 3)
 ("\\(Error\\|Warning\\) \\(\\([FEW][0-9]+\\) \\)?\\([a-zA-Z]?:?[^:(    \n]+\\) 
\\([0-9]+\\)\\([)       ]\\|:[^0-9\n]\\)" 4 5)
 (".*[  :]\\([a-zA-Z]?:?[^:(    \n]+\\)[:(](+[  ]*\\([0-9]+\\))[:)      ]*$" 1 2)
 (".*([         ]*\\([a-zA-Z]?:?[^:(    \n]+\\)[:(][    ]*\\([0-9]+\\))" 1 2)
 ("[^\n ]+ (\\([0-9]+\\)) in \\([^ \n]+\\)" 2 1)
 (".*in \\([^(\n]+\\)(\\([0-9]+\\))$" 1 2)
 ("\\(cfe\\|fort\\): [^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3)
 ("\\(.* on \\)?[Ll]ine[        ]+\\([0-9]+\\)[         ]+of[   
]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2)
 (".*\"\\([^,\" \n      ]+\\)\", lines? \\([0-9]+\\)\\([(.]\\([0-9]+\\))?\\)?[:., (-]" 
1 2 4)
 ("^File \"\\([^,\" \n  ]+\\)\", lines? \\([0-9]+\\)[-0-9]*, characters? \\([0-9]+\\)" 
1 2 3)
 ("[a-z0-9/]+: \\([eE]rror\\|[wW]arning\\): \\([^,\" \n ]+\\)[,:] \\(line 
\\)?\\([0-9]+\\):" 2 4)
 (".*in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1)
 (" +\\([0-9]+\\) +.*\n[ew] [0-9]+-+" nil 1)
 ("[Ew] +[0-9]+ line \\([0-9]+\\) -  " nil 1)
 ("[EW], \\([^(\n]*\\)(\\([0-9]+\\),[   ]*\\([0-9]+\\)" 1 2 3)
 ("\\(cc\\| cft\\)-[0-9]+ c\\(c\\|f77\\): ERROR \\([^,\n]+, \\)* File = \\([^,\n]+\\), 
Line = \\([0-9]+\\)" 4 5)
 ("\\([^( \n    ]+\\)(\\([0-9]+\\):\\([0-9]+\\)) : " 1 2 3)
 ("\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(Error\\|Warning\\)\\[[0-9]+\\]:" 1 2)
 ("\\([^, \n    ]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., (-]" 1 2 3)
 (".* at \\([^ ]+\\) line \\([0-9]+\\)," 1 2)
 ("Semantic error at line \\([0-9]+\\), column \\([0-9]+\\), file \\(.*\\):" 3 1 2)
 ("Error [0-9]+ at (\\([0-9]*\\):\\([^)\n]+\\))" 2 1)
 (".* ERROR [a-zA-Z0-9 ]+, File = \\(.+\\), Line = \\([0-9]+\\), Column = 
\\([0-9]+\\)" 1 2 3))

Hope this helps,
Klaus

Reply via email to