Board index » off-topic » Re: help with customer error parsers

Re: help with customer error parsers


2004-04-01 07:59:45 AM
off-topic1
The following macro shows a regular expression that will do what you want
...
[API Macro:locSearch]
void locSearch( void )
{
SrchTranslate( "^(.*) ([0-9]+): Info (.*)$",
"1=\\1\\n2=\\2\\n3=\\3",
SEARCH_FORWARD | SEARCH_GLOBAL | SEARCH_MAXIMAL | SEARCH_REGEX,
NULL );
}
It translates your string to ...
1=C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c
2=343
3=766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
'phone_summary.c'
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
"chris" < XXXX@XXXXX.COM >wrote in message
Quote


I am trying to setup a custom error parser (Project ->Properties ->
Errors ->Custom Error Parsers.

I want codewright to find the following message:

C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c 343: Info
766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
'phone_summary.c'
Quote

Here is the customer parser I setup:

^([^ \t]+)\ ([0-9]+):\ Info\ (.*)$

But it still skips over the messages above. filename, line# and error
message are groups 1,2 and 3 respectively.

Anybody see what I am doing wrong?

Maybe I am not "activating" the customer error parser, but it looks like
all you need to do is define it and codewright should start using it
immediately.
Quote

Thanks, Chris



 
 

Re:Re: help with customer error parsers

Hi,
This looks a lot like a Lint-Message.
Did you try the PC-Lint error parser that comes with Codewright ?
Stamatis
chris schrieb in Nachricht < XXXX@XXXXX.COM >...
Quote


I am trying to setup a custom error parser (Project ->Properties ->
Errors ->Custom Error Parsers.

I want codewright to find the following message:

C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c 343: Info
766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
'phone_summary.c'
Quote

 

Re:Re: help with customer error parsers

Yes it is indeed pc-lint....
I should have mentioned that I have both the "_PCLint2ErrorInfo" and "_PCLint1ErrorInfo" parsers turned on, but the "next error" features skips over these messages.
Anyway, I'm still don't understand why my customer error parser isn't finding them...
Chris
"St. Zarifakis" < XXXX@XXXXX.COM >wrote:
Quote
Hi,

This looks a lot like a Lint-Message.
Did you try the PC-Lint error parser that comes with Codewright ?

Stamatis


chris schrieb in Nachricht < XXXX@XXXXX.COM >...
>
>
>I am trying to setup a custom error parser (Project ->Properties ->
Errors ->Custom Error Parsers.
>
>I want codewright to find the following message:
>
>C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c 343: Info
766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
'phone_summary.c'
>


 

{smallsort}

Re:Re: help with customer error parsers

thanks for the reply...
I tried your macro and it works as advertised. unfortunately it does not work in the build window, and it doesn't take me to the line in the file. but it does demonstrate a regular expression that should work, which is I believe what you intended.
I put the same exact regular expression into the customer error parser dialog and it still does not work (still skips over these error messages in the build window when I select Search ->Find Next Error).
"Thom Little" < XXXX@XXXXX.COM >wrote:
Quote
The following macro shows a regular expression that will do what you want
...

[API Macro:locSearch]
void locSearch( void )
{
SrchTranslate( "^(.*) ([0-9]+): Info (.*)$",
"1=\\1\\n2=\\2\\n3=\\3",
SEARCH_FORWARD | SEARCH_GLOBAL | SEARCH_MAXIMAL | SEARCH_REGEX,
NULL );
}


It translates your string to ...

1=C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c
2=343
3=766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
'phone_summary.c'


--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--


"chris" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>
>
>I am trying to setup a custom error parser (Project ->Properties ->
Errors ->Custom Error Parsers.
>
>I want codewright to find the following message:
>
>C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c 343: Info
766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
'phone_summary.c'
>
>Here is the customer parser I setup:
>
>^([^ \t]+)\ ([0-9]+):\ Info\ (.*)$
>
>But it still skips over the messages above. filename, line# and error
message are groups 1,2 and 3 respectively.
>
>Anybody see what I am doing wrong?
>
>Maybe I am not "activating" the customer error parser, but it looks like
all you need to do is define it and codewright should start using it
immediately.
>
>Thanks, Chris
>
>
>


 

Re:Re: help with customer error parsers

Maybe the error file name you specified is wrong.
Maybe you erroneously left the quotes around the regular expression.
Maybe the file error file date was not in the format you documented in your
message.
If you run the macro I provided against the error as a simple macro and not
an error extension it should parse each error in the file.
If you use the regular expression from the macro (excluding the quotes) and
set he order of the parameters correctly and then select the error parser as
the only error parser and make sure you use the correct file name then ...
it should work.
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
"chris" < XXXX@XXXXX.COM >wrote in message
Quote


thanks for the reply...

I tried your macro and it works as advertised. unfortunately it does not
work in the build window, and it doesn't take me to the line in the file.
but it does demonstrate a regular expression that should work, which is I
believe what you intended.
Quote

I put the same exact regular expression into the customer error parser
dialog and it still does not work (still skips over these error messages in
the build window when I select Search ->Find Next Error).
Quote


"Thom Little" < XXXX@XXXXX.COM >wrote:
>The following macro shows a regular expression that will do what you want
>...
>
>[API Macro:locSearch]
>void locSearch( void )
>{
>SrchTranslate( "^(.*) ([0-9]+): Info (.*)$",
>"1=\\1\\n2=\\2\\n3=\\3",
>SEARCH_FORWARD | SEARCH_GLOBAL | SEARCH_MAXIMAL | SEARCH_REGEX,
>NULL );
>}
>
>
>It translates your string to ...
>
>1=C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c
>2=343
>3=766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
>'phone_summary.c'
>
>
>--
>-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
>--
>
>
>"chris" < XXXX@XXXXX.COM >wrote in message
>news: XXXX@XXXXX.COM ...
>>
>>
>>I am trying to setup a custom error parser (Project ->Properties ->
>Errors ->Custom Error Parsers.
>>
>>I want codewright to find the following message:
>>
>>C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c 343:
Info
>766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
>'phone_summary.c'
>>
>>Here is the customer parser I setup:
>>
>>^([^ \t]+)\ ([0-9]+):\ Info\ (.*)$
>>
>>But it still skips over the messages above. filename, line# and error
>message are groups 1,2 and 3 respectively.
>>
>>Anybody see what I am doing wrong?
>>
>>Maybe I am not "activating" the customer error parser, but it looks
like
>all you need to do is define it and codewright should start using it
>immediately.
>>
>>Thanks, Chris
>>
>>
>>
>
>

 

Re:Re: help with customer error parsers

... if it doesn't, please e-mail me a copy of the error file you are trying
to parse.
--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
"chris" < XXXX@XXXXX.COM >wrote in message
Quote


thanks for the reply...

I tried your macro and it works as advertised. unfortunately it does not
work in the build window, and it doesn't take me to the line in the file.
but it does demonstrate a regular expression that should work, which is I
believe what you intended.
Quote

I put the same exact regular expression into the customer error parser
dialog and it still does not work (still skips over these error messages in
the build window when I select Search ->Find Next Error).
Quote


"Thom Little" < XXXX@XXXXX.COM >wrote:
>The following macro shows a regular expression that will do what you want
>...
>
>[API Macro:locSearch]
>void locSearch( void )
>{
>SrchTranslate( "^(.*) ([0-9]+): Info (.*)$",
>"1=\\1\\n2=\\2\\n3=\\3",
>SEARCH_FORWARD | SEARCH_GLOBAL | SEARCH_MAXIMAL | SEARCH_REGEX,
>NULL );
>}
>
>
>It translates your string to ...
>
>1=C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c
>2=343
>3=766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
>'phone_summary.c'
>
>
>--
>-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
>--
>
>
>"chris" < XXXX@XXXXX.COM >wrote in message
>news: XXXX@XXXXX.COM ...
>>
>>
>>I am trying to setup a custom error parser (Project ->Properties ->
>Errors ->Custom Error Parsers.
>>
>>I want codewright to find the following message:
>>
>>C:\dx_work\dxme_work\src\ui\screens\follow_wired\phone_summary.c 343:
Info
>766 Header file 'c:\DIAB\4.3b\include\stdlib.h' not used in module
>'phone_summary.c'
>>
>>Here is the customer parser I setup:
>>
>>^([^ \t]+)\ ([0-9]+):\ Info\ (.*)$
>>
>>But it still skips over the messages above. filename, line# and error
>message are groups 1,2 and 3 respectively.
>>
>>Anybody see what I am doing wrong?
>>
>>Maybe I am not "activating" the customer error parser, but it looks
like
>all you need to do is define it and codewright should start using it
>immediately.
>>
>>Thanks, Chris
>>
>>
>>
>
>