Author Topic: ErrorParsing and Slickedit RE documentation error?  (Read 2336 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
ErrorParsing and Slickedit RE documentation error?
« on: July 29, 2016, 07:57:24 PM »
I was trying to make an error parser, but I can't get it to work.
The parse pattern I'm using:
{#0:p}\:{#1:i}\:{#2:i}\: error{#3?*}$

In any case, ":f" seems to exclude spaces in filenames, but these errors have filenames with spaces - so somethings gotta change here.

A sample error message, in the EditExpression window, "Validate" matches it, but when this error appears in the error log, it is not matched.

In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef:11:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xtr1common:213:22: error: use of undeclared identifier 'char16_t'
        struct _Is_integral<char16_t>





The documentation for SlickRE pattern ":p" doesn't seem to be right.
As documented:
:p (([A-Za-z0-9]\:|\\\\|)(\\|/|)(:f(?:\\|/))@:f) - Windows: Matches a path.

But, when I use that as an expression, it doesn't find anything.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: ErrorParsing and Slickedit RE documentation error?
« Reply #1 on: July 30, 2016, 01:37:31 PM »
:f doesn't support spaces because in practice it makes it pretty useless.

The work around is to use :q or make other tweaks to your RE

Docs have an error. Good catch. Looks like some Perl syntax got mixed in there. Remove the "?:" and then it's correct.

Without added your new error parsing expression, I just created a file with the error text you described and typed the following in the build window:

type error.txt

When I do a next error, first it brings up xstddef on line 11. The next next-error brings up xtr1common on line 213. I guess I don't understand why you tried to add something for this.

Try putting your error RE at the top in the list. Order is extremely important since other regular expressions can match before your's does.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: ErrorParsing and Slickedit RE documentation error?
« Reply #2 on: July 30, 2016, 10:14:19 PM »
Hm... I have disabled some of the standard error parsers because it tends to get false hits on a datestamp line that appears in my builds a lot.


It would be nice if there was a way to find out *which* error parser matched.
Using the Error RE dialog to figure it out is pretty tedious.