- Support for passing the size of the input string to the matching algorithm.
- Call
pt_match_ninstead ofpt_matchto pass the string size. pt_matchsimply forwards the call topt_match_npassingSIZE_MAXas the string size.- A new
PT_OP_CUSTOM_MATCHER_Noperation was added for custom matchers that receive the input string size. Use thePT_CUSTOM_MATCHER_Nmacro orCUSTOM_MATCHER_Nalias to create such expression.
- Call
- Support for passing custom
malloc/realloc/freefunctions inpt_match_options
- Compilation and support for literals, case insensitive and set expressions when
PT_ELEMENT_TYPEis notchar
PT_MALLOC,PT_REALLOCandPT_FREEmacros. Pass custom memory functions inpt_match_optionsinstead.
- Refactor project as a single header implementation
- Split Quantifier Expressions into At Least and At Most expressions
- Make
PT_DATAtype configurable, just#define PT_DATA <your type here> - Add Action Expressions to simplify implementation and make code more readable
- Reimplement match algorithm using recursion. This is much faster than the previous approach.
- Make Expressions be layed out contiguously in memory and remove heap based creation and destruction of them
- Grammar literals are now definable at compile-time
- Add Byte expression
- Change actions to receive the capture with pointer and size, instead of pointer to input string, start and end of capture
- Change Character Class Expressions to use only functions defined in
ctype.h - Change Range Expressions to use 2 bytes instead of a NULL terminated string
- Use Grammars without malloc'ing them.
- Populate
pt_match_result.data.iwith the first syntactic error code when syntactic errors occur
- Put
extern "C"declarations in inner headers.
- ABI change on
pt_match_options - Included Case Insensitive and Character Class Expressions (the old Custom Matcher)
- Changed Custom Matcher Expressions to allow operating on strings, also receiving userdata
- Removed all the Action sequence computation, as Actions are already stacked in the right sequence. Running actions is now iterative, O(n) and use far less memory.
- Fixed
SEQandORexpression macros on C++, turns out they behave differently about temporary lifetime of arrays.
- Fixed
SEQandORexpression macros to compile on both C and C++ using preprocessor macros andinitializer_listdirectly onmacro-on.h.
- Added
extern "C"declaration onpega-texto.hfor using in C++.
- Fixed validation error code emmited when
pt_is_nullablereturned true, as it may find an error other thanPT_VALIDATE_LOOP_EMPTY_STRING.
- Added
NULLstring check on match.
- Fixed validation error on empty
SEQandORExpressions, which are valid with aNULLpointer.
- Macros for Expressions to not own memory buffers
- Empty
SEQandORExpressions don't allocate a 0-byte buffer anymore
- Fixed validation error on Non-terminal cycles.
- Fixed validation error on Non-terminal cycles.
- Basic error handling support.
- Expressions, Grammars, parsing, validation, actions.