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

Fix various parsing errors #645

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Fix various parsing errors #645

wants to merge 9 commits into from

Conversation

MicahGale
Copy link
Collaborator

@MicahGale MicahGale commented Jan 23, 2025

Pull Request Checklist for MontePy

Description

This fixes a few small syntax parsing errors. This fixed errors with parsing blank sdef by adding a rule for the parser that sdef uses to allow only a classifier. It also fixes an error with SSW. The issue is that the first word after the classifier was a keyword. There was a rule that allowed vol no 1 2 3 and this gets confused for ssw cel=1. So the solution was to not consider the no in vol no a keyword as it isn't part of a key value pair.

fixes #636, fixes #639


General Checklist

  • I have performed a self-review of my own code.
  • The code follows the standards outlined in the development documentation.
  • I have added tests that prove my fix is effective or that my feature works (if applicable).

Documentation Checklist

  • I have documented all added classes and methods.
  • For infrastructure updates, I have updated the developer's guide.
  • For significant new features, I have added a section to the getting started guide.

First-Time Contributor Checklist

  • If this is your first contribution, add yourself to pyproject.toml if you wish to do so.

Additional Notes for Reviewers

Ensure that:

  • The submitted code is consistent with the merge checklist outlined here.
  • The PR covers all relevant aspects according to the development guidelines.
  • 100% coverage of the patch is achieved, or justification for a variance is given.

📚 Documentation preview 📚: https://montepy--645.org.readthedocs.build/en/645/

@MicahGale MicahGale added bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". parsers are hard Examples of where MCNP syntax is complicated and should be simplified. labels Jan 23, 2025
@MicahGale MicahGale self-assigned this Jan 23, 2025
@MicahGale MicahGale requested a review from tjlaboss January 25, 2025 04:15
@MicahGale MicahGale marked this pull request as ready for review January 25, 2025 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugs A deviation from expected behavior that does not reach the level of being reportable as an "Error". parsers are hard Examples of where MCNP syntax is complicated and should be simplified.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parsing Error with SSW Blank sdef is not supported
1 participant