all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
Subject: Re: Tailor an own compilation-error-regexp-alist.
Date: Fri, 19 Jan 2007 00:10:51 -0700	[thread overview]
Message-ID: <eopqth$f2n$1@sea.gmane.org> (raw)
In-Reply-To: <1168520326.589689.20540@i39g2000hsf.googlegroups.com>

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

      parent reply	other threads:[~2007-01-19  7:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='eopqth$f2n$1@sea.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.