-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parser not able to handle Hollerith constants with whitespaces #48
Comments
The code for this is here: Line 218 in b69ad37
The call ofc_sparse_parent_pointer gets a pointer to the source without the spaces removed, so the code should handle holleriths with spaces in. This tool does not tokenize or use whitespace in that way at all, it removes all whitespace before parsing as tokenizing legacy fortran is not possible, however it keeps a reference to the original source for situations like this, and for reporting error locations. |
I should further note that this is failing during semantic analysis which should mean that the hollerith was parsed without issue. The specific error message is here: Line 2090 in b69ad37
|
Would it be possible to get a minimal test which triggers this issue? |
Hi @ben-brewer-codethink , I apologize that I won't be able to really minimize the test cases. But as you said the problem should be straight-forward. I'm attaching the original source file mentioned above, FYI it's a part of NASTRAN-95 distribution: |
This code is actually valid:
because Hollerith constants may have whitespaces, and they are unquoted. This is one spectacular piece of Fortran, which exists to confuse the whitespace-based tokenizers.
The text was updated successfully, but these errors were encountered: