All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Be aware that this project is still v0.y.z which means that anything can change anytime:
"4. Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable."
(Semantic Versioning Specification)
We defined for this project that while being on major version zero we mark incompatible changes with
new minor version numbers. Please note that this is no version handling covered by Semver
.
- New support for handling of user defined comments (
%line_comment
,%block_comment
)- The new method
CommentHandler::on_comment_parsed
is called in order of appearance each time before the parser consumes a normal token from token stream. - It is default implemented and the user can provide an own implementation if she is interested in comments.
- It is still a bit under investigation where best call this method during parse process.
- The new method
- More efficient implementation of lookahead DFA
- This can also lead to smaller generated parser files up to about 5 percents
- Add new features to support static disabling of log levels during compile time (see issue
#61)
- Thanks to dalance for this proposal
- Exchanged
id_tree
bysyntree
- This includes major API changes that have impact on user code. Please open discussions for migration support
- Filled some missing source documentations
- Fixed issue #58
- ATTENTION ! Incompatible change !
- Removed feature
trim_parse_tree
- Enable trimming of parse tree in build script by calling
trim_parse_tree
on the builder object
- New benches to measure performance of tokenizer
- Using
RegexSet
fromregex-automata
crate as foundation of tokenizing- This will result in major performance boost
- Currently unicode word boundaries are not supported, so one has to use ASCII word boundaries
instead. Simple change occurrences of
\b
to(?-u:\b)
.
- Removed clippy warning
- Removed
miette
as error handling - General improvements of error handling
- Fixed the problem that regex for white spaces consumed newline characters
- Fixed issue #54
- In
TokenStream
the size of the lookahead buffer is always at least 1
- In
- Changed repository reference to the new location
- Otherwise fully compatible with version 0.11.1
- Merged PR #43 from ryo33
- Use \s for WHITESPACE_TOKEN
- Supporting Span information for
parol
's new feature to generate span calculation
- Using
derive_builder
in version 0.12.0 now so that we can use re-export decently.
- Reexporting once_cell now
- Merged PR #2 from ry033. Kudos 👍
- This introduces a new feature "auto_generation" that should be enabled for crates that use
parol
's auto generation mode. If you don't know exactly what this is, please enable this feature! I consider to make it a default feature in future release.
- This introduces a new feature "auto_generation" that should be enabled for crates that use
Token
: Fixed the methodto_owned
and added a methodinto_owned
.
This release introduces breaking changes to the public API. To indicate this we increase minor version number.
- Removed
OwnedToken
type and usedCow
to hold the scanned text inToken
s instead. Anyway this member is private and can only be accessed via methodtext()
. See below for more on this new method. - The
Token
's constructor methodwith
had a change in the type of the text parameter which should be fairly easy to adapt in user code. - The
Token
'sto_owned
method returns aToken
now. - The parsed text of a token can now be accessed via method
text()
of typeToken
now. Formerly you used the membersymbol
directly which is not possible anymore. - Similarly the method to access the token's text via
ParseTree
was renamed fromsymbol()
totext()
in the implementation ofparser::ParseTreeStackEntry
- The types
errors::FileSource
,lexer::Location
andlexer::TokenIter
now internally use aCow<Path>
for holding the file name instead of a more expensiveArc<PathBuf>
. This was originally chosen because of the necessity ofmiette::SourceCode
to beSend + Sync
. But the Cow will do the same with much less effort.- These changes effect user code due to changes in the methods
try_new
oferrors::FileSource
,with
oflexer::Location
andnew
oflexer::TokenIter
- These changes effect user code due to changes in the methods
- Better diagnostics to support parol language server
- Changed display format of
Location
to match vscode's format - Improved traces
- Fixed a bug in TokenStream::push_scanner
- Improved debugging support for error
pop from an empty scanner stack
. - New error type
ParserError::PopOnEmptyScannerStateStack
- Made
ParseType
aCopy
- Using miette 0.5.1 now
- Also updated some other crate references
This version brings rather breaking changes:
- Provide each token with the file name
- Thus the init method could be removed from
UserActionsTrait
. - Factored out the location information form the token types into a separate
Location
struct.
- Add explicit lifetimes in
UserActionsTrait
to aid the use of Token<'t> inparol
's auto-generation feature.
- New test for scanner state switching and the consistence of
miette::NamedSource
which is produced from token stream and token span. TokenStream::ensure_buffer
is called at the end ofTokenStream::consume
to have a more consistent behavior ofTokenStream::all_input_consumed
- Optimized creation of errors::FileSource using the TokenStream
- Referencing
miette ^4.0
now.
- Better formatting of file paths
- Revived
OwnedToken
type for auto-generation feature ofparol
-
As of this version a detailed changelog is maintained to help people to keep track of changes that have been made since last version of
parol_runtime
. -
A new (non-default) feature
trim_parse_tree
was added. The featuretrim_parse_tree
is useful if performance is a goal and the full parse tree is not needed at the end of the parse process. You can activate this feature in your dependencies with this entryparol_runtime = { version = "0.5.5", default-features = false, features = ["trim_parse_tree"] }
The parse tree returned from
LLKParser::parse
contains only the root node and is therefore useless if the feature is activated. Also note that you can't access the children of the nodes provided as parameters of your semantic actions (each of type&ParseTreeStackEntry
) because they don't have children anymore. Therefore to navigate them will fail.This fixes issue (enhancement) #1