Home Download Buy Blog Forum Support

file_regex parse error

Re: file_regex parse error

Postby facelessuser on Mon Jan 16, 2012 6:20 pm

Try something more like this:

Code: Select all
(Compile Error:[\\w\\W]+)((?<=\\[).*?(?=\\;))\\;([0-9]+)\\;([0-9]+)


Code: Select all
Group 1 = (Compile Error:[\\w\\W]+)
Group 2 = ((?<=\\[).*?(?=\\;))
Group 3 = ([0-9]+)
Group 4 = ([0-9]+)


Edit: Don't forget to escape stuff; I didn't in my example here.
Edit2: Added escapes
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: file_regex parse error

Postby shagwana on Mon Jan 16, 2012 7:48 pm

Tried it and it does not work

As I understand these groups they are;

Group 1 needs to be the file name of the file with the error
Group 2 needs to be the line number
Group 3 needs to be the char on that line
Group 4 needs to be the error message

Swapping them around does not work, as a matter of fact it causes the already working group 1 to 3 to not work any more. :mrgreen:
shagwana
 
Posts: 17
Joined: Mon Jul 11, 2011 8:37 pm

Re: file_regex parse error

Postby facelessuser on Mon Jan 16, 2012 8:34 pm

Here I simplified the regex and fixed some issues related to brackets:
Code: Select all
(Compile Error:[\\w\\W]+)(?:\\n|\\r\\n)\\[(.*?)\\;([0-9]+)\\;([0-9]+)\\]


This is what it targeted:
test.jpg
test.jpg (39.05 KiB) Viewed 1085 times


This is my replacement output
Code: Select all
group1: Compile Error: Missing type specifier
group2: C:/Users/user account/My Projects/Sandbox/Sublime Text 2 blitzmax plugin/Example bmx Source/CompileTest/TestProg2.bmx
group3: 3
group4: 16
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: file_regex parse error

Postby hibbelig on Mon Jan 16, 2012 8:56 pm

I think you'll be out of luck with this error message. I think it's a shortcoming of the build system.

The build system expects you to provide a regex that matches the file name, line number, column number, and error message, in that order. But your compiler emits the error message first.

IWBNI either named groups (parentheses) were used (does this feature exist?) or the build system spec allowed you to specify which group matches the file name and so on. Since you have a real need for this, you might be successful if you submit a feature request at http://sublimetext.userecho.com/.
hibbelig
 
Posts: 77
Joined: Wed Dec 21, 2011 11:24 pm

Re: file_regex parse error

Postby facelessuser on Mon Jan 16, 2012 9:10 pm

hibbelig wrote:I think you'll be out of luck with this error message. I think it's a shortcoming of the build system.

The build system expects you to provide a regex that matches the file name, line number, column number, and error message, in that order. But your compiler emits the error message first.

IWBNI either named groups (parentheses) were used (does this feature exist?) or the build system spec allowed you to specify which group matches the file name and so on. Since you have a real need for this, you might be successful if you submit a feature request at http://sublimetext.userecho.com/.


Ahh. The missing puzzle piece. From looking at his regex, I assumed he was having a regex issue. But it appears that even with regex that can match what he wants, he is still out of luck. Thanks for the info; I haven't really used the this particular feature much.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: file_regex parse error

Postby shagwana on Mon Jan 16, 2012 9:27 pm

Aha, so that be the issue.

I guess a seperate 'file_regex', 'line_regex', 'column_regex' and 'error_regex' would do it as well.
shagwana
 
Posts: 17
Joined: Mon Jul 11, 2011 8:37 pm

Previous

Return to Plugin Development

Who is online

Users browsing this forum: svenax and 5 guests