Revision history for XS-Parse-Keyword 0.51 2026-09-24 [CHANGES] * Recognise the new undef-aware equality operators on Perl 5.45.3 onwards (PPC0030) 0.50 2026-09-10 [BUGFIXES] * Use `SvROK` not `SvRV` to check for values being references (CVE-2026-85644) * Avoid putting #ifdef inside the arguments to `boolSV()`, that may itself be a macro (RT170453) 0.49 2025-09-23 [BUGFIXES] * Appease C compilers that don't like to `return` a void expression from a void-returning function (RT170345) 0.48 2025-01-09 [CHANGES] * Added `XPK_FLAG_PERMIT_LEXICAL`, allowing optional 'my'-prefixed keywords 0.47 2024-11-25 [BUGFIXES] * Don't upset gcc 15, by ensuring that function pointer casts fully specify argument types (RT157196) 0.46 2024-09-03 [CHANGES] * Added `XPK_PREFIXED_TERMEXPR_ENTERLEAVE` * Use module-specific rather than dist-specific dirs to store `include/` files 0.45 2024-08-29 [CHANGES] * Refuse to register operators that have neither `.new_op` nor `.ppadd`, as these will never work [BUGFIXES] * Update for perl 5.41.3: `OP_SMARTMATCH` is now removed, so make that registration conditional (RT155194) 0.44 2024-07-19 [BUGFIXES] * `boot_xs_parse_infix()` has to load `XS/Parse/Infix.pm`, the perl module * Fix opname check for lexical operator alises, to match Perl's actual identifier rules * Fix deparse logic for fully-qualified infix operator names * Fix `lex_scan_packagename()` to not get confused by attribute syntax 0.43 2024-07-03 [CHANGES] * Use `File::ShareDir` for storing .h include files, rather than storing the contents in the `__DATA__` section of the build helpers * Support a new naming model for infix operators that supports lexical-aliases and renaming at import time 0.42 2024-04-30 [BUGFIXES] * Don't crash on zero-argument calls to list-associative wrapper functions (thanks aquanight) (RT153244) 0.41 2024-04-25 [BUGFIXES] * Remmeber to EXTEND the stack in list-associative operator wrapper functions (thanks aquanight) (RT153173) 0.40 2024-04-23 [CHANGES] * Support N-way list-associative operators, implemented as LISTOPs * Delete the no-longer-used API constants XPI_OPERAND_{ARITH,TERM,CUSTOM} from XSParseInfix.h [BUGFIXES] * Avoid a subsequent `use VERSION` in unit tests to keep perl 5.39.8 happy 0.39 2023-12-04 [CHANGES] * Added optional variants of XPK_ARITHEXPR, XPK_TERMEXPR, XPK_LISTEXPR and the context-forcing versions 0.38 2023-08-09 [BUGFIXES] * Fix warn() non-static format string (RT149346) * Don't bother with Build.PL probing for PL_infix_plugin; just use perl version number 0.37 2023-08-08 [CHANGES] * Added `XPK_WARNING()` and several conditional variants 0.36 2023-07-20 [BUGFIXES] * Remember to also call `op_scope()` after `block_end()` if the XPK_FLAG_BLOCKSCOPE flag is set 0.35 2023-07-19 [CHANGES] * Added XPK_INTRO_MY, to call `intro_my()` * Added XPK_FLAG_BLOCKSCOPE to wrap a block_start()+block_end() around a syntax construction * Renamed XPK_PARENSCOPE to XPK_PARENS, etc.. * Adjusted documentation of XS::Parse::Infix for release of Perl v5.38 0.34 2023-06-14 [CHANGES] * Swap all unit tests from Test::More to Test2::V0 [BUGFIXES] * Remember to set `-std=c99` compiler flag on Perls before v5.36 * Skip whitespace between pieces of SEQUENCE or SEPARATEDLIST 0.33 2023-02-18 [CHANGES] * Added XPK_LEXVAR, a non `my`-alike variant * Added XPK_*_pieces() macros allowing caller to dynamically generate sub-arrays of pieces [BUGFIXES] * Remember to consume whitespace between XPK_REPEATED elements 0.32 2023-01-12 [BUGFIXES] * Ensure that XPK_TERMEXPR acting as a fullexpr is OK with empty parens (RT145618) 0.31 2022-12-25 [CHANGES] * PL_infix_plugin now exists in 5.37.7 * Support the new infix operator precedence levels added by perl v5.37.7 * Various updates to hax/ support files 0.30 2022-12-03 [CHANGES] * Added XPK_STAGED_ANONSUB; inspired a bit by XS::Parse::Sublike for customising the parsing of anonmethod 0.29 2022-12-01 [CHANGES] * Added XPK_PREFIXED_TERMEXPR_ENTERLEAVE [BUGFIXES] * Don't try to call `SvPVX()` on a `newSV(0)` because -DDEBUGGING perls get upset (RT145278) * Remember to `break` out of switch block cases when testing for `KEYWORD_PLUGIN_*` return values 0.28 2022-11-25 [CHANGES] * Include a XSParseInfixClassification field in the XSParseInfixInfo structure * Do not permit mixed identifier/non characters in the names of registered infix operators * No longer supports XSParseInfix ABI version 0 [BUGFIXES] * When parsing an infix operator name, make sure not to be confused by additional identifier characters immediately after it 0.27 2022-10-31 [CHANGES] * Updates to XS::Parse::Infix for latest `infix-plugin` perl5 branch + parsedata field is now an SV **, not an ANY * * Expose parse_infix() as a real ABI function, allowing infix operators to be hyper-operators and parse other operator names 0.26 2022-10-24 [CHANGES] * Updates to XS::Parse::Infix for latest `infix-plugin` perl5 branch + Requires classification to set the operator precedence + No longer need XPI_OPERAND_ARITH or XPI_OPERAND_TERM; most of .lhs_flags and .rhs_flags are redundant now + No longer support XPI_OPERAND_CUSTOM + Optional `parse` phase for parametric/hyper-operators * Bump XS::Parse::Infix ABI version to 2 * Declare XPI ABI v0 as deprecated, soon to be removed 0.25 2022-07-25 [CHANGES] * Permit infix operators to consume fewer than all the available symbols; allowing for RHS operands that begin with symbols without intervening whitespace * Improved unit-testing of infix operator parser precedence issues * Added `XPI_OPERAND_ARITH`; renumbered `XPI_OPERAND_TERM` to be non-zero. Currently zero is accepted for back-compat 0.24 2022-06-26 [CHANGES] * Skip attempting to create duplicate wrapper funcs, in case of multiple registrations of the same operator with different spellings [BUGFIXES] * Arrange extra_linker_flags correctly while building probe program for PL_infix_plugin 0.23 2022-05-18 [CHANGES] * Defined XPK_KEYWORD, a better version of XPK_LITERAL for keyword-like tokens * Defined XPK_ARITHEXPR, a higher-precedence version of XPK_TERMEXPR * Defined XPK_ARGSCOPE, a variant of XPK_PARENSCOPE where the parens themselves are optional * Undocument the old XPK_STRING token type [BUGFIXES] * Fixes for bugs that affect -DDEBUGGING-enabled perls + Remember to clear OPf_KIDS when stealing the op_first of a LISTOP (RT142770) + Don't call cv_clone() at compiletime when unit testing; generate an OP_ANONCODE instead (RT142771) 0.22 2022-02-21 [CHANGES] * Added XPK_AUTOSEMI piece type [BUGFIXES] * Don't segfault if lex_scan_lexvar() fails (RT140402) * Set required version of ExtUtils::ParseXS for multiple t/*.xs files 0.21 2021-10-12 [BUGFIXES] * Fix for perl 5.20 - cannot use assert() as an expression 0.20 (bad MANIFEST) 0.19 2021-10-05 [CHANGES] * Defined XPK_PREFIXED_BLOCK_ENTERLEAVE and XPK_SETUP for customizing the parser context around blocks 0.18 2021-09-28 [CHANGES] * Define the XPI_OPERAND_ONLY_LOOK flag * Define a callchecker for list/list infix operators. Add a callchecker that can optimise out certain kinds of operations (ref to padav or pkgav, anonlist if XPI_OPERAND_ONLY_LOOK is set) [BUGFIXES] * cygwin requires deparse_infix to be declared with XS_INTERNAL() (RT139449) * Some architectures require intermediate storage for values in the test function pp_addpairs (RT139445) * Fix conditions in lexical variable type checking (RT139444) 0.17 2021-09-23 [CHANGES] * Support certain kinds of list operands on LHS of infix operators * Generate wrapper functions around list-list infix operators, which unpack their argument lists from two ARRAYrefs 0.16 2021-09-21 [CHANGES] * Attempt automatic deparsing of infix operators * Support certain kinds of list operands on RHS of infix operators 0.15 2021-09-06 [CHANGES] * Optional generation of wrapper functions around scalar-infix operators * Quieter Build.PL by skipping PL_infix_plugin check on versions of perl known to be too old it 0.14 2021-08-31 [CHANGES] * Added the entire XS::Parse::Infix subsystem * Added XPK_INFIX_* token types 0.13 2021-08-26 [CHANGES] * Bump to ABI version 2; pass build1's arg0 param as a pointer, not a direct struct copy [BUGFIXES] * Back-compat for ABI version 1's build1 arg0 param not having a line number (RT138708) 0.12 2021-08-16 [CHANGES] * Support probe on XPK_IDENT, XPK_PACKAGENAME, XPK_COMMALIST * Provide optional versions of XPK_IDENT and XPK_PACKAGENAME * Report the line number each piece was parsed from 0.11 2021-08-03 [BUGFIXES] * Split Builder.pm into two parts (static + dynamic), so the static part can be indexed as normal by usual CPAN toolchain (RT138313) 0.10 2021-07-13 [CHANGES] * Better configure-time probing for HPUX compiler support [BUGFIXES] * Fix for CHOICE/TAGGEDCHOICE corrupting the value of ->i in the result (RT136845) 0.09 2021-07-12 [CHANGES] * Attempt to support HPUX, which may need additional compiletime arguments to support anonymous inner unions * Better compiletime error messages by attempting to include some source context in the same style as yyerror() * Slight compiletime performance boost by setting PERL_NO_GET_CONTEXT [BUGFIXES] * Check for recursive parser errors and abort (RT137458) 0.08 2021-06-17 [CHANGES] * Support probe in XPK_CHOICE and XPK_TAGGEDCHOICE [BUGFIXES] * Remember to mask off the typeflags in probe_piece() 0.07 2021-06-16 [CHANGES] * Added XPK_BLOCK_VOIDCTX and XPK_TERMEXPR_VOIDCTX * Undocumented the _flags() variants of XPK_BLOCK and XPK_TERMEXPR, and all the flags for them * Support probing in XPK_BLOCK * (undocumented) trial to see if all supported platforms support anonymous unions 0.06 2021-06-01 [BREAKING CHANGES] * ABI version is now 1 - this will require a from-source rebuild of all modules using it. [CHANGES] * Renamed XPK_STRING to XPK_LITERAL * Support probe on the four bracketed scope types * Added _OPT-suffixed versions of the four bracketed scope types * Added more token types: + XPK_LEXVAR_MY + XPK_COMMA + XPK_PREFIXED_BLOCK + XPK_SEQUENCE 0.05 2021-05-31 [CHANGES] * Added context-setting variants of block/expr types: + XPK_BLOCK_SCALARCTX, XPK_BLOCK_LISTCTX + XPK_TERMEXPR_SCALARCTX + XPK_LISTEXPR_LISTCTX 0.04 2021-05-24 [CHANGES] * Added many more token types: XPK_LEXVARNAME, XPK_ATTRIBUTES, XPK_VSTRING, XPK_VSTRING_OPT, XPK_EQUALS * Added XPK_COMMALIST structure type * Defined hooks flags XPK_FLAG_STMT, XPK_FLAG_EXPR, XPK_FLAG_AUTOSEMI * API change to the way .build is invoked, allowing greater future compatibility for args structures 0.03 2021-04-27 [BUGFIXES] * Fix the `VAR never introduced at ...` warnings from uses of XPK_BLOCK * Make sure the Builder.pm file is mentioned in META.{yml,json} so CPAN tools can find it 0.02 2021-04-21 [CHANGES] * Back-compat to perl 5.14 * Avoid passing user strings directly to printf, by emitting XPK_FAILURE using croak("%s", str) * Various documentation wording improvements 0.01 2021-04-14 First version, released on an unsuspecting world.