-
Notifications
You must be signed in to change notification settings - Fork 8
better comment/continuation handling and improvements to the pretty printing system #7
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
Open
dorchard
wants to merge
24
commits into
dagit:master
Choose a base branch
from
dorchard:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fortran77 programs can use '*', 'c', or 'C' in first column for comments. By adding a preprocessing stage I converted every line that starts with these characters to '!' comments. This solution would break badly intended modern Fortran code in free form if a keyword or identifier that starts with 'c' is used.
Resolve conflict in preprocessor by changing the entry function pre_process and add type annotations to the function since the rest of the pre_processor is also annotated in upstream. Conflicts: src/Language/Fortran/PreProcess.hs
Dobule precision implementation in the lexer and parser were commented out. Changed the keywords in lexer and added necessary data type in Fortran to successfully parse thme.
Fixed form Fortran (aka. 66/77) has continuation lines specified in column 6 of each lines by putting a character that is not ' ' or '0' these lines are supposed to be interpreted as part of the statement above. Since fixed form is not handled explicitly in current version of language-fortran, preprocessor takes these continuation lines and appends it to the end of the previous line before sending it to lexer.
Now there is a new interface called pre_process_fixed_form that applies comment transformation and continuation line elimination on the input before parsing.
…for interfacespecs which were previously wrong
ftp://ftp.nag.co.uk/sc22wg5/n001-n1100/n692.pdf implements: - 11.3.2 The USE statement and use association use statements with "only" keyword. improve: - 3.3.1.3 Free form statement continuation We must ignore the whole comment line (including \n)
implement and improve some features of f90.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also some changes paving the way for the new and improved version...