Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Error Parser Issue(Builder error parser not highlighting errors)
Error Parser Issue [message #1838976] Wed, 10 March 2021 12:34 Go to next message
Eclipse UserFriend
I'm a little embarrassed that I can't solve my issue.
I've been supporting Eclipse for our software group since Juno.

I've looked through old posts for a possible solution. I thought I had found one, the solution was to change a compiler switch to alter the compiler output message format to a single line.

I've looked through the Green Hills v3.5 compiler manual & didn't find a similar switch. :(

So, I'm left with trying to parse a multi-line message.

16:29:59 **** Incremental Build of configuration Default for project rel ****
"W:\\SoftwareDevTools\\_GenUse\\ghs_cfg.bat" && y:/ghs/ppc35/build.exe vb_io_default.bld vb_io3.bld
Compiling C:\SoftwareDev\FirmDev\emc110\OSS\C-2268-xxxx_wip\ccpid_io3.c because "ccpid_io3.o" doesn't exist
"C:\SoftwareDev\FirmDev\emc110\OSS\C-2268-xxxx_wip\ccpid_io3.c", line 93: error:
expected a ";"
const UINT8 ccpStationId[16] = CCPID_IO3; /* Also serves as version ID */
^

I've tried the regex expressions "\"(.*?)\", line (\\d+):" & "(.*?)", line (\d+): , plus many other variants.

Is there relatively painless way to trace the error parser code to determine what it doesn't like.

Thanks in advance taking the time read this post.
Re: Error Parser Issue [message #1838979 is a reply to message #1838976] Wed, 10 March 2021 13:10 Go to previous messageGo to next message
Eclipse UserFriend
It seems that you're using some non-standard command set for directing the compilation.

If you're using another compiler instead of the GNU gcc, you may be out of luck for the original question.

For the error shown, please see the code just before the line
const UINT8 ccpStationId[16] = CCPID_IO3; /* Also serves as version ID */
^

The complaint tells that there is a semicolon missing at the end of previous statement.

In GNU gcc, the switch is -fmessage-length=0.
Re: Error Parser Issue [message #1838998 is a reply to message #1838979] Thu, 11 March 2021 03:00 Go to previous message
Eclipse UserFriend
FWIW: in the editor, \"(.*?)\",\s*line\s(\d+):\s*error:\s*(.+) will match the last two lines.
with $1=file $2=line $3=error

Not sure how the last part stops at a newline.
You may actually need: \"(.*?)\",\s*line\s(\d+):\s*error:\s*(.+?)\n

I think the regex used is from Java.
You may need to precede it with ?s to enable treating multilines as a single line.
https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html#DOTALL
but the one I gave here works in the editor.

You may also have to use double slashes for a single slash but none of the default parsers do.
OTOH, maybe yours failed because of the double slash in line (\\d+):
Also, spaces may be ignored. Use \s instead.

[Updated on: Thu, 11 March 2021 04:16] by Moderator

Previous Topic:Debugger console: GDB bad font rendering
Next Topic:mingw installation
Goto Forum:
  


Current Time: Thu Jul 24 16:56:33 EDT 2025

Powered by FUDForum. Page generated in 0.04482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top