f18
f18 copied to clipboard
TODO: Improve parsing error messages
Some erroneous sources produce messages that could do a better job of indicating what needs to be done to fix the problem.
I've attached one such case. parsequirk01.f90.txt
Test case(s) are needed.
Test case(s) are needed.
You caught me between the chicken and the egg. I wanted to file an issue so that I could reference the issue number in the source code to put into the pull request. Now that I have done so, I can update the issue description.
I attached a test case. Here's the output currently produced by the compiler:
test.f90:7:6: error: expected '=>' DO CONCURRENT (table(n) = 1:n) ^ test.f90:7:3: in the context: pointer assignment statement DO CONCURRENT (table(n) = 1:n) ^ test.f90:7:3: in the context: execution part construct test.f90:5:3: in the context: execution part n = 1 ^ test.f90:1:1: in the context: main program PROGRAM parsequirk01 ^ test.f90:7:6: error: expected '(' DO CONCURRENT (table(n) = 1:n) ^ test.f90:7:3: in the context: pointer assignment statement DO CONCURRENT (table(n) = 1:n) ^ test.f90:7:3: in the context: execution part construct test.f90:5:3: in the context: execution part n = 1 ^ test.f90:1:1: in the context: main program PROGRAM parsequirk01 ^ test.f90:7:6: error: expected '=' DO CONCURRENT (table(n) = 1:n) ^ test.f90:7:3: in the context: assignment statement DO CONCURRENT (table(n) = 1:n) ^ test.f90:7:3: in the context: execution part construct test.f90:5:3: in the context: execution part n = 1 ^ test.f90:1:1: in the context: main program PROGRAM parsequirk01 ^ test.f90:9:7: error: expected end of statement END DO ^ test.f90:9:3: in the context: END PROGRAM statement END DO ^ test.f90:1:1: in the context: main program PROGRAM parsequirk01 ^ ./bin/f18: could not parse test.f90