Repository: idaholab/MontePy

Issue:
Commas not allowed in mesh tally arguments
## Bug Description

<!-- A clear and concise description of what the bug is. -->

The _FMESHn_ card takes several keywords whose values are a 3-tuple of numbers; namely _origin_, _axs_, and _vec_: [MCNP 6.3.1 Manual § 5.11.2](https://mcnp.lanl.gov/pdf_files/TechReport_2024_LANL_LA-UR-24-24602Rev.1_KuleszaAdamsEtAl.pdf#subsection.5.11.2)

<img width="1177" height="325" alt="Image" src="https://github.com/user-attachments/assets/d17a9a9d-0e5f-437e-bbc3-21a146ca6663" />

<img width="1173" height="334" alt="Image" src="https://github.com/user-attachments/assets/10abdd19-726e-4fac-9f70-60be9f62d42e" />

These values may be given with or without commas. Commas are used in the default. MontePy cannot parse the input with the commas.


## To Reproduce

<!-- A short code snippet of what you have ran. Please change or remove any specific values or anything that can't be public. For example: --> 

``` python
>>> problem = montepy.MCNP_Problem("")
>>> problem.parse("fmesh1:n vec=0 0 0")
DATA INPUT: fmesh1:n 
>>> problem.parse("fmesh1:n vec=0, 0, 0")
montepy.exceptions.ParsingError:
. . .
```

This also breaks with _axs_ and _origin_.


## Error Message 

<!-- If an error message was printed please include the entire stacktrace. If it includes any specific values please change or remove them. For example: -->

<details open> 

``` python
>>>problem.parse("fmesh1:n vec=0,0,0")
Traceback (most recent call last):
  File "./montepy/mcnp_problem.py", line 729, in parse
    obj = montepy.parse_data(input)
  File "./montepy/data_inputs/data_parser.py", line 54, in parse_data
    return data_input.DataInput(input, prefix=prefix)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "./montepy/mcnp_object.py", line 49, in wrapped
    add_line_number_to_exception(e, self)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "./montepy/exceptions.py", line 235, in add_line_number_to_exception
    raise error
  File "./montepy/mcnp_object.py", line 41, in wrapped
    return func(*args, **kwargs)
  File "./montepy/data_inputs/data_input.py", line 327, in __init__
    super().__init__(input, fast_parse)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "./montepy/mcnp_object.py", line 49, in wrapped
    add_line_number_to_exception(e, self)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "./montepy/exceptions.py", line 235, in add_line_number_to_exception
    raise error
  File "./montepy/mcnp_object.py", line 41, in wrapped
    return func(*args, **kwargs)
  File "./montepy/data_inputs/data_input.py", line 62, in __init__
    super().__init__(input, self._parser)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "./montepy/mcnp_object.py", line 49, in wrapped
    add_line_number_to_exception(e, self)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "./montepy/exceptions.py", line 259, in add_line_number_to_exception
    raise error.with_traceback(trace)
  File "./montepy/mcnp_object.py", line 41, in wrapped
    return func(*args, **kwargs)
  File "./montepy/mcnp_object.py", line 137, in __init__
    raise ParsingError(
    ...<3 lines>...
    )
montepy.exceptions.ParsingError:     , line 0

    >    0| fmesh1:n vec=0,0,0
          |               ^ not expected here.
There was an error parsing ",".
sly: Syntax error at line 1, token=,
```

(First attempts to parse as data card, and then tries surface and cell. I've removed the surface and cell attempts from the traceback.)

</details>



## Version

 - Latest `develop` (commit 8a0e7afef2e7029209844ff627b5e5a3a88bab8a)

Discussion hints:

Solution patch:
diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index db85341b..f7442e81 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -26,6 +26,7 @@ MontePy Changelog
 * Fixed bug where lines that were the allowed length was raising a ``LineOverRunWarning`` when read by MontePy (:issue:`517`). 
 * Added descriptive TypeError messages (:issue:`801`)
 * Fixed a bug that caused to write an extra termination line between the data block and the cell data section in the MCNP input. (:pull:`819`) (:issue:`703`).
+* Avoided parsing ``FMESH`` inputs that have more complicated syntax to parse (:issue:`846`).
 
 **Deprecations**
 
diff --git a/montepy/data_inputs/data_parser.py b/montepy/data_inputs/data_parser.py
index 3736f5d2..6d2c9598 100644
--- a/montepy/data_inputs/data_parser.py
+++ b/montepy/data_inputs/data_parser.py
@@ -27,7 +27,7 @@
     universe_input.UniverseInput,
 }
 
-VERBOTEN = {"de", "sdef"}
+VERBOTEN = {"de", "sdef", "fmesh"}
 
 
 def parse_data(input: montepy.mcnp_object.InitInput):


Test patch:
diff --git a/tests/test_tally.py b/tests/test_tally.py
index 226e683e..bfbf5244 100644
--- a/tests/test_tally.py
+++ b/tests/test_tally.py
@@ -66,3 +66,10 @@ def test_de_parsing_jail(_, line):
         assert data.mcnp_str() == line
         with pytest.raises(montepy.exceptions.UnsupportedFeature):
             data.data
+
+
+class TestFmesh:
+    # this is hacky; just makes sure it doesn't crash
+    @pytest.mark.parametrize("line", ["fmesh14:n vec=0 0 0", "fmesh14:n vec=0, 0, 0"])
+    def test_fmesh_parse(_, line):
+        parse_data(line)