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
On 15 September 2012 18:24, Laszlo Nagy gandalf@shopzeus.com wrote:
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.
Ingenious solution Laslo. I think it is worth putting on the wiki. A few projects may use more than one language and compiler. Since at the moment we don't want to complicate Geany for a rare use-case this gives a solution for those projects.
Cheers Lex
Best,
Laszlo
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Ingenious solution Laslo. I think it is worth putting on the wiki. A few projects may use more than one language and compiler. Since at the moment we don't want to complicate Geany for a rare use-case this gives a solution for those projects.
I cannot add a new page under howto-s. I don't see a "create new page" link or anything. I'm not familiar with docuwiki. Can you please help me out?
L
On 15 September 2012 21:22, Laszlo Nagy gandalf@shopzeus.com wrote:
Ingenious solution Laslo. I think it is worth putting on the wiki. A few projects may use more than one language and compiler. Since at the moment we don't want to complicate Geany for a rare use-case this gives a solution for those projects.
I cannot add a new page under howto-s. I don't see a "create new page" link or anything. I'm not familiar with docuwiki. Can you please help me out?
Top right corner, show pagesource.
To edit you need to be logged in (sadly required these days) very top right corner, if you are not registered there is a register link on the login page.
See also http://wiki.geany.org/wiki/start for links on using the wiki.
Cheers Lex
L
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 15 September 2012 22:13, Lex Trotman elextr@gmail.com wrote:
On 15 September 2012 21:22, Laszlo Nagy gandalf@shopzeus.com wrote:
Ingenious solution Laslo. I think it is worth putting on the wiki. A few projects may use more than one language and compiler. Since at the moment we don't want to complicate Geany for a rare use-case this gives a solution for those projects.
I cannot add a new page under howto-s. I don't see a "create new page" link or anything. I'm not familiar with docuwiki. Can you please help me out?
Top right corner, show pagesource.
To edit you need to be logged in (sadly required these days) very top right corner, if you are not registered there is a register link on the login page.
PS stupid firefox has a broken security certificate, try another browser.
Cheers Lex
See also http://wiki.geany.org/wiki/start for links on using the wiki.
Cheers Lex
L
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Top right corner, show pagesource.
To edit you need to be logged in (sadly required these days) very top right corner, if you are not registered there is a register link on the login page.
PS stupid firefox has a broken security certificate, try another browser.
I don't see "show pagesource" but I see an "Edit" tab (I'm logged in.)
The related source code is:
<nspages -title -simplelist -exclude:start -exclude:win32 -textns="" -textpages="">
But I still don't know how to create a new page. I have read formatting ( https://wiki.geany.org/wiki/syntax ) and from that, it appears that I should use something like:
[[How to parse error messages of multiple compilers]]
But I suspect that this is not what I should do, since all the other links are quite different.
Thanks,
Laszlo
On 12-09-15 05:32 AM, Laszlo Nagy wrote:
Top right corner, show pagesource.
To edit you need to be logged in (sadly required these days) very top right corner, if you are not registered there is a register link on the login page.
PS stupid firefox has a broken security certificate, try another browser.
I don't see "show pagesource" but I see an "Edit" tab (I'm logged in.)
The related source code is:
<nspages -title -simplelist -exclude:start -exclude:win32 -textns="" -textpages="">
But I still don't know how to create a new page. I have read formatting ( https://wiki.geany.org/wiki/syntax ) and from that, it appears that I should use something like:
[[How to parse error messages of multiple compilers]]
But I suspect that this is not what I should do, since all the other links are quite different.
I think you can just go to a page URL that doesn't exist yet and then it will give the option to create it as a new page.
For example (not sure if this is best section/name):
https://wiki.geany.org/howtos/error_transformer
Then near the search box on top right it should have a "Create" option.
Cheers, Matthew Brush