On Thu, Apr 05, 2007 at 05:29:58PM +0100, Christophe Dupre wrote: > Hello, > > I'm trying to write a compiler plug-in for a compiler (it's a compiler > use for PIC microcontrollers) and I'm hafing difficulties defining the > error format. > > Here is a typical compiler output: > >>> Warning 208 > "C:\Project\1816-CooperDataInterrogator\CircularBuffer.c" Line 60(6,15): > Function not void and does not return a value PutRecord > *** Error 165 "C:\Project\1816-CooperDataInterrogator\test.c" Line > 7(10,11): No overload function matches > > And it's made of: > Error No - Filename - line No(Column Start,Column End) - Message. > > I've defined the error format the following way: > CompilerSet errorformat=%*[^0-9]%n\ %f\ %l%v%p%m > > After setting the compiler and running make, the first error is > recognised but the line and column number aren't. > How can I model line No(Column Start,Column End), e.g.: "Line 60(6,15): > ", and "Line 7(10,11): "
CompilerSet errorformat=%f\ Line\ %l(%c%m, \\*\*\*\ Error\ %*[0-9]\ %f This works for both: "C:\Project\1816-CooperDataInterrogator\CircularBuffer.c" Line 60(6,15): *** Error 165 "C:\Project\1816-CooperDataInterrogator\test.c" Line You can use a mapping such like this map <F2> :w <bar> compiler! test <bar> cf error<cr> and an error file error to speed up fixing your errorformat. HTH Marc Weber