Student: Thirumalai Shaktivel
Project: LFortran: Finish AST generation
Organisation: Fortran-lang
Mentor: Ondřej Čertík
The main objective of this project is to make sure that all the grammar rules defined are exposed to AST(Abstract Syntax Tree) level. There were many other goals such as solving the issues labelled parser and fmt (converts preserved AST nodes back to Fortran source code).
Some grammar rules were not defined in the parser. After adding them, we created AST nodes related to those grammar rules, defined macros, used them in the parser to expose those nodes to the AST level and added tests to make sure everything works correctly as expected. Following are the implemented grammar rules and AST nodes:
- Coarrays
- Comments, Semicolon, and EndOfLine
- Block data, Select Type and Select Rank Constructs
- Entry, Sync Team, Sync Images, and Sync Memory statements
- Data, Common, Flush, Computed GoTo, Endline, and Critical statements
- BOZ, Forall single and multiline statements
Some grammar rules are defined but are not exposed to the AST level. Following are some of those which have been refactored:
- Declaration Attributes
- Block construct
- Enum, derived type, and use statements
- ErrorStop and Stop statements
- Subroutine Call, Event Post, Event Wait, and Sync All statements
List of Issues created for the Completion of AST generation
GSoC weekly report: LFortran: GSoC Student Progress (Thirumalai Shaktivel, AST project)
LFortran released its new version during my GSoC period. We came across many bugs and issues. The best part is that we fixed every bug that was reported:
My commits during GSoC:
$ git shortlog -ns --since="5 months ago"
1254 Ondřej Čertík
457 Gagandeep Singh
438 Thirumalai Shaktivel <--
88 Rohit Goswami
55 Dominic Poerio
20 Andrew Best
I plan on contributing to LFortran as much as possible after the GSoC period. Following are the tasks to perform:
- Implement rest of the missing statements or constructs with reference to the Fortran 2018 standards.
- Work on reported
trivia
issues. - Fix the existing
parser
andfmt
issues. - Regularly interact with the community members by reviewing the MR, discussing the ideas, implementing the same.