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

Allow dollar in symbol names #351

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

emanspeaks
Copy link
Contributor

@emanspeaks emanspeaks commented Jan 21, 2024

Some language dialects allow dollar signs in symbol names. In Intel, this is always allowed. In g77, it can be enabled via command line flag. This seems to be an older practice that has fallen out of favor and was always a language extension, but is needed to support backward compatibility with older codes.

I've opted to implement this as always allowed like the Intel implementation, but I can change this to be an opt-in feature if we'd rather. I don't suspect it will hurt anyone to allow it.

There are other noted historical uses of $ in Fortran that are more rare, particularly with different variations of write statements, but it is unclear if any of these are still supported today by any compilers. (Even if they are, the current proposed regex is unlikely to erroneously match to them.)

@emanspeaks emanspeaks requested a review from gnikit as a code owner January 21, 2024 04:55
@emanspeaks emanspeaks marked this pull request as draft January 21, 2024 04:55
Copy link

codecov bot commented Jan 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8466034) 87.52% compared to head (7a31879) 87.52%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #351   +/-   ##
=======================================
  Coverage   87.52%   87.52%           
=======================================
  Files          35       35           
  Lines        4760     4760           
=======================================
  Hits         4166     4166           
  Misses        594      594           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@emanspeaks emanspeaks marked this pull request as ready for review January 21, 2024 05:04
@emanspeaks emanspeaks changed the title Draft: Allow dollar in symbol names Allow dollar in symbol names Jan 21, 2024
Copy link
Member

@gnikit gnikit left a comment

Choose a reason for hiding this comment

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

LGTM. Thansk for the PR.

Having the option on by default for me is the way to go. I think you know my stance with weird (possibly deprecated) compiler extensions; they should really not be part of modern day tooling. This one however seems to be minimally invasive and I can't see any side effects so all is well.

@gnikit gnikit force-pushed the dollar-symbol-names branch from 1d32b17 to 7a31879 Compare January 24, 2024 17:33
@gnikit gnikit merged commit 2f84c3a into fortran-lang:master Jan 24, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants