* Tailor an own compilation-error-regexp-alist.
@ 2007-01-11 9:00 william.a.george
2007-01-11 12:58 ` william.a.george
0 siblings, 1 reply; 5+ messages in thread
From: william.a.george @ 2007-01-11 9:00 UTC (permalink / raw)
Hi.
I'm having a problem with parsing the errors from my compiler in emacs.
This is an example of the error message from the compiler:
401: rec_p = ReceiveMsg();
E 42: syntax error, expecting statement
Can anyone help me to write an own "compilation-error-regexp-alist"?
Or maybe describe how it should be done?
Thanks in advance.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tailor an own compilation-error-regexp-alist.
2007-01-11 9:00 Tailor an own compilation-error-regexp-alist william.a.george
@ 2007-01-11 12:58 ` william.a.george
2007-01-16 14:47 ` william.a.george
2007-01-19 7:10 ` Kevin Rodgers
0 siblings, 2 replies; 5+ messages in thread
From: william.a.george @ 2007-01-11 12:58 UTC (permalink / raw)
More information about my problem.
The compiler is C166/ST10.
The error messages begins with the file name, and then a list of errors
and warnings in that file, then the next file name, followed by more
errors and warnings according the the example above.
I can give a new example for clarification:
function.c:
4390: }
W 183: variable 'varx possibly uninitialized
W 183: variable 'vary' possibly uninitialized
log_master.c:
401: re_p = RecMsg();
E 42: syntax error, expecting statement
769: U8 loop; /* Loop counter */
E 42: syntax error, expecting declaration
I think that once I get som help for the compiler, I can do the same
steps for the assembler and linker.
I hope that this can give more information to be able to help.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tailor an own compilation-error-regexp-alist.
2007-01-11 12:58 ` william.a.george
@ 2007-01-16 14:47 ` william.a.george
2007-01-16 15:50 ` Lennart Borgman (gmail)
2007-01-19 7:10 ` Kevin Rodgers
1 sibling, 1 reply; 5+ messages in thread
From: william.a.george @ 2007-01-16 14:47 UTC (permalink / raw)
Any help please :(
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tailor an own compilation-error-regexp-alist.
2007-01-16 14:47 ` william.a.george
@ 2007-01-16 15:50 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2007-01-16 15:50 UTC (permalink / raw)
Cc: help-gnu-emacs
william.a.george@gmail.com wrote:
> Any help please :(
I guess you are using Emacs 22 (not yet released but very stable, in
late beta test)? Then look at the variables
compilation-error-regexp-alist-alist
compilation-error-regexp-alist
I am not familiar with this part of Emacs but it looks like this could
help you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Tailor an own compilation-error-regexp-alist.
2007-01-11 12:58 ` william.a.george
2007-01-16 14:47 ` william.a.george
@ 2007-01-19 7:10 ` Kevin Rodgers
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2007-01-19 7:10 UTC (permalink / raw)
william.a.george@gmail.com wrote:
> More information about my problem.
> The compiler is C166/ST10.
>
> The error messages begins with the file name, and then a list of errors
> and warnings in that file, then the next file name, followed by more
> errors and warnings according the the example above.
> I can give a new example for clarification:
>
> function.c:
> 4390: }
> W 183: variable 'varx possibly uninitialized
> W 183: variable 'vary' possibly uninitialized
>
> log_master.c:
> 401: re_p = RecMsg();
> E 42: syntax error, expecting statement
> 769: U8 loop; /* Loop counter */
> E 42: syntax error, expecting declaration
>
> I think that once I get som help for the compiler, I can do the same
> steps for the assembler and linker.
> I hope that this can give more information to be able to help.
Here's what I came up with:
(add-to-list 'compilation-error-regexp-alist-alist
'(tasking . ("^\\([^: \n]+\\):\n +\\([0-9]+\\):.*\\(\n[EW]
+[0-9]+:.*\\)+" ; REGEXP
1 ; FILE
2 ; LINE
)))
(add-to-list 'compilation-error-regexp-alist 'tasking)
According to compilation-error-regexp-alist's doc string, the FILE index
can reference a subexpression that doesn't match, in which case the
previously matched file name is used. So it should be possible to match
each erroneous source line number, by making the file name line
optional. But wrapping "\\([^: \n]+\\):\n" in "\\(...\\)?" and
incrementing FILE and LINE to 2 and 3 resp. yields an error (instead of
matching log_master.c line 769 as a distinct error from line 401):
font-lock-fontify-keywords-region: No match 2 in highlight (2
compilation-error-face)
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-19 7:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-11 9:00 Tailor an own compilation-error-regexp-alist william.a.george
2007-01-11 12:58 ` william.a.george
2007-01-16 14:47 ` william.a.george
2007-01-16 15:50 ` Lennart Borgman (gmail)
2007-01-19 7:10 ` Kevin Rodgers
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.