- Fix lone statements in parser bodies causing syntax errors if not followed by a return value in the next line
- Add example
indentto demonstrate context-sensitive parsing
- Add
repeatattribute, which accepts bothusizeand ranges, and matches a pattern within that range or exactly that number of times
- Implement
DerefandDerefMutforSpan - Add attribute
mapand aliasconvert, which can be used like#[map(map_fn)] patternto convert the output type of a parser- Previously you would have to write a new named parser just to convert the output of another parser
- Fix compiler error in empty match statement when error type is specified
- Disable unreachable_code lint inside generated code, as it could be generated by empty match statements
- Add support for match-type parsers (https://github.com/boxbeam/untwine/blob/master/TUTORIAL.md#using-matches)
- This allows much more concise and intuitive representations for parsers which have many different structures evaluating to the same type
- Make delimited lists less greedy
- Previously, if a delimiter was found when parsing a delimited list, it would attempt to parse another element and error if it fails
- Delimited lists will now consider parsing successful and return what was parsed if there is no element following the delimiter
- This is useful for structures which allow optional (or required) trailing delimiters, such as
1,2,3, - The above can now be expressed like
num$","+ ","?instead ofnum ("," num)* ","?- This also allows you to get a
Vec<T>instead of a(T, Vec<T>)
- This also allows you to get a
- Add
#[span]decorator, which allows you to capture the portion of input corresponding to a parsed value - Update examples to reflect new ideal implementations of JSON and boolean expression parsers
- Fix improper error reporting with lookahead optimization
- Could sometimes cause panics due to the start position of an error being ahead of the end position, causing an overflow in display code
- Disable elided_named_lifetimes warning inside parser blocks
- Make all non-captured parsers use
.ignore()to drop their outputs- This makes it possible to do things such as
#(a | b)whereaandbhave different types. Since the overall output is ignored, both their outputs will be ignored and the parsers do not have to have the same output type.
- This makes it possible to do things such as
- Add character literals like
'"'
- Fix issue with incomplete parses sometimes not generating any errors
- Write tutorial
- Fix some strange error messages
- Make AppendCell crate-private
- Overhaul of error handling internals
- ~20% improvement in parser performance
- Improve errors for missing delimiters
- Add some missing documentation
- Implement automatic error recovery
- Enabled with
recover = truein your parser's configuration block - Automatically recovers to the delimiters of delimited lists and of wrapped named rules
- Wrapped named rules like
parens: "(" parens* ")" -> MyType { ... }
- Wrapped named rules like
- Enabled with
- Remove all runtime dependencies
- Implement lookahead optimization
- Automatically generates a match statement at compiletime for choice patterns
- Looks ahead by one character only
- ~25% improvement in parser performance
- Add tests
- Improve docs
- Add parser_repl function for easy testing of a simple parser
- Only intended for debugging, very minimal REPL without scrolling
- Prettier, more informative errors
- Error ranges, which point out an error's origin / context as well
- Implementation of proof of concept parsers
- Initial working release