help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tailor an own compilation-error-regexp-alist.


From: Kevin Rodgers
Subject: Re: Tailor an own compilation-error-regexp-alist.
Date: Fri, 19 Jan 2007 00:10:51 -0700
User-agent: Thunderbird 1.5.0.9 (Macintosh/20061207)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]