From: Stefano C. [mailto:[email protected]]
Sent: Monday, March 03, 2008 10:42 AM
The question is: why error messages of interpreter has inconsistent
And so on. I can’t invent one regexp for my output-capturing text
of
- nothing, because of there’s no last “:” in the string with “^ from”.
your editor works exactly. If it has support for regexp groups, you can use
the following regexp:
/^(?:.:\d+:in\s+`require’:\s+)?(.)(?=:\d+:)/
The name of the file is in the first group (this works also for the first
case)
OK, but this regexp works for the second case ONLY (unfortunately, I
have
only one “output pattern” setting, so, I am trying to invent the
universal
one).
Regarding the last case, I think (but I may be wrong) that the third and
last
one are a single message, split in two lines for some reason. You should
try
to understand why this happens and act consequently. If you post the full
error messages, maybe with a piece of code which generates them, I can try
to
help you more.
Yes, it is like call stack: first line has something like case1-case3,
other
lines has something like case4.
For ex:
D:/!work/home/!stuff/ruby-tricks/test.rb:1:in `require’: ./tricks.rb:31:
syntax error, unexpected ‘]’, expecting $end (SyntaxError)
p 1,2,3].inject(0){|sum, n| sum + n}
^ from D:/!work/home/!stuff/ruby-tricks/test.rb:1
And I’d be happy to browse all call-stack by clicking on output strings
in
“Script Output” window of my editor.
Most of compilers have “parsing-friendly” output, having the same
“file:line: error” strings on each line.
Faithfully, I have a proposition to core team for thinking about it.
V.