edn-abnf 0.5.35 → 0.5.36pre2
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 +425 -61
- 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: ffe8e904ee5a50ead60bd3583dc0280908528c42d0d9def2c6d957a76a37412c
|
|
4
|
+
data.tar.gz: 7cc0afc1c2be87aad5d61006cf186209fba5ff9f5519e9b4de301f4713adfdff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b22f6dc393b06caf005b9a912570c710face625647d710c5ec34ebc26d2c2be64d6f7e5c292f6bada972b3f4cb4375a114fea0e6196b388eeba6eedd36a4fde
|
|
7
|
+
data.tar.gz: fc1d29a21c85fb0e16beb271df70397a930aaebc6155f9dd348c9e8494d09b03904d811472fcb65123f0fad01461c3b0b458a36858bf964725de099192684031
|
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.36pre2"
|
|
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
|
@@ -1976,13 +1976,16 @@ module EDNGRAMMAR
|
|
|
1976
1976
|
end
|
|
1977
1977
|
|
|
1978
1978
|
module AppString1
|
|
1979
|
+
end
|
|
1980
|
+
|
|
1981
|
+
module AppString2
|
|
1979
1982
|
def ast # XXX ignoring h and b64
|
|
1980
|
-
data = sqstr.ast.force_encoding(Encoding::UTF_8) # XXX undo .b
|
|
1981
|
-
app = app_prefix.text_value
|
|
1983
|
+
data = elements[0].sqstr.ast.force_encoding(Encoding::UTF_8) # XXX undo .b
|
|
1984
|
+
app = elements[0].app_prefix.text_value
|
|
1982
1985
|
begin
|
|
1983
1986
|
::EDNGRAMMAR::APPS[app].decode(app, data)
|
|
1984
1987
|
rescue CBOR_DIAG::AppParseError => e
|
|
1985
|
-
app_parser_level1_diagnostics(e, elements[1].elements[1])
|
|
1988
|
+
app_parser_level1_diagnostics(e, elements[0].elements[1].elements[1])
|
|
1986
1989
|
raise e
|
|
1987
1990
|
end
|
|
1988
1991
|
end
|
|
@@ -2000,16 +2003,42 @@ module EDNGRAMMAR
|
|
|
2000
2003
|
end
|
|
2001
2004
|
|
|
2002
2005
|
i0, s0 = index, []
|
|
2003
|
-
|
|
2006
|
+
i1, s1 = index, []
|
|
2007
|
+
r2 = _nt_app_prefix
|
|
2008
|
+
s1 << r2
|
|
2009
|
+
if r2
|
|
2010
|
+
r3 = _nt_sqstr
|
|
2011
|
+
s1 << r3
|
|
2012
|
+
end
|
|
2013
|
+
if s1.last
|
|
2014
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
|
2015
|
+
r1.extend(AppString0)
|
|
2016
|
+
else
|
|
2017
|
+
@index = i1
|
|
2018
|
+
r1 = nil
|
|
2019
|
+
end
|
|
2004
2020
|
s0 << r1
|
|
2005
2021
|
if r1
|
|
2006
|
-
|
|
2007
|
-
|
|
2022
|
+
i4 = index
|
|
2023
|
+
r5 = lambda {|x| pref = x[0].app_prefix.text_value
|
|
2024
|
+
ret = !$options.integrated || !["h", "b64", "dt"].include?(pref)
|
|
2025
|
+
ret}.call(s0)
|
|
2026
|
+
if !r5
|
|
2027
|
+
terminal_parse_failure("<semantic predicate>")
|
|
2028
|
+
end
|
|
2029
|
+
if r5
|
|
2030
|
+
@index = i4
|
|
2031
|
+
r4 = instantiate_node(SyntaxNode,input, index...index)
|
|
2032
|
+
else
|
|
2033
|
+
@index = i4
|
|
2034
|
+
r4 = nil
|
|
2035
|
+
end
|
|
2036
|
+
s0 << r4
|
|
2008
2037
|
end
|
|
2009
2038
|
if s0.last
|
|
2010
2039
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
2011
|
-
r0.extend(AppString0)
|
|
2012
2040
|
r0.extend(AppString1)
|
|
2041
|
+
r0.extend(AppString2)
|
|
2013
2042
|
else
|
|
2014
2043
|
@index = i0
|
|
2015
2044
|
r0 = nil
|
|
@@ -2103,13 +2132,17 @@ module EDNGRAMMAR
|
|
|
2103
2132
|
end
|
|
2104
2133
|
|
|
2105
2134
|
module AppRstring1
|
|
2135
|
+
end
|
|
2136
|
+
|
|
2137
|
+
module AppRstring2
|
|
2138
|
+
|
|
2106
2139
|
def ast # XXX ignoring h and b64
|
|
2107
|
-
data = rawstring.ast.force_encoding(Encoding::UTF_8) # XXX undo .b
|
|
2108
|
-
app = app_prefix.text_value
|
|
2140
|
+
data = elements[0].rawstring.ast.force_encoding(Encoding::UTF_8) # XXX undo .b
|
|
2141
|
+
app = elements[0].app_prefix.text_value
|
|
2109
2142
|
begin
|
|
2110
2143
|
::EDNGRAMMAR::APPS[app].decode(app, data)
|
|
2111
2144
|
rescue CBOR_DIAG::AppParseError => e
|
|
2112
|
-
app_parser_level1_raw_diagnostics(e,
|
|
2145
|
+
app_parser_level1_raw_diagnostics(e, elements[0].elements[1].elements[1])
|
|
2113
2146
|
raise e
|
|
2114
2147
|
end
|
|
2115
2148
|
end
|
|
@@ -2127,16 +2160,42 @@ module EDNGRAMMAR
|
|
|
2127
2160
|
end
|
|
2128
2161
|
|
|
2129
2162
|
i0, s0 = index, []
|
|
2130
|
-
|
|
2163
|
+
i1, s1 = index, []
|
|
2164
|
+
r2 = _nt_app_prefix
|
|
2165
|
+
s1 << r2
|
|
2166
|
+
if r2
|
|
2167
|
+
r3 = _nt_rawstring
|
|
2168
|
+
s1 << r3
|
|
2169
|
+
end
|
|
2170
|
+
if s1.last
|
|
2171
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
|
2172
|
+
r1.extend(AppRstring0)
|
|
2173
|
+
else
|
|
2174
|
+
@index = i1
|
|
2175
|
+
r1 = nil
|
|
2176
|
+
end
|
|
2131
2177
|
s0 << r1
|
|
2132
2178
|
if r1
|
|
2133
|
-
|
|
2134
|
-
|
|
2179
|
+
i4 = index
|
|
2180
|
+
r5 = lambda {|x| pref = x[0].app_prefix.text_value
|
|
2181
|
+
ret = !$options.integrated || !["h", "b64", "dt"].include?(pref)
|
|
2182
|
+
ret}.call(s0)
|
|
2183
|
+
if !r5
|
|
2184
|
+
terminal_parse_failure("<semantic predicate>")
|
|
2185
|
+
end
|
|
2186
|
+
if r5
|
|
2187
|
+
@index = i4
|
|
2188
|
+
r4 = instantiate_node(SyntaxNode,input, index...index)
|
|
2189
|
+
else
|
|
2190
|
+
@index = i4
|
|
2191
|
+
r4 = nil
|
|
2192
|
+
end
|
|
2193
|
+
s0 << r4
|
|
2135
2194
|
end
|
|
2136
2195
|
if s0.last
|
|
2137
2196
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
2138
|
-
r0.extend(AppRstring0)
|
|
2139
2197
|
r0.extend(AppRstring1)
|
|
2198
|
+
r0.extend(AppRstring2)
|
|
2140
2199
|
else
|
|
2141
2200
|
@index = i0
|
|
2142
2201
|
r0 = nil
|
|
@@ -2148,25 +2207,30 @@ module EDNGRAMMAR
|
|
|
2148
2207
|
end
|
|
2149
2208
|
|
|
2150
2209
|
module Rawstring0
|
|
2151
|
-
def
|
|
2152
|
-
elements[
|
|
2210
|
+
def rawcontent0
|
|
2211
|
+
elements[1]
|
|
2153
2212
|
end
|
|
2154
2213
|
|
|
2214
|
+
end
|
|
2215
|
+
|
|
2216
|
+
module Rawstring1
|
|
2155
2217
|
def rawcontent
|
|
2156
|
-
elements[
|
|
2218
|
+
elements[1]
|
|
2157
2219
|
end
|
|
2220
|
+
end
|
|
2158
2221
|
|
|
2159
|
-
|
|
2160
|
-
|
|
2222
|
+
module Rawstring2
|
|
2223
|
+
def startrawdelim
|
|
2224
|
+
elements[0]
|
|
2225
|
+
end
|
|
2226
|
+
|
|
2227
|
+
def alikerawdelim
|
|
2228
|
+
elements[2]
|
|
2161
2229
|
end
|
|
2162
2230
|
end
|
|
2163
2231
|
|
|
2164
|
-
module
|
|
2165
|
-
def ast
|
|
2166
|
-
rawcontent.text_value.gsub("\r", "") + (
|
|
2167
|
-
tv = matchrawdelim.text_value
|
|
2168
|
-
dv = startrawdelim.text_value.length
|
|
2169
|
-
tv[dv..]) end
|
|
2232
|
+
module Rawstring3
|
|
2233
|
+
def ast; elements[1].elements[1].text_value.gsub("\r", "") end
|
|
2170
2234
|
end
|
|
2171
2235
|
|
|
2172
2236
|
def _nt_rawstring
|
|
@@ -2184,26 +2248,78 @@ module EDNGRAMMAR
|
|
|
2184
2248
|
r1 = _nt_startrawdelim
|
|
2185
2249
|
s0 << r1
|
|
2186
2250
|
if r1
|
|
2187
|
-
|
|
2251
|
+
i2 = index
|
|
2252
|
+
i3, s3 = index, []
|
|
2253
|
+
if (match_len = has_terminal?(" ", false, index))
|
|
2254
|
+
r4 = true
|
|
2255
|
+
@index += match_len
|
|
2256
|
+
else
|
|
2257
|
+
terminal_parse_failure('" "')
|
|
2258
|
+
r4 = nil
|
|
2259
|
+
end
|
|
2260
|
+
s3 << r4
|
|
2261
|
+
if r4
|
|
2262
|
+
r5 = _nt_rawcontent0
|
|
2263
|
+
s3 << r5
|
|
2264
|
+
if r5
|
|
2265
|
+
if (match_len = has_terminal?(" ", false, index))
|
|
2266
|
+
r6 = true
|
|
2267
|
+
@index += match_len
|
|
2268
|
+
else
|
|
2269
|
+
terminal_parse_failure('" "')
|
|
2270
|
+
r6 = nil
|
|
2271
|
+
end
|
|
2272
|
+
s3 << r6
|
|
2273
|
+
end
|
|
2274
|
+
end
|
|
2275
|
+
if s3.last
|
|
2276
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
2277
|
+
r3.extend(Rawstring0)
|
|
2278
|
+
else
|
|
2279
|
+
@index = i3
|
|
2280
|
+
r3 = nil
|
|
2281
|
+
end
|
|
2188
2282
|
if r3
|
|
2283
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
2189
2284
|
r2 = r3
|
|
2190
2285
|
else
|
|
2191
|
-
|
|
2286
|
+
i7, s7 = index, []
|
|
2287
|
+
r9 = _nt_newline
|
|
2288
|
+
if r9
|
|
2289
|
+
r8 = r9
|
|
2290
|
+
else
|
|
2291
|
+
r8 = instantiate_node(SyntaxNode,input, index...index)
|
|
2292
|
+
end
|
|
2293
|
+
s7 << r8
|
|
2294
|
+
if r8
|
|
2295
|
+
r10 = _nt_rawcontent
|
|
2296
|
+
s7 << r10
|
|
2297
|
+
end
|
|
2298
|
+
if s7.last
|
|
2299
|
+
r7 = instantiate_node(SyntaxNode,input, i7...index, s7)
|
|
2300
|
+
r7.extend(Rawstring1)
|
|
2301
|
+
else
|
|
2302
|
+
@index = i7
|
|
2303
|
+
r7 = nil
|
|
2304
|
+
end
|
|
2305
|
+
if r7
|
|
2306
|
+
r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
|
|
2307
|
+
r2 = r7
|
|
2308
|
+
else
|
|
2309
|
+
@index = i2
|
|
2310
|
+
r2 = nil
|
|
2311
|
+
end
|
|
2192
2312
|
end
|
|
2193
2313
|
s0 << r2
|
|
2194
2314
|
if r2
|
|
2195
|
-
|
|
2196
|
-
s0 <<
|
|
2197
|
-
if r4
|
|
2198
|
-
r5 = _nt_matchrawdelim
|
|
2199
|
-
s0 << r5
|
|
2200
|
-
end
|
|
2315
|
+
r11 = _nt_alikerawdelim
|
|
2316
|
+
s0 << r11
|
|
2201
2317
|
end
|
|
2202
2318
|
end
|
|
2203
2319
|
if s0.last
|
|
2204
2320
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
2205
|
-
r0.extend(
|
|
2206
|
-
r0.extend(
|
|
2321
|
+
r0.extend(Rawstring2)
|
|
2322
|
+
r0.extend(Rawstring3)
|
|
2207
2323
|
else
|
|
2208
2324
|
@index = i0
|
|
2209
2325
|
r0 = nil
|
|
@@ -2301,19 +2417,19 @@ module EDNGRAMMAR
|
|
|
2301
2417
|
r0
|
|
2302
2418
|
end
|
|
2303
2419
|
|
|
2304
|
-
module
|
|
2420
|
+
module Alikerawdelim0
|
|
2305
2421
|
def rawdelim
|
|
2306
2422
|
elements[0]
|
|
2307
2423
|
end
|
|
2308
2424
|
|
|
2309
2425
|
end
|
|
2310
2426
|
|
|
2311
|
-
def
|
|
2427
|
+
def _nt_alikerawdelim
|
|
2312
2428
|
start_index = index
|
|
2313
|
-
if node_cache[:
|
|
2314
|
-
cached = node_cache[:
|
|
2429
|
+
if node_cache[:alikerawdelim].has_key?(index)
|
|
2430
|
+
cached = node_cache[:alikerawdelim][index]
|
|
2315
2431
|
if cached
|
|
2316
|
-
node_cache[:
|
|
2432
|
+
node_cache[:alikerawdelim][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
2317
2433
|
@index = cached.interval.end
|
|
2318
2434
|
end
|
|
2319
2435
|
return cached
|
|
@@ -2324,7 +2440,7 @@ module EDNGRAMMAR
|
|
|
2324
2440
|
s0 << r1
|
|
2325
2441
|
if r1
|
|
2326
2442
|
i2 = index
|
|
2327
|
-
r3 = lambda {|(rd)|rd.text_value.length
|
|
2443
|
+
r3 = lambda {|(rd)|rd.text_value.length == @rawdelimlength}.call(s0)
|
|
2328
2444
|
if !r3
|
|
2329
2445
|
terminal_parse_failure("<semantic predicate>")
|
|
2330
2446
|
end
|
|
@@ -2339,13 +2455,13 @@ module EDNGRAMMAR
|
|
|
2339
2455
|
end
|
|
2340
2456
|
if s0.last
|
|
2341
2457
|
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
2342
|
-
r0.extend(
|
|
2458
|
+
r0.extend(Alikerawdelim0)
|
|
2343
2459
|
else
|
|
2344
2460
|
@index = i0
|
|
2345
2461
|
r0 = nil
|
|
2346
2462
|
end
|
|
2347
2463
|
|
|
2348
|
-
node_cache[:
|
|
2464
|
+
node_cache[:alikerawdelim][start_index] = r0
|
|
2349
2465
|
|
|
2350
2466
|
r0
|
|
2351
2467
|
end
|
|
@@ -2487,6 +2603,94 @@ module EDNGRAMMAR
|
|
|
2487
2603
|
r0
|
|
2488
2604
|
end
|
|
2489
2605
|
|
|
2606
|
+
def _nt_rawchars0
|
|
2607
|
+
start_index = index
|
|
2608
|
+
if node_cache[:rawchars0].has_key?(index)
|
|
2609
|
+
cached = node_cache[:rawchars0][index]
|
|
2610
|
+
if cached
|
|
2611
|
+
node_cache[:rawchars0][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
2612
|
+
@index = cached.interval.end
|
|
2613
|
+
end
|
|
2614
|
+
return cached
|
|
2615
|
+
end
|
|
2616
|
+
|
|
2617
|
+
s0, i0 = [], index
|
|
2618
|
+
loop do
|
|
2619
|
+
i1 = index
|
|
2620
|
+
if (match_len = has_terminal?("\n", false, index))
|
|
2621
|
+
r2 = true
|
|
2622
|
+
@index += match_len
|
|
2623
|
+
else
|
|
2624
|
+
terminal_parse_failure('"\\n"')
|
|
2625
|
+
r2 = nil
|
|
2626
|
+
end
|
|
2627
|
+
if r2
|
|
2628
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
2629
|
+
r1 = r2
|
|
2630
|
+
else
|
|
2631
|
+
if (match_len = has_terminal?("\r", false, index))
|
|
2632
|
+
r3 = true
|
|
2633
|
+
@index += match_len
|
|
2634
|
+
else
|
|
2635
|
+
terminal_parse_failure('"\\r"')
|
|
2636
|
+
r3 = nil
|
|
2637
|
+
end
|
|
2638
|
+
if r3
|
|
2639
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
2640
|
+
r1 = r3
|
|
2641
|
+
else
|
|
2642
|
+
if has_terminal?(@regexps[gr = '\A[!-_]'] ||= Regexp.new(gr), :regexp, index)
|
|
2643
|
+
r4 = true
|
|
2644
|
+
@index += 1
|
|
2645
|
+
else
|
|
2646
|
+
terminal_parse_failure('[!-_]')
|
|
2647
|
+
r4 = nil
|
|
2648
|
+
end
|
|
2649
|
+
if r4
|
|
2650
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
|
2651
|
+
r1 = r4
|
|
2652
|
+
else
|
|
2653
|
+
if has_terminal?(@regexps[gr = '\A[a-~]'] ||= Regexp.new(gr), :regexp, index)
|
|
2654
|
+
r5 = true
|
|
2655
|
+
@index += 1
|
|
2656
|
+
else
|
|
2657
|
+
terminal_parse_failure('[a-~]')
|
|
2658
|
+
r5 = nil
|
|
2659
|
+
end
|
|
2660
|
+
if r5
|
|
2661
|
+
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
2662
|
+
r1 = r5
|
|
2663
|
+
else
|
|
2664
|
+
r6 = _nt_NONASCII
|
|
2665
|
+
if r6
|
|
2666
|
+
r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true
|
|
2667
|
+
r1 = r6
|
|
2668
|
+
else
|
|
2669
|
+
@index = i1
|
|
2670
|
+
r1 = nil
|
|
2671
|
+
end
|
|
2672
|
+
end
|
|
2673
|
+
end
|
|
2674
|
+
end
|
|
2675
|
+
end
|
|
2676
|
+
if r1
|
|
2677
|
+
s0 << r1
|
|
2678
|
+
else
|
|
2679
|
+
break
|
|
2680
|
+
end
|
|
2681
|
+
end
|
|
2682
|
+
if s0.empty?
|
|
2683
|
+
@index = i0
|
|
2684
|
+
r0 = nil
|
|
2685
|
+
else
|
|
2686
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
2687
|
+
end
|
|
2688
|
+
|
|
2689
|
+
node_cache[:rawchars0][start_index] = r0
|
|
2690
|
+
|
|
2691
|
+
r0
|
|
2692
|
+
end
|
|
2693
|
+
|
|
2490
2694
|
def _nt_rawcontent
|
|
2491
2695
|
start_index = index
|
|
2492
2696
|
if node_cache[:rawcontent].has_key?(index)
|
|
@@ -2533,6 +2737,111 @@ module EDNGRAMMAR
|
|
|
2533
2737
|
r0
|
|
2534
2738
|
end
|
|
2535
2739
|
|
|
2740
|
+
module Rawcontent00
|
|
2741
|
+
def shortrawdelim
|
|
2742
|
+
elements[1]
|
|
2743
|
+
end
|
|
2744
|
+
end
|
|
2745
|
+
|
|
2746
|
+
module Rawcontent01
|
|
2747
|
+
end
|
|
2748
|
+
|
|
2749
|
+
def _nt_rawcontent0
|
|
2750
|
+
start_index = index
|
|
2751
|
+
if node_cache[:rawcontent0].has_key?(index)
|
|
2752
|
+
cached = node_cache[:rawcontent0][index]
|
|
2753
|
+
if cached
|
|
2754
|
+
node_cache[:rawcontent0][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
|
2755
|
+
@index = cached.interval.end
|
|
2756
|
+
end
|
|
2757
|
+
return cached
|
|
2758
|
+
end
|
|
2759
|
+
|
|
2760
|
+
s0, i0 = [], index
|
|
2761
|
+
loop do
|
|
2762
|
+
i1 = index
|
|
2763
|
+
r2 = _nt_rawchars0
|
|
2764
|
+
if r2
|
|
2765
|
+
r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
|
|
2766
|
+
r1 = r2
|
|
2767
|
+
else
|
|
2768
|
+
i3, s3 = index, []
|
|
2769
|
+
s4, i4 = [], index
|
|
2770
|
+
loop do
|
|
2771
|
+
r5 = _nt_rawchars
|
|
2772
|
+
if r5
|
|
2773
|
+
s4 << r5
|
|
2774
|
+
else
|
|
2775
|
+
break
|
|
2776
|
+
end
|
|
2777
|
+
end
|
|
2778
|
+
r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
|
|
2779
|
+
s3 << r4
|
|
2780
|
+
if r4
|
|
2781
|
+
r6 = _nt_shortrawdelim
|
|
2782
|
+
s3 << r6
|
|
2783
|
+
end
|
|
2784
|
+
if s3.last
|
|
2785
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
|
2786
|
+
r3.extend(Rawcontent00)
|
|
2787
|
+
else
|
|
2788
|
+
@index = i3
|
|
2789
|
+
r3 = nil
|
|
2790
|
+
end
|
|
2791
|
+
if r3
|
|
2792
|
+
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
|
2793
|
+
r1 = r3
|
|
2794
|
+
else
|
|
2795
|
+
i7, s7 = index, []
|
|
2796
|
+
if (match_len = has_terminal?(" ", false, index))
|
|
2797
|
+
r8 = true
|
|
2798
|
+
@index += match_len
|
|
2799
|
+
else
|
|
2800
|
+
terminal_parse_failure('" "')
|
|
2801
|
+
r8 = nil
|
|
2802
|
+
end
|
|
2803
|
+
s7 << r8
|
|
2804
|
+
if r8
|
|
2805
|
+
i9 = index
|
|
2806
|
+
r10 = _nt_alikerawdelim
|
|
2807
|
+
if r10
|
|
2808
|
+
@index = i9
|
|
2809
|
+
r9 = nil
|
|
2810
|
+
else
|
|
2811
|
+
@index = i9
|
|
2812
|
+
r9 = instantiate_node(SyntaxNode,input, index...index)
|
|
2813
|
+
end
|
|
2814
|
+
s7 << r9
|
|
2815
|
+
end
|
|
2816
|
+
if s7.last
|
|
2817
|
+
r7 = instantiate_node(SyntaxNode,input, i7...index, s7)
|
|
2818
|
+
r7.extend(Rawcontent01)
|
|
2819
|
+
else
|
|
2820
|
+
@index = i7
|
|
2821
|
+
r7 = nil
|
|
2822
|
+
end
|
|
2823
|
+
if r7
|
|
2824
|
+
r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
|
|
2825
|
+
r1 = r7
|
|
2826
|
+
else
|
|
2827
|
+
@index = i1
|
|
2828
|
+
r1 = nil
|
|
2829
|
+
end
|
|
2830
|
+
end
|
|
2831
|
+
end
|
|
2832
|
+
if r1
|
|
2833
|
+
s0 << r1
|
|
2834
|
+
else
|
|
2835
|
+
break
|
|
2836
|
+
end
|
|
2837
|
+
end
|
|
2838
|
+
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
2839
|
+
|
|
2840
|
+
node_cache[:rawcontent0][start_index] = r0
|
|
2841
|
+
|
|
2842
|
+
r0
|
|
2843
|
+
end
|
|
2844
|
+
|
|
2536
2845
|
module Sqstr0
|
|
2537
2846
|
def SQUOTE1
|
|
2538
2847
|
elements[0]
|
|
@@ -10423,7 +10732,7 @@ module EDNGRAMMAR
|
|
|
10423
10732
|
elements[0]
|
|
10424
10733
|
end
|
|
10425
10734
|
|
|
10426
|
-
def
|
|
10735
|
+
def alikerawdelim
|
|
10427
10736
|
elements[2]
|
|
10428
10737
|
end
|
|
10429
10738
|
end
|
|
@@ -10560,7 +10869,7 @@ module EDNGRAMMAR
|
|
|
10560
10869
|
r15 = instantiate_node(SyntaxNode,input, i15...index, s15)
|
|
10561
10870
|
s13 << r15
|
|
10562
10871
|
if r15
|
|
10563
|
-
r17 =
|
|
10872
|
+
r17 = _nt_alikerawdelim
|
|
10564
10873
|
s13 << r17
|
|
10565
10874
|
end
|
|
10566
10875
|
end
|
|
@@ -11287,7 +11596,7 @@ module EDNGRAMMAR
|
|
|
11287
11596
|
end
|
|
11288
11597
|
|
|
11289
11598
|
module RAppStringB644
|
|
11290
|
-
def
|
|
11599
|
+
def alikerawdelim
|
|
11291
11600
|
elements[2]
|
|
11292
11601
|
end
|
|
11293
11602
|
end
|
|
@@ -11511,7 +11820,7 @@ module EDNGRAMMAR
|
|
|
11511
11820
|
r28 = instantiate_node(SyntaxNode,input, i28...index, s28)
|
|
11512
11821
|
s26 << r28
|
|
11513
11822
|
if r28
|
|
11514
|
-
r30 =
|
|
11823
|
+
r30 = _nt_alikerawdelim
|
|
11515
11824
|
s26 << r30
|
|
11516
11825
|
end
|
|
11517
11826
|
end
|
|
@@ -11928,6 +12237,17 @@ module EDNGRAMMAR
|
|
|
11928
12237
|
def ast; elements[1].ast; end
|
|
11929
12238
|
end
|
|
11930
12239
|
|
|
12240
|
+
module AppStringDtRaw22
|
|
12241
|
+
def app_string_dt
|
|
12242
|
+
elements[1]
|
|
12243
|
+
end
|
|
12244
|
+
|
|
12245
|
+
end
|
|
12246
|
+
|
|
12247
|
+
module AppStringDtRaw23
|
|
12248
|
+
def ast; elements[1].ast; end
|
|
12249
|
+
end
|
|
12250
|
+
|
|
11931
12251
|
def _nt_app_string_dt_raw2
|
|
11932
12252
|
start_index = index
|
|
11933
12253
|
if node_cache[:app_string_dt_raw2].has_key?(index)
|
|
@@ -11939,25 +12259,69 @@ module EDNGRAMMAR
|
|
|
11939
12259
|
return cached
|
|
11940
12260
|
end
|
|
11941
12261
|
|
|
11942
|
-
i0
|
|
11943
|
-
|
|
12262
|
+
i0 = index
|
|
12263
|
+
i1, s1 = index, []
|
|
12264
|
+
r3 = _nt_newline
|
|
12265
|
+
if r3
|
|
12266
|
+
r2 = r3
|
|
12267
|
+
else
|
|
12268
|
+
r2 = instantiate_node(SyntaxNode,input, index...index)
|
|
12269
|
+
end
|
|
12270
|
+
s1 << r2
|
|
11944
12271
|
if r2
|
|
11945
|
-
|
|
12272
|
+
r4 = _nt_app_string_dt
|
|
12273
|
+
s1 << r4
|
|
12274
|
+
end
|
|
12275
|
+
if s1.last
|
|
12276
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
|
12277
|
+
r1.extend(AppStringDtRaw20)
|
|
12278
|
+
r1.extend(AppStringDtRaw21)
|
|
11946
12279
|
else
|
|
11947
|
-
|
|
12280
|
+
@index = i1
|
|
12281
|
+
r1 = nil
|
|
11948
12282
|
end
|
|
11949
|
-
s0 << r1
|
|
11950
12283
|
if r1
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
end
|
|
11954
|
-
if s0.last
|
|
11955
|
-
r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
|
|
11956
|
-
r0.extend(AppStringDtRaw20)
|
|
11957
|
-
r0.extend(AppStringDtRaw21)
|
|
12284
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
|
12285
|
+
r0 = r1
|
|
11958
12286
|
else
|
|
11959
|
-
|
|
11960
|
-
|
|
12287
|
+
i5, s5 = index, []
|
|
12288
|
+
if (match_len = has_terminal?(" ", false, index))
|
|
12289
|
+
r6 = true
|
|
12290
|
+
@index += match_len
|
|
12291
|
+
else
|
|
12292
|
+
terminal_parse_failure('" "')
|
|
12293
|
+
r6 = nil
|
|
12294
|
+
end
|
|
12295
|
+
s5 << r6
|
|
12296
|
+
if r6
|
|
12297
|
+
r7 = _nt_app_string_dt
|
|
12298
|
+
s5 << r7
|
|
12299
|
+
if r7
|
|
12300
|
+
if (match_len = has_terminal?(" ", false, index))
|
|
12301
|
+
r8 = true
|
|
12302
|
+
@index += match_len
|
|
12303
|
+
else
|
|
12304
|
+
terminal_parse_failure('" "')
|
|
12305
|
+
r8 = nil
|
|
12306
|
+
end
|
|
12307
|
+
s5 << r8
|
|
12308
|
+
end
|
|
12309
|
+
end
|
|
12310
|
+
if s5.last
|
|
12311
|
+
r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
|
|
12312
|
+
r5.extend(AppStringDtRaw22)
|
|
12313
|
+
r5.extend(AppStringDtRaw23)
|
|
12314
|
+
else
|
|
12315
|
+
@index = i5
|
|
12316
|
+
r5 = nil
|
|
12317
|
+
end
|
|
12318
|
+
if r5
|
|
12319
|
+
r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true
|
|
12320
|
+
r0 = r5
|
|
12321
|
+
else
|
|
12322
|
+
@index = i0
|
|
12323
|
+
r0 = nil
|
|
12324
|
+
end
|
|
11961
12325
|
end
|
|
11962
12326
|
|
|
11963
12327
|
node_cache[:app_string_dt_raw2][start_index] = r0
|