Skip to content

Releases: mincrmatt12/nmfu

0.5.6

12 Apr 15:25
Compare
Choose a tag to compare

This is a minor feature release, improving various error messages.

For example, the test example/test/optional3.fail.nmfu now errors with

Compile error: Ambiguous transitions detected while joining DFAs on character 't'
Due to:
- line 3:
        /(fg|[et])est/; // ambiguous on first letter (in t case)
             ^
- direct match 'text'[0]:
  at line 6:
    "text";

New Features

  • When generating an error about ambiguity, show specific characters causing the ambiguity where possible. (4ef3b56, cebb198)
  • Give error names to states and transitions in direct / case-insensitive matches to allow mentioning specific parts of a match in an error. (b05a690)
  • Properly annotate regular expression matches with debug line/column information. (a9e372e, 6b8a9fa, d5f4450)
  • Report case match ambiguity errors with better specificity (annotating on transition instead of state.) (c342c1b)

Bugs Fixed

  • Fix a typo in error messages which do not have a line number associated with them. (69bbacb)
  • Fix line number associations for loop & foreach statements. (bc48bf2)
  • Give line numbers for duplicate definition errors. (0c0323e)
  • When using -ddtree, ensure the dump still occurs if an error is thrown. (50ce062)

0.5.5

04 Nov 21:47
Compare
Choose a tag to compare

This is a minor bugfix and documentation release.

Bugs Fixed

  • Finish actions applied immediately prior to a potentially-empty match are no longer dropped by DFA.append_after. (#3, cd28251, 53bbc12)

Infrastructure Changes

  • Added note to documentation about the lack of generality with $last (666e240)
  • Fix cross-references in documentation (5e00f1b)
  • Remove mentions of deprecated snaps (0dc8a68)
  • Show failing testcase for integration tests in assertion message (37ef846)

0.5.4

09 Oct 02:29
Compare
Choose a tag to compare

This is a minor feature release, adding packed enums.

New Features

  • The command-line flag -fuse-packed-enums has been added which causes any generated C enums to be declared with __attribute__((packed)) for potentially less memory use. (bff55ba)

0.5.3

31 Aug 01:08
Compare
Choose a tag to compare

This is a minor dependency update release, which should only serve to solve potential dependency conflicts.

Infrastructure Changes

  • Changed version requirement on lark to allow any 1.x version, instead of only 1.0.x (adb1e94)

0.5.2

23 Jul 05:31
Compare
Choose a tag to compare

This is a minor bugfix release, fixing a few bugs with binary strings and duplicate definition detection.

Bugs Fixed

  • Duplicate macro arguments are now properly considered errors (d793494)
  • Strings containing quotes or which are specified as binary strings are now properly written in generated C files (c7b0052)
  • Removed redundant conditions in DFA.append_after (ddef270)

Infrastructure Changes

0.5.1

03 Apr 03:43
Compare
Choose a tag to compare

This is a minor bugfix release.

Bugs Fixed

  • Fixed the accept state used for empty try-catch handlers not getting added to the DFA, which could cause the parser to sometimes incorrectly terminate early (6b62704)

Infrastructure Changes

  • Adjusted how AppImages are created, and marked them as terminal apps (1a6b80f, f22a022)

0.5.0

03 Apr 02:31
Compare
Choose a tag to compare

This is a major feature release, greatly expanding the capabilities of case statements, as well as adding more ways to communicate from the parser to the calling code.

NOTE: snaps are no longer packaged for nmfu (due to CI issues), if you install nmfu via snap, please migrate either to installing from PyPI (perhaps via pipx) or use the AppImages.

New Features

  • The "greedy" case modifier, which loosens the ambiguity requirements on case blocks: (52e5418)
    • Ambiguity between a completed match and checking for a longer match of another branch are resolved to consume the least characters in the conditional matches.
    • Ambiguity between multiple branches can be explicitly clarified with priorities.
  • Finish codes: explicit finish statements can now return custom status codes, instead of just always giving _DONE (1ffe4d4)
  • Yield: parsers can now interrupt execution with a return code and be restarted; for example to build a lexer (1ffe4d4, 41b2c23)

The existing examples have been updated to take advantage of these features, as well as a new example demonstrating greedy case statements and yielding in the context of a simple lexer.

Bugs Fixed

  • Loops that have (possibly conditional) breaks before any matching statements no longer think they're infinite (a687b3b)
  • Fix over-eager fallthrough shortcircuit optimizations involving condition points (55a38d8)
  • Fix over-sensitive detection for infinite fallthrough loops (a5c65df)
  • append_after no longer diverts error handling transitions on its own when dealing with proxy states; now instead just replicates the error/nonerror status and lets the normal handling take place (#2, 3f3f524, 03c23e6)
  • Try-except blocks now use a simpler representation for exception handlers that consume no characters, which fixes various cases of missed actions with outofspace handlers (6bad7c1, 74f3e9a)

Infrastructure Changes

  • Tests now use finish codes to better check correctness (9f1c20e, 9d0b812)
  • Various examples/docs have been updated to use finish codes instead of result enumerations (976fc60, a777a5e)
  • New lexer example demonstrating yield functionality (a9a96a8)
  • Various documentation improvements:
  • Updated to lark 1.0 (f3dd61e)
  • Appimages now build against Ubuntu 20.04 as their base (9dc256c)
  • Disable auto-building of snaps due to CI problems (the snapcraft.yml file is still present in case you still need them) (d7b771d)
  • Debug dumper improvements:
    • Now highlights error-handling transitions in orange (4cf606d)
    • Now properly visualizes transitions with actions defined as diverting to "undefined" instead of just hiding them (7cf4a5a)

0.5.0a3

14 May 21:01
Compare
Choose a tag to compare
0.5.0a3 Pre-release
Pre-release

This is a minor update to the previous 0.5.0a2 preview release.

Bugs Fixed

  • append_after no longer diverts error handling transitions on its own when dealing with proxy states; now instead just replicates the error/nonerror status and lets the normal handling take place (#2, 3f3f524, 03c23e6)

Infrastructure Changes

  • Debug dumper now properly visualizes transitions with actions defined as diverting to "undefined" instead of just hiding them (7cf4a5a)

0.5.0a2

08 May 22:03
Compare
Choose a tag to compare
0.5.0a2 Pre-release
Pre-release

This is a minor update to the previous 0.5.0a1 preview release.

Bugs Fixed

  • Fix over-eager fallthrough shortcircuit optimizations involving condition points (55a38d8)

Infrastructure Changes

  • Disable auto-building of snaps due to CI problems (the snapcraft.yml file is still present in case you still need them) (d7b771d)
  • Debug dumper now highlights error-handling transitions in orange (4cf606d)

0.5.0a1

08 May 21:58
Compare
Choose a tag to compare
0.5.0a1 Pre-release
Pre-release

This is a preview of some of the new features in the upcoming 0.5.0 release.

New Features

  • Greedy case statements: explicit ambiguity resolution can be turned on as an option in case statements now (52e5418)
  • Finish codes: explicit finish statements can now return custom status codes, instead of just always giving _DONE (1ffe4d4)
  • Yield: parsers can now interrupt execution with a return code and be restarted; for example to build a lexer (1ffe4d4, 41b2c23)

Bugs Fixed

  • Loops that have (possibly conditional) breaks before any matching statements no longer think they're infinite (a687b3b)

Infrastructure Changes

  • Tests now use finish codes to better check correctness (9f1c20e)
  • Various examples/docs have been updated to use finish codes instead of result enumerations (976fc60, a777a5e)
  • New lexer example demonstrating yield functionality (a9a96a8)
  • Various documentation improvements:
  • Updated to lark 1.0 (f3dd61e)
  • Appimages now build against Ubuntu 20.04 as their base (9dc256c)
    • Note snaps may be removed in a future release due to issues in reliably building them in CI