875ab13421
[2.5.0] - 2022-05-27 - Janosch Müller Added * Regexp::Expression::Base.construct and .token_class methods o see the wiki for details [2.4.0] - 2022-05-09 - Janosch Müller Fixed * fixed interpretation of + and ? after interval quantifiers ({n,n}) - they used to be treated as reluctant or possessive mode indicators - however, Ruby does not support these modes for interval quantifiers - they are now treated as chained quantifiers instead, as Ruby does it - c.f. #3 * fixed Expression::Base#nesting_level for some tree rewrite cases - e.g. the alternatives in /a|[b]/ had an inconsistent nesting_level * fixed Scanner accepting invalid posix classes, e.g. [[:foo:]] - they raise a SyntaxError when used in a Regexp, so could only be passed as String - they now raise a Regexp::Scanner::ValidationError in the Scanner Added * added Expression::Base#== for (deep) comparison of expressions * added Expression::Base#parts - returns the text elements and subexpressions of an expression - e.g. parse(/(a)/)[0].parts # => ["(", #<Literal @text="a"...>, ")"] * added Expression::Base#te (a.k.a. token end index) - Expression::Subexpression always had #te, only terminal nodes lacked it so far * made some Expression::Base methods available on Quantifier instances, too - #type, #type?, #is?, #one_of?, #options, #terminal? - #base_length, #full_length, #starts_at, #te, #ts, #offset - #conditional_level, #level, #nesting_level , #set_level - this allows a more unified handling with Expression::Base instances * allowed Quantifier#initialize to take a token and options Hash like other nodes * added a deprecation warning for initializing Quantifiers with 4+ arguments: Calling Expression::Base#quantify or Quantifier.new with 4+ arguments is deprecated. It will no longer be supported in regexp_parser v3.0.0. Please pass a Regexp::Token instead, e.g. replace token, text, min, max, mode with ::Regexp::Token.new(:quantifier, token, text). min, max, and mode will be derived automatically. Or do exp.quantifier = Quantifier.construct(token: token, text: str). This is consistent with how Expression::Base instances are created. [2.3.1] - 2022-04-24 - Janosch Müller Fixed * removed five inexistent unicode properties from Syntax#features - these were never supported by Ruby or the Regexp::Scanner - thanks to Markus Schirp for the report [2.3.0] - 2022-04-08 - Janosch Müller Added * improved parsing performance through Syntax refactoring - instead of fresh Syntax instances, pre-loaded constants are now re-used - this approximately doubles the parsing speed for simple regexps * added methods to Syntax classes to show relative feature sets - e.g. Regexp::Syntax::V3_2_0.added_features * support for new unicode properties of Ruby 3.2 / Unicode 14.0 |
||
---|---|---|
.. | ||
DESCR | ||
distinfo | ||
Makefile | ||
PLIST |