regex r-string feature

This commit is contained in:
John Kerl 2021-08-17 23:18:50 -04:00
parent 07e77b86d2
commit 1230553eb9
10 changed files with 604323 additions and 595316 deletions

View file

@ -85,11 +85,11 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S16
Accept: 102,
Accept: 103,
Ignore: "",
},
ActionRow{ // S17
Accept: 102,
Accept: 103,
Ignore: "",
},
ActionRow{ // S18
@ -149,7 +149,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S32
Accept: 109,
Accept: 110,
Ignore: "",
},
ActionRow{ // S33
@ -337,7 +337,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S79
Accept: 103,
Accept: 104,
Ignore: "",
},
ActionRow{ // S80
@ -353,7 +353,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S83
Accept: 103,
Accept: 104,
Ignore: "",
},
ActionRow{ // S84
@ -461,11 +461,11 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S110
Accept: 117,
Accept: 118,
Ignore: "",
},
ActionRow{ // S111
Accept: 118,
Accept: 119,
Ignore: "",
},
ActionRow{ // S112
@ -481,7 +481,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S115
Accept: 123,
Accept: 124,
Ignore: "",
},
ActionRow{ // S116
@ -521,7 +521,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S125
Accept: 132,
Accept: 133,
Ignore: "",
},
ActionRow{ // S126
@ -569,11 +569,11 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S137
Accept: 128,
Accept: 129,
Ignore: "",
},
ActionRow{ // S138
Accept: 134,
Accept: 135,
Ignore: "",
},
ActionRow{ // S139
@ -589,7 +589,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S142
Accept: 39,
Accept: 0,
Ignore: "",
},
ActionRow{ // S143
@ -621,31 +621,31 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S150
Accept: 53,
Accept: 39,
Ignore: "",
},
ActionRow{ // S151
Accept: 69,
Accept: 53,
Ignore: "",
},
ActionRow{ // S152
Accept: 75,
Accept: 69,
Ignore: "",
},
ActionRow{ // S153
Accept: 101,
Accept: 75,
Ignore: "",
},
ActionRow{ // S154
Accept: 100,
Accept: 101,
Ignore: "",
},
ActionRow{ // S155
Accept: 31,
Accept: 100,
Ignore: "",
},
ActionRow{ // S156
Accept: 0,
Accept: 31,
Ignore: "",
},
ActionRow{ // S157
@ -657,31 +657,31 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S159
Accept: 50,
Accept: 0,
Ignore: "",
},
ActionRow{ // S160
Accept: 66,
Accept: 50,
Ignore: "",
},
ActionRow{ // S161
Accept: 96,
Accept: 66,
Ignore: "",
},
ActionRow{ // S162
Accept: 0,
Accept: 96,
Ignore: "",
},
ActionRow{ // S163
Accept: 64,
Accept: 0,
Ignore: "",
},
ActionRow{ // S164
Accept: 103,
Accept: 64,
Ignore: "",
},
ActionRow{ // S165
Accept: 0,
Accept: 104,
Ignore: "",
},
ActionRow{ // S166
@ -689,39 +689,39 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S167
Accept: 103,
Accept: 0,
Ignore: "",
},
ActionRow{ // S168
Accept: 102,
Accept: 104,
Ignore: "",
},
ActionRow{ // S169
Accept: 102,
Accept: 103,
Ignore: "",
},
ActionRow{ // S170
Accept: 56,
Accept: 103,
Ignore: "",
},
ActionRow{ // S171
Accept: 57,
Accept: 56,
Ignore: "",
},
ActionRow{ // S172
Accept: 84,
Accept: 57,
Ignore: "",
},
ActionRow{ // S173
Accept: 51,
Accept: 84,
Ignore: "",
},
ActionRow{ // S174
Accept: 73,
Accept: 51,
Ignore: "",
},
ActionRow{ // S175
Accept: 34,
Accept: 73,
Ignore: "",
},
ActionRow{ // S176
@ -733,7 +733,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S178
Accept: 0,
Accept: 34,
Ignore: "",
},
ActionRow{ // S179
@ -741,11 +741,11 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S180
Accept: 122,
Accept: 0,
Ignore: "",
},
ActionRow{ // S181
Accept: 39,
Accept: 123,
Ignore: "",
},
ActionRow{ // S182
@ -753,59 +753,59 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S183
Accept: 119,
Accept: 39,
Ignore: "",
},
ActionRow{ // S184
Accept: 111,
Accept: 120,
Ignore: "",
},
ActionRow{ // S185
Accept: 110,
Ignore: "",
},
ActionRow{ // S186
Accept: 112,
Ignore: "",
},
ActionRow{ // S186
Accept: 111,
Ignore: "",
},
ActionRow{ // S187
Accept: 107,
Ignore: "",
},
ActionRow{ // S188
Accept: 39,
Ignore: "",
},
ActionRow{ // S189
Accept: 114,
Ignore: "",
},
ActionRow{ // S190
Accept: 113,
Ignore: "",
},
ActionRow{ // S191
ActionRow{ // S188
Accept: 108,
Ignore: "",
},
ActionRow{ // S189
Accept: 39,
Ignore: "",
},
ActionRow{ // S190
Accept: 115,
Ignore: "",
},
ActionRow{ // S191
Accept: 114,
Ignore: "",
},
ActionRow{ // S192
Accept: 124,
Accept: 116,
Ignore: "",
},
ActionRow{ // S193
Accept: 49,
Accept: 125,
Ignore: "",
},
ActionRow{ // S194
Accept: 38,
Accept: 49,
Ignore: "",
},
ActionRow{ // S195
Accept: 40,
Accept: 38,
Ignore: "",
},
ActionRow{ // S196
Accept: 39,
Accept: 40,
Ignore: "",
},
ActionRow{ // S197
@ -845,11 +845,11 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S206
Accept: 127,
Accept: 39,
Ignore: "",
},
ActionRow{ // S207
Accept: 39,
Accept: 128,
Ignore: "",
},
ActionRow{ // S208
@ -865,31 +865,31 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S211
Accept: 133,
Accept: 39,
Ignore: "",
},
ActionRow{ // S212
Accept: 39,
Accept: 134,
Ignore: "",
},
ActionRow{ // S213
Accept: 43,
Accept: 39,
Ignore: "",
},
ActionRow{ // S214
Accept: 44,
Accept: 43,
Ignore: "",
},
ActionRow{ // S215
Accept: 39,
Accept: 44,
Ignore: "",
},
ActionRow{ // S216
Accept: 45,
Accept: 39,
Ignore: "",
},
ActionRow{ // S217
Accept: 39,
Accept: 45,
Ignore: "",
},
ActionRow{ // S218
@ -897,19 +897,19 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S219
Accept: 39,
Accept: 0,
Ignore: "",
},
ActionRow{ // S220
Accept: 46,
Accept: 102,
Ignore: "",
},
ActionRow{ // S221
Accept: 39,
Accept: 0,
Ignore: "",
},
ActionRow{ // S222
Accept: 21,
Accept: 39,
Ignore: "",
},
ActionRow{ // S223
@ -917,43 +917,43 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S224
Accept: 39,
Accept: 46,
Ignore: "",
},
ActionRow{ // S225
Accept: 47,
Ignore: "",
},
ActionRow{ // S226
Accept: 39,
Ignore: "",
},
ActionRow{ // S226
Accept: 21,
Ignore: "",
},
ActionRow{ // S227
Accept: 48,
Accept: 39,
Ignore: "",
},
ActionRow{ // S228
Accept: 101,
Accept: 39,
Ignore: "",
},
ActionRow{ // S229
Accept: 32,
Accept: 47,
Ignore: "",
},
ActionRow{ // S230
Accept: 0,
Accept: 39,
Ignore: "",
},
ActionRow{ // S231
Accept: 30,
Accept: 48,
Ignore: "",
},
ActionRow{ // S232
Accept: 30,
Accept: 101,
Ignore: "",
},
ActionRow{ // S233
Accept: 0,
Accept: 32,
Ignore: "",
},
ActionRow{ // S234
@ -961,11 +961,11 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S235
Accept: 103,
Accept: 30,
Ignore: "",
},
ActionRow{ // S236
Accept: 0,
Accept: 30,
Ignore: "",
},
ActionRow{ // S237
@ -973,51 +973,51 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S238
Accept: 103,
Ignore: "",
},
ActionRow{ // S239
Accept: 103,
Ignore: "",
},
ActionRow{ // S240
Accept: 58,
Ignore: "",
},
ActionRow{ // S241
Accept: 52,
Ignore: "",
},
ActionRow{ // S242
Accept: 0,
Ignore: "",
},
ActionRow{ // S239
Accept: 104,
Ignore: "",
},
ActionRow{ // S240
Accept: 0,
Ignore: "",
},
ActionRow{ // S241
Accept: 0,
Ignore: "",
},
ActionRow{ // S242
Accept: 104,
Ignore: "",
},
ActionRow{ // S243
Accept: 36,
Accept: 104,
Ignore: "",
},
ActionRow{ // S244
Accept: 36,
Accept: 58,
Ignore: "",
},
ActionRow{ // S245
Accept: 39,
Accept: 52,
Ignore: "",
},
ActionRow{ // S246
Accept: 39,
Accept: 0,
Ignore: "",
},
ActionRow{ // S247
Accept: 106,
Accept: 36,
Ignore: "",
},
ActionRow{ // S248
Accept: 39,
Accept: 36,
Ignore: "",
},
ActionRow{ // S249
Accept: 41,
Accept: 39,
Ignore: "",
},
ActionRow{ // S250
@ -1025,7 +1025,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S251
Accept: 125,
Accept: 107,
Ignore: "",
},
ActionRow{ // S252
@ -1033,7 +1033,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S253
Accept: 19,
Accept: 41,
Ignore: "",
},
ActionRow{ // S254
@ -1041,15 +1041,15 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S255
Accept: 129,
Accept: 126,
Ignore: "",
},
ActionRow{ // S256
Accept: 130,
Accept: 39,
Ignore: "",
},
ActionRow{ // S257
Accept: 23,
Accept: 19,
Ignore: "",
},
ActionRow{ // S258
@ -1057,23 +1057,23 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S259
Accept: 39,
Accept: 130,
Ignore: "",
},
ActionRow{ // S260
Accept: 39,
Accept: 131,
Ignore: "",
},
ActionRow{ // S261
Accept: 39,
Accept: 23,
Ignore: "",
},
ActionRow{ // S262
Accept: 137,
Accept: 39,
Ignore: "",
},
ActionRow{ // S263
Accept: 105,
Accept: 39,
Ignore: "",
},
ActionRow{ // S264
@ -1085,19 +1085,19 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S266
Accept: 39,
Ignore: "",
},
ActionRow{ // S267
Accept: 39,
Ignore: "",
},
ActionRow{ // S268
Accept: 138,
Ignore: "",
},
ActionRow{ // S267
Accept: 106,
Ignore: "",
},
ActionRow{ // S268
Accept: 39,
Ignore: "",
},
ActionRow{ // S269
Accept: 104,
Accept: 102,
Ignore: "",
},
ActionRow{ // S270
@ -1109,75 +1109,75 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S272
Accept: 0,
Accept: 39,
Ignore: "",
},
ActionRow{ // S273
Accept: 103,
Accept: 139,
Ignore: "",
},
ActionRow{ // S274
Accept: 0,
Accept: 105,
Ignore: "",
},
ActionRow{ // S275
Accept: 103,
Accept: 39,
Ignore: "",
},
ActionRow{ // S276
Accept: 103,
Accept: 39,
Ignore: "",
},
ActionRow{ // S277
Accept: 39,
Accept: 0,
Ignore: "",
},
ActionRow{ // S278
Accept: 39,
Ignore: "",
},
ActionRow{ // S279
Accept: 126,
Ignore: "",
},
ActionRow{ // S280
Accept: 135,
Ignore: "",
},
ActionRow{ // S281
Accept: 39,
Ignore: "",
},
ActionRow{ // S282
Accept: 20,
Ignore: "",
},
ActionRow{ // S283
Accept: 22,
Ignore: "",
},
ActionRow{ // S284
Accept: 26,
Ignore: "",
},
ActionRow{ // S285
Accept: 39,
Ignore: "",
},
ActionRow{ // S286
Accept: 104,
Ignore: "",
},
ActionRow{ // S287
ActionRow{ // S279
Accept: 0,
Ignore: "",
},
ActionRow{ // S280
Accept: 104,
Ignore: "",
},
ActionRow{ // S281
Accept: 104,
Ignore: "",
},
ActionRow{ // S282
Accept: 39,
Ignore: "",
},
ActionRow{ // S283
Accept: 39,
Ignore: "",
},
ActionRow{ // S284
Accept: 127,
Ignore: "",
},
ActionRow{ // S285
Accept: 136,
Ignore: "",
},
ActionRow{ // S286
Accept: 39,
Ignore: "",
},
ActionRow{ // S287
Accept: 20,
Ignore: "",
},
ActionRow{ // S288
Accept: 42,
Accept: 22,
Ignore: "",
},
ActionRow{ // S289
Accept: 14,
Accept: 26,
Ignore: "",
},
ActionRow{ // S290
@ -1185,7 +1185,7 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S291
Accept: 39,
Accept: 105,
Ignore: "",
},
ActionRow{ // S292
@ -1193,19 +1193,19 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S293
Accept: 7,
Accept: 42,
Ignore: "",
},
ActionRow{ // S294
Accept: 131,
Accept: 14,
Ignore: "",
},
ActionRow{ // S295
Accept: 0,
Accept: 39,
Ignore: "",
},
ActionRow{ // S296
Accept: 103,
Accept: 39,
Ignore: "",
},
ActionRow{ // S297
@ -1213,87 +1213,107 @@ var ActTab = ActionTable{
Ignore: "",
},
ActionRow{ // S298
Accept: 39,
Accept: 7,
Ignore: "",
},
ActionRow{ // S299
Accept: 39,
Accept: 132,
Ignore: "",
},
ActionRow{ // S300
Accept: 39,
Accept: 0,
Ignore: "",
},
ActionRow{ // S301
Accept: 17,
Accept: 104,
Ignore: "",
},
ActionRow{ // S302
Accept: 8,
Accept: 39,
Ignore: "",
},
ActionRow{ // S303
Accept: 16,
Accept: 39,
Ignore: "",
},
ActionRow{ // S304
Accept: 139,
Accept: 39,
Ignore: "",
},
ActionRow{ // S305
Accept: 13,
Accept: 39,
Ignore: "",
},
ActionRow{ // S306
Accept: 12,
Accept: 17,
Ignore: "",
},
ActionRow{ // S307
Accept: 0,
Accept: 8,
Ignore: "",
},
ActionRow{ // S308
Accept: 39,
Accept: 16,
Ignore: "",
},
ActionRow{ // S309
Accept: 121,
Accept: 140,
Ignore: "",
},
ActionRow{ // S310
Accept: 116,
Accept: 13,
Ignore: "",
},
ActionRow{ // S311
Accept: 39,
Accept: 12,
Ignore: "",
},
ActionRow{ // S312
Accept: 18,
Accept: 0,
Ignore: "",
},
ActionRow{ // S313
Accept: 0,
Accept: 39,
Ignore: "",
},
ActionRow{ // S314
Accept: 120,
Accept: 122,
Ignore: "",
},
ActionRow{ // S315
Accept: 136,
Accept: 117,
Ignore: "",
},
ActionRow{ // S316
Accept: 0,
Accept: 39,
Ignore: "",
},
ActionRow{ // S317
Accept: 0,
Accept: 18,
Ignore: "",
},
ActionRow{ // S318
Accept: 108,
Accept: 0,
Ignore: "",
},
ActionRow{ // S319
Accept: 121,
Ignore: "",
},
ActionRow{ // S320
Accept: 137,
Ignore: "",
},
ActionRow{ // S321
Accept: 0,
Ignore: "",
},
ActionRow{ // S322
Accept: 0,
Ignore: "",
},
ActionRow{ // S323
Accept: 109,
Ignore: "",
},
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -96,6 +96,9 @@ string_literal : '"' {_string_literal_element} '"' ;
// Miller regexes are of the form "a.*b" for case-sensitive, or "a.*b"i for case-insensitive.
regex_case_insensitive : '"' {_string_literal_element} '"' 'i';
// Regex strings not to be unbackslashed but left as-is, e.g. for second argument to sub etc.:
regex_r_string : 'r' '"' {_string_literal_element} '"';
// Notes on int literals:
// * Leading minus sign is handled via the unary-minus operator, not here.
int_literal
@ -1483,6 +1486,9 @@ MlrvalOrFunction
| regex_case_insensitive
<< dsl.NewASTNode($0, dsl.NodeTypeRegexCaseInsensitive) >>
| regex_r_string
<< dsl.NewASTNode($0, dsl.NodeTypeRegex) >>
| int_literal
<< dsl.NewASTNode($0, dsl.NodeTypeIntLiteral) >>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -11,9 +11,9 @@ import (
)
const (
numProductions = 326
numStates = 4310
numSymbols = 248
numProductions = 327
numStates = 4327
numSymbols = 249
)
// Stack

View file

@ -2750,11 +2750,21 @@ var productionsTable = ProdTab{
},
},
ProdTabEntry{
String: `MlrvalOrFunction : int_literal << dsl.NewASTNode(X[0], dsl.NodeTypeIntLiteral) >>`,
String: `MlrvalOrFunction : regex_r_string << dsl.NewASTNode(X[0], dsl.NodeTypeRegex) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 210,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeRegex)
},
},
ProdTabEntry{
String: `MlrvalOrFunction : int_literal << dsl.NewASTNode(X[0], dsl.NodeTypeIntLiteral) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 211,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeIntLiteral)
},
@ -2763,7 +2773,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : float_literal << dsl.NewASTNode(X[0], dsl.NodeTypeFloatLiteral) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 211,
Index: 212,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeFloatLiteral)
@ -2773,7 +2783,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : boolean_literal << dsl.NewASTNode(X[0], dsl.NodeTypeBoolLiteral) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 212,
Index: 213,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeBoolLiteral)
@ -2783,7 +2793,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : null_literal << dsl.NewASTNode(X[0], dsl.NodeTypeNullLiteral) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 213,
Index: 214,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeNullLiteral)
@ -2793,22 +2803,6 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : const_M_PI << dsl.NewASTNode(
X[0],
dsl.NodeTypeConstant,
) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 214,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(
X[0],
dsl.NodeTypeConstant,
)
},
},
ProdTabEntry{
String: `MlrvalOrFunction : const_M_E << dsl.NewASTNode(
X[0],
dsl.NodeTypeConstant,
) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
@ -2822,11 +2816,27 @@ var productionsTable = ProdTab{
},
},
ProdTabEntry{
String: `MlrvalOrFunction : panic << dsl.NewASTNode(X[0], dsl.NodeTypePanic) >>`,
String: `MlrvalOrFunction : const_M_E << dsl.NewASTNode(
X[0],
dsl.NodeTypeConstant,
) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 216,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(
X[0],
dsl.NodeTypeConstant,
)
},
},
ProdTabEntry{
String: `MlrvalOrFunction : panic << dsl.NewASTNode(X[0], dsl.NodeTypePanic) >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 217,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypePanic)
},
@ -2835,7 +2845,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : ArrayLiteral << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 217,
Index: 218,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -2848,7 +2858,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArrayLiteral",
NTType: 61,
Index: 218,
Index: 219,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(
@ -2867,7 +2877,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArrayLiteral",
NTType: 61,
Index: 219,
Index: 220,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AdoptChildren(
@ -2887,7 +2897,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArrayLiteralElements",
NTType: 62,
Index: 220,
Index: 221,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
@ -2905,7 +2915,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArrayLiteralElements",
NTType: 62,
Index: 221,
Index: 222,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
@ -2922,7 +2932,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArrayLiteralElements",
NTType: 62,
Index: 222,
Index: 223,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.PrependChild(
@ -2935,7 +2945,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : MapLiteral << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 223,
Index: 224,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -2948,7 +2958,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "MapLiteral",
NTType: 63,
Index: 224,
Index: 225,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(
@ -2967,7 +2977,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "MapLiteral",
NTType: 63,
Index: 225,
Index: 226,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AdoptChildren(
@ -2987,7 +2997,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "MapLiteralKeyValuePairs",
NTType: 64,
Index: 226,
Index: 227,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
@ -3005,7 +3015,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "MapLiteralKeyValuePairs",
NTType: 64,
Index: 227,
Index: 228,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
@ -3022,7 +3032,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "MapLiteralKeyValuePairs",
NTType: 64,
Index: 228,
Index: 229,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.PrependChild(
@ -3040,7 +3050,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "MapLiteralKeyValuePair",
NTType: 65,
Index: 229,
Index: 230,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(
@ -3055,7 +3065,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : ContextVariable << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 230,
Index: 231,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3065,7 +3075,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_IPS << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 231,
Index: 232,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3075,7 +3085,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_IFS << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 232,
Index: 233,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3085,7 +3095,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_IRS << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 233,
Index: 234,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3095,7 +3105,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_OPS << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 234,
Index: 235,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3105,7 +3115,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_OFS << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 235,
Index: 236,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3115,7 +3125,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_ORS << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 236,
Index: 237,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3125,7 +3135,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_FLATSEP << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 237,
Index: 238,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3135,7 +3145,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_NF << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 238,
Index: 239,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3145,7 +3155,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_NR << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 239,
Index: 240,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3155,7 +3165,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_FNR << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 240,
Index: 241,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3165,7 +3175,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_FILENAME << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 241,
Index: 242,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3175,7 +3185,7 @@ var productionsTable = ProdTab{
String: `ContextVariable : ctx_FILENUM << dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable) >>`,
Id: "ContextVariable",
NTType: 66,
Index: 242,
Index: 243,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeContextVariable)
@ -3185,7 +3195,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : ENV << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 243,
Index: 244,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3199,7 +3209,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ENV",
NTType: 67,
Index: 244,
Index: 245,
NumSymbols: 4,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
@ -3217,7 +3227,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ENV",
NTType: 67,
Index: 245,
Index: 246,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
@ -3231,7 +3241,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : ArrayOrMapIndexAccess << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 246,
Index: 247,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3241,7 +3251,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : ArrayOrMapPositionalNameAccess << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 247,
Index: 248,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3251,7 +3261,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : ArrayOrMapPositionalValueAccess << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 248,
Index: 249,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3261,7 +3271,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : ArraySliceAccess << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 249,
Index: 250,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3276,7 +3286,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArrayOrMapIndexAccess",
NTType: 68,
Index: 250,
Index: 251,
NumSymbols: 4,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(
@ -3296,7 +3306,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArrayOrMapPositionalNameAccess",
NTType: 69,
Index: 251,
Index: 252,
NumSymbols: 5,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(
@ -3316,7 +3326,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArrayOrMapPositionalValueAccess",
NTType: 70,
Index: 252,
Index: 253,
NumSymbols: 6,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(
@ -3337,7 +3347,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArraySliceAccess",
NTType: 71,
Index: 253,
Index: 254,
NumSymbols: 6,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeTernary(
@ -3362,7 +3372,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArraySliceAccess",
NTType: 71,
Index: 254,
Index: 255,
NumSymbols: 5,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeTernary(
@ -3390,7 +3400,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArraySliceAccess",
NTType: 71,
Index: 255,
Index: 256,
NumSymbols: 5,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeTernary(
@ -3421,7 +3431,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "ArraySliceAccess",
NTType: 71,
Index: 256,
Index: 257,
NumSymbols: 4,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeTernary(
@ -3443,7 +3453,7 @@ var productionsTable = ProdTab{
String: `MlrvalOrFunction : FunctionCallsite << >>`,
Id: "MlrvalOrFunction",
NTType: 60,
Index: 257,
Index: 258,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3456,7 +3466,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "FunctionCallsite",
NTType: 72,
Index: 258,
Index: 259,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(
@ -3475,7 +3485,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "FunctionCallsite",
NTType: 72,
Index: 259,
Index: 260,
NumSymbols: 4,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AdoptChildren(
@ -3491,7 +3501,7 @@ var productionsTable = ProdTab{
String: `FunctionName : non_sigil_name << >>`,
Id: "FunctionName",
NTType: 73,
Index: 260,
Index: 261,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3501,7 +3511,7 @@ var productionsTable = ProdTab{
String: `FunctionName : int << >>`,
Id: "FunctionName",
NTType: 73,
Index: 261,
Index: 262,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3511,7 +3521,7 @@ var productionsTable = ProdTab{
String: `FunctionName : float << >>`,
Id: "FunctionName",
NTType: 73,
Index: 262,
Index: 263,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3525,7 +3535,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "FcnArgs",
NTType: 74,
Index: 263,
Index: 264,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
@ -3543,7 +3553,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "FcnArgs",
NTType: 74,
Index: 264,
Index: 265,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
@ -3560,7 +3570,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "FcnArgs",
NTType: 74,
Index: 265,
Index: 266,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.PrependChild(
@ -3576,7 +3586,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "SubroutineCallsite",
NTType: 75,
Index: 266,
Index: 267,
NumSymbols: 4,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(
@ -3595,7 +3605,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "SubroutineCallsite",
NTType: 75,
Index: 267,
Index: 268,
NumSymbols: 5,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AdoptChildren(
@ -3611,7 +3621,7 @@ var productionsTable = ProdTab{
String: `SubroutineName : non_sigil_name << >>`,
Id: "SubroutineName",
NTType: 76,
Index: 268,
Index: 269,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3621,7 +3631,7 @@ var productionsTable = ProdTab{
String: `BracefulStatement : BeginBlock << >>`,
Id: "BracefulStatement",
NTType: 77,
Index: 269,
Index: 270,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3631,7 +3641,7 @@ var productionsTable = ProdTab{
String: `BracefulStatement : EndBlock << >>`,
Id: "BracefulStatement",
NTType: 77,
Index: 270,
Index: 271,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3641,7 +3651,7 @@ var productionsTable = ProdTab{
String: `BracefulStatement : CondBlock << >>`,
Id: "BracefulStatement",
NTType: 77,
Index: 271,
Index: 272,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3651,7 +3661,7 @@ var productionsTable = ProdTab{
String: `BracefulStatement : IfChain << >>`,
Id: "BracefulStatement",
NTType: 77,
Index: 272,
Index: 273,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3661,7 +3671,7 @@ var productionsTable = ProdTab{
String: `BracefulStatement : WhileLoop << >>`,
Id: "BracefulStatement",
NTType: 77,
Index: 273,
Index: 274,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3671,7 +3681,7 @@ var productionsTable = ProdTab{
String: `BracefulStatement : ForLoop << >>`,
Id: "BracefulStatement",
NTType: 77,
Index: 274,
Index: 275,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3681,7 +3691,7 @@ var productionsTable = ProdTab{
String: `BracefulStatement : FunctionDefinition << >>`,
Id: "BracefulStatement",
NTType: 77,
Index: 275,
Index: 276,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3691,7 +3701,7 @@ var productionsTable = ProdTab{
String: `BracefulStatement : SubroutineDefinition << >>`,
Id: "BracefulStatement",
NTType: 77,
Index: 276,
Index: 277,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3701,7 +3711,7 @@ var productionsTable = ProdTab{
String: `BeginBlock : begin StatementBlockInBraces << dsl.NewASTNodeUnary(nil, X[1], dsl.NodeTypeBeginBlock) >>`,
Id: "BeginBlock",
NTType: 78,
Index: 277,
Index: 278,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(nil, X[1], dsl.NodeTypeBeginBlock)
@ -3711,7 +3721,7 @@ var productionsTable = ProdTab{
String: `EndBlock : end StatementBlockInBraces << dsl.NewASTNodeUnary(nil, X[1], dsl.NodeTypeEndBlock) >>`,
Id: "EndBlock",
NTType: 79,
Index: 278,
Index: 279,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(nil, X[1], dsl.NodeTypeEndBlock)
@ -3721,7 +3731,7 @@ var productionsTable = ProdTab{
String: `CondBlock : Rvalue StatementBlockInBraces << dsl.NewASTNodeBinary(nil, X[0], X[1], dsl.NodeTypeCondBlock) >>`,
Id: "CondBlock",
NTType: 80,
Index: 279,
Index: 280,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(nil, X[0], X[1], dsl.NodeTypeCondBlock)
@ -3731,7 +3741,7 @@ var productionsTable = ProdTab{
String: `IfChain : IfElifStar << >>`,
Id: "IfChain",
NTType: 81,
Index: 280,
Index: 281,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3741,7 +3751,7 @@ var productionsTable = ProdTab{
String: `IfChain : IfElifStar ElseBlock << dsl.AppendChild(X[0], X[1]) >>`,
Id: "IfChain",
NTType: 81,
Index: 281,
Index: 282,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AppendChild(X[0], X[1])
@ -3751,7 +3761,7 @@ var productionsTable = ProdTab{
String: `IfElifStar : IfBlock << dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeIfChain) >>`,
Id: "IfElifStar",
NTType: 82,
Index: 282,
Index: 283,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeIfChain)
@ -3761,7 +3771,7 @@ var productionsTable = ProdTab{
String: `IfElifStar : IfElifStar ElifBlock << dsl.AppendChild(X[0], X[1]) >>`,
Id: "IfElifStar",
NTType: 82,
Index: 283,
Index: 284,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AppendChild(X[0], X[1])
@ -3771,7 +3781,7 @@ var productionsTable = ProdTab{
String: `IfBlock : if "(" Rvalue ")" StatementBlockInBraces << dsl.NewASTNodeBinary(X[0], X[2], X[4], dsl.NodeTypeIfItem) >>`,
Id: "IfBlock",
NTType: 83,
Index: 284,
Index: 285,
NumSymbols: 5,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(X[0], X[2], X[4], dsl.NodeTypeIfItem)
@ -3781,7 +3791,7 @@ var productionsTable = ProdTab{
String: `ElifBlock : elif "(" Rvalue ")" StatementBlockInBraces << dsl.NewASTNodeBinary(X[0], X[2], X[4], dsl.NodeTypeIfItem) >>`,
Id: "ElifBlock",
NTType: 84,
Index: 285,
Index: 286,
NumSymbols: 5,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(X[0], X[2], X[4], dsl.NodeTypeIfItem)
@ -3791,7 +3801,7 @@ var productionsTable = ProdTab{
String: `ElseBlock : else StatementBlockInBraces << dsl.NewASTNodeUnary(X[0], X[1], dsl.NodeTypeIfItem) >>`,
Id: "ElseBlock",
NTType: 85,
Index: 286,
Index: 287,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(X[0], X[1], dsl.NodeTypeIfItem)
@ -3801,7 +3811,7 @@ var productionsTable = ProdTab{
String: `WhileLoop : while "(" Rvalue ")" StatementBlockInBraces << dsl.NewASTNodeBinary(X[0], X[2], X[4], dsl.NodeTypeWhileLoop) >>`,
Id: "WhileLoop",
NTType: 86,
Index: 287,
Index: 288,
NumSymbols: 5,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(X[0], X[2], X[4], dsl.NodeTypeWhileLoop)
@ -3811,7 +3821,7 @@ var productionsTable = ProdTab{
String: `DoWhileLoop : do StatementBlockInBraces while "(" Rvalue ")" << dsl.NewASTNodeBinary(X[0], X[1], X[4], dsl.NodeTypeDoWhileLoop) >>`,
Id: "DoWhileLoop",
NTType: 87,
Index: 288,
Index: 289,
NumSymbols: 6,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(X[0], X[1], X[4], dsl.NodeTypeDoWhileLoop)
@ -3821,7 +3831,7 @@ var productionsTable = ProdTab{
String: `ForLoop : ForLoopOneVariable << >>`,
Id: "ForLoop",
NTType: 88,
Index: 289,
Index: 290,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3831,7 +3841,7 @@ var productionsTable = ProdTab{
String: `ForLoop : ForLoopTwoVariable << >>`,
Id: "ForLoop",
NTType: 88,
Index: 290,
Index: 291,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3841,7 +3851,7 @@ var productionsTable = ProdTab{
String: `ForLoop : ForLoopMultivariable << >>`,
Id: "ForLoop",
NTType: 88,
Index: 291,
Index: 292,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3851,7 +3861,7 @@ var productionsTable = ProdTab{
String: `ForLoop : TripleForLoop << >>`,
Id: "ForLoop",
NTType: 88,
Index: 292,
Index: 293,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -3867,7 +3877,7 @@ var productionsTable = ProdTab{
); >>`,
Id: "ForLoopOneVariable",
NTType: 89,
Index: 293,
Index: 294,
NumSymbols: 7,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeTernary(
@ -3890,7 +3900,7 @@ var productionsTable = ProdTab{
); >>`,
Id: "ForLoopTwoVariable",
NTType: 90,
Index: 294,
Index: 295,
NumSymbols: 9,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeQuaternary(
@ -3914,7 +3924,7 @@ var productionsTable = ProdTab{
); >>`,
Id: "ForLoopMultivariable",
NTType: 91,
Index: 295,
Index: 296,
NumSymbols: 11,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeQuaternary(
@ -3936,7 +3946,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "MultiIndex",
NTType: 92,
Index: 296,
Index: 297,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(
@ -3954,7 +3964,7 @@ var productionsTable = ProdTab{
) >>`,
Id: "MultiIndex",
NTType: 92,
Index: 297,
Index: 298,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AppendChild(
@ -3974,7 +3984,7 @@ var productionsTable = ProdTab{
); >>`,
Id: "TripleForLoop",
NTType: 93,
Index: 298,
Index: 299,
NumSymbols: 9,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeQuaternary(
@ -3991,7 +4001,7 @@ var productionsTable = ProdTab{
String: `TripleForStart : empty << dsl.NewASTNodeZary(nil, dsl.NodeTypeStatementBlock) >>`,
Id: "TripleForStart",
NTType: 94,
Index: 299,
Index: 300,
NumSymbols: 0,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(nil, dsl.NodeTypeStatementBlock)
@ -4001,7 +4011,7 @@ var productionsTable = ProdTab{
String: `TripleForStart : Assignment << dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeStatementBlock) >>`,
Id: "TripleForStart",
NTType: 94,
Index: 300,
Index: 301,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeStatementBlock)
@ -4011,7 +4021,7 @@ var productionsTable = ProdTab{
String: `TripleForStart : TripleForStart "," Assignment << dsl.AppendChild(X[0], X[2]) >>`,
Id: "TripleForStart",
NTType: 94,
Index: 301,
Index: 302,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AppendChild(X[0], X[2])
@ -4021,7 +4031,7 @@ var productionsTable = ProdTab{
String: `TripleForContinuation : empty << dsl.NewASTNodeZary(nil, dsl.NodeTypeStatementBlock) >>`,
Id: "TripleForContinuation",
NTType: 95,
Index: 302,
Index: 303,
NumSymbols: 0,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(nil, dsl.NodeTypeStatementBlock)
@ -4031,7 +4041,7 @@ var productionsTable = ProdTab{
String: `TripleForContinuation : TripleForContinuationItem << dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeStatementBlock) >>`,
Id: "TripleForContinuation",
NTType: 95,
Index: 303,
Index: 304,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeStatementBlock)
@ -4041,7 +4051,7 @@ var productionsTable = ProdTab{
String: `TripleForContinuation : TripleForContinuation "," TripleForContinuationItem << dsl.AppendChild(X[0], X[2]) >>`,
Id: "TripleForContinuation",
NTType: 95,
Index: 304,
Index: 305,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AppendChild(X[0], X[2])
@ -4051,7 +4061,7 @@ var productionsTable = ProdTab{
String: `TripleForContinuationItem : Assignment << >>`,
Id: "TripleForContinuationItem",
NTType: 96,
Index: 305,
Index: 306,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -4061,7 +4071,7 @@ var productionsTable = ProdTab{
String: `TripleForContinuationItem : BareBoolean << >>`,
Id: "TripleForContinuationItem",
NTType: 96,
Index: 306,
Index: 307,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return X[0], nil
@ -4071,7 +4081,7 @@ var productionsTable = ProdTab{
String: `TripleForUpdate : empty << dsl.NewASTNodeZary(nil, dsl.NodeTypeStatementBlock) >>`,
Id: "TripleForUpdate",
NTType: 97,
Index: 307,
Index: 308,
NumSymbols: 0,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(nil, dsl.NodeTypeStatementBlock)
@ -4081,7 +4091,7 @@ var productionsTable = ProdTab{
String: `TripleForUpdate : Assignment << dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeStatementBlock) >>`,
Id: "TripleForUpdate",
NTType: 97,
Index: 308,
Index: 309,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeStatementBlock)
@ -4091,7 +4101,7 @@ var productionsTable = ProdTab{
String: `TripleForUpdate : TripleForUpdate "," Assignment << dsl.AppendChild(X[0], X[2]) >>`,
Id: "TripleForUpdate",
NTType: 97,
Index: 309,
Index: 310,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AppendChild(X[0], X[2])
@ -4101,7 +4111,7 @@ var productionsTable = ProdTab{
String: `BreakStatement : break << dsl.NewASTNodeZary(X[0], dsl.NodeTypeBreak) >>`,
Id: "BreakStatement",
NTType: 98,
Index: 310,
Index: 311,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(X[0], dsl.NodeTypeBreak)
@ -4111,7 +4121,7 @@ var productionsTable = ProdTab{
String: `ContinueStatement : continue << dsl.NewASTNodeZary(X[0], dsl.NodeTypeContinue) >>`,
Id: "ContinueStatement",
NTType: 99,
Index: 311,
Index: 312,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(X[0], dsl.NodeTypeContinue)
@ -4126,7 +4136,7 @@ var productionsTable = ProdTab{
); >>`,
Id: "FunctionDefinition",
NTType: 100,
Index: 312,
Index: 313,
NumSymbols: 6,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(
@ -4147,7 +4157,7 @@ var productionsTable = ProdTab{
); >>`,
Id: "FunctionDefinition",
NTType: 100,
Index: 313,
Index: 314,
NumSymbols: 8,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeTernary(
@ -4168,7 +4178,7 @@ var productionsTable = ProdTab{
); >>`,
Id: "SubroutineDefinition",
NTType: 101,
Index: 314,
Index: 315,
NumSymbols: 6,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeBinary(
@ -4183,7 +4193,7 @@ var productionsTable = ProdTab{
String: `FuncOrSubrParameterList : empty << dsl.NewASTNodeZary(nil, dsl.NodeTypeParameterList) >>`,
Id: "FuncOrSubrParameterList",
NTType: 102,
Index: 315,
Index: 316,
NumSymbols: 0,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(nil, dsl.NodeTypeParameterList)
@ -4193,7 +4203,7 @@ var productionsTable = ProdTab{
String: `FuncOrSubrParameterList : FuncOrSubrNonEmptyParameterList << dsl.Wrap(X[0]) >>`,
Id: "FuncOrSubrParameterList",
NTType: 102,
Index: 316,
Index: 317,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.Wrap(X[0])
@ -4203,7 +4213,7 @@ var productionsTable = ProdTab{
String: `FuncOrSubrNonEmptyParameterList : FuncOrSubrParameter << dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeParameterList) >>`,
Id: "FuncOrSubrNonEmptyParameterList",
NTType: 103,
Index: 317,
Index: 318,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeParameterList)
@ -4213,7 +4223,7 @@ var productionsTable = ProdTab{
String: `FuncOrSubrNonEmptyParameterList : FuncOrSubrParameter "," << dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeParameterList) >>`,
Id: "FuncOrSubrNonEmptyParameterList",
NTType: 103,
Index: 318,
Index: 319,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(nil, X[0], dsl.NodeTypeParameterList)
@ -4223,7 +4233,7 @@ var productionsTable = ProdTab{
String: `FuncOrSubrNonEmptyParameterList : FuncOrSubrParameter "," FuncOrSubrNonEmptyParameterList << dsl.PrependChild(X[2], X[0]) >>`,
Id: "FuncOrSubrNonEmptyParameterList",
NTType: 103,
Index: 319,
Index: 320,
NumSymbols: 3,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.PrependChild(X[2], X[0])
@ -4234,24 +4244,6 @@ var productionsTable = ProdTab{
nil,
X[0],
dsl.NodeTypeParameter,
) >>`,
Id: "FuncOrSubrParameter",
NTType: 104,
Index: 320,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
nil,
X[0],
dsl.NodeTypeParameter,
)
},
},
ProdTabEntry{
String: `FuncOrSubrParameter : TypedFuncOrSubrParameterName << dsl.NewASTNodeUnary(
nil,
X[0],
dsl.NodeTypeParameter,
) >>`,
Id: "FuncOrSubrParameter",
NTType: 104,
@ -4265,11 +4257,29 @@ var productionsTable = ProdTab{
)
},
},
ProdTabEntry{
String: `FuncOrSubrParameter : TypedFuncOrSubrParameterName << dsl.NewASTNodeUnary(
nil,
X[0],
dsl.NodeTypeParameter,
) >>`,
Id: "FuncOrSubrParameter",
NTType: 104,
Index: 322,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(
nil,
X[0],
dsl.NodeTypeParameter,
)
},
},
ProdTabEntry{
String: `UntypedFuncOrSubrParameterName : non_sigil_name << dsl.NewASTNode(X[0], dsl.NodeTypeParameterName) >>`,
Id: "UntypedFuncOrSubrParameterName",
NTType: 105,
Index: 322,
Index: 323,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNode(X[0], dsl.NodeTypeParameterName)
@ -4279,7 +4289,7 @@ var productionsTable = ProdTab{
String: `TypedFuncOrSubrParameterName : Typedecl UntypedFuncOrSubrParameterName << dsl.AppendChild(X[1], X[0]) >>`,
Id: "TypedFuncOrSubrParameterName",
NTType: 106,
Index: 323,
Index: 324,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.AppendChild(X[1], X[0])
@ -4289,7 +4299,7 @@ var productionsTable = ProdTab{
String: `ReturnStatement : return Rvalue << dsl.NewASTNodeUnary(X[0], X[1], dsl.NodeTypeReturn) >>`,
Id: "ReturnStatement",
NTType: 107,
Index: 324,
Index: 325,
NumSymbols: 2,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeUnary(X[0], X[1], dsl.NodeTypeReturn)
@ -4299,7 +4309,7 @@ var productionsTable = ProdTab{
String: `ReturnStatement : return << dsl.NewASTNodeZary(X[0], dsl.NodeTypeReturn) >>`,
Id: "ReturnStatement",
NTType: 107,
Index: 325,
Index: 326,
NumSymbols: 1,
ReduceFunc: func(X []Attrib, C interface{}) (Attrib, error) {
return dsl.NewASTNodeZary(X[0], dsl.NodeTypeReturn)

View file

@ -238,6 +238,7 @@ var TokMap = TokenMap{
"**",
"string_literal",
"regex_case_insensitive",
"regex_r_string",
"int_literal",
"float_literal",
"boolean_literal",
@ -381,43 +382,44 @@ var TokMap = TokenMap{
"**": 99,
"string_literal": 100,
"regex_case_insensitive": 101,
"int_literal": 102,
"float_literal": 103,
"boolean_literal": 104,
"null_literal": 105,
"const_M_PI": 106,
"const_M_E": 107,
"panic": 108,
"[": 109,
"ctx_IPS": 110,
"ctx_IFS": 111,
"ctx_IRS": 112,
"ctx_OPS": 113,
"ctx_OFS": 114,
"ctx_ORS": 115,
"ctx_FLATSEP": 116,
"ctx_NF": 117,
"ctx_NR": 118,
"ctx_FNR": 119,
"ctx_FILENAME": 120,
"ctx_FILENUM": 121,
"env": 122,
"[[": 123,
"[[[": 124,
"call": 125,
"begin": 126,
"end": 127,
"if": 128,
"elif": 129,
"else": 130,
"while": 131,
"do": 132,
"for": 133,
"in": 134,
"break": 135,
"continue": 136,
"func": 137,
"subr": 138,
"return": 139,
"regex_r_string": 102,
"int_literal": 103,
"float_literal": 104,
"boolean_literal": 105,
"null_literal": 106,
"const_M_PI": 107,
"const_M_E": 108,
"panic": 109,
"[": 110,
"ctx_IPS": 111,
"ctx_IFS": 112,
"ctx_IRS": 113,
"ctx_OPS": 114,
"ctx_OFS": 115,
"ctx_ORS": 116,
"ctx_FLATSEP": 117,
"ctx_NF": 118,
"ctx_NR": 119,
"ctx_FNR": 120,
"ctx_FILENAME": 121,
"ctx_FILENUM": 122,
"env": 123,
"[[": 124,
"[[[": 125,
"call": 126,
"begin": 127,
"end": 128,
"if": 129,
"elif": 130,
"else": 131,
"while": 132,
"do": 133,
"for": 134,
"in": 135,
"break": 136,
"continue": 137,
"func": 138,
"subr": 139,
"return": 140,
},
}

View file

@ -29,6 +29,12 @@ indexing bug:
implicit r:
* double-check end of reference-main-data-types.md.in
----------------------------------------------------------------
r-strings:
* UT
* doc @ regex page including implicit-r
----------------------------------------------------------------
docs:
w discussion re docs6 ...