Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
The New API Release
Swift 4.2 and new API transition release
In this release I have added significant new capabilities to not only auto-generate the rules for parsing but also the Abstract Syntax Tree implemented as Swift types, and using the Decoding framework of standard Swift to automatically populate that based on the results of parsing with the rules.
In addition I have begun the work of refactoring the rule/token API to make significant optimisation available in the future and to dramatically simplify developing rules directly in Swift.
In this release old API is marked as deprecated, and the next release (0.6) will remove them completely to free me to start to benefit from the new architecture from now on.
This release requires at least Swift 4.2. Please use the
swift/4.1 branch if you wish to continue with Swift 4.1 for now, but note only bug-fix pull requests from others will be applied from now on.
Some fairly major changes as we progress towards version 1.0. No changes required by any consumers but Swift IntermediateRepresentation autogeneration has been added. There are some issues at this stage, but for the first time you can parse STLR itself and generate the parsing rules and the IR automatically which can then be used to parse STLR.
The new flatter rule system is also included in this release and is thoroughly tested but is not yet consumed by anything. Existing rule implementers don't need to change anything (and may never need to), but internally ParserRules and ScannerRules will be replaced by this new architecture.
Furthermore creating custom (and therefore potentially highly optimised) rules in Swift is now very easy (see ClosureRule).
If any future changes are required they will be minimal.
This is a significant release. The API and underlying implementation have been replaced significantly simplifying both.
The remainder of the releases up to v1.0 will now focus on stabilising the STLR language itself (not bugs, but ensuring there is a solid base to build on in future releases, and that any grammar breaking changes are minimised (I am not aware of any that are required at this point, but I will leave the door open)