Page 1 of 1
re for dm
Posted: Sun Feb 15, 2009 1:42 pm
by Nicholas Jordan
Code: Select all
zarfDLL.c(103) : Error: invalid simple type name destructor
not proficient at re's - this is a typical for my compiler, need to focus on what I am working on .... will try a regex to capture line number to show some work:
Code: Select all
^[:alnum:]+\.[:alnum:][(]\([:digit:]+\)
That's the best I can do, it does not look like re's given for capturing compiler line number for single click to line from "Tool Output" window.
Posted: Sun Feb 15, 2009 9:06 pm
by ben_josephs
I'm afraid I don't entirely understand your message. Please use simple language and leave out the obscurities.
But are you looking for something like
Regular expression to match output: ^([[:alnum:]]+\.[[:alnum:]])\(([[:digit:]]+)\)
Registers:
File: 1
Line: 2
or
Regular expression to match output: ^([a-z0-9]+\.[ch])\(([0-9]+)\)
Registers:
File: 1
Line: 2
?
Re: re for dm
Posted: Mon Feb 16, 2009 4:27 am
by Evil Bob
Code: Select all
zarfDLL.c(103) : Error: invalid simple type name destructor
It looks like you are trying to capture the code inside the parenthesis. You could use:
Find:::^[^\(]+\(([^)]+)\).+$
Replace:::Error: \1
This would replace the entire line with "Error: 103" using the example, and ignore all parenthesis after the first set.
Posted: Wed Feb 18, 2009 6:10 am
by Nicholas Jordan
ben_josephs wrote:I'm afraid I don't entirely understand your message. Please use simple language and leave out the obscurities.
sorry, seemed pretty simple to me - re for jump to line on compiler diagnostic - first code block is a line I took as "typical"
What are the
Registers:
File: 1
Line: 2
? ... I have no idea what this is for nor where applies.
My apologies, no intent to be obscure.
Re: re for dm
Posted: Wed Feb 18, 2009 6:11 am
by Nicholas Jordan
Evil Bob wrote:It looks like you are trying to capture the code inside the parenthesis.
Yes, but I have no idea how these compiler jumps work so I was guessing....
Not a good idea to do that.
Posted: Wed Feb 18, 2009 1:26 pm
by ben_josephs
In
Configure | Preferences | Tools | <Your tool>
set something similar to
Regular expression to match output: ^([a-z0-9]+\.[ch])\(([0-9]+)\)
Registers:
File: 1
Line: 2
The regex contains two sets of capturing parentheses. They are numbered from the left, starting at 1, by the positions of the opening parentheses. The "register" numbered
n holds the text that was matched by the
nth parenthesised regular subexpression.
Code: Select all
1 2
| |
V V
^([a-z0-9]+\.[ch])\(([0-9]+)\)
In Posix syntax, capturing parentheses are unescaped and literal parentheses are escaped. (In the default syntax it's the other way around.)
much clearer
Posted: Thu Feb 19, 2009 12:52 pm
by Nicholas Jordan
Okay, I think I grasp what is going on. Attempted a rewrite which I will try both this and what you posted. The first capture is any allowable filename under win, but the compiler only recognize dot c and dot cpp ( or h && hxx ) so the approach I took was first group is anything not opening paren in compiler std out, then try to get past that paren and capture line number in second grouping.
Code: Select all
^\([^(]+\)\(?(\)\([0-9]+\)
^ ^ ^ ^
| | | | second grouping, for line number
| | | close "there but do not capture"
| | there but do not capture
| one or more not paren
I will try this and what you posted.
My apologies again, let me know if this is clearer post. I had just lost the machine totally and was coming back up, trying to continue working during system recovery.
Posted: Thu Feb 19, 2009 2:04 pm
by ben_josephs
Here's a corrected version of your regex:
^([^(]+)\(([0-9]+)\)
It assumes Posix regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
partial result
Posted: Wed Feb 25, 2009 9:34 pm
by Nicholas Jordan
Okay, I have tried:
Code: Select all
* ^[^0-9]+(\([0-9]+\)
* ^([a-z0-9]+\.[c])\(([0-9]+)\)
* ^([a-z0-9]+\.[ch])(\([0-9]+\))
* Here's a corrected version of your regex:
* ^([^(]+)\(([0-9]+)\)
Those are directly from using the comments field in the source file as a fast short buffer. I have tried all of the above and am getting some jumps, about 20% or so it goes to the line number - I am considering trying to turn off trasparent dialog boxes in xp as clearly that calls into 16-bit non-renetrant code as does the tool output window, I am getting some builds and better jumps would be adjunct to coding effectiveness.
Posted: Thu Feb 26, 2009 9:38 am
by ben_josephs
What are the messages from your compiler that you are having trouble with?
I'm afraid I'm unclear what transparent dialogue boxes and 16-bit non-re-entrant code have to do with this problem, and I don't know what an adjunct to coding effectiveness is.
posted
Posted: Sat Feb 28, 2009 7:41 pm
by Nicholas Jordan
Code: Select all
zarfDLL.c(103) : Error: invalid simple type name destructor
is exactly the syntax I am trying to captue. Filename(line number) - enable hyper-jumps, in this example on line 103 of file zarfDLL.c an error is being reported "invalid simple type name destructor"
As for the other two matters, the name of this tool I am building "zarf" is a coffee holder for coffee that is too hot to handle so though it seems simple to me please disreguard the other two comments by me.
Posted: Sat Feb 28, 2009 8:22 pm
by ben_josephs
That is the same style as before, and that is what my suggestions were designed for. They both work.
thanks
Posted: Sun Mar 01, 2009 3:20 pm
by Nicholas Jordan
Okay, I'm underway. Must be the double-click response - maybe there's a shortcut key .... Okay, it's f-4, issue retired.