Hello...
I have some strange compiler but want to have option for geany to highlight the line with error. But I have no idea how to setup 'error regular expression' to manage that. In the output of compiler there are line describing error in format: path/file space lineNumber error message. for example:
/home/slavko/PLC/plc.asm 94 nepoznan ukaz >MMOV
thet means the file '/home/slavko/PLC/plc.asm' has error in line 94 and 'nepoznan ukaz >MMOV' describe error.
So what expression i need tor that?
thanks in advice... Slavko.
On 14-05-10 07:59 AM, Slavko Kocjancic wrote:
Hello...
I have some strange compiler but want to have option for geany to highlight the line with error. But I have no idea how to setup 'error regular expression' to manage that. In the output of compiler there are line describing error in format: path/file space lineNumber error message. for example:
/home/slavko/PLC/plc.asm 94 nepoznan ukaz >MMOV
thet means the file '/home/slavko/PLC/plc.asm' has error in line 94 and 'nepoznan ukaz >MMOV' describe error.
So what expression i need tor that?
I don't know about the "error regular expression" groups and such but in regular PCRE, this might do it:
^(?<file>.+?) (?<line>[0-9]+) (?<msg>.+?)$
Cheers, Matthew Brush
On Sat, 10 May 2014 16:59:40 +0200 Slavko Kocjancic eslavko@gmail.com wrote:
I have some strange compiler but want to have option for geany to highlight the line with error. But I have no idea how to setup 'error regular expression' to manage that. In the output of compiler there are line describing error in format: path/file space lineNumber error message. for example:
/home/slavko/PLC/plc.asm 94 nepoznan ukaz >MMOV
thet means the file '/home/slavko/PLC/plc.asm' has error in line 94 and 'nepoznan ukaz >MMOV' describe error.
So what expression i need tor that?
"(.+) ([0-9]+) " without the quotes. Search the documentation for error_regex.
On 05/10/2014 09:13 PM, Dimitar Zhekov wrote:
On Sat, 10 May 2014 16:59:40 +0200 Slavko Kocjancic eslavko@gmail.com wrote:
I have some strange compiler but want to have option for geany to highlight the line with error. But I have no idea how to setup 'error regular expression' to manage that. In the output of compiler there are line describing error in format: path/file space lineNumber error message. for example:
/home/slavko/PLC/plc.asm 94 nepoznan ukaz >MMOV
thet means the file '/home/slavko/PLC/plc.asm' has error in line 94 and 'nepoznan ukaz >MMOV' describe error.
So what expression i need tor that?
"(.+) ([0-9]+) " without the quotes. Search the documentation for error_regex.
I searched the documentation but there is only few lines on that subject. And from that i'm unable to solve the problem. The "(.+) ([0-9]+) " works but has some problems. The near all output of compiler like "compiling_pass 1" are accepted as errors. I try to modifi the expression to be more precise like "(.+) ([0-9]+) (nepoznan)" and it works. But there are a lot of messages so I try with "(.+) ([0-9]+) (nepoznan|izven|podan)" and it works but there are tens of messages so it's not practical to use that. On the other hands I figured that symbol
is after message. But I can't find solution how to make to work with
that. "(.+) ([0-9]+) (>)" doesn't work. I think I need to somehow filter out string betwen error line number and >. Any help?
On Sun, 11 May 2014 08:51:46 +0200 Slavko Kocjancic eslavko@gmail.com wrote:
I have some strange compiler but want to have option for geany to highlight the line with error. But I have no idea how to setup 'error regular expression' to manage that. In the output of compiler there are line describing error in format: path/file space lineNumber error message. for example:
/home/slavko/PLC/plc.asm 94 nepoznan ukaz >MMOV
thet means the file '/home/slavko/PLC/plc.asm' has error in line 94 and 'nepoznan ukaz >MMOV' describe error.
So what expression i need tor that?
"(.+) ([0-9]+) " without the quotes. Search the documentation for error_regex.
I searched the documentation but there is only few lines on that subject. And from that i'm unable to solve the problem. The "(.+) ([0-9]+) " works but has some problems. The near all output of compiler like "compiling_pass 1" are accepted as errors. [...]
is after message. But I can't find solution how to make to work with
that. "(.+) ([0-9]+) (>)" doesn't work. I think I need to somehow filter out string betwen error line number and >. Any help?
"(.+) ([0-9]+) .*>"
See tee manual page of grep, section "REGULAR EXPRESSIONS", or Google for "regular expressions".
Geany uses (an equivalent to) extended regular expressions.
On 05/11/2014 07:35 PM, Dimitar Zhekov wrote:
On Sun, 11 May 2014 08:51:46 +0200 Slavko Kocjancic eslavko@gmail.com wrote:
I have some strange compiler but want to have option for geany to highlight the line with error. But I have no idea how to setup 'error regular expression' to manage that. In the output of compiler there are line describing error in format: path/file space lineNumber error message. for example:
/home/slavko/PLC/plc.asm 94 nepoznan ukaz >MMOV
thet means the file '/home/slavko/PLC/plc.asm' has error in line 94 and 'nepoznan ukaz >MMOV' describe error.
So what expression i need tor that?
"(.+) ([0-9]+) " without the quotes. Search the documentation for error_regex.
I searched the documentation but there is only few lines on that subject. And from that i'm unable to solve the problem. The "(.+) ([0-9]+) " works but has some problems. The near all output of compiler like "compiling_pass 1" are accepted as errors. [...]
is after message. But I can't find solution how to make to work with
that. "(.+) ([0-9]+) (>)" doesn't work. I think I need to somehow filter out string betwen error line number and >. Any help?
"(.+) ([0-9]+) .*>"
See tee manual page of grep, section "REGULAR EXPRESSIONS", or Google for "regular expressions".
Geany uses (an equivalent to) extended regular expressions.
Thanks that works... I didn't realiye that grep has same expression...
Slavko.