Home Download Buy Blog Forum Support

problem with line_regex

problem with line_regex

Postby demonguy on Mon Aug 04, 2014 11:26 am

I'm using a compiler whose error message turns out to be
"*** ERROR C202 IN LINE 29 OF E:\WORKFILES\MCU\SOURCES\PWM\MAIN.C: 'a': undefined identifier"
it's line number shows before the file path, so i have to use line_regex like this:

"file_regex": "OF (.+):.+",
"line_regex": "LINE ([0-9]+) OF",

the problem is that , it won't jump to the correct line of the error.
how could i fix it?
demonguy
 
Posts: 3
Joined: Mon Aug 04, 2014 11:19 am

Re: problem with line_regex

Postby demonguy on Tue Aug 05, 2014 2:36 pm

no one knows? Did i misunderstand the usage of line_regex?
demonguy
 
Posts: 3
Joined: Mon Aug 04, 2014 11:19 am

Re: problem with line_regex

Postby estmatic on Tue Aug 05, 2014 4:55 pm

I'm not sure that what you need is possible. I think that "line_regex" is used when the filename and line number on the build output are on separate lines, so it will match the line_regex and then start going backwards to find the filename using file_regex.

If the filename and line number are on the same line then you're only supposed to use file_regex and use the match groups to parse out the info. The problem is that Sublime seems to expect that the filename is always before the line number. Group 0 is the filename, 1 is the line number, 2 is the column, and 3 is the error message. There doesn't seem to be a way of telling Sublime to use a different order though.

A Google search brought up some older posts with people having this very issue... no solution that I could find unfortunately.
estmatic
 
Posts: 13
Joined: Tue Nov 06, 2012 6:34 pm

Re: problem with line_regex

Postby demonguy on Tue Aug 05, 2014 7:43 pm

I see, i will seek further solution, anyway, thanks for your help
demonguy
 
Posts: 3
Joined: Mon Aug 04, 2014 11:19 am


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 22 guests