Hi All,
I was writting a compiler for a new language, and I was having problems
with Geany. Whenever I tried to run "make" (e.g. press F8 in geany)
there were three cases:
* no error
* error in the compiler program -> error message was a Python traceback
* error in the source file being compiled by the compiler -> error
message was a gnu formatted error message.
I asked about this problem here before: what kind of regular expression
should I use so that Geany finds both errors? The answer was that it is
almost impossible, because Geany can only handle a single regular
expression.
Today I came up with another solution. It is a tiny wrapper program that
can run any other command. It monitors the data that is flowing through
stderr and stdout. It can run several different regular expressions on
the output, and convert them into standardized format.
It is trivial to change this program so that you parse the compiler
output from program code (instead of a regular expression). It allows
you to parse the output of almost anything, including cases when the
information is spread in multiple lines.
If anyone is interested, the "program" is attached. I'm not sure if it
worth adding it to the Geany wiki.
Best,
Laszlo