| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
/* You may distribute under the terms of either the GNU General Public License |
|
2
|
|
|
|
|
|
|
* or the Artistic License (the same terms as Perl itself) |
|
3
|
|
|
|
|
|
|
* |
|
4
|
|
|
|
|
|
|
* (C) Paul Evans, 2021-2022 -- leonerd@leonerd.org.uk |
|
5
|
|
|
|
|
|
|
*/ |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#include "EXTERN.h" |
|
8
|
|
|
|
|
|
|
#include "perl.h" |
|
9
|
|
|
|
|
|
|
#include "XSUB.h" |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#include "XSParseKeyword.h" |
|
12
|
|
|
|
|
|
|
#include "XSParseInfix.h" |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#include "perl-backcompat.c.inc" |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
static const char hintkey[] = "t::pieces/permit"; |
|
17
|
|
|
|
|
|
|
|
|
18
|
11
|
|
|
|
|
|
static int build_expr(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata) |
|
19
|
|
|
|
|
|
|
{ |
|
20
|
|
|
|
|
|
|
/* wrap the result in "("...")" parens so we can unit-test how it parsed */ |
|
21
|
11
|
|
|
|
|
|
*out = newBINOP(OP_CONCAT, 0, |
|
22
|
|
|
|
|
|
|
newBINOP(OP_CONCAT, 0, newSVOP(OP_CONST, 0, newSVpvs("(")), op_scope(arg0->op)), |
|
23
|
|
|
|
|
|
|
newSVOP(OP_CONST, 0, newSVpvs(")"))); |
|
24
|
11
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
|
static int build_prefixedblock(pTHX_ OP **out, XSParseKeywordPiece *args[], size_t nargs, void *hookdata) |
|
28
|
|
|
|
|
|
|
{ |
|
29
|
1
|
|
|
|
|
|
PADOFFSET padix = args[0]->padix; |
|
30
|
1
|
|
|
|
|
|
OP *value = args[1]->op; |
|
31
|
1
|
|
|
|
|
|
OP *body = args[2]->op; |
|
32
|
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
|
OP *padsvop = newOP(OP_PADSV, OPf_MOD|(OPpLVAL_INTRO<<8)); |
|
34
|
1
|
|
|
|
|
|
padsvop->op_targ = padix; |
|
35
|
|
|
|
|
|
|
|
|
36
|
1
|
|
|
|
|
|
*out = op_prepend_elem(OP_LINESEQ, |
|
37
|
|
|
|
|
|
|
newBINOP(OP_SASSIGN, 0, value, padsvop), |
|
38
|
|
|
|
|
|
|
body); |
|
39
|
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
|
static int build_anonsub(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata) |
|
44
|
|
|
|
|
|
|
{ |
|
45
|
1
|
|
|
|
|
|
*out = newUNOP(OP_REFGEN, 0, |
|
46
|
|
|
|
|
|
|
newSVOP(OP_ANONCODE, 0, (SV *)arg0->cv)); |
|
47
|
1
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
5
|
|
|
|
|
|
static int build_list(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata) |
|
51
|
|
|
|
|
|
|
{ |
|
52
|
5
|
|
|
|
|
|
OP *list = arg0->op; |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
/* TODO: Consider always doing this? */ |
|
55
|
5
|
100
|
|
|
|
|
if(list->op_type != OP_LIST) |
|
56
|
4
|
|
|
|
|
|
list = newLISTOP(OP_LIST, 0, list, NULL); |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
/* unshift $sep */ |
|
59
|
|
|
|
|
|
|
#if HAVE_PERL_VERSION(5, 22, 0) |
|
60
|
5
|
|
|
|
|
|
op_sibling_splice(list, cUNOPx(list)->op_first, 0, newSVOP(OP_CONST, 0, newSVpvs(","))); |
|
61
|
|
|
|
|
|
|
#else |
|
62
|
|
|
|
|
|
|
{ |
|
63
|
|
|
|
|
|
|
OP *o = newSVOP(OP_CONST, 0, newSVpvs(",")); |
|
64
|
|
|
|
|
|
|
o->op_sibling = cUNOPx(list)->op_first->op_sibling; |
|
65
|
|
|
|
|
|
|
cUNOPx(list)->op_first->op_sibling = o; |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
#endif |
|
68
|
|
|
|
|
|
|
|
|
69
|
5
|
|
|
|
|
|
*out = op_convert_list(OP_JOIN, 0, list); |
|
70
|
|
|
|
|
|
|
|
|
71
|
5
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
72
|
|
|
|
|
|
|
} |
|
73
|
|
|
|
|
|
|
|
|
74
|
6
|
|
|
|
|
|
static int build_constsv(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata) |
|
75
|
|
|
|
|
|
|
{ |
|
76
|
6
|
|
|
|
|
|
*out = newSVOP(OP_CONST, 0, arg0->sv); |
|
77
|
6
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
|
|
80
|
4
|
|
|
|
|
|
static int build_constsv_or_undef(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata) |
|
81
|
|
|
|
|
|
|
{ |
|
82
|
4
|
100
|
|
|
|
|
if(arg0->sv) |
|
83
|
2
|
|
|
|
|
|
*out = newSVOP(OP_CONST, 0, arg0->sv); |
|
84
|
|
|
|
|
|
|
else |
|
85
|
2
|
|
|
|
|
|
*out = newOP(OP_UNDEF, OPf_WANT_SCALAR); |
|
86
|
4
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
87
|
|
|
|
|
|
|
} |
|
88
|
|
|
|
|
|
|
|
|
89
|
1
|
|
|
|
|
|
static int build_constpadix(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata) |
|
90
|
|
|
|
|
|
|
{ |
|
91
|
1
|
|
|
|
|
|
*out = newSVOP(OP_CONST, 0, newSVuv(arg0->padix)); |
|
92
|
1
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
93
|
|
|
|
|
|
|
} |
|
94
|
|
|
|
|
|
|
|
|
95
|
5
|
|
|
|
|
|
static int build_literal(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata) |
|
96
|
|
|
|
|
|
|
{ |
|
97
|
|
|
|
|
|
|
/* ignore arg0 */ |
|
98
|
|
|
|
|
|
|
|
|
99
|
5
|
|
|
|
|
|
*out = newSVOP(OP_CONST, 0, SvREFCNT_inc((SV *)hookdata)); |
|
100
|
|
|
|
|
|
|
|
|
101
|
5
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
102
|
|
|
|
|
|
|
} |
|
103
|
|
|
|
|
|
|
|
|
104
|
4
|
|
|
|
|
|
static int build_attrs(pTHX_ OP **out, XSParseKeywordPiece *args[], size_t nargs, void *hookdata) |
|
105
|
|
|
|
|
|
|
{ |
|
106
|
4
|
|
|
|
|
|
int nattrs = args[0]->i; |
|
107
|
|
|
|
|
|
|
|
|
108
|
4
|
|
|
|
|
|
SV *retsv = newSV(0); |
|
109
|
4
|
|
|
|
|
|
sv_setpvs(retsv, ""); |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
int argi; |
|
112
|
11
|
100
|
|
|
|
|
for(argi = 0; argi < nattrs; argi++) |
|
113
|
9
|
100
|
|
|
|
|
sv_catpvf(retsv, ":%s(%s)", |
|
|
|
50
|
|
|
|
|
|
|
114
|
7
|
|
|
|
|
|
SvPV_nolen(args[argi+1]->attr.name), |
|
115
|
2
|
50
|
|
|
|
|
SvPOK(args[argi+1]->attr.value) ? SvPV_nolen(args[argi+1]->attr.value) : ""); |
|
116
|
|
|
|
|
|
|
|
|
117
|
4
|
|
|
|
|
|
*out = newSVOP(OP_CONST, 0, retsv); |
|
118
|
4
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
119
|
|
|
|
|
|
|
} |
|
120
|
|
|
|
|
|
|
|
|
121
|
3
|
|
|
|
|
|
static int build_infix_opname(pTHX_ OP **out, XSParseKeywordPiece *arg0, void *hookdata) |
|
122
|
|
|
|
|
|
|
{ |
|
123
|
3
|
|
|
|
|
|
const char *opname = PL_op_name[arg0->infix->opcode]; |
|
124
|
3
|
|
|
|
|
|
*out = newSVOP(OP_CONST, 0, newSVpvn(opname, strlen(opname))); |
|
125
|
3
|
|
|
|
|
|
return KEYWORD_PLUGIN_EXPR; |
|
126
|
|
|
|
|
|
|
} |
|
127
|
|
|
|
|
|
|
|
|
128
|
2
|
|
|
|
|
|
static void setup_block_VAR(pTHX_ void *hookdata) |
|
129
|
|
|
|
|
|
|
{ |
|
130
|
|
|
|
|
|
|
char *varname = hookdata; |
|
131
|
2
|
|
|
|
|
|
PADOFFSET padix = pad_add_name_pvn(varname, strlen(varname), 0, NULL, NULL); |
|
132
|
2
|
|
|
|
|
|
intro_my(); |
|
133
|
|
|
|
|
|
|
|
|
134
|
2
|
|
|
|
|
|
sv_setpvs(PAD_SVl(padix), "Hello"); |
|
135
|
2
|
|
|
|
|
|
} |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_block = { |
|
138
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
.piece1 = XPK_BLOCK, |
|
141
|
|
|
|
|
|
|
.build1 = &build_expr, |
|
142
|
|
|
|
|
|
|
}; |
|
143
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_block_scalar = { |
|
144
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
.piece1 = XPK_BLOCK_SCALARCTX, |
|
147
|
|
|
|
|
|
|
.build1 = &build_list, |
|
148
|
|
|
|
|
|
|
}; |
|
149
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_block_list = { |
|
150
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
.piece1 = XPK_BLOCK_LISTCTX, |
|
153
|
|
|
|
|
|
|
.build1 = &build_list, |
|
154
|
|
|
|
|
|
|
}; |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_prefixedblock = { |
|
157
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
.pieces = (const struct XSParseKeywordPieceType []){ |
|
160
|
|
|
|
|
|
|
XPK_PREFIXED_BLOCK( XPK_LEXVAR_MY(XPK_LEXVAR_SCALAR), XPK_EQUALS, XPK_TERMEXPR_SCALARCTX, XPK_COMMA ), |
|
161
|
|
|
|
|
|
|
{0} |
|
162
|
|
|
|
|
|
|
}, |
|
163
|
|
|
|
|
|
|
.build = &build_prefixedblock, |
|
164
|
|
|
|
|
|
|
}; |
|
165
|
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_prefixedblock_VAR = { |
|
167
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
.piece1 = XPK_PREFIXED_BLOCK( XPK_SETUP(&setup_block_VAR) ), |
|
170
|
|
|
|
|
|
|
.build1 = &build_expr, |
|
171
|
|
|
|
|
|
|
}; |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_anonsub = { |
|
174
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
175
|
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
.piece1 = XPK_ANONSUB, |
|
177
|
|
|
|
|
|
|
.build1 = &build_anonsub, |
|
178
|
|
|
|
|
|
|
}; |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_arithexpr = { |
|
181
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
.piece1 = XPK_ARITHEXPR, |
|
184
|
|
|
|
|
|
|
.build1 = &build_expr, |
|
185
|
|
|
|
|
|
|
}; |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_termexpr = { |
|
188
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
.piece1 = XPK_TERMEXPR, |
|
191
|
|
|
|
|
|
|
.build1 = &build_expr, |
|
192
|
|
|
|
|
|
|
}; |
|
193
|
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_prefixedtermexpr_VAR = { |
|
195
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
196
|
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
.piece1 = XPK_PREFIXED_TERMEXPR_ENTERLEAVE( XPK_SETUP(&setup_block_VAR) ), |
|
198
|
|
|
|
|
|
|
.build1 = &build_expr, |
|
199
|
|
|
|
|
|
|
}; |
|
200
|
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_listexpr = { |
|
202
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
.piece1 = XPK_LISTEXPR, |
|
205
|
|
|
|
|
|
|
.build1 = &build_list, |
|
206
|
|
|
|
|
|
|
}; |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_ident = { |
|
209
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
210
|
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
.piece1 = XPK_IDENT, |
|
212
|
|
|
|
|
|
|
.build1 = &build_constsv, |
|
213
|
|
|
|
|
|
|
}; |
|
214
|
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_ident_opt = { |
|
216
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
.piece1 = XPK_IDENT_OPT, |
|
219
|
|
|
|
|
|
|
.build1 = &build_constsv_or_undef, |
|
220
|
|
|
|
|
|
|
}; |
|
221
|
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_packagename = { |
|
223
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
224
|
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
.piece1 = XPK_PACKAGENAME, |
|
226
|
|
|
|
|
|
|
.build1 = &build_constsv, |
|
227
|
|
|
|
|
|
|
}; |
|
228
|
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_lexvar_name = { |
|
230
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
231
|
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
.piece1 = XPK_LEXVARNAME(XPK_LEXVAR_ANY), |
|
233
|
|
|
|
|
|
|
.build1 = &build_constsv, |
|
234
|
|
|
|
|
|
|
}; |
|
235
|
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_lexvar_my = { |
|
237
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
238
|
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
.piece1 = XPK_LEXVAR_MY(XPK_LEXVAR_ANY), |
|
240
|
|
|
|
|
|
|
.build1 = &build_constpadix, |
|
241
|
|
|
|
|
|
|
}; |
|
242
|
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_attrs = { |
|
244
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
.pieces = (const struct XSParseKeywordPieceType []){ |
|
247
|
|
|
|
|
|
|
XPK_ATTRIBUTES, |
|
248
|
|
|
|
|
|
|
{0}, |
|
249
|
|
|
|
|
|
|
}, |
|
250
|
|
|
|
|
|
|
.build = &build_attrs, |
|
251
|
|
|
|
|
|
|
}; |
|
252
|
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_vstring = { |
|
254
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
255
|
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
.piece1 = XPK_VSTRING, |
|
257
|
|
|
|
|
|
|
.build1 = &build_constsv, |
|
258
|
|
|
|
|
|
|
}; |
|
259
|
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_vstring_opt = { |
|
261
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
262
|
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
.piece1 = XPK_VSTRING_OPT, |
|
264
|
|
|
|
|
|
|
.build1 = &build_constsv_or_undef, |
|
265
|
|
|
|
|
|
|
}; |
|
266
|
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_infix_relation = { |
|
268
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
269
|
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
.piece1 = XPK_INFIX_RELATION, |
|
271
|
|
|
|
|
|
|
.build1 = &build_infix_opname, |
|
272
|
|
|
|
|
|
|
}; |
|
273
|
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_infix_equality = { |
|
275
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
276
|
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
.piece1 = XPK_INFIX_EQUALITY, |
|
278
|
|
|
|
|
|
|
.build1 = &build_infix_opname, |
|
279
|
|
|
|
|
|
|
}; |
|
280
|
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_colon = { |
|
282
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
283
|
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
.piece1 = XPK_COLON, |
|
285
|
|
|
|
|
|
|
.build1 = &build_literal, |
|
286
|
|
|
|
|
|
|
}; |
|
287
|
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_str = { |
|
289
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
290
|
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
.piece1 = XPK_LITERAL("foo"), |
|
292
|
|
|
|
|
|
|
.build1 = &build_literal, |
|
293
|
|
|
|
|
|
|
}; |
|
294
|
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_kw = { |
|
296
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
297
|
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
.piece1 = XPK_KEYWORD("bar"), |
|
299
|
|
|
|
|
|
|
.build1 = &build_literal, |
|
300
|
|
|
|
|
|
|
}; |
|
301
|
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
static const struct XSParseKeywordHooks hooks_autosemi = { |
|
303
|
|
|
|
|
|
|
.permit_hintkey = hintkey, |
|
304
|
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
.piece1 = XPK_AUTOSEMI, |
|
306
|
|
|
|
|
|
|
.build1 = &build_literal, |
|
307
|
|
|
|
|
|
|
}; |
|
308
|
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
MODULE = t::pieces PACKAGE = t::pieces |
|
310
|
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
BOOT: |
|
312
|
11
|
|
|
|
|
|
boot_xs_parse_keyword(0); |
|
313
|
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceblock", &hooks_block, NULL); |
|
315
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceblock_scalar", &hooks_block_scalar, NULL); |
|
316
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceblock_list", &hooks_block_list, NULL); |
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceprefixedblock", &hooks_prefixedblock, NULL); |
|
319
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceprefixedblock_VAR", &hooks_prefixedblock_VAR, "$VAR"); |
|
320
|
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceanonsub", &hooks_anonsub, NULL); |
|
322
|
|
|
|
|
|
|
register_xs_parse_keyword("piecearithexpr", &hooks_arithexpr, NULL); |
|
323
|
|
|
|
|
|
|
register_xs_parse_keyword("piecetermexpr", &hooks_termexpr, NULL); |
|
324
|
|
|
|
|
|
|
register_xs_parse_keyword("piecelistexpr", &hooks_listexpr, NULL); |
|
325
|
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceprefixedtermexpr_VAR", &hooks_prefixedtermexpr_VAR, "$VAR"); |
|
327
|
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceident", &hooks_ident, NULL); |
|
329
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceident_opt", &hooks_ident_opt, NULL); |
|
330
|
|
|
|
|
|
|
register_xs_parse_keyword("piecepkg", &hooks_packagename, NULL); |
|
331
|
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
register_xs_parse_keyword("piecelexvarname", &hooks_lexvar_name, NULL); |
|
333
|
|
|
|
|
|
|
register_xs_parse_keyword("piecelexvarmy", &hooks_lexvar_my, NULL); |
|
334
|
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceattrs", &hooks_attrs, NULL); |
|
336
|
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
register_xs_parse_keyword("piecevstring", &hooks_vstring, NULL); |
|
338
|
|
|
|
|
|
|
register_xs_parse_keyword("piecevstring_opt", &hooks_vstring_opt, NULL); |
|
339
|
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceinfix", &hooks_infix_relation, NULL); |
|
341
|
|
|
|
|
|
|
register_xs_parse_keyword("pieceinfixeq", &hooks_infix_equality, NULL); |
|
342
|
|
|
|
|
|
|
|
|
343
|
11
|
|
|
|
|
|
register_xs_parse_keyword("piececolon", &hooks_colon, newSVpvs("colon")); |
|
344
|
|
|
|
|
|
|
|
|
345
|
11
|
|
|
|
|
|
register_xs_parse_keyword("piecestr", &hooks_str, newSVpvs("foo")); |
|
346
|
11
|
|
|
|
|
|
register_xs_parse_keyword("piecekw", &hooks_kw, newSVpvs("bar")); |
|
347
|
|
|
|
|
|
|
|
|
348
|
11
|
|
|
|
|
|
register_xs_parse_keyword("pieceautosemi", &hooks_autosemi, newSVpvs("EOS")); |