nmhit 0.3.0__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {nmhit-0.3.0 → nmhit-0.3.1}/CMakeLists.txt +1 -1
  2. {nmhit-0.3.0 → nmhit-0.3.1}/PKG-INFO +1 -1
  3. {nmhit-0.3.0 → nmhit-0.3.1}/generated/Lexer.cpp +2 -2
  4. {nmhit-0.3.0 → nmhit-0.3.1}/pyproject.toml +1 -1
  5. {nmhit-0.3.0 → nmhit-0.3.1}/src/Lexer.l +1 -1
  6. {nmhit-0.3.0 → nmhit-0.3.1}/tests/test_hit.cpp +18 -0
  7. {nmhit-0.3.0 → nmhit-0.3.1}/.clang-format +0 -0
  8. {nmhit-0.3.0 → nmhit-0.3.1}/.github/workflows/ci.yml +0 -0
  9. {nmhit-0.3.0 → nmhit-0.3.1}/.github/workflows/release.yml +0 -0
  10. {nmhit-0.3.0 → nmhit-0.3.1}/.gitignore +0 -0
  11. {nmhit-0.3.0 → nmhit-0.3.1}/.pre-commit-config.yaml +0 -0
  12. {nmhit-0.3.0 → nmhit-0.3.1}/.pre-commit-hooks.yaml +0 -0
  13. {nmhit-0.3.0 → nmhit-0.3.1}/CONTRIBUTING.md +0 -0
  14. {nmhit-0.3.0 → nmhit-0.3.1}/README.md +0 -0
  15. {nmhit-0.3.0 → nmhit-0.3.1}/cmake/nmhit.pc.in +0 -0
  16. {nmhit-0.3.0 → nmhit-0.3.1}/cmake/nmhitConfig.cmake.in +0 -0
  17. {nmhit-0.3.0 → nmhit-0.3.1}/generated/Lexer.h +0 -0
  18. {nmhit-0.3.0 → nmhit-0.3.1}/generated/Parser.cpp +0 -0
  19. {nmhit-0.3.0 → nmhit-0.3.1}/generated/Parser.h +0 -0
  20. {nmhit-0.3.0 → nmhit-0.3.1}/generated/location.hh +0 -0
  21. {nmhit-0.3.0 → nmhit-0.3.1}/include/nmhit/BraceExpr.h +0 -0
  22. {nmhit-0.3.0 → nmhit-0.3.1}/include/nmhit/Node.h +0 -0
  23. {nmhit-0.3.0 → nmhit-0.3.1}/include/nmhit/TypeRegistry.h +0 -0
  24. {nmhit-0.3.0 → nmhit-0.3.1}/include/nmhit/nmhit.h +0 -0
  25. {nmhit-0.3.0 → nmhit-0.3.1}/python/nmhit/__init__.py +0 -0
  26. {nmhit-0.3.0 → nmhit-0.3.1}/python/nmhit/_cli.py +0 -0
  27. {nmhit-0.3.0 → nmhit-0.3.1}/python/nmhit/py.typed +0 -0
  28. {nmhit-0.3.0 → nmhit-0.3.1}/python/src/_nmhit.cpp +0 -0
  29. {nmhit-0.3.0 → nmhit-0.3.1}/python/tests/test_nmhit.py +0 -0
  30. {nmhit-0.3.0 → nmhit-0.3.1}/src/BraceExpr.cpp +0 -0
  31. {nmhit-0.3.0 → nmhit-0.3.1}/src/Node.cpp +0 -0
  32. {nmhit-0.3.0 → nmhit-0.3.1}/src/ParseDriver.h +0 -0
  33. {nmhit-0.3.0 → nmhit-0.3.1}/src/Parser.y +0 -0
  34. {nmhit-0.3.0 → nmhit-0.3.1}/tests/CMakeLists.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  cmake_minimum_required(VERSION 3.20)
2
2
  # Keep this version in sync with [project] version in pyproject.toml.
3
- project(neml2-hit VERSION 0.3.0 LANGUAGES CXX)
3
+ project(neml2-hit VERSION 0.3.1 LANGUAGES CXX)
4
4
 
5
5
  set(CMAKE_CXX_STANDARD 17)
6
6
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nmhit
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Python bindings for the nmhit NEML2-flavored HIT parser
5
5
  License: MIT
6
6
  Classifier: Programming Language :: Python :: 3
@@ -756,7 +756,7 @@ static const YY_CHAR yy_ec[256] =
756
756
  static const YY_CHAR yy_meta[33] =
757
757
  { 0,
758
758
  1, 2, 3, 4, 5, 6, 7, 8, 9, 5,
759
- 5, 5, 5, 5, 10, 1, 5, 11, 12, 13,
759
+ 5, 5, 5, 1, 10, 1, 5, 11, 12, 13,
760
760
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
761
761
  1, 14
762
762
  } ;
@@ -820,7 +820,7 @@ static const flex_int16_t yy_def[218] =
820
820
  static const flex_int16_t yy_nxt[720] =
821
821
  { 0,
822
822
  30, 31, 32, 31, 33, 30, 34, 30, 30, 35,
823
- 35, 35, 35, 35, 30, 30, 35, 36, 30, 30,
823
+ 35, 35, 35, 30, 30, 30, 35, 36, 30, 30,
824
824
  35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
825
825
  30, 30, 38, 39, 38, 98, 82, 98, 99, 100,
826
826
  101, 82, 85, 85, 40, 88, 41, 38, 39, 38,
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
4
4
 
5
5
  [project]
6
6
  name = "nmhit"
7
- version = "0.3.0" # Keep in sync with VERSION in CMakeLists.txt.
7
+ version = "0.3.1" # Keep in sync with VERSION in CMakeLists.txt.
8
8
  description = "Python bindings for the nmhit NEML2-flavored HIT parser"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -36,7 +36,7 @@ DIGIT [0-9]
36
36
  EXP [eE][+\-]?[0-9]+
37
37
  FLOAT ({SIGN}?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([eE][+\-]?[0-9]+)?|{SIGN}?[0-9]+[eE][+\-]?[0-9]+)
38
38
  INTEGER {SIGN}?[0-9]+
39
- IDENT [A-Za-z0-9_.\/:<>+\-*!]+
39
+ IDENT [A-Za-z0-9_.\/<>+\-*!]+
40
40
  COMMENT #[^\n]*
41
41
 
42
42
  %%
@@ -628,6 +628,24 @@ main()
628
628
  EXPECT(root->children(nmhit::NodeType::Field).size() == 1);
629
629
  });
630
630
 
631
+ run("post_override_no_space_around_assign", []() {
632
+ // Regression for the MOOSE-HIT command-line override convention
633
+ // `path/to/key:=value` (no whitespace). The old IDENT regex allowed
634
+ // ':' inside identifiers, so flex's longest-match greedily ate the
635
+ // ':', leaving `key:` as the field name and `=value` as a plain
636
+ // assignment — the override never fired and the original value won.
637
+ // Each line below would silently no-op before the IDENT fix.
638
+ auto r1 = nmhit::parse_text("k = 1", {}, {"k:=99"});
639
+ EXPECT(r1->param<int>("k") == 99);
640
+ auto r2 = nmhit::parse_text("a/k = 1", {}, {"a/k:=99"});
641
+ EXPECT(r2->param<int>("a/k") == 99);
642
+ auto r3 = nmhit::parse_text("a/b/c = 1", {}, {"a/b/c:=99"});
643
+ EXPECT(r3->param<int>("a/b/c") == 99);
644
+ // No-space-LHS variant (the most-typed MOOSE form): `key:= value`.
645
+ auto r4 = nmhit::parse_text("k = 1", {}, {"k:= 99"});
646
+ EXPECT(r4->param<int>("k") == 99);
647
+ });
648
+
631
649
  run("pre_and_post_empty_vectors_are_noop", []() {
632
650
  auto root1 = nmhit::parse_text("k = 42");
633
651
  auto root2 = nmhit::parse_text("k = 42", {}, {});
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes