Skip to content

Improve Parsing Correctness

Latest

Choose a tag to compare

@istathar istathar released this 03 Aug 01:38
· 45 commits to main since this release
v0.7.0
b839463

Ensuring Correctness

What started as fixing a minor annoyance in how one of the built-in functions works, suggested something in the parser that could give a better error message, which uncovered a bug in the parser, which led to us improving the documentation about it, which led to realizing an edge case wasn't being handled, which led to improvements to the language itself.

Language Improvements

A number of improvements have been made to the core language.

Of particular note is a refinement of the definition of a procedure declaration. A procedure is now declared by an identifier, a space, and then a colon. Although this is how we were formatting procedure declarations, previously the grammar did not require the space. Not requiring it led to massive ambiguity that had to be handled as a special case throughout, as the code base struggled to answer the question of whether or not something was a procedure declaration or merely a colon in descriptive text or a literal string.

The other breaking change is to remove conditions from responses. Previously you could write auxiliary text after a response, but this, it turns out, was likewise causing massive ambiguity for the parser to have to deal with. By restricting response lines to only having response literals we dramatically reduce the complexity of that part of the code, reduce mis-parses, and improve error messages.

We have solidify literals for empty lists and empty tuples.

Finally, we have made an extension to the "magic" header line, allowing the author to write a semantic version indicating the minimum version of the technique compiler that a given document requires. Only in particular edge cases would an author need to worry about expressing anything different, but this prepares us for future evolutions of the language. The % technique v1 string will continue to be the expected default. Note that while we are still in the pre-1.0 era, the 0.x versions of the compiler will accept documents with v1.

Taken together these changes have led us to bump the major version to 0.7.

Ongoing Development Support

Developers doing local builds of technique will have the Git commit has embedded in the --version string to help indicate that what they are running is a development build and not a release version.

  • Embed commit in version string when developing by @istathar in #143

Full Changelog: v0.6.5...v0.7.0