Lahey Fortran Regular Expression

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
E Programmer
Posts: 38
Joined: Thu Apr 07, 2005 7:07 pm

Lahey Fortran Regular Expression

Post by E Programmer »

Hi
I need help identifying the line number where an error or warning occured

Sample:

Code: Select all

Compiling program unit STATCALC at line 4573.
Line 4629, file e:\dash\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
WARNING -- INTEGER scalar (IRETURN) is set but never used.
With Lines Regex: ^Line [0-9]+,
and Filename Regex: file e:\[a-z\]+.f90

I go to the correct filename, but always to line 90. Like it's using the filename as the line number.

O great, Zeus guru, what do i do?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Based on the same error output I created these expressions and they seemed to work fine:

Code: Select all

Lines:
^Line [0-9]+

Files:
file e:\[a-z\]+.f90

Errors:
^Line [0-9]+, file
NOTE: The expressions above contain white space and for the expressions to work the white space must be maintained.

Cheers Jussi
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

I tried these expressions and they also seemed to work:

Code: Select all

Lines:
^Line [0-9]+

Errors:
^Line [0-9]+, file
In this case Zeus will use the default file name regular expressions for the file name.

I think these are the set of expressions you should try first off.

Cheers Jussi
E Programmer
Posts: 38
Joined: Thu Apr 07, 2005 7:07 pm

Post by E Programmer »

Both suggested solutions worked if I double clicked on the error line number

Code: Select all

Line 311, file e:\dash\dash.f90
But if I clicked on the Error or Warning line, it went to line 90.
It also when to line 90, when I used previous and next compile error in the tool bar.

Remember the filename is f90. If I change the filename to .for and force the compile to assume the file is Fortran 90 code, it works fine.
Guest

Post by Guest »

But if I clicked on the Error or Warning line, it went to line 90

This happens because the default warning regular expression is identifying this line:
WARNING -- INTEGER scalar (IRETURN) is set but never used.
as a waring (ie it is green). But the line contains no file or line number information so all Zeus can do is load the file that was compiled. I am not exactly sure why it is going to line 90 :?

But to stop Zeus from doing this all you need to do is stop the line from being identified as a warning. Changing the warning regexp to something like zzzzz would do the trick :)
It also when to line 90, when I used previous and next compile error in the tool bar
I could not replicate this error :(

In an attempt to replicate this bug I ran the following test:

Step 1: Create a dummy d:\temp\errors.txt file containing the following text:

Code: Select all

Compiling program unit STATCALC at line 4573.
Line 1, file d:\temp\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
Compiling program unit STATCALC at line 4573.
Line 2, file d:\temp\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
Compiling program unit STATCALC at line 4573.
Line 3, file d:\temp\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
Compiling program unit STATCALC at line 4573.
Line 5, file d:\temp\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
WARNING -- INTEGER scalar (IRETURN) is set but never used.

Code: Select all

Compiling program unit STATCALC at line 4573.
Line 1, file e:\dash\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
Compiling program unit STATCALC at line 4573.
Line 2, file e:\dash\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
Compiling program unit STATCALC at line 4573.
Line 3, file e:\dash\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
Compiling program unit STATCALC at line 4573.
Line 5, file e:\dash\dash.f90
      call screenmenu('RETURN to Main Menu',iReturn)
                                            |
WARNING -- INTEGER scalar (IRETURN) is set but never used.
Step 2: Create a dummy d:\temp\dash.f90 file containing at least 6 lines of text.
Step 3: Options, Properties to bring up the document type for the d:\temp\dash.f90 file.
Step 4: Set the compiler command to be type d:\temp\errors.txt
Step 5: Setup the line and error regexp as before
Step 6: Set the warnign regexp to zzzz

When I compile the d:\temp\dash.f90 I get the compiler screen with the 5 dummy errors. If I then use the next/previous error toobar buttons Zeus quite happily moves between the errors at the lines 1, 2, 3, 4 and 5 :)

Jussi
E Programmer
Posts: 38
Joined: Thu Apr 07, 2005 7:07 pm

Close to working....

Post by E Programmer »

Using the Error regex

Code: Select all

^Line
Hilights the errors (and warnings)
Goes to the correct line

BUT, the message at the bottom of the screen displays the Line information rather than the error information. I can live with that but would prefer to see the error info below.
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

BUT, the message at the bottom of the screen displays the Line information rather than the error information.
It looks like there needs to be a new compiler check box option, something like Compiler error message spans current and next lines. This new option would concatenation the error line and the text from the next line and display the concatenated text in the status bar.

Jussi
Post Reply