edn-abnf 0.5.21 → 0.5.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/edn-abnf.gemspec +1 -1
- data/lib/parser/edngrammar.rb +229 -168
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7ecff49f462934ac958a9624737c4612c498e6f434958eb26787b0f05fbc7e13
|
|
4
|
+
data.tar.gz: 0ec7a86f00424edbf61b5027d1e7fae7f01817b9b098acf65b491c70aa4067bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2818b417115bb44c83a5f5e200f7cdaf9a60f823ddc17d4e1c24a56c1805660d1e0a78cf14b5b608997dcb8403e7a6262f149cab1ddadce0bd716af181fda1c8
|
|
7
|
+
data.tar.gz: ada8677b77c726d04a644066400d27711ec46f9acf9030b3e53039315656ee45a7c2d1acf0f2e17365538e505a6449c24f041f82bfa717341d400add0246853d
|
data/edn-abnf.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "edn-abnf"
|
|
3
|
-
s.version = "0.5.
|
|
3
|
+
s.version = "0.5.24"
|
|
4
4
|
s.summary = "CBOR Extended Diagnostic Notation (EDN) implemented in ABNF"
|
|
5
5
|
s.description = %q{edn-abnf implements converters and miscellaneous tools for CBOR EDN's ABNF}
|
|
6
6
|
s.author = "Carsten Bormann"
|
data/lib/parser/edngrammar.rb
CHANGED
|
@@ -2129,69 +2129,57 @@ module EDNGRAMMAR
|
|
|
2129
2129
|
s0, i0 = [], index
|
|
2130
2130
|
loop do
|
|
2131
2131
|
i1 = index
|
|
2132
|
-
if (match_len = has_terminal?("\
|
|
2132
|
+
if (match_len = has_terminal?("\n", false, index))
|
|
2133
2133
|
r2 = true
|
|
2134
2134
|
@index += match_len
|
|
2135
2135
|
else
|
|
2136
|
-
terminal_parse_failure('"\\
|
|
2136
|
+
terminal_parse_failure('"\\n"')
|
|
2137
2137
|
r2 = nil
|
|
2138
2138
|
end
|
|
2139
2139
|
if r2
|
|
2140
2140
|
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
2141
2141
|
r1 = r2
|
|
2142
2142
|
else
|
|
2143
|
-
if (match_len = has_terminal?("\
|
|
2143
|
+
if (match_len = has_terminal?("\r", false, index))
|
|
2144
2144
|
r3 = true
|
|
2145
2145
|
@index += match_len
|
|
2146
2146
|
else
|
|
2147
|
-
terminal_parse_failure('"\\
|
|
2147
|
+
terminal_parse_failure('"\\r"')
|
|
2148
2148
|
r3 = nil
|
|
2149
2149
|
end
|
|
2150
2150
|
if r3
|
|
2151
2151
|
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
2152
2152
|
r1 = r3
|
|
2153
2153
|
else
|
|
2154
|
-
if (
|
|
2154
|
+
if has_terminal?(@regexps[gr = '\A[\\ -_]'] ||= Regexp.new(gr), :regexp, index)
|
|
2155
2155
|
r4 = true
|
|
2156
|
-
@index +=
|
|
2156
|
+
@index += 1
|
|
2157
2157
|
else
|
|
2158
|
-
terminal_parse_failure('
|
|
2158
|
+
terminal_parse_failure('[\\ -_]')
|
|
2159
2159
|
r4 = nil
|
|
2160
2160
|
end
|
|
2161
2161
|
if r4
|
|
2162
2162
|
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
2163
2163
|
r1 = r4
|
|
2164
2164
|
else
|
|
2165
|
-
if has_terminal?(@regexps[gr = '\A[
|
|
2165
|
+
if has_terminal?(@regexps[gr = '\A[a-~]'] ||= Regexp.new(gr), :regexp, index)
|
|
2166
2166
|
r5 = true
|
|
2167
2167
|
@index += 1
|
|
2168
2168
|
else
|
|
2169
|
-
terminal_parse_failure('[
|
|
2169
|
+
terminal_parse_failure('[a-~]')
|
|
2170
2170
|
r5 = nil
|
|
2171
2171
|
end
|
|
2172
2172
|
if r5
|
|
2173
2173
|
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
2174
2174
|
r1 = r5
|
|
2175
2175
|
else
|
|
2176
|
-
|
|
2177
|
-
r6 = true
|
|
2178
|
-
@index += 1
|
|
2179
|
-
else
|
|
2180
|
-
terminal_parse_failure('[a-~]')
|
|
2181
|
-
r6 = nil
|
|
2182
|
-
end
|
|
2176
|
+
r6 = _nt_NONASCII
|
|
2183
2177
|
if r6
|
|
2184
2178
|
r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
|
|
2185
2179
|
r1 = r6
|
|
2186
2180
|
else
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
|
|
2190
|
-
r1 = r7
|
|
2191
|
-
else
|
|
2192
|
-
@index = i1
|
|
2193
|
-
r1 = nil
|
|
2194
|
-
end
|
|
2181
|
+
@index = i1
|
|
2182
|
+
r1 = nil
|
|
2195
2183
|
end
|
|
2196
2184
|
end
|
|
2197
2185
|
end
|
|
@@ -3189,6 +3177,50 @@ module EDNGRAMMAR
|
|
|
3189
3177
|
r0
|
|
3190
3178
|
end
|
|
3191
3179
|
|
|
3180
|
+
def _nt_lblank
|
|
3181
|
+
start_index = index
|
|
3182
|
+
if node_cache[:lblank].has_key?(index)
|
|
3183
|
+
cached = node_cache[:lblank][index]
|
|
3184
|
+
if cached
|
|
3185
|
+
node_cache[:lblank][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
3186
|
+
@index = cached.interval.end
|
|
3187
|
+
end
|
|
3188
|
+
return cached
|
|
3189
|
+
end
|
|
3190
|
+
|
|
3191
|
+
i0 = index
|
|
3192
|
+
if (match_len = has_terminal?("\n", false, index))
|
|
3193
|
+
r1 = true
|
|
3194
|
+
@index += match_len
|
|
3195
|
+
else
|
|
3196
|
+
terminal_parse_failure('"\\n"')
|
|
3197
|
+
r1 = nil
|
|
3198
|
+
end
|
|
3199
|
+
if r1
|
|
3200
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
3201
|
+
r0 = r1
|
|
3202
|
+
else
|
|
3203
|
+
if (match_len = has_terminal?(" ", false, index))
|
|
3204
|
+
r2 = true
|
|
3205
|
+
@index += match_len
|
|
3206
|
+
else
|
|
3207
|
+
terminal_parse_failure('" "')
|
|
3208
|
+
r2 = nil
|
|
3209
|
+
end
|
|
3210
|
+
if r2
|
|
3211
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
3212
|
+
r0 = r2
|
|
3213
|
+
else
|
|
3214
|
+
@index = i0
|
|
3215
|
+
r0 = nil
|
|
3216
|
+
end
|
|
3217
|
+
end
|
|
3218
|
+
|
|
3219
|
+
node_cache[:lblank][start_index] = r0
|
|
3220
|
+
|
|
3221
|
+
r0
|
|
3222
|
+
end
|
|
3223
|
+
|
|
3192
3224
|
def _nt_non_slash
|
|
3193
3225
|
start_index = index
|
|
3194
3226
|
if node_cache[:non_slash].has_key?(index)
|
|
@@ -3307,10 +3339,58 @@ module EDNGRAMMAR
|
|
|
3307
3339
|
r0
|
|
3308
3340
|
end
|
|
3309
3341
|
|
|
3342
|
+
def _nt_eol_comment
|
|
3343
|
+
start_index = index
|
|
3344
|
+
if node_cache[:eol_comment].has_key?(index)
|
|
3345
|
+
cached = node_cache[:eol_comment][index]
|
|
3346
|
+
if cached
|
|
3347
|
+
node_cache[:eol_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
3348
|
+
@index = cached.interval.end
|
|
3349
|
+
end
|
|
3350
|
+
return cached
|
|
3351
|
+
end
|
|
3352
|
+
|
|
3353
|
+
i0 = index
|
|
3354
|
+
if (match_len = has_terminal?("#", false, index))
|
|
3355
|
+
r1 = true
|
|
3356
|
+
@index += match_len
|
|
3357
|
+
else
|
|
3358
|
+
terminal_parse_failure('"#"')
|
|
3359
|
+
r1 = nil
|
|
3360
|
+
end
|
|
3361
|
+
if r1
|
|
3362
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
3363
|
+
r0 = r1
|
|
3364
|
+
else
|
|
3365
|
+
if (match_len = has_terminal?("//", false, index))
|
|
3366
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
|
3367
|
+
@index += match_len
|
|
3368
|
+
else
|
|
3369
|
+
terminal_parse_failure('"//"')
|
|
3370
|
+
r2 = nil
|
|
3371
|
+
end
|
|
3372
|
+
if r2
|
|
3373
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
3374
|
+
r0 = r2
|
|
3375
|
+
else
|
|
3376
|
+
@index = i0
|
|
3377
|
+
r0 = nil
|
|
3378
|
+
end
|
|
3379
|
+
end
|
|
3380
|
+
|
|
3381
|
+
node_cache[:eol_comment][start_index] = r0
|
|
3382
|
+
|
|
3383
|
+
r0
|
|
3384
|
+
end
|
|
3385
|
+
|
|
3310
3386
|
module Comment0
|
|
3311
3387
|
end
|
|
3312
3388
|
|
|
3313
3389
|
module Comment1
|
|
3390
|
+
def eol_comment
|
|
3391
|
+
elements[0]
|
|
3392
|
+
end
|
|
3393
|
+
|
|
3314
3394
|
end
|
|
3315
3395
|
|
|
3316
3396
|
def _nt_comment
|
|
@@ -3344,7 +3424,12 @@ module EDNGRAMMAR
|
|
|
3344
3424
|
break
|
|
3345
3425
|
end
|
|
3346
3426
|
end
|
|
3347
|
-
|
|
3427
|
+
if s3.empty?
|
|
3428
|
+
@index = i3
|
|
3429
|
+
r3 = nil
|
|
3430
|
+
else
|
|
3431
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
3432
|
+
end
|
|
3348
3433
|
s1 << r3
|
|
3349
3434
|
if r3
|
|
3350
3435
|
if (match_len = has_terminal?("/", false, index))
|
|
@@ -3369,13 +3454,7 @@ module EDNGRAMMAR
|
|
|
3369
3454
|
r0 = r1
|
|
3370
3455
|
else
|
|
3371
3456
|
i6, s6 = index, []
|
|
3372
|
-
|
|
3373
|
-
r7 = true
|
|
3374
|
-
@index += match_len
|
|
3375
|
-
else
|
|
3376
|
-
terminal_parse_failure('"#"')
|
|
3377
|
-
r7 = nil
|
|
3378
|
-
end
|
|
3457
|
+
r7 = _nt_eol_comment
|
|
3379
3458
|
s6 << r7
|
|
3380
3459
|
if r7
|
|
3381
3460
|
s8, i8 = [], index
|
|
@@ -8009,63 +8088,51 @@ module EDNGRAMMAR
|
|
|
8009
8088
|
end
|
|
8010
8089
|
|
|
8011
8090
|
i0 = index
|
|
8012
|
-
if (match_len = has_terminal?("\
|
|
8091
|
+
if (match_len = has_terminal?("\r", false, index))
|
|
8013
8092
|
r1 = true
|
|
8014
8093
|
@index += match_len
|
|
8015
8094
|
else
|
|
8016
|
-
terminal_parse_failure('"\\
|
|
8095
|
+
terminal_parse_failure('"\\r"')
|
|
8017
8096
|
r1 = nil
|
|
8018
8097
|
end
|
|
8019
8098
|
if r1
|
|
8020
8099
|
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
8021
8100
|
r0 = r1
|
|
8022
8101
|
else
|
|
8023
|
-
if (
|
|
8102
|
+
if has_terminal?(@regexps[gr = '\A[\\ -_]'] ||= Regexp.new(gr), :regexp, index)
|
|
8024
8103
|
r2 = true
|
|
8025
|
-
@index +=
|
|
8104
|
+
@index += 1
|
|
8026
8105
|
else
|
|
8027
|
-
terminal_parse_failure('
|
|
8106
|
+
terminal_parse_failure('[\\ -_]')
|
|
8028
8107
|
r2 = nil
|
|
8029
8108
|
end
|
|
8030
8109
|
if r2
|
|
8031
8110
|
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
8032
8111
|
r0 = r2
|
|
8033
8112
|
else
|
|
8034
|
-
if has_terminal?(@regexps[gr = '\A[
|
|
8113
|
+
if has_terminal?(@regexps[gr = '\A[a-]'] ||= Regexp.new(gr), :regexp, index)
|
|
8035
8114
|
r3 = true
|
|
8036
8115
|
@index += 1
|
|
8037
8116
|
else
|
|
8038
|
-
terminal_parse_failure('[
|
|
8117
|
+
terminal_parse_failure('[a-]')
|
|
8039
8118
|
r3 = nil
|
|
8040
8119
|
end
|
|
8041
8120
|
if r3
|
|
8042
8121
|
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
8043
8122
|
r0 = r3
|
|
8044
8123
|
else
|
|
8045
|
-
|
|
8046
|
-
r4 = true
|
|
8047
|
-
@index += 1
|
|
8048
|
-
else
|
|
8049
|
-
terminal_parse_failure('[a-]')
|
|
8050
|
-
r4 = nil
|
|
8051
|
-
end
|
|
8124
|
+
r4 = _nt_NONASCII
|
|
8052
8125
|
if r4
|
|
8053
8126
|
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
8054
8127
|
r0 = r4
|
|
8055
8128
|
else
|
|
8056
|
-
r5 =
|
|
8129
|
+
r5 = _nt_shortrawdelim
|
|
8057
8130
|
if r5
|
|
8058
8131
|
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
8059
8132
|
r0 = r5
|
|
8060
8133
|
else
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
|
|
8064
|
-
r0 = r6
|
|
8065
|
-
else
|
|
8066
|
-
@index = i0
|
|
8067
|
-
r0 = nil
|
|
8068
|
-
end
|
|
8134
|
+
@index = i0
|
|
8135
|
+
r0 = nil
|
|
8069
8136
|
end
|
|
8070
8137
|
end
|
|
8071
8138
|
end
|
|
@@ -8078,14 +8145,14 @@ module EDNGRAMMAR
|
|
|
8078
8145
|
end
|
|
8079
8146
|
|
|
8080
8147
|
module SqAppStringH0
|
|
8081
|
-
def
|
|
8148
|
+
def s_app_string_h
|
|
8082
8149
|
elements[1]
|
|
8083
8150
|
end
|
|
8084
8151
|
|
|
8085
8152
|
end
|
|
8086
8153
|
|
|
8087
8154
|
module SqAppStringH1
|
|
8088
|
-
def ast;
|
|
8155
|
+
def ast; s_app_string_h.ast end
|
|
8089
8156
|
end
|
|
8090
8157
|
|
|
8091
8158
|
def _nt_sq_app_string_h
|
|
@@ -8109,7 +8176,7 @@ module EDNGRAMMAR
|
|
|
8109
8176
|
end
|
|
8110
8177
|
s0 << r1
|
|
8111
8178
|
if r1
|
|
8112
|
-
r2 =
|
|
8179
|
+
r2 = _nt_s_app_string_h
|
|
8113
8180
|
s0 << r2
|
|
8114
8181
|
if r2
|
|
8115
8182
|
if (match_len = has_terminal?("'", false, index))
|
|
@@ -8136,7 +8203,7 @@ module EDNGRAMMAR
|
|
|
8136
8203
|
r0
|
|
8137
8204
|
end
|
|
8138
8205
|
|
|
8139
|
-
module
|
|
8206
|
+
module SAppStringH0
|
|
8140
8207
|
def HEXDIG1
|
|
8141
8208
|
elements[0]
|
|
8142
8209
|
end
|
|
@@ -8154,13 +8221,13 @@ module EDNGRAMMAR
|
|
|
8154
8221
|
end
|
|
8155
8222
|
end
|
|
8156
8223
|
|
|
8157
|
-
module
|
|
8224
|
+
module SAppStringH1
|
|
8158
8225
|
def ast
|
|
8159
8226
|
Integer(elements[0].text_value + elements[2].text_value, 16).chr("BINARY")
|
|
8160
8227
|
end
|
|
8161
8228
|
end
|
|
8162
8229
|
|
|
8163
|
-
module
|
|
8230
|
+
module SAppStringH2
|
|
8164
8231
|
def ellipsis
|
|
8165
8232
|
elements[0]
|
|
8166
8233
|
end
|
|
@@ -8170,21 +8237,25 @@ module EDNGRAMMAR
|
|
|
8170
8237
|
end
|
|
8171
8238
|
end
|
|
8172
8239
|
|
|
8173
|
-
module
|
|
8240
|
+
module SAppStringH3
|
|
8174
8241
|
def ast; ellipsis.ast end
|
|
8175
8242
|
end
|
|
8176
8243
|
|
|
8177
|
-
module
|
|
8244
|
+
module SAppStringH4
|
|
8245
|
+
def eol_comment
|
|
8246
|
+
elements[0]
|
|
8247
|
+
end
|
|
8248
|
+
|
|
8178
8249
|
end
|
|
8179
8250
|
|
|
8180
|
-
module
|
|
8251
|
+
module SAppStringH5
|
|
8181
8252
|
def h_S
|
|
8182
8253
|
elements[0]
|
|
8183
8254
|
end
|
|
8184
8255
|
|
|
8185
8256
|
end
|
|
8186
8257
|
|
|
8187
|
-
module
|
|
8258
|
+
module SAppStringH6
|
|
8188
8259
|
def unpack_thread(s)
|
|
8189
8260
|
case s[0]
|
|
8190
8261
|
when CBOR::Tagged
|
|
@@ -8215,12 +8286,12 @@ module EDNGRAMMAR
|
|
|
8215
8286
|
end
|
|
8216
8287
|
end
|
|
8217
8288
|
|
|
8218
|
-
def
|
|
8289
|
+
def _nt_s_app_string_h
|
|
8219
8290
|
start_index = index
|
|
8220
|
-
if node_cache[:
|
|
8221
|
-
cached = node_cache[:
|
|
8291
|
+
if node_cache[:s_app_string_h].has_key?(index)
|
|
8292
|
+
cached = node_cache[:s_app_string_h][index]
|
|
8222
8293
|
if cached
|
|
8223
|
-
node_cache[:
|
|
8294
|
+
node_cache[:s_app_string_h][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
8224
8295
|
@index = cached.interval.end
|
|
8225
8296
|
end
|
|
8226
8297
|
return cached
|
|
@@ -8250,8 +8321,8 @@ module EDNGRAMMAR
|
|
|
8250
8321
|
end
|
|
8251
8322
|
if s4.last
|
|
8252
8323
|
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
8253
|
-
r4.extend(
|
|
8254
|
-
r4.extend(
|
|
8324
|
+
r4.extend(SAppStringH0)
|
|
8325
|
+
r4.extend(SAppStringH1)
|
|
8255
8326
|
else
|
|
8256
8327
|
@index = i4
|
|
8257
8328
|
r4 = nil
|
|
@@ -8269,8 +8340,8 @@ module EDNGRAMMAR
|
|
|
8269
8340
|
end
|
|
8270
8341
|
if s9.last
|
|
8271
8342
|
r9 = instantiate_node(SyntaxNode,input, i9...index, s9)
|
|
8272
|
-
r9.extend(
|
|
8273
|
-
r9.extend(
|
|
8343
|
+
r9.extend(SAppStringH2)
|
|
8344
|
+
r9.extend(SAppStringH3)
|
|
8274
8345
|
else
|
|
8275
8346
|
@index = i9
|
|
8276
8347
|
r9 = nil
|
|
@@ -8293,13 +8364,7 @@ module EDNGRAMMAR
|
|
|
8293
8364
|
s0 << r2
|
|
8294
8365
|
if r2
|
|
8295
8366
|
i13, s13 = index, []
|
|
8296
|
-
|
|
8297
|
-
r14 = true
|
|
8298
|
-
@index += match_len
|
|
8299
|
-
else
|
|
8300
|
-
terminal_parse_failure('"#"')
|
|
8301
|
-
r14 = nil
|
|
8302
|
-
end
|
|
8367
|
+
r14 = _nt_eol_comment
|
|
8303
8368
|
s13 << r14
|
|
8304
8369
|
if r14
|
|
8305
8370
|
s15, i15 = [], index
|
|
@@ -8316,7 +8381,7 @@ module EDNGRAMMAR
|
|
|
8316
8381
|
end
|
|
8317
8382
|
if s13.last
|
|
8318
8383
|
r13 = instantiate_node(SyntaxNode,input, i13...index, s13)
|
|
8319
|
-
r13.extend(
|
|
8384
|
+
r13.extend(SAppStringH4)
|
|
8320
8385
|
else
|
|
8321
8386
|
@index = i13
|
|
8322
8387
|
r13 = nil
|
|
@@ -8331,14 +8396,14 @@ module EDNGRAMMAR
|
|
|
8331
8396
|
end
|
|
8332
8397
|
if s0.last
|
|
8333
8398
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
8334
|
-
r0.extend(
|
|
8335
|
-
r0.extend(
|
|
8399
|
+
r0.extend(SAppStringH5)
|
|
8400
|
+
r0.extend(SAppStringH6)
|
|
8336
8401
|
else
|
|
8337
8402
|
@index = i0
|
|
8338
8403
|
r0 = nil
|
|
8339
8404
|
end
|
|
8340
8405
|
|
|
8341
|
-
node_cache[:
|
|
8406
|
+
node_cache[:s_app_string_h][start_index] = r0
|
|
8342
8407
|
|
|
8343
8408
|
r0
|
|
8344
8409
|
end
|
|
@@ -8532,6 +8597,10 @@ module EDNGRAMMAR
|
|
|
8532
8597
|
end
|
|
8533
8598
|
|
|
8534
8599
|
module HComment1
|
|
8600
|
+
def eol_comment
|
|
8601
|
+
elements[0]
|
|
8602
|
+
end
|
|
8603
|
+
|
|
8535
8604
|
def i_LF
|
|
8536
8605
|
elements[2]
|
|
8537
8606
|
end
|
|
@@ -8568,7 +8637,12 @@ module EDNGRAMMAR
|
|
|
8568
8637
|
break
|
|
8569
8638
|
end
|
|
8570
8639
|
end
|
|
8571
|
-
|
|
8640
|
+
if s3.empty?
|
|
8641
|
+
@index = i3
|
|
8642
|
+
r3 = nil
|
|
8643
|
+
else
|
|
8644
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
8645
|
+
end
|
|
8572
8646
|
s1 << r3
|
|
8573
8647
|
if r3
|
|
8574
8648
|
if (match_len = has_terminal?("/", false, index))
|
|
@@ -8593,13 +8667,7 @@ module EDNGRAMMAR
|
|
|
8593
8667
|
r0 = r1
|
|
8594
8668
|
else
|
|
8595
8669
|
i6, s6 = index, []
|
|
8596
|
-
|
|
8597
|
-
r7 = true
|
|
8598
|
-
@index += match_len
|
|
8599
|
-
else
|
|
8600
|
-
terminal_parse_failure('"#"')
|
|
8601
|
-
r7 = nil
|
|
8602
|
-
end
|
|
8670
|
+
r7 = _nt_eol_comment
|
|
8603
8671
|
s6 << r7
|
|
8604
8672
|
if r7
|
|
8605
8673
|
s8, i8 = [], index
|
|
@@ -8712,7 +8780,7 @@ module EDNGRAMMAR
|
|
|
8712
8780
|
i0, s0 = index, []
|
|
8713
8781
|
s1, i1 = [], index
|
|
8714
8782
|
loop do
|
|
8715
|
-
r2 =
|
|
8783
|
+
r2 = _nt_lblank
|
|
8716
8784
|
if r2
|
|
8717
8785
|
s1 << r2
|
|
8718
8786
|
else
|
|
@@ -8730,7 +8798,7 @@ module EDNGRAMMAR
|
|
|
8730
8798
|
if r5
|
|
8731
8799
|
s6, i6 = [], index
|
|
8732
8800
|
loop do
|
|
8733
|
-
r7 =
|
|
8801
|
+
r7 = _nt_lblank
|
|
8734
8802
|
if r7
|
|
8735
8803
|
s6 << r7
|
|
8736
8804
|
else
|
|
@@ -8781,7 +8849,7 @@ module EDNGRAMMAR
|
|
|
8781
8849
|
end
|
|
8782
8850
|
|
|
8783
8851
|
i0 = index
|
|
8784
|
-
r1 =
|
|
8852
|
+
r1 = _nt_lblank
|
|
8785
8853
|
if r1
|
|
8786
8854
|
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
8787
8855
|
r0 = r1
|
|
@@ -8847,6 +8915,10 @@ module EDNGRAMMAR
|
|
|
8847
8915
|
end
|
|
8848
8916
|
|
|
8849
8917
|
module RhComment1
|
|
8918
|
+
def eol_comment
|
|
8919
|
+
elements[0]
|
|
8920
|
+
end
|
|
8921
|
+
|
|
8850
8922
|
end
|
|
8851
8923
|
|
|
8852
8924
|
def _nt_rh_comment
|
|
@@ -8880,7 +8952,12 @@ module EDNGRAMMAR
|
|
|
8880
8952
|
break
|
|
8881
8953
|
end
|
|
8882
8954
|
end
|
|
8883
|
-
|
|
8955
|
+
if s3.empty?
|
|
8956
|
+
@index = i3
|
|
8957
|
+
r3 = nil
|
|
8958
|
+
else
|
|
8959
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
8960
|
+
end
|
|
8884
8961
|
s1 << r3
|
|
8885
8962
|
if r3
|
|
8886
8963
|
if (match_len = has_terminal?("/", false, index))
|
|
@@ -8905,13 +8982,7 @@ module EDNGRAMMAR
|
|
|
8905
8982
|
r0 = r1
|
|
8906
8983
|
else
|
|
8907
8984
|
i6, s6 = index, []
|
|
8908
|
-
|
|
8909
|
-
r7 = true
|
|
8910
|
-
@index += match_len
|
|
8911
|
-
else
|
|
8912
|
-
terminal_parse_failure('"#"')
|
|
8913
|
-
r7 = nil
|
|
8914
|
-
end
|
|
8985
|
+
r7 = _nt_eol_comment
|
|
8915
8986
|
s6 << r7
|
|
8916
8987
|
if r7
|
|
8917
8988
|
s8, i8 = [], index
|
|
@@ -9042,7 +9113,7 @@ module EDNGRAMMAR
|
|
|
9042
9113
|
elements[0]
|
|
9043
9114
|
end
|
|
9044
9115
|
|
|
9045
|
-
def
|
|
9116
|
+
def rh_S
|
|
9046
9117
|
elements[1]
|
|
9047
9118
|
end
|
|
9048
9119
|
end
|
|
@@ -9052,6 +9123,10 @@ module EDNGRAMMAR
|
|
|
9052
9123
|
end
|
|
9053
9124
|
|
|
9054
9125
|
module RAppStringH4
|
|
9126
|
+
def eol_comment
|
|
9127
|
+
elements[0]
|
|
9128
|
+
end
|
|
9129
|
+
|
|
9055
9130
|
def matchrawdelim
|
|
9056
9131
|
elements[2]
|
|
9057
9132
|
end
|
|
@@ -9144,7 +9219,7 @@ module EDNGRAMMAR
|
|
|
9144
9219
|
r10 = _nt_ellipsis
|
|
9145
9220
|
s9 << r10
|
|
9146
9221
|
if r10
|
|
9147
|
-
r11 =
|
|
9222
|
+
r11 = _nt_rh_S
|
|
9148
9223
|
s9 << r11
|
|
9149
9224
|
end
|
|
9150
9225
|
if s9.last
|
|
@@ -9174,13 +9249,7 @@ module EDNGRAMMAR
|
|
|
9174
9249
|
if r2
|
|
9175
9250
|
i12 = index
|
|
9176
9251
|
i13, s13 = index, []
|
|
9177
|
-
|
|
9178
|
-
r14 = true
|
|
9179
|
-
@index += match_len
|
|
9180
|
-
else
|
|
9181
|
-
terminal_parse_failure('"#"')
|
|
9182
|
-
r14 = nil
|
|
9183
|
-
end
|
|
9252
|
+
r14 = _nt_eol_comment
|
|
9184
9253
|
s13 << r14
|
|
9185
9254
|
if r14
|
|
9186
9255
|
s15, i15 = [], index
|
|
@@ -9237,14 +9306,14 @@ module EDNGRAMMAR
|
|
|
9237
9306
|
end
|
|
9238
9307
|
|
|
9239
9308
|
module SqAppStringB640
|
|
9240
|
-
def
|
|
9309
|
+
def s_app_string_b64
|
|
9241
9310
|
elements[1]
|
|
9242
9311
|
end
|
|
9243
9312
|
|
|
9244
9313
|
end
|
|
9245
9314
|
|
|
9246
9315
|
module SqAppStringB641
|
|
9247
|
-
def ast;
|
|
9316
|
+
def ast; s_app_string_b64.ast end
|
|
9248
9317
|
end
|
|
9249
9318
|
|
|
9250
9319
|
def _nt_sq_app_string_b64
|
|
@@ -9268,7 +9337,7 @@ module EDNGRAMMAR
|
|
|
9268
9337
|
end
|
|
9269
9338
|
s0 << r1
|
|
9270
9339
|
if r1
|
|
9271
|
-
r2 =
|
|
9340
|
+
r2 = _nt_s_app_string_b64
|
|
9272
9341
|
s0 << r2
|
|
9273
9342
|
if r2
|
|
9274
9343
|
if (match_len = has_terminal?("'", false, index))
|
|
@@ -9295,7 +9364,7 @@ module EDNGRAMMAR
|
|
|
9295
9364
|
r0
|
|
9296
9365
|
end
|
|
9297
9366
|
|
|
9298
|
-
module
|
|
9367
|
+
module SAppStringB640
|
|
9299
9368
|
def b64dig
|
|
9300
9369
|
elements[0]
|
|
9301
9370
|
end
|
|
@@ -9305,14 +9374,14 @@ module EDNGRAMMAR
|
|
|
9305
9374
|
end
|
|
9306
9375
|
end
|
|
9307
9376
|
|
|
9308
|
-
module
|
|
9377
|
+
module SAppStringB641
|
|
9309
9378
|
def b64_S
|
|
9310
9379
|
elements[1]
|
|
9311
9380
|
end
|
|
9312
9381
|
|
|
9313
9382
|
end
|
|
9314
9383
|
|
|
9315
|
-
module
|
|
9384
|
+
module SAppStringB642
|
|
9316
9385
|
def b64dig
|
|
9317
9386
|
elements[0]
|
|
9318
9387
|
end
|
|
@@ -9323,7 +9392,7 @@ module EDNGRAMMAR
|
|
|
9323
9392
|
|
|
9324
9393
|
end
|
|
9325
9394
|
|
|
9326
|
-
module
|
|
9395
|
+
module SAppStringB643
|
|
9327
9396
|
def b64dig1
|
|
9328
9397
|
elements[0]
|
|
9329
9398
|
end
|
|
@@ -9345,17 +9414,21 @@ module EDNGRAMMAR
|
|
|
9345
9414
|
end
|
|
9346
9415
|
end
|
|
9347
9416
|
|
|
9348
|
-
module
|
|
9417
|
+
module SAppStringB644
|
|
9418
|
+
def eol_comment
|
|
9419
|
+
elements[0]
|
|
9420
|
+
end
|
|
9421
|
+
|
|
9349
9422
|
end
|
|
9350
9423
|
|
|
9351
|
-
module
|
|
9424
|
+
module SAppStringB645
|
|
9352
9425
|
def b64_S
|
|
9353
9426
|
elements[0]
|
|
9354
9427
|
end
|
|
9355
9428
|
|
|
9356
9429
|
end
|
|
9357
9430
|
|
|
9358
|
-
module
|
|
9431
|
+
module SAppStringB646
|
|
9359
9432
|
def ast
|
|
9360
9433
|
t = text_value.gsub(/\s|#[^\n]*(?:\n|\z)/, '').chars.each_slice(4).map(&:join)
|
|
9361
9434
|
if last = t[-1]
|
|
@@ -9370,12 +9443,12 @@ module EDNGRAMMAR
|
|
|
9370
9443
|
end
|
|
9371
9444
|
end
|
|
9372
9445
|
|
|
9373
|
-
def
|
|
9446
|
+
def _nt_s_app_string_b64
|
|
9374
9447
|
start_index = index
|
|
9375
|
-
if node_cache[:
|
|
9376
|
-
cached = node_cache[:
|
|
9448
|
+
if node_cache[:s_app_string_b64].has_key?(index)
|
|
9449
|
+
cached = node_cache[:s_app_string_b64][index]
|
|
9377
9450
|
if cached
|
|
9378
|
-
node_cache[:
|
|
9451
|
+
node_cache[:s_app_string_b64][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
9379
9452
|
@index = cached.interval.end
|
|
9380
9453
|
end
|
|
9381
9454
|
return cached
|
|
@@ -9398,7 +9471,7 @@ module EDNGRAMMAR
|
|
|
9398
9471
|
end
|
|
9399
9472
|
if s4.last
|
|
9400
9473
|
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
9401
|
-
r4.extend(
|
|
9474
|
+
r4.extend(SAppStringB640)
|
|
9402
9475
|
else
|
|
9403
9476
|
@index = i4
|
|
9404
9477
|
r4 = nil
|
|
@@ -9469,7 +9542,7 @@ module EDNGRAMMAR
|
|
|
9469
9542
|
end
|
|
9470
9543
|
if s15.last
|
|
9471
9544
|
r15 = instantiate_node(SyntaxNode,input, i15...index, s15)
|
|
9472
|
-
r15.extend(
|
|
9545
|
+
r15.extend(SAppStringB641)
|
|
9473
9546
|
else
|
|
9474
9547
|
@index = i15
|
|
9475
9548
|
r15 = nil
|
|
@@ -9502,7 +9575,7 @@ module EDNGRAMMAR
|
|
|
9502
9575
|
end
|
|
9503
9576
|
if s19.last
|
|
9504
9577
|
r19 = instantiate_node(SyntaxNode,input, i19...index, s19)
|
|
9505
|
-
r19.extend(
|
|
9578
|
+
r19.extend(SAppStringB642)
|
|
9506
9579
|
else
|
|
9507
9580
|
@index = i19
|
|
9508
9581
|
r19 = nil
|
|
@@ -9531,7 +9604,7 @@ module EDNGRAMMAR
|
|
|
9531
9604
|
end
|
|
9532
9605
|
if s8.last
|
|
9533
9606
|
r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
|
|
9534
|
-
r8.extend(
|
|
9607
|
+
r8.extend(SAppStringB643)
|
|
9535
9608
|
else
|
|
9536
9609
|
@index = i8
|
|
9537
9610
|
r8 = nil
|
|
@@ -9544,13 +9617,7 @@ module EDNGRAMMAR
|
|
|
9544
9617
|
s0 << r7
|
|
9545
9618
|
if r7
|
|
9546
9619
|
i26, s26 = index, []
|
|
9547
|
-
|
|
9548
|
-
r27 = true
|
|
9549
|
-
@index += match_len
|
|
9550
|
-
else
|
|
9551
|
-
terminal_parse_failure('"#"')
|
|
9552
|
-
r27 = nil
|
|
9553
|
-
end
|
|
9620
|
+
r27 = _nt_eol_comment
|
|
9554
9621
|
s26 << r27
|
|
9555
9622
|
if r27
|
|
9556
9623
|
s28, i28 = [], index
|
|
@@ -9567,7 +9634,7 @@ module EDNGRAMMAR
|
|
|
9567
9634
|
end
|
|
9568
9635
|
if s26.last
|
|
9569
9636
|
r26 = instantiate_node(SyntaxNode,input, i26...index, s26)
|
|
9570
|
-
r26.extend(
|
|
9637
|
+
r26.extend(SAppStringB644)
|
|
9571
9638
|
else
|
|
9572
9639
|
@index = i26
|
|
9573
9640
|
r26 = nil
|
|
@@ -9583,14 +9650,14 @@ module EDNGRAMMAR
|
|
|
9583
9650
|
end
|
|
9584
9651
|
if s0.last
|
|
9585
9652
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
9586
|
-
r0.extend(
|
|
9587
|
-
r0.extend(
|
|
9653
|
+
r0.extend(SAppStringB645)
|
|
9654
|
+
r0.extend(SAppStringB646)
|
|
9588
9655
|
else
|
|
9589
9656
|
@index = i0
|
|
9590
9657
|
r0 = nil
|
|
9591
9658
|
end
|
|
9592
9659
|
|
|
9593
|
-
node_cache[:
|
|
9660
|
+
node_cache[:s_app_string_b64][start_index] = r0
|
|
9594
9661
|
|
|
9595
9662
|
r0
|
|
9596
9663
|
end
|
|
@@ -9757,6 +9824,10 @@ module EDNGRAMMAR
|
|
|
9757
9824
|
end
|
|
9758
9825
|
|
|
9759
9826
|
module B64Comment0
|
|
9827
|
+
def eol_comment
|
|
9828
|
+
elements[0]
|
|
9829
|
+
end
|
|
9830
|
+
|
|
9760
9831
|
end
|
|
9761
9832
|
|
|
9762
9833
|
def _nt_b64_comment
|
|
@@ -9771,13 +9842,7 @@ module EDNGRAMMAR
|
|
|
9771
9842
|
end
|
|
9772
9843
|
|
|
9773
9844
|
i0, s0 = index, []
|
|
9774
|
-
|
|
9775
|
-
r1 = true
|
|
9776
|
-
@index += match_len
|
|
9777
|
-
else
|
|
9778
|
-
terminal_parse_failure('"#"')
|
|
9779
|
-
r1 = nil
|
|
9780
|
-
end
|
|
9845
|
+
r1 = _nt_eol_comment
|
|
9781
9846
|
s0 << r1
|
|
9782
9847
|
if r1
|
|
9783
9848
|
s2, i2 = [], index
|
|
@@ -9876,7 +9941,7 @@ module EDNGRAMMAR
|
|
|
9876
9941
|
elements[0]
|
|
9877
9942
|
end
|
|
9878
9943
|
|
|
9879
|
-
def
|
|
9944
|
+
def rb64_S
|
|
9880
9945
|
elements[1]
|
|
9881
9946
|
end
|
|
9882
9947
|
end
|
|
@@ -9922,13 +9987,17 @@ module EDNGRAMMAR
|
|
|
9922
9987
|
end
|
|
9923
9988
|
|
|
9924
9989
|
module RAppStringB644
|
|
9990
|
+
def eol_comment
|
|
9991
|
+
elements[0]
|
|
9992
|
+
end
|
|
9993
|
+
|
|
9925
9994
|
def matchrawdelim
|
|
9926
9995
|
elements[2]
|
|
9927
9996
|
end
|
|
9928
9997
|
end
|
|
9929
9998
|
|
|
9930
9999
|
module RAppStringB645
|
|
9931
|
-
def
|
|
10000
|
+
def rb64_S
|
|
9932
10001
|
elements[0]
|
|
9933
10002
|
end
|
|
9934
10003
|
|
|
@@ -9961,7 +10030,7 @@ module EDNGRAMMAR
|
|
|
9961
10030
|
end
|
|
9962
10031
|
|
|
9963
10032
|
i0, s0 = index, []
|
|
9964
|
-
r1 =
|
|
10033
|
+
r1 = _nt_rb64_S
|
|
9965
10034
|
s0 << r1
|
|
9966
10035
|
if r1
|
|
9967
10036
|
s2, i2 = [], index
|
|
@@ -9972,7 +10041,7 @@ module EDNGRAMMAR
|
|
|
9972
10041
|
r5 = _nt_b64dig
|
|
9973
10042
|
s4 << r5
|
|
9974
10043
|
if r5
|
|
9975
|
-
r6 =
|
|
10044
|
+
r6 = _nt_rb64_S
|
|
9976
10045
|
s4 << r6
|
|
9977
10046
|
end
|
|
9978
10047
|
if s4.last
|
|
@@ -10124,13 +10193,7 @@ module EDNGRAMMAR
|
|
|
10124
10193
|
if r7
|
|
10125
10194
|
i25 = index
|
|
10126
10195
|
i26, s26 = index, []
|
|
10127
|
-
|
|
10128
|
-
r27 = true
|
|
10129
|
-
@index += match_len
|
|
10130
|
-
else
|
|
10131
|
-
terminal_parse_failure('"#"')
|
|
10132
|
-
r27 = nil
|
|
10133
|
-
end
|
|
10196
|
+
r27 = _nt_eol_comment
|
|
10134
10197
|
s26 << r27
|
|
10135
10198
|
if r27
|
|
10136
10199
|
s28, i28 = [], index
|
|
@@ -10211,7 +10274,7 @@ module EDNGRAMMAR
|
|
|
10211
10274
|
i0, s0 = index, []
|
|
10212
10275
|
s1, i1 = [], index
|
|
10213
10276
|
loop do
|
|
10214
|
-
r2 =
|
|
10277
|
+
r2 = _nt_lblank
|
|
10215
10278
|
if r2
|
|
10216
10279
|
s1 << r2
|
|
10217
10280
|
else
|
|
@@ -10229,7 +10292,7 @@ module EDNGRAMMAR
|
|
|
10229
10292
|
if r5
|
|
10230
10293
|
s6, i6 = [], index
|
|
10231
10294
|
loop do
|
|
10232
|
-
r7 =
|
|
10295
|
+
r7 = _nt_lblank
|
|
10233
10296
|
if r7
|
|
10234
10297
|
s6 << r7
|
|
10235
10298
|
else
|
|
@@ -10269,6 +10332,10 @@ module EDNGRAMMAR
|
|
|
10269
10332
|
end
|
|
10270
10333
|
|
|
10271
10334
|
module Rb64Comment0
|
|
10335
|
+
def eol_comment
|
|
10336
|
+
elements[0]
|
|
10337
|
+
end
|
|
10338
|
+
|
|
10272
10339
|
end
|
|
10273
10340
|
|
|
10274
10341
|
def _nt_rb64_comment
|
|
@@ -10283,13 +10350,7 @@ module EDNGRAMMAR
|
|
|
10283
10350
|
end
|
|
10284
10351
|
|
|
10285
10352
|
i0, s0 = index, []
|
|
10286
|
-
|
|
10287
|
-
r1 = true
|
|
10288
|
-
@index += match_len
|
|
10289
|
-
else
|
|
10290
|
-
terminal_parse_failure('"#"')
|
|
10291
|
-
r1 = nil
|
|
10292
|
-
end
|
|
10353
|
+
r1 = _nt_eol_comment
|
|
10293
10354
|
s0 << r1
|
|
10294
10355
|
if r1
|
|
10295
10356
|
s2, i2 = [], index
|