Page 1 of 1

Regex expression for MPC C compiler

Posted: Wed Jan 20, 2010 3:09 am
by John DT
The external tool replies with the following text in the Tool Output:

Code: Select all

C:\1LMA-3D9\V_09>MPC.EXE  +l +e +dINHX8M v_main.c 

C:\1LMA-3D9\V_09>type v_main.err 
ERROR   v_main.c 58:9:ILLEGAL OR UNDEFINED ARGUMENT xyz
WARNING V_serial.c 280:17:ARGUMENT OUT OF RANGE HDataPtr (00B5) not between 0000 and 007F

Tool completed successfully
My Regex (posit style) expression is:

Code: Select all

^(ERROR|WARNING) +([A-Za-z0-9_\.]+) +([0-9]+):([0-9]+): 

File = 2 Line = 3 Column = 4
The regex seems to find the text and the four groups seem to function during a replace (F8) as well.

Nevertheless, the double click on the Error line does not result in a jump.
Any ideas? Do I need to restart textpad after changing the Regex ?[/code]

Posted: Wed Jan 20, 2010 7:28 am
by ben_josephs
It works here.

TextPad interprets the Regular expression to match output in the regex style in use at the time it was entered. Did you set Posix syntax after you entered the regex?

Try resetting the regex. (Just copy it and paste it over itself.)

Regex expression for MPC C compiler

Posted: Thu Jan 21, 2010 2:09 am
by John DT
Thank you for your help Ben!

I wasn't successful at first in getting the double click "goto" to work even after several tries. Later I removed the original error from the source files, compiled again, and suddenly the technique started to function correctly.

My guess is that a fully new compilation result was required before the configuration change was not ignored.

With respect to my post in the general forum concerning the error message box upon starting the workspace: I suppose that the error has no effect on the rest of of the editing session.