"^\\(?:[ \t]+at \\|==[0-9]+== +\\(?:at\\|b\\(y\\)\\)\\).+(\\([^()\n]+\\):\\([0-9]+\\))$" 2 3 nil (1))
(javac
- ,(concat
- ;; line1
- "^\\(\\(?:[A-Za-z]:\\)?[^:\n]+\\):" ;file
- "\\([0-9]+\\): " ;line
- "\\(warning: \\)?.*\n" ;type (optional) and message
- ;; line2: source line containing error
- ".*\n"
- ;; line3: single "^" under error position in line2
- " *\\^$")
+ ,(rx bol
+ (group ; file
+ (? (in "A-Za-z") ":")
+ (+ (not (in "\n:"))))
+ ":"
+ (group (+ (in "0-9"))) ; line number
+ ": "
+ (? (group "warning: ")) ; type (optional)
+ (* nonl) "\n" ; message
+ (* nonl) "\n" ; source line containing error
+ (* " ") "^" ; caret line; ^ marks error
+ eol)
1 2
- ,(lambda () (1- (current-column)))
+ ,#'current-column
(3))
(jikes-file
;; javac
(javac
"/src/Test.java:5: ';' expected\n foo foo\n ^\n"
- 1 15 5 "/src/Test.java" 2)
+ 1 16 5 "/src/Test.java" 2)
(javac
"e:\\src\\Test.java:7: warning: ';' expected\n foo foo\n ^\n"
- 1 10 7 "e:\\src\\Test.java" 1)
+ 1 11 7 "e:\\src\\Test.java" 1)
;; jikes-file jikes-line
(jikes-file
"Found 2 semantic errors compiling \"../javax/swing/BorderFactory.java\":"