SlickEdit Product Discussion > SlickEdit®

Formatting Build Output so that Slickedit would support it

(1/2) > >>

heedless:
Hello.

At the company where I work, we use custom build tools.
I would like to write a script that would parse our build tool's output, and format it so that Visual Slickedit could read it.

The point is, to get Visual Slickedit to show the error on it's "Build" window, and to be able to jump to the relevant line of code on double clicking of the window.

What output format does Vslick Accept so that I would get the above functionality?
(i.e. what can it parse as the build tool's output?)

Wanderer:
Go to Build->Configure Error Parsing...
You can add a new set of regular expressions that SlickEdit will use to parse your error output.  See the SlickEdit help for a description of what tokens are used for filename, line number, etc.

heedless:
I forgot to mention: We use vslick v9.

That option is not available there...

Lee:
Try modelling your output after gcc, which is one the standard defaults for error processing in SlickEdit:

Example:
c:/Projects/ucpp/cpp.cpp:47: error: expected `;' before "char"

Or, if you are good at crafting regular expressions, you can append a regular expression of your output syntax to def_error_re2 macro variable (using Macro> Set Macro Variable... or set-var on the command line. Here's an example:

Error message appears as this in build window:
**Error** C:\Projects\Hello World\Application.as: Line 16: Unexpected '}' encountered

SlickEdit regular expression would be:
^\*\*Error\*\* {#0:p}\: Line {#1:i}\: {#2}{#3?*$}

The expression is parsed and the match groups provide the info:
#0 = filename - (path and filename)
#1 = linenum - (integer)
#2 = column number - (optional)
#3 = error description

hs2:
You've to use set-var def_error_re2 w/ a regexp to parse your output (@see error.e).
e.g.

--- Code: --- /home/user/file.c:31:6: warning: "/*" within comment

path: ((/|)(([~/ \t"']#)(/))@([~/ \t"']#))
file: ([~/ \t"']#)
-> def_error_re2=^?*((/|)(([~/ \t"']#)(/))@([~/ \t"']#)){#0([~/\ \t"']#)}\:{#1:i}\:{#2:i}\:{#3?*}$

--- End code ---

Edit:
@Lee: I thought tailoring 'def_error_re2' is the way to go. Wrong ?
Missed to refresh my browser and didn't see your posting...

HS2

Navigation

[0] Message Index

[#] Next page

Go to full version