On Wed, 29 Nov 2006, Eggum, DavidX S wrote:
> Hugh,
>
> Vim will use the first matching pattern in your efm, so put the more
> specific patterns at the beginning, the more general patterns at the
> end. So try putting the new lines at the front of the efm:
OK, so how does that interact with multiline patterns? Is it something
like (pseudocode):
foreach line in input do
foreach efm_item in errorformat do
if efm_item matches line then
if efm_item begins %E then
multiline = true
elseif efm_item begins %Z then
multiline = true
fi
if efm_item begins %C then
next unless multiline
fi
return efm_line.match(line)
fi
end
end
Because I was thinking that once the %E was matched then %C and %Z
lines would have priority.
I might add that I was also puzzled about the multiline items
having to be separated by commas, i.e. not being able to have a
single multiline %E...%C...%C...%Z..., expression with no commas
in it. But if the above model is used then that makes more sense.
I'll give this a try.
>
> \%E%f:%l:\ multiple\ definitions\ of\ %m,
> \%Z%*\\s:%f:%l:\ first\ defined\ here,
> \\"%f\"%*\\D%l:\ %m,
> \%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\
> only\ once,
> \%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
> \%f:%l:\ %m,
> \\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
> \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
>
> David
>
Thank you