Skip to content
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

[fortran] Bug fixes for ingestion TIE-GCM source #567

Merged
merged 34 commits into from
Oct 14, 2023

Conversation

vincentraymond-ua
Copy link
Contributor

@vincentraymond-ua vincentraymond-ua commented Oct 12, 2023

TIE-GCM bug fixes

There were a number of small bugs in the Fortran->Gromet pipeline that were discovered when determining which TIE-GCM files are currently able to be ingested.

Node Helper

  • Fixes missing comma in CONTROL_CHARACTERS list causing '>' to be ignored.
  • Adds additional set of control characters to CONTROL_CHARACTERS list that weren't previously seen in any examples
  • Adds remove_comments function to remove comment nodes from tree-sitter parse tree. This prevents comments from being processed by ts2cast and creating unexpected None values in the CAST.

Preprocessor

  • Fixes bug in include directory path when running script from directory other than the system root.
  • Runs gcc processor from system root if there are no #include directives.

TS2CAST

  • Fixes bug in function call handler to support ingesting functions with no arguments.
  • Fixes bug when in function call handler when the function call is part of a unary expression +foo()
  • Fixes bug in conditional handler to support ingesting single line conditionals
  • Adds support for not operator

Resolves #563

@github-actions github-actions bot added the lang/Fortran Used for work related to Fortran (ex. frontend support) label Oct 12, 2023
@vincentraymond-ua vincentraymond-ua changed the title [fortran] - Bug fixes for ingestion TIE-GCM source [fortran] Bug fixes for ingestion TIE-GCM source Oct 12, 2023
Copy link
Contributor

@jastier jastier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any issues. Well commented, good edge case checking.

LGTM

@vincentraymond-ua vincentraymond-ua merged commit 7ae4f25 into main Oct 14, 2023
8 checks passed
@vincentraymond-ua vincentraymond-ua deleted the vraymond/tie-gcm-support branch October 14, 2023 15:21
github-actions bot added a commit that referenced this pull request Oct 14, 2023
## TIE-GCM bug fixes
There were a number of small bugs in the Fortran->Gromet pipeline that
were discovered when determining which TIE-GCM files are currently able
to be ingested.

### Node Helper
- Fixes missing comma in CONTROL_CHARACTERS list causing '>' to be
ignored.
- Adds additional set of control characters to CONTROL_CHARACTERS list
that weren't previously seen in any examples
- Adds remove_comments function to remove comment nodes from tree-sitter
parse tree. This prevents comments from being processed by ts2cast and
creating unexpected None values in the CAST.

### Preprocessor
- Fixes bug in include directory path when running script from directory
other than the system root.
- Runs gcc processor from system root if there are no `#include`
directives.

### TS2CAST
- Fixes bug in function call handler to support ingesting functions with
no arguments.
- Fixes bug when in function call handler when the function call is part
of a unary expression `+foo()`
- Fixes bug in conditional handler to support ingesting single line
conditionals
- Adds support for `not` operator

Resolves #563 7ae4f25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/Fortran Used for work related to Fortran (ex. frontend support)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fortran] Fix bugs in TIE-GCM ingestion
2 participants