Repository navigation
1.6.0
The theme of this release is "type information". Overall, function signatures
have been greatly elaborated across the various systems.
Added
->,fn,always, andmaybefor concise definition of function
signatures that involve parsers.- Parser:
sliding-takeandsliding-take1for parsing escaped characters
efficiently.
Changed
<$is now a macro.betweenis now a macro.:failcan be returned from the lambda given toapto fail the whole parse.
This is useful for manually validating the results of parse.- toml: Improved performance.
- xml: Improved performance.
Removed
- Certain parsers no longer have an internal, automatically managed "lambda
cache". In any case, it is considered best practice to instead define your own
top-level, preallocated parsers for known cost-centers. These often involve
char,string,between, andconsume. For instance, you should
essentially always define:
(defparameter +colon+ (p:char #\:))And call +colon+ at usage sites, instead of using p:char directly within
your composite parsers. This avoids a significant amount of lambda allocation at
runtime. By doing this consistently you can expect a 3x-10x reduction in memory
allocation and a 2x-3x speed up.
For parsers/combinators that have a &key id in their arguments lists, the
argument have been left alone to avoid API breakage, although it now has no
effect. Even so, you should define your own defparameters for these as well.