Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: Fix crackfortran parsing error when a division occurs within a common block #28633

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

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

charris
Copy link
Member

@charris charris commented Apr 2, 2025

Backport of #28396.

The analyzeline function currently passes over all / characters, presumably assuming they only indicate the name of the common block. However, this means division operations after the common block name are also passed over.
For instance
common /mortmp/ ctmp((lub*(lub+1)*(lub+1))/lpmin+1)
fails to parse correctly.

This pull request attempts to rectify this by counting the number of slashes encountered in the line and only passing over the first two.

  • BUG: Fix crackpython parsing error when a division occurs within a common block

  • Add test for more complicated array sizing expression

  • fix typos

  • Simplify tests to currently supported syntax

  • Use regular expression to find common block name

  • Revert from broken regular expression version to prior version, add comment

  • Add space before inline comment

  • Use regular expression to split line

  • Add missing white space to appease linter

  • More linting fixes

  • Pass maxsplit as a keyword argument

…ommon block (numpy#28396)

* BUG: Fix crackpython parsing error when a division occurs within a common block

* Add test for more complicated array sizing expression

* fix typos

* Simplify tests to currently supported syntax

* Use regular expression to find common block name

* Revert from broken regular expression version to prior version, add comment

* Add space before inline comment

* Use regular expression to split line

* Add missing white space to appease linter

* More linting fixes

* Pass maxsplit as a keyword argument
@charris charris added this to the 2.2.5 release milestone Apr 2, 2025
@charris charris merged commit 9470412 into numpy:maintenance/2.2.x Apr 2, 2025
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.