Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-XS-Parse-Keyword for
openSUSE:Factory checked in at 2023-07-30 20:57:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-XS-Parse-Keyword (Old)
and /work/SRC/openSUSE:Factory/.perl-XS-Parse-Keyword.new.32662 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-XS-Parse-Keyword"
Sun Jul 30 20:57:26 2023 rev:15 rq:1101231 version:0.360.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-XS-Parse-Keyword/perl-XS-Parse-Keyword.changes
2023-07-12 17:26:38.802247928 +0200
+++
/work/SRC/openSUSE:Factory/.perl-XS-Parse-Keyword.new.32662/perl-XS-Parse-Keyword.changes
2023-07-30 20:57:32.115135371 +0200
@@ -1,0 +2,20 @@
+Fri Jul 21 03:11:07 UTC 2023 - Tina Müller <[email protected]>
+
+- updated to 0.36
+ see /usr/share/doc/packages/perl-XS-Parse-Keyword/Changes
+
+ 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
+
+-------------------------------------------------------------------
Old:
----
XS-Parse-Keyword-0.34.tar.gz
New:
----
XS-Parse-Keyword-0.36.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-XS-Parse-Keyword.spec ++++++
--- /var/tmp/diff_new_pack.rW49Zy/_old 2023-07-30 20:57:32.839139669 +0200
+++ /var/tmp/diff_new_pack.rW49Zy/_new 2023-07-30 20:57:32.843139693 +0200
@@ -18,12 +18,14 @@
%define cpan_name XS-Parse-Keyword
Name: perl-XS-Parse-Keyword
-Version: 0.34
+Version: 0.360.0
Release: 0
+%define cpan_version 0.36
+Provides: perl(XS::Parse::Keyword) = 0.360.0
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: XS functions to assist in parsing keyword syntax
URL: https://metacpan.org/release/%{cpan_name}
-Source0:
https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
+Source0:
https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
BuildRequires: perl
BuildRequires: perl-macros
@@ -32,6 +34,10 @@
BuildRequires: perl(ExtUtils::ParseXS) >= 3.16
BuildRequires: perl(Module::Build) >= 0.400400
BuildRequires: perl(Test2::V0)
+Provides: perl(XS::Parse::Infix) = 0.360.0
+Provides: perl(XS::Parse::Infix::Builder) = 0.360.0
+Provides: perl(XS::Parse::Keyword::Builder) = 0.360.0
+%define __perllib_provides /bin/true
%{perl_requires}
%description
@@ -47,7 +53,7 @@
requiring changes or at least a rebuild of any module that depends on it.
%prep
-%autosetup -n %{cpan_name}-%{version}
+%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Build.PL --installdirs=vendor optimize="%{optflags}"
++++++ XS-Parse-Keyword-0.34.tar.gz -> XS-Parse-Keyword-0.36.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/Changes
new/XS-Parse-Keyword-0.36/Changes
--- old/XS-Parse-Keyword-0.34/Changes 2023-06-14 18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/Changes 2023-07-20 17:56:49.000000000 +0200
@@ -1,5 +1,19 @@
Revision history for XS-Parse-Keyword
+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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/MANIFEST
new/XS-Parse-Keyword-0.36/MANIFEST
--- old/XS-Parse-Keyword-0.34/MANIFEST 2023-06-14 18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/MANIFEST 2023-07-20 17:56:49.000000000 +0200
@@ -43,7 +43,7 @@
t/38pieces-infix.t
t/40build.t
t/41structures.t
-t/42scopes.t
+t/42containers.t
t/43probing.t
t/50flags-autosemi.t
t/60line.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/META.json
new/XS-Parse-Keyword-0.36/META.json
--- old/XS-Parse-Keyword-0.34/META.json 2023-06-14 18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/META.json 2023-07-20 17:56:49.000000000 +0200
@@ -40,19 +40,19 @@
"provides" : {
"XS::Parse::Infix" : {
"file" : "lib/XS/Parse/Infix.pm",
- "version" : "0.34"
+ "version" : "0.36"
},
"XS::Parse::Infix::Builder" : {
"file" : "lib/XS/Parse/Infix/Builder.pm",
- "version" : "0.34"
+ "version" : "0.36"
},
"XS::Parse::Keyword" : {
"file" : "lib/XS/Parse/Keyword.pm",
- "version" : "0.34"
+ "version" : "0.36"
},
"XS::Parse::Keyword::Builder" : {
"file" : "lib/XS/Parse/Keyword/Builder.pm",
- "version" : "0.34"
+ "version" : "0.36"
}
},
"release_status" : "stable",
@@ -61,6 +61,6 @@
"http://dev.perl.org/licenses/"
]
},
- "version" : "0.34",
+ "version" : "0.36",
"x_serialization_backend" : "JSON::PP version 4.07"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/META.yml
new/XS-Parse-Keyword-0.36/META.yml
--- old/XS-Parse-Keyword-0.34/META.yml 2023-06-14 18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/META.yml 2023-07-20 17:56:49.000000000 +0200
@@ -19,19 +19,19 @@
provides:
XS::Parse::Infix:
file: lib/XS/Parse/Infix.pm
- version: '0.34'
+ version: '0.36'
XS::Parse::Infix::Builder:
file: lib/XS/Parse/Infix/Builder.pm
- version: '0.34'
+ version: '0.36'
XS::Parse::Keyword:
file: lib/XS/Parse/Keyword.pm
- version: '0.34'
+ version: '0.36'
XS::Parse::Keyword::Builder:
file: lib/XS/Parse/Keyword/Builder.pm
- version: '0.34'
+ version: '0.36'
requires:
perl: '5.014'
resources:
license: http://dev.perl.org/licenses/
-version: '0.34'
+version: '0.36'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/README
new/XS-Parse-Keyword-0.36/README
--- old/XS-Parse-Keyword-0.34/README 2023-06-14 18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/README 2023-07-20 17:56:49.000000000 +0200
@@ -71,6 +71,13 @@
The semicolon, if present, will be consumed automatically.
+ XPK_FLAG_BLOCKSCOPE
+
+ The entire parse and build process will be wrapped in a pair of
+ block_start() and block_end() calls. This ensures that, for example,
+ any newly-introduced lexical variables do not escape from the scope
+ of the syntax created by the keyword.
+
The permit Stage
const char *permit_hintkey;
@@ -535,6 +542,14 @@
whereas XPK_KEYWORD("key") would not because of the subsequent "w"
character.
+ XPK_INTRO_MY
+
+ atomic, emits nothing.
+
+ Calls the core perl intro_my() function immediately. No input is
+ consumed and no output value is generated. This is often useful after
+ XPK_LEXVAR_MY.
+
XPK_SEQUENCE
structural, might support probe, emits nothing.
@@ -628,46 +643,45 @@
An XPK_COMMALIST supports probe if its first contained piece does; i.e.
is transparent to probing.
- XPK_PARENSCOPE
+ XPK_PARENS
structural, can probe, emits nothing.
- XPK_PARENSCOPE(pieces ...)
+ XPK_PARENS(pieces ...)
A structural type which expects to find a sequence of pieces, all
contained in parentheses as ( ... ). This will pass no extra arguments.
- XPK_ARGSCOPE
+ XPK_ARGS
structural, emits nothing.
- XPK_ARGSCOPE(pieces ...)
+ XPK_ARGS(pieces ...)
- A structural type similar to XPK_PARENSCOPE, except that the
- parentheses themselves are optional; much like Perl's parsing of calls
- to known functions.
+ A structural type similar to XPK_PARENS, except that the parentheses
+ themselves are optional; much like Perl's parsing of calls to known
+ functions.
If parentheses are encountered in the input, they will be consumed by
- this piece and it will behave identically to XPK_PARENSCOPE. If there
- is no open parenthesis, this piece will behave like XPK_SEQUENCE and
- consume all the pieces inside it, without expecting a closing
- parenthesis.
+ this piece and it will behave identically to XPK_PARENS. If there is no
+ open parenthesis, this piece will behave like XPK_SEQUENCE and consume
+ all the pieces inside it, without expecting a closing parenthesis.
- XPK_BRACKETSCOPE
+ XPK_BRACKETS
structural, can probe, emits nothing.
- XPK_BRACKETSCOPE(pieces ...)
+ XPK_BRACKETS(pieces ...)
A structural type which expects to find a sequence of pieces, all
contained in square brackets as [ ... ]. This will pass no extra
arguments.
- XPK_BRACESCOPE
+ XPK_BRACES
structural, can probe, emits nothing.
- XPK_BRACESCOPE(pieces ...)
+ XPK_BRACES(pieces ...)
A structural type which expects to find a sequence of pieces, all
contained in braces as { ... }. This will pass no extra arguments.
@@ -677,11 +691,11 @@
special constrained syntax that should not just accept an arbitrary
block.
- XPK_CHEVRONSCOPE
+ XPK_CHEVRONS
structural, can probe, emits nothing.
- XPK_CHEVRONSCOPE(pieces ...)
+ XPK_CHEVRONS(pieces ...)
A structural type which expects to find a sequence of pieces, all
contained in angle brackets as < ... >. This will pass no extra
@@ -691,20 +705,19 @@
contents of this scope shouldn't allow arbitrary expressions or the
closing bracket will be ambiguous.
- XPK_PARENSCOPE_OPT, XPK_BRACKETSCOPE_OPT, XPK_BRACESCOPE_OPT,
- XPK_CHEVRONSCOPE_OPT
+ XPK_PARENS_OPT, XPK_BRACKETS_OPT, XPK_BRACES_OPT, XPK_CHEVRONS_OPT
structural, can probe, emits i.
- XPK_PARENSCOPE_OPT(pieces ...)
- XPK_BRACKETSCOPE_OPT(pieces ...)
- XPK_BRACESCOPE_OPT(pieces ...)
- XPK_CHEVERONSCOPE_OPT(pieces ...)
-
- Each of the four XPK_...SCOPE macros above has an optional variant,
- whose name is suffixed by _OPT. These pass an argument whose i field is
- either true or false, indicating whether the scope was found, followed
- by the values from the scope itself.
+ XPK_PARENS_OPT(pieces ...)
+ XPK_BRACKETS_OPT(pieces ...)
+ XPK_BRACES_OPT(pieces ...)
+ XPK_CHEVERONS_OPT(pieces ...)
+
+ Each of the four contained structure macros above has an optional
+ variant, whose name is suffixed by _OPT. These pass an argument whose i
+ field is either true or false, indicating whether the scope was found,
+ followed by the values from the scope itself.
This is a convenient shortcut to nesting the scope within a
XPK_OPTIONAL macro.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/XSParseKeyword.h
new/XS-Parse-Keyword-0.36/XSParseKeyword.h
--- old/XS-Parse-Keyword-0.34/XSParseKeyword.h 2023-06-14 18:44:30.000000000
+0200
+++ new/XS-Parse-Keyword-0.36/XSParseKeyword.h 2023-07-20 17:56:49.000000000
+0200
@@ -9,7 +9,7 @@
union {
char c; /* LITERALCHAR */
const char *str; /* LITERALSTR */
- const struct XSParseKeywordPieceType *pieces; /* SCOPEs */
+ const struct XSParseKeywordPieceType *pieces; /* containers */
void (*callback)(pTHX_ void *hookdata); /* SETUP, ANONSUB
PREPARE+START */
OP *(*op_wrap_callback)(pTHX_ OP *o, void *hookdata);
@@ -17,9 +17,10 @@
};
enum {
- XPK_FLAG_EXPR = (1<<0),
- XPK_FLAG_STMT = (1<<1),
- XPK_FLAG_AUTOSEMI = (1<<2),
+ XPK_FLAG_EXPR = (1<<0),
+ XPK_FLAG_STMT = (1<<1),
+ XPK_FLAG_AUTOSEMI = (1<<2),
+ XPK_FLAG_BLOCKSCOPE = (1<<3),
};
enum {
@@ -46,6 +47,8 @@
XS_PARSE_KEYWORD_INFIX = 0x40, /* infix */
+ XS_PARSE_KEYWORD_INTRO_MY = 0x60, /* emits nothing */
+
XS_PARSE_KEYWORD_SETUP = 0x70, /* invokes callback, emits nothing */
XS_PARSE_KEYWORD_ANONSUB_PREPARE, /* invokes callback, emits nothing */
@@ -58,10 +61,10 @@
XS_PARSE_KEYWORD_CHOICE, /* i, contained */
XS_PARSE_KEYWORD_TAGGEDCHOICE, /* i, contained */
XS_PARSE_KEYWORD_SEPARATEDLIST, /* i, contained */
- XS_PARSE_KEYWORD_PARENSCOPE = 0xb0, /* contained */
- XS_PARSE_KEYWORD_BRACKETSCOPE, /* contained */
- XS_PARSE_KEYWORD_BRACESCOPE, /* contained */
- XS_PARSE_KEYWORD_CHEVRONSCOPE, /* contained */
+ XS_PARSE_KEYWORD_PARENS = 0xb0, /* contained */
+ XS_PARSE_KEYWORD_BRACKETS, /* contained */
+ XS_PARSE_KEYWORD_BRACES, /* contained */
+ XS_PARSE_KEYWORD_CHEVRONS, /* contained */
};
enum {
@@ -84,7 +87,7 @@
XPK_TYPEFLAG_ENTERLEAVE = (1<<20), /* wrap ENTER/LEAVE pair around the item
*/
- XPK_TYPEFLAG_MAYBEPARENS = (1<<21), /* parens themselves are optional on
PARENSCOPE */
+ XPK_TYPEFLAG_MAYBEPARENS = (1<<21), /* parens themselves are optional on
PARENS */
};
#define XPK_BLOCK_flags(flags) {.type = XS_PARSE_KEYWORD_BLOCK|(flags),
.u.pieces = NULL}
@@ -156,6 +159,8 @@
#define XPK_INFIX_MATCH_NOSMART XPK_INFIX(XPI_SELECT_MATCH_NOSMART)
#define XPK_INFIX_MATCH_SMART XPK_INFIX(XPI_SELECT_MATCH_SMART)
+#define XPK_INTRO_MY {.type = XS_PARSE_KEYWORD_INTRO_MY}
+
#define XPK_SEQUENCE_pieces(p) {.type = XS_PARSE_KEYWORD_SEQUENCE, .u.pieces =
p}
#define XPK_SEQUENCE(...) XPK_SEQUENCE_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
@@ -181,28 +186,44 @@
#define XPK_FAILURE(s) {.type = XS_PARSE_KEYWORD_FAILURE, .u.str = (const char
*)s}
-#define XPK_PARENSCOPE_pieces(p) {.type = XS_PARSE_KEYWORD_PARENSCOPE,
.u.pieces = p}
-#define XPK_PARENSCOPE(...) XPK_PARENSCOPE_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
-#define XPK_PARENSCOPE_OPT(...) \
- {.type = XS_PARSE_KEYWORD_PARENSCOPE|XPK_TYPEFLAG_OPT, .u.pieces = (const
struct XSParseKeywordPieceType []){ __VA_ARGS__, {0} }}
-
-#define XPK_ARGSCOPE_pieces(p) {.type =
XS_PARSE_KEYWORD_PARENSCOPE|XPK_TYPEFLAG_MAYBEPARENS, .u.pieces = p}
-#define XPK_ARGSCOPE(...) XPK_ARGSCOPE_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
-
-#define XPK_BRACKETSCOPE_pieces(p) {.type = XS_PARSE_KEYWORD_BRACKETSCOPE,
.u.pieces = p}
-#define XPK_BRACKETSCOPE(...) XPK_BRACKETSCOPE_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
-#define XPK_BRACKETSCOPE_OPT(...) \
- {.type = XS_PARSE_KEYWORD_BRACKETSCOPE|XPK_TYPEFLAG_OPT, .u.pieces = (const
struct XSParseKeywordPieceType []){ __VA_ARGS__, {0} }}
-
-#define XPK_BRACESCOPE_pieces(p) {.type = XS_PARSE_KEYWORD_BRACESCOPE,
.u.pieces = p}
-#define XPK_BRACESCOPE(...) XPK_BRACESCOPE_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
-#define XPK_BRACESCOPE_OPT(...) \
- {.type = XS_PARSE_KEYWORD_BRACESCOPE|XPK_TYPEFLAG_OPT, .u.pieces = (const
struct XSParseKeywordPieceType []){ __VA_ARGS__, {0} }}
-
-#define XPK_CHEVRONSCOPE_pieces(p) {.type = XS_PARSE_KEYWORD_CHEVRONSCOPE,
.u.pieces = p}
-#define XPK_CHEVRONSCOPE(...) XPK_CHEVRONSCOPE_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
-#define XPK_CHEVRONSCOPE_OPT(...) \
- {.type = XS_PARSE_KEYWORD_CHEVRONSCOPE|XPK_TYPEFLAG_OPT, .u.pieces = (const
struct XSParseKeywordPieceType []){ __VA_ARGS__, {0} }}
+#define XPK_PARENS_pieces(p) {.type = XS_PARSE_KEYWORD_PARENS, .u.pieces = p}
+#define XPK_PARENS(...) XPK_PARENS_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
+#define XPK_PARENS_OPT(...) \
+ {.type = XS_PARSE_KEYWORD_PARENS|XPK_TYPEFLAG_OPT, .u.pieces = (const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }}
+
+#define XPK_ARGS_pieces(p) {.type =
XS_PARSE_KEYWORD_PARENS|XPK_TYPEFLAG_MAYBEPARENS, .u.pieces = p}
+#define XPK_ARGS(...) XPK_ARGS_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
+
+#define XPK_BRACKETS_pieces(p) {.type = XS_PARSE_KEYWORD_BRACKETS, .u.pieces =
p}
+#define XPK_BRACKETS(...) XPK_BRACKETS_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
+#define XPK_BRACKETS_OPT(...) \
+ {.type = XS_PARSE_KEYWORD_BRACKETS|XPK_TYPEFLAG_OPT, .u.pieces = (const
struct XSParseKeywordPieceType []){ __VA_ARGS__, {0} }}
+
+#define XPK_BRACES_pieces(p) {.type = XS_PARSE_KEYWORD_BRACES, .u.pieces = p}
+#define XPK_BRACES(...) XPK_BRACES_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
+#define XPK_BRACES_OPT(...) \
+ {.type = XS_PARSE_KEYWORD_BRACES|XPK_TYPEFLAG_OPT, .u.pieces = (const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }}
+
+#define XPK_CHEVRONS_pieces(p) {.type = XS_PARSE_KEYWORD_CHEVRONS, .u.pieces =
p}
+#define XPK_CHEVRONS(...) XPK_CHEVRONS_pieces(((const struct
XSParseKeywordPieceType []){ __VA_ARGS__, {0} }))
+#define XPK_CHEVRONS_OPT(...) \
+ {.type = XS_PARSE_KEYWORD_CHEVRONS|XPK_TYPEFLAG_OPT, .u.pieces = (const
struct XSParseKeywordPieceType []){ __VA_ARGS__, {0} }}
+
+/* back-compat for older names */
+#define XPK_PARENSCOPE_pieces XPK_PARENS_pieces
+#define XPK_PARENSCOPE XPK_PARENS
+#define XPK_PARENSCOPE_OPT XPK_PARENS_OPT
+#define XPK_ARGSCOPE_pieces XPK_ARGS_pieces
+#define XPK_ARGSCOPE XPK_ARGS
+#define XPK_BRACKETSCOPE_pieces XPK_BRACKETS_pieces
+#define XPK_BRACKETSCOPE XPK_BRACKETS
+#define XPK_BRACKETSCOPE_OPT XPK_BRACKETS_OPT
+#define XPK_BRACESCOPE_pieces XPK_BRACES_pieces
+#define XPK_BRACESCOPE XPK_BRACES
+#define XPK_BRACESCOPE_OPT XPK_BRACES_OPT
+#define XPK_CHEVRONSCOPE_pieces XPK_CHEVRONS_pieces
+#define XPK_CHEVRONSCOPE XPK_CHEVRONS
+#define XPK_CHEVRONSCOPE_OPT XPK_CHEVRONS_OPT
/* This type defined in XSParseInfix.h */
typedef struct XSParseInfixInfo XSParseInfixInfo;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/hax/perl-backcompat.c.inc
new/XS-Parse-Keyword-0.36/hax/perl-backcompat.c.inc
--- old/XS-Parse-Keyword-0.34/hax/perl-backcompat.c.inc 2023-06-14
18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/hax/perl-backcompat.c.inc 2023-07-20
17:56:49.000000000 +0200
@@ -198,16 +198,18 @@
}
#endif
-#ifdef PERL_USE_GCC_BRACE_GROUPS
-# define xV_FROM_REF(XV, ref) \
+#ifndef xV_FROM_REF
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define xV_FROM_REF(XV, ref) \
({ SV *_ref = ref; assert(SvROK(_ref)); assert(SvTYPE(SvRV(_ref)) == SVt_PV
## XV); (XV *)(SvRV(_ref)); })
-#else
-# define xV_FROM_REF(XV, ref) ((XV *)SvRV(ref))
-#endif
+# else
+# define xV_FROM_REF(XV, ref) ((XV *)SvRV(ref))
+# endif
-#define AV_FROM_REF(ref) xV_FROM_REF(AV, ref)
-#define CV_FROM_REF(ref) xV_FROM_REF(CV, ref)
-#define HV_FROM_REF(ref) xV_FROM_REF(HV, ref)
+# define AV_FROM_REF(ref) xV_FROM_REF(AV, ref)
+# define CV_FROM_REF(ref) xV_FROM_REF(CV, ref)
+# define HV_FROM_REF(ref) xV_FROM_REF(HV, ref)
+#endif
#ifndef newPADxVOP
# define newPADxVOP(type, flags, padix) S_newPADxVOP(aTHX_ type, flags,
padix)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/lib/XS/Parse/Infix/Builder.pm
new/XS-Parse-Keyword-0.36/lib/XS/Parse/Infix/Builder.pm
--- old/XS-Parse-Keyword-0.34/lib/XS/Parse/Infix/Builder.pm 2023-06-14
18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/lib/XS/Parse/Infix/Builder.pm 2023-07-20
17:56:49.000000000 +0200
@@ -3,7 +3,7 @@
#
# (C) Paul Evans, 2021 -- [email protected]
-package XS::Parse::Infix::Builder 0.34;
+package XS::Parse::Infix::Builder 0.36;
use v5.14;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/XS-Parse-Keyword-0.34/lib/XS/Parse/Infix/Builder_data.pm.PL
new/XS-Parse-Keyword-0.36/lib/XS/Parse/Infix/Builder_data.pm.PL
--- old/XS-Parse-Keyword-0.34/lib/XS/Parse/Infix/Builder_data.pm.PL
2023-06-14 18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/lib/XS/Parse/Infix/Builder_data.pm.PL
2023-07-20 17:56:49.000000000 +0200
@@ -28,7 +28,7 @@
<$in_h> } );
__DATA__
-package XS::Parse::Infix::Builder_data 0.34;
+package XS::Parse::Infix::Builder_data 0.36;
use v5.14;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/lib/XS/Parse/Infix.pm
new/XS-Parse-Keyword-0.36/lib/XS/Parse/Infix.pm
--- old/XS-Parse-Keyword-0.34/lib/XS/Parse/Infix.pm 2023-06-14
18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/lib/XS/Parse/Infix.pm 2023-07-20
17:56:49.000000000 +0200
@@ -1,9 +1,9 @@
# You may distribute under the terms of either the GNU General Public License
# or the Artistic License (the same terms as Perl itself)
#
-# (C) Paul Evans, 2021-2022 -- [email protected]
+# (C) Paul Evans, 2021-2023 -- [email protected]
-package XS::Parse::Infix 0.34;
+package XS::Parse::Infix 0.36;
use v5.14;
use warnings;
@@ -28,9 +28,8 @@
changes or at least a rebuild of any module that depends on it.
In addition, the places this functionality can be used are relatively small.
-No current release of perl actually supports custom infix operators, though it
-has now been merged to C<blead>, the main development branch, and will be
-present in development release C<v5.37.7> onwards.
+Support for custom infix operators as added in Perl development release
+C<v5.37.7>, and is therefore present in Perl C<v5.38.0>.
In addition, the various C<XPK_INFIX_*> token types of L<XS::Parse::Keyword>
support querying on this module, so some syntax provided by other modules may
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/XS-Parse-Keyword-0.34/lib/XS/Parse/Keyword/Builder.pm
new/XS-Parse-Keyword-0.36/lib/XS/Parse/Keyword/Builder.pm
--- old/XS-Parse-Keyword-0.34/lib/XS/Parse/Keyword/Builder.pm 2023-06-14
18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/lib/XS/Parse/Keyword/Builder.pm 2023-07-20
17:56:49.000000000 +0200
@@ -3,7 +3,7 @@
#
# (C) Paul Evans, 2021 -- [email protected]
-package XS::Parse::Keyword::Builder 0.34;
+package XS::Parse::Keyword::Builder 0.36;
use v5.14;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/XS-Parse-Keyword-0.34/lib/XS/Parse/Keyword/Builder_data.pm.PL
new/XS-Parse-Keyword-0.36/lib/XS/Parse/Keyword/Builder_data.pm.PL
--- old/XS-Parse-Keyword-0.34/lib/XS/Parse/Keyword/Builder_data.pm.PL
2023-06-14 18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/lib/XS/Parse/Keyword/Builder_data.pm.PL
2023-07-20 17:56:49.000000000 +0200
@@ -28,7 +28,7 @@
<$in_h> } );
__DATA__
-package XS::Parse::Keyword::Builder_data 0.34;
+package XS::Parse::Keyword::Builder_data 0.36;
use v5.14;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/lib/XS/Parse/Keyword.pm
new/XS-Parse-Keyword-0.36/lib/XS/Parse/Keyword.pm
--- old/XS-Parse-Keyword-0.34/lib/XS/Parse/Keyword.pm 2023-06-14
18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/lib/XS/Parse/Keyword.pm 2023-07-20
17:56:49.000000000 +0200
@@ -3,7 +3,7 @@
#
# (C) Paul Evans, 2021-2022 -- [email protected]
-package XS::Parse::Keyword 0.34;
+package XS::Parse::Keyword 0.36;
use v5.14;
use warnings;
@@ -85,6 +85,13 @@
The semicolon, if present, will be consumed automatically.
+=item C<XPK_FLAG_BLOCKSCOPE>
+
+The entire parse and build process will be wrapped in a pair of
+C<block_start()> and C<block_end()> calls. This ensures that, for example, any
+newly-introduced lexical variables do not escape from the scope of the syntax
+created by the keyword.
+
=back
=head2 The C<permit> Stage
@@ -549,6 +556,13 @@
C<"keyword">, the piece C<XPK_LITERAL("key")> would match it, whereas
C<XPK_KEYWORD("key")> would not because of the subsequent C<"w"> character.
+=head2 XPK_INTRO_MY
+
+I<atomic, emits nothing.>
+
+Calls the core perl C<intro_my()> function immediately. No input is consumed
+and no output value is generated. This is often useful after C<XPK_LEXVAR_MY>.
+
=head2 XPK_SEQUENCE
I<structural, might support probe, emits nothing.>
@@ -638,43 +652,43 @@
An C<XPK_COMMALIST> supports probe if its first contained piece does; i.e.
is transparent to probing.
-=head2 XPK_PARENSCOPE
+=head2 XPK_PARENS
I<structural, can probe, emits nothing.>
- XPK_PARENSCOPE(pieces ...)
+ XPK_PARENS(pieces ...)
A structural type which expects to find a sequence of pieces, all contained in
parentheses as C<( ... )>. This will pass no extra arguments.
-=head2 XPK_ARGSCOPE
+=head2 XPK_ARGS
I<structural, emits nothing.>
- XPK_ARGSCOPE(pieces ...)
+ XPK_ARGS(pieces ...)
-A structural type similar to C<XPK_PARENSCOPE>, except that the parentheses
+A structural type similar to C<XPK_PARENS>, except that the parentheses
themselves are optional; much like Perl's parsing of calls to known functions.
If parentheses are encountered in the input, they will be consumed by this
-piece and it will behave identically to C<XPK_PARENSCOPE>. If there is no open
+piece and it will behave identically to C<XPK_PARENS>. If there is no open
parenthesis, this piece will behave like C<XPK_SEQUENCE> and consume all the
pieces inside it, without expecting a closing parenthesis.
-=head2 XPK_BRACKETSCOPE
+=head2 XPK_BRACKETS
I<structural, can probe, emits nothing.>
- XPK_BRACKETSCOPE(pieces ...)
+ XPK_BRACKETS(pieces ...)
A structural type which expects to find a sequence of pieces, all contained in
square brackets as C<[ ... ]>. This will pass no extra arguments.
-=head2 XPK_BRACESCOPE
+=head2 XPK_BRACES
I<structural, can probe, emits nothing.>
- XPK_BRACESCOPE(pieces ...)
+ XPK_BRACES(pieces ...)
A structural type which expects to find a sequence of pieces, all contained in
braces as C<{ ... }>. This will pass no extra arguments.
@@ -683,11 +697,11 @@
those will already consume a set of braces. This is intended for special
constrained syntax that should not just accept an arbitrary block.
-=head2 XPK_CHEVRONSCOPE
+=head2 XPK_CHEVRONS
I<structural, can probe, emits nothing.>
- XPK_CHEVRONSCOPE(pieces ...)
+ XPK_CHEVRONS(pieces ...)
A structural type which expects to find a sequence of pieces, all contained in
angle brackets as C<< < ... > >>. This will pass no extra arguments.
@@ -696,19 +710,19 @@
contents of this scope shouldn't allow arbitrary expressions or the closing
bracket will be ambiguous.
-=head2 XPK_PARENSCOPE_OPT, XPK_BRACKETSCOPE_OPT, XPK_BRACESCOPE_OPT,
XPK_CHEVRONSCOPE_OPT
+=head2 XPK_PARENS_OPT, XPK_BRACKETS_OPT, XPK_BRACES_OPT, XPK_CHEVRONS_OPT
I<structural, can probe, emits i.>
- XPK_PARENSCOPE_OPT(pieces ...)
- XPK_BRACKETSCOPE_OPT(pieces ...)
- XPK_BRACESCOPE_OPT(pieces ...)
- XPK_CHEVERONSCOPE_OPT(pieces ...)
-
-Each of the four C<XPK_...SCOPE> macros above has an optional variant, whose
-name is suffixed by C<_OPT>. These pass an argument whose I<i> field is either
-true or false, indicating whether the scope was found, followed by the values
-from the scope itself.
+ XPK_PARENS_OPT(pieces ...)
+ XPK_BRACKETS_OPT(pieces ...)
+ XPK_BRACES_OPT(pieces ...)
+ XPK_CHEVERONS_OPT(pieces ...)
+
+Each of the four contained structure macros above has an optional variant,
+whose name is suffixed by C<_OPT>. These pass an argument whose I<i> field is
+either true or false, indicating whether the scope was found, followed by the
+values from the scope itself.
This is a convenient shortcut to nesting the scope within a C<XPK_OPTIONAL>
macro.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/src/keyword.c
new/XS-Parse-Keyword-0.36/src/keyword.c
--- old/XS-Parse-Keyword-0.34/src/keyword.c 2023-06-14 18:44:30.000000000
+0200
+++ new/XS-Parse-Keyword-0.36/src/keyword.c 2023-07-20 17:56:49.000000000
+0200
@@ -313,9 +313,9 @@
return TRUE;
}
- case XS_PARSE_KEYWORD_PARENSCOPE:
+ case XS_PARSE_KEYWORD_PARENS:
if(piece->type & XPK_TYPEFLAG_MAYBEPARENS)
- croak("TODO: probe_piece on type=PARENSCOPE+MAYBEPARENS");
+ croak("TODO: probe_piece on type=PARENS+MAYBEPARENS");
if(lex_peek_unichar(0) != '(')
return FALSE;
@@ -323,21 +323,21 @@
parse_piece(aTHX_ argsv, argidx, piece, hookdata);
return TRUE;
- case XS_PARSE_KEYWORD_BRACKETSCOPE:
+ case XS_PARSE_KEYWORD_BRACKETS:
if(lex_peek_unichar(0) != '[')
return FALSE;
parse_piece(aTHX_ argsv, argidx, piece, hookdata);
return TRUE;
- case XS_PARSE_KEYWORD_BRACESCOPE:
+ case XS_PARSE_KEYWORD_BRACES:
if(lex_peek_unichar(0) != '{')
return FALSE;
parse_piece(aTHX_ argsv, argidx, piece, hookdata);
return TRUE;
- case XS_PARSE_KEYWORD_CHEVRONSCOPE:
+ case XS_PARSE_KEYWORD_CHEVRONS:
if(lex_peek_unichar(0) != '<')
return FALSE;
@@ -666,6 +666,10 @@
(*argidx)++;
return;
+ case XS_PARSE_KEYWORD_INTRO_MY:
+ intro_my();
+ return;
+
case XS_PARSE_KEYWORD_INFIX:
{
if(!XSParseInfix_parse(aTHX_ piece->u.c, &THISARG.infix))
@@ -728,7 +732,7 @@
}
return;
- case XS_PARSE_KEYWORD_PARENSCOPE:
+ case XS_PARSE_KEYWORD_PARENS:
{
bool has_paren = (lex_peek_unichar(0) == '(');
@@ -758,7 +762,7 @@
return;
}
- case XS_PARSE_KEYWORD_BRACKETSCOPE:
+ case XS_PARSE_KEYWORD_BRACKETS:
if(is_optional) {
THISARG.i = 0;
(*argidx)++;
@@ -775,7 +779,7 @@
return;
- case XS_PARSE_KEYWORD_BRACESCOPE:
+ case XS_PARSE_KEYWORD_BRACES:
if(is_optional) {
THISARG.i = 0;
(*argidx)++;
@@ -792,7 +796,7 @@
return;
- case XS_PARSE_KEYWORD_CHEVRONSCOPE:
+ case XS_PARSE_KEYWORD_CHEVRONS:
if(is_optional) {
THISARG.i = 0;
(*argidx)++;
@@ -836,6 +840,12 @@
SV *argsv = newSV(maxargs * sizeof(XSParseKeywordPiece));
SAVEFREESV(argsv);
+ bool is_blockscope = hooks->flags & XPK_FLAG_BLOCKSCOPE;
+
+ int floor;
+ if(is_blockscope)
+ floor = block_start(TRUE);
+
size_t argidx = 0;
if(hooks->build)
parse_pieces(aTHX_ argsv, &argidx, hooks->pieces, reg->hookdata);
@@ -879,6 +889,9 @@
else
ret = (*hooks->build1)(aTHX_ op, args + 0, reg->hookdata);
+ if(is_blockscope)
+ *op = op_scope(block_end(floor, *op));
+
switch(hooks->flags & (XPK_FLAG_EXPR|XPK_FLAG_STMT)) {
case XPK_FLAG_EXPR:
if(ret && (ret != KEYWORD_PLUGIN_EXPR))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/t/35pieces-lexvar.t
new/XS-Parse-Keyword-0.36/t/35pieces-lexvar.t
--- old/XS-Parse-Keyword-0.34/t/35pieces-lexvar.t 2023-06-14
18:44:30.000000000 +0200
+++ new/XS-Parse-Keyword-0.36/t/35pieces-lexvar.t 2023-07-20
17:56:49.000000000 +0200
@@ -37,4 +37,12 @@
is( $ret2, $ret, 'result of piecelexvar matches previous' );
}
+# intro_my()
+{
+ my $one = "outside";
+ my $ret = piecelexvarmyintro $one in $one + 2;
+ is( $ret, 3, 'result of piecelexvarmyintro' );
+ is( $one, "outside", 'lexvar inside does not leak out' );
+}
+
done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/t/42containers.t
new/XS-Parse-Keyword-0.36/t/42containers.t
--- old/XS-Parse-Keyword-0.34/t/42containers.t 1970-01-01 01:00:00.000000000
+0100
+++ new/XS-Parse-Keyword-0.36/t/42containers.t 2023-07-20 17:56:49.000000000
+0200
@@ -0,0 +1,40 @@
+#!/usr/bin/perl
+
+use v5.14;
+use warnings;
+
+use Test2::V0;
+
+use lib "t";
+use testcase "t::structures";
+
+BEGIN { $^H{"t::structures/permit"} = 1; }
+
+# parens
+{
+ is( parens ( "abc" ), "abc", 'parenthesis container' );
+}
+
+# args - parens are optional
+{
+ is( args ( "123" ), "123", 'arguments container with parens' );
+ is( args "123", "123", 'arguments container without parens' );
+}
+
+# brackets
+{
+ is( brackets [ "def" ], "def", 'bracket container' );
+}
+
+# braces
+{
+ is( braces { "ghi" }, "ghi", 'brace container' );
+}
+
+# chevrons
+{
+ # takes a bareword identifier
+ is( chevrons < jkl >, "jkl", 'chevron container' );
+}
+
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/t/42scopes.t
new/XS-Parse-Keyword-0.36/t/42scopes.t
--- old/XS-Parse-Keyword-0.34/t/42scopes.t 2023-06-14 18:44:30.000000000
+0200
+++ new/XS-Parse-Keyword-0.36/t/42scopes.t 1970-01-01 01:00:00.000000000
+0100
@@ -1,40 +0,0 @@
-#!/usr/bin/perl
-
-use v5.14;
-use warnings;
-
-use Test2::V0;
-
-use lib "t";
-use testcase "t::structures";
-
-BEGIN { $^H{"t::structures/permit"} = 1; }
-
-# paren scope
-{
- is( scopeparen ( "abc" ), "abc", 'parenthesis scope' );
-}
-
-# arg scope - parens are optional
-{
- is( scopeargs ( "123" ), "123", 'arguments scope with parens' );
- is( scopeargs "123", "123", 'arguments scope without parens' );
-}
-
-# bracket scope
-{
- is( scopebracket [ "def" ], "def", 'bracket scope' );
-}
-
-# brace scope
-{
- is( scopebrace { "ghi" }, "ghi", 'brace scope' );
-}
-
-# chevron scope
-{
- # takes a bareword identifier
- is( scopechevron < jkl >, "jkl", 'chevron scope' );
-}
-
-done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/t/pieces.xs
new/XS-Parse-Keyword-0.36/t/pieces.xs
--- old/XS-Parse-Keyword-0.34/t/pieces.xs 2023-06-14 18:44:30.000000000
+0200
+++ new/XS-Parse-Keyword-0.36/t/pieces.xs 2023-07-20 17:56:49.000000000
+0200
@@ -125,6 +125,20 @@
return KEYWORD_PLUGIN_EXPR;
}
+static int build_lexvar_intro(pTHX_ OP **out, XSParseKeywordPiece *args[],
size_t nargs, void *hookdata)
+{
+ PADOFFSET padix = args[0]->padix;
+ OP *expr = args[1]->op;
+
+ OP *varop = newOP(OP_PADSV, OPf_MOD|OPf_REF | (OPpLVAL_INTRO << 8));
+ varop->op_targ = padix;
+
+ OP *assignop = newASSIGNOP(OPf_WANT_VOID, varop, 0, newSVOP(OP_CONST, 0,
newSViv(1)));
+
+ *out = newLISTOP(OP_LINESEQ, 0, assignop, expr);
+ return KEYWORD_PLUGIN_EXPR;
+}
+
static void setup_block_VAR(pTHX_ void *hookdata)
{
char *varname = hookdata;
@@ -294,6 +308,20 @@
.build1 = &build_constpadix,
};
+static const struct XSParseKeywordHooks hooks_lexvar_my_intro = {
+ .flags = XPK_FLAG_BLOCKSCOPE,
+ .permit_hintkey = hintkey,
+
+ .pieces = (const struct XSParseKeywordPieceType []){
+ XPK_LEXVAR_MY(XPK_LEXVAR_ANY),
+ XPK_KEYWORD("in"),
+ XPK_INTRO_MY,
+ XPK_TERMEXPR,
+ 0
+ },
+ .build = &build_lexvar_intro,
+};
+
static const struct XSParseKeywordHooks hooks_attrs = {
.permit_hintkey = hintkey,
@@ -389,6 +417,7 @@
register_xs_parse_keyword("piecelexvarname", &hooks_lexvar_name, NULL);
register_xs_parse_keyword("piecelexvar", &hooks_lexvar, NULL);
register_xs_parse_keyword("piecelexvarmy", &hooks_lexvar_my, NULL);
+ register_xs_parse_keyword("piecelexvarmyintro", &hooks_lexvar_my_intro,
NULL);
register_xs_parse_keyword("pieceattrs", &hooks_attrs, NULL);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/t/probing.xs
new/XS-Parse-Keyword-0.36/t/probing.xs
--- old/XS-Parse-Keyword-0.34/t/probing.xs 2023-06-14 18:44:30.000000000
+0200
+++ new/XS-Parse-Keyword-0.36/t/probing.xs 2023-07-20 17:56:49.000000000
+0200
@@ -126,7 +126,7 @@
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
- XPK_OPTIONAL( XPK_PARENSCOPE( XPK_TERMEXPR ) ),
+ XPK_OPTIONAL( XPK_PARENS( XPK_TERMEXPR ) ),
{0}
},
.build = &build_constbool,
@@ -136,7 +136,7 @@
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
- XPK_OPTIONAL( XPK_BRACKETSCOPE( XPK_TERMEXPR ) ),
+ XPK_OPTIONAL( XPK_BRACKETS( XPK_TERMEXPR ) ),
{0}
},
.build = &build_constbool,
@@ -146,7 +146,7 @@
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
- XPK_OPTIONAL( XPK_BRACESCOPE( XPK_TERMEXPR ) ),
+ XPK_OPTIONAL( XPK_BRACES( XPK_TERMEXPR ) ),
{0}
},
.build = &build_constbool,
@@ -156,7 +156,7 @@
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
- XPK_OPTIONAL( XPK_CHEVRONSCOPE( XPK_IDENT ) ),
+ XPK_OPTIONAL( XPK_CHEVRONS( XPK_IDENT ) ),
{0}
},
.build = &build_constbool,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/XS-Parse-Keyword-0.34/t/structures.xs
new/XS-Parse-Keyword-0.36/t/structures.xs
--- old/XS-Parse-Keyword-0.34/t/structures.xs 2023-06-14 18:44:30.000000000
+0200
+++ new/XS-Parse-Keyword-0.36/t/structures.xs 2023-07-20 17:56:49.000000000
+0200
@@ -107,52 +107,52 @@
.build = &build_constiv,
};
-static const struct XSParseKeywordHooks hooks_scope_paren = {
+static const struct XSParseKeywordHooks hooks_parens = {
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
- XPK_PARENSCOPE( XPK_TERMEXPR ),
+ XPK_PARENS( XPK_TERMEXPR ),
{0}
},
.build = &build_op,
};
-static const struct XSParseKeywordHooks hooks_scope_args = {
+static const struct XSParseKeywordHooks hooks_args = {
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
- XPK_ARGSCOPE( XPK_TERMEXPR ),
+ XPK_ARGS( XPK_TERMEXPR ),
{0}
},
.build = &build_op,
};
-static const struct XSParseKeywordHooks hooks_scope_bracket = {
+static const struct XSParseKeywordHooks hooks_brackets = {
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
- XPK_BRACKETSCOPE( XPK_TERMEXPR ),
+ XPK_BRACKETS( XPK_TERMEXPR ),
{0}
},
.build = &build_op,
};
-static const struct XSParseKeywordHooks hooks_scope_brace = {
+static const struct XSParseKeywordHooks hooks_braces = {
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
- XPK_BRACESCOPE( XPK_TERMEXPR ),
+ XPK_BRACES( XPK_TERMEXPR ),
{0}
},
.build = &build_op,
};
-static const struct XSParseKeywordHooks hooks_scope_chevron = {
+static const struct XSParseKeywordHooks hooks_chevrons = {
.permit_hintkey = hintkey,
.pieces = (const struct XSParseKeywordPieceType []){
/* A TERMEXPR inside chevrons is ambiguous, because of the < 2 > 1 >
problem */
- XPK_CHEVRONSCOPE( XPK_IDENT ),
+ XPK_CHEVRONS( XPK_IDENT ),
{0}
},
.build = &build_constsv,
@@ -170,8 +170,8 @@
register_xs_parse_keyword("structtagged", &hooks_tagged, NULL);
register_xs_parse_keyword("structcommalist", &hooks_commalist, NULL);
- register_xs_parse_keyword("scopeparen", &hooks_scope_paren, NULL);
- register_xs_parse_keyword("scopeargs", &hooks_scope_args, NULL);
- register_xs_parse_keyword("scopebracket", &hooks_scope_bracket, NULL);
- register_xs_parse_keyword("scopebrace", &hooks_scope_brace, NULL);
- register_xs_parse_keyword("scopechevron", &hooks_scope_chevron, NULL);
+ register_xs_parse_keyword("parens", &hooks_parens, NULL);
+ register_xs_parse_keyword("args", &hooks_args, NULL);
+ register_xs_parse_keyword("brackets", &hooks_brackets, NULL);
+ register_xs_parse_keyword("braces", &hooks_braces, NULL);
+ register_xs_parse_keyword("chevrons", &hooks_chevrons, NULL);