dns-zonefile 1.0.5 → 1.0.6
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/doc/zonefile.treetop +80 -17
- data/lib/dns/zonefile.rb +1 -0
- data/lib/dns/zonefile/parser.rb +817 -444
- data/lib/dns/zonefile/version.rb +1 -1
- data/spec/dns/zonefile_spec.rb +58 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae6164575393f959641701f1326096baa90f0d13
|
4
|
+
data.tar.gz: 8ba96a9924f0617a51694aa710fa5305a8501472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04a2438bef1469f4c65bd8a49417ddbbd16f647d6fb79a608891effff682f551895f824d212f7d90661c220a0da50a926ad934226917b318d987e3b25254753c
|
7
|
+
data.tar.gz: 1f263367e7313dcd24df102b5423c26c89a35d4f4c1b8bf42d34e03a0f5284d3b9a071caea9a94db9d83b029f696bbc3bd040d14e2fa62429948f1ece275bcfa
|
data/doc/zonefile.treetop
CHANGED
@@ -67,7 +67,7 @@ grammar Zonefile
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def record_type
|
70
|
-
record.
|
70
|
+
record.record_type
|
71
71
|
end
|
72
72
|
|
73
73
|
def ttl
|
@@ -89,9 +89,13 @@ grammar Zonefile
|
|
89
89
|
end
|
90
90
|
|
91
91
|
rule a_record
|
92
|
-
host space ttl klass "A" space ip_address {
|
92
|
+
host space ms_age ttl klass "A" space ip_address {
|
93
93
|
def to_s
|
94
|
-
"#{host} #{ttl} #{klass} A #{ip_address}"
|
94
|
+
"#{host} #{ms_age} #{ttl} #{klass} A #{ip_address}"
|
95
|
+
end
|
96
|
+
|
97
|
+
def record_type
|
98
|
+
"A"
|
95
99
|
end
|
96
100
|
}
|
97
101
|
end
|
@@ -105,10 +109,14 @@ grammar Zonefile
|
|
105
109
|
end
|
106
110
|
|
107
111
|
rule aaaa_record
|
108
|
-
host space ttl klass "AAAA" space ip_address:ip6_address {
|
112
|
+
host space ms_age ttl klass "AAAA" space ip_address:ip6_address {
|
109
113
|
def to_s
|
110
114
|
"#{host} #{ttl} #{klass} AAAA #{ip_address}"
|
111
115
|
end
|
116
|
+
|
117
|
+
def record_type
|
118
|
+
"AAAA"
|
119
|
+
end
|
112
120
|
}
|
113
121
|
end
|
114
122
|
|
@@ -122,14 +130,18 @@ grammar Zonefile
|
|
122
130
|
|
123
131
|
rule cname_record
|
124
132
|
(
|
125
|
-
host space ttl klass "CNAME" space target:host /
|
126
|
-
host space klass ttl "CNAME" space target:host /
|
127
|
-
host space ttl "CNAME" space target:host /
|
133
|
+
host space ms_age ttl klass "CNAME" space target:host /
|
134
|
+
host space klass ms_age ttl "CNAME" space target:host /
|
135
|
+
host space ms_age ttl "CNAME" space target:host /
|
128
136
|
host space klass "CNAME" space target:host
|
129
137
|
) {
|
130
138
|
def to_s
|
131
139
|
"#{host} #{ttl} #{klass} CNAME #{target}"
|
132
140
|
end
|
141
|
+
|
142
|
+
def record_type
|
143
|
+
"CNAME"
|
144
|
+
end
|
133
145
|
}
|
134
146
|
end
|
135
147
|
|
@@ -138,67 +150,99 @@ grammar Zonefile
|
|
138
150
|
def to_s
|
139
151
|
"#{host} #{ttl} #{klass} MX #{priority} #{exchanger}"
|
140
152
|
end
|
153
|
+
|
154
|
+
def record_type
|
155
|
+
"MX"
|
156
|
+
end
|
141
157
|
}
|
142
158
|
end
|
143
159
|
|
144
160
|
rule naptr_record
|
145
|
-
host space ttl klass "NAPTR" space data {
|
161
|
+
host space ms_age ttl klass "NAPTR" space data {
|
146
162
|
def to_s
|
147
163
|
"#{host} #{ttl} #{klass} NAPTR #{data}"
|
148
164
|
end
|
165
|
+
|
166
|
+
def record_type
|
167
|
+
"NAPTR"
|
168
|
+
end
|
149
169
|
}
|
150
170
|
end
|
151
171
|
|
152
172
|
rule ns_record
|
153
|
-
host space ttl klass "NS" space nameserver:host {
|
173
|
+
host space ms_age ttl klass "NS" space nameserver:host {
|
154
174
|
def to_s
|
155
175
|
"#{host} #{ttl} #{klass} NS #{nameserver}"
|
156
176
|
end
|
177
|
+
|
178
|
+
def record_type
|
179
|
+
"NS"
|
180
|
+
end
|
157
181
|
}
|
158
182
|
end
|
159
183
|
|
160
184
|
rule ptr_record
|
161
|
-
host space ttl klass "PTR" space target:host {
|
185
|
+
host space ms_age ttl klass "PTR" space target:host {
|
162
186
|
def to_s
|
163
187
|
"#{host} #{ttl} #{klass} PTR #{target}"
|
164
188
|
end
|
189
|
+
|
190
|
+
def record_type
|
191
|
+
"PTR"
|
192
|
+
end
|
165
193
|
}
|
166
194
|
end
|
167
195
|
|
168
196
|
rule soa_record
|
169
|
-
origin space ttl klass "SOA" space ns space rp space data {
|
197
|
+
origin space ms_age ttl klass "SOA" space ns space rp space data {
|
170
198
|
def to_s
|
171
199
|
"#{origin} #{ttl} #{klass} SOA #{ns} #{rp} (#{space})"
|
172
200
|
end
|
201
|
+
|
202
|
+
def record_type
|
203
|
+
"SOA"
|
204
|
+
end
|
173
205
|
}
|
174
206
|
end
|
175
207
|
|
176
208
|
rule srv_record
|
177
209
|
(
|
178
|
-
host space ttl klass "SRV" space priority:integer space weight:integer space port:integer space target:host /
|
179
|
-
host space klass ttl "SRV" space priority:integer space weight:integer space port:integer space target:host /
|
180
|
-
host space ttl "SRV" space priority:integer space weight:integer space port:integer space target:host /
|
210
|
+
host space ms_age ttl klass "SRV" space priority:integer space weight:integer space port:integer space target:host /
|
211
|
+
host space klass ms_age ttl "SRV" space priority:integer space weight:integer space port:integer space target:host /
|
212
|
+
host space ms_age ttl "SRV" space priority:integer space weight:integer space port:integer space target:host /
|
181
213
|
host space klass "SRV" space priority:integer space weight:integer space port:integer space target:host
|
182
214
|
) {
|
183
215
|
def to_s
|
184
216
|
"#{host} #{ttl} #{klass} SRV #{priority} #{weight} #{port} #{target}"
|
185
217
|
end
|
218
|
+
|
219
|
+
def record_type
|
220
|
+
"SRV"
|
221
|
+
end
|
186
222
|
}
|
187
223
|
end
|
188
224
|
|
189
225
|
rule spf_record
|
190
|
-
host space ttl klass "SPF" space data:txt_data {
|
226
|
+
host space ms_age ttl klass "SPF" space data:txt_data {
|
191
227
|
def to_s
|
192
228
|
"#{host} #{ttl} #{klass} SPF #{data}"
|
193
229
|
end
|
230
|
+
|
231
|
+
def record_type
|
232
|
+
"SPF"
|
233
|
+
end
|
194
234
|
}
|
195
235
|
end
|
196
236
|
|
197
237
|
rule txt_record
|
198
|
-
host space ttl klass "TXT" space data:
|
238
|
+
host space ms_age ttl klass "TXT" space data:ms_txt_data {
|
199
239
|
def to_s
|
200
240
|
"#{host} #{ttl} #{klass} TXT #{data}"
|
201
241
|
end
|
242
|
+
|
243
|
+
def record_type
|
244
|
+
"TXT"
|
245
|
+
end
|
202
246
|
}
|
203
247
|
end
|
204
248
|
|
@@ -259,7 +303,7 @@ grammar Zonefile
|
|
259
303
|
end
|
260
304
|
|
261
305
|
rule rp
|
262
|
-
(("\\." / [+a-zA-Z0-9\-)])
|
306
|
+
(("\\." / [+a-zA-Z0-9\-)])* ".")+ {
|
263
307
|
def to_s
|
264
308
|
text_value
|
265
309
|
end
|
@@ -361,6 +405,14 @@ grammar Zonefile
|
|
361
405
|
end
|
362
406
|
}
|
363
407
|
end
|
408
|
+
|
409
|
+
rule ms_age
|
410
|
+
( "[AGE:" [\d]+ "]" space / '' ) {
|
411
|
+
def to_s
|
412
|
+
text_value
|
413
|
+
end
|
414
|
+
}
|
415
|
+
end
|
364
416
|
|
365
417
|
rule ttl
|
366
418
|
((time_interval space) / '') {
|
@@ -395,6 +447,17 @@ grammar Zonefile
|
|
395
447
|
end
|
396
448
|
}
|
397
449
|
end
|
450
|
+
|
451
|
+
rule ms_txt_data
|
452
|
+
(
|
453
|
+
"(" space* data:txt_data space* ")" /
|
454
|
+
data:txt_data
|
455
|
+
) {
|
456
|
+
def to_s
|
457
|
+
data.to_s
|
458
|
+
end
|
459
|
+
}
|
460
|
+
end
|
398
461
|
|
399
462
|
rule txt_data
|
400
463
|
txt_string (space txt_data)* {
|
data/lib/dns/zonefile.rb
CHANGED
data/lib/dns/zonefile/parser.rb
CHANGED
@@ -552,7 +552,7 @@ module DNS
|
|
552
552
|
end
|
553
553
|
|
554
554
|
def record_type
|
555
|
-
record.
|
555
|
+
record.record_type
|
556
556
|
end
|
557
557
|
|
558
558
|
def ttl
|
@@ -703,26 +703,34 @@ module DNS
|
|
703
703
|
elements[1]
|
704
704
|
end
|
705
705
|
|
706
|
-
def
|
706
|
+
def ms_age
|
707
707
|
elements[2]
|
708
708
|
end
|
709
709
|
|
710
|
-
def
|
710
|
+
def ttl
|
711
711
|
elements[3]
|
712
712
|
end
|
713
713
|
|
714
|
+
def klass
|
715
|
+
elements[4]
|
716
|
+
end
|
717
|
+
|
714
718
|
def space2
|
715
|
-
elements[
|
719
|
+
elements[6]
|
716
720
|
end
|
717
721
|
|
718
722
|
def ip_address
|
719
|
-
elements[
|
723
|
+
elements[7]
|
720
724
|
end
|
721
725
|
end
|
722
726
|
|
723
727
|
module ARecord1
|
724
728
|
def to_s
|
725
|
-
"#{host} #{ttl} #{klass} A #{ip_address}"
|
729
|
+
"#{host} #{ms_age} #{ttl} #{klass} A #{ip_address}"
|
730
|
+
end
|
731
|
+
|
732
|
+
def record_type
|
733
|
+
"A"
|
726
734
|
end
|
727
735
|
end
|
728
736
|
|
@@ -744,26 +752,30 @@ module DNS
|
|
744
752
|
r2 = _nt_space
|
745
753
|
s0 << r2
|
746
754
|
if r2
|
747
|
-
r3 =
|
755
|
+
r3 = _nt_ms_age
|
748
756
|
s0 << r3
|
749
757
|
if r3
|
750
|
-
r4 =
|
758
|
+
r4 = _nt_ttl
|
751
759
|
s0 << r4
|
752
760
|
if r4
|
753
|
-
|
754
|
-
r5 = true
|
755
|
-
@index += match_len
|
756
|
-
else
|
757
|
-
terminal_parse_failure('"A"')
|
758
|
-
r5 = nil
|
759
|
-
end
|
761
|
+
r5 = _nt_klass
|
760
762
|
s0 << r5
|
761
763
|
if r5
|
762
|
-
|
764
|
+
if (match_len = has_terminal?("A", false, index))
|
765
|
+
r6 = true
|
766
|
+
@index += match_len
|
767
|
+
else
|
768
|
+
terminal_parse_failure('"A"')
|
769
|
+
r6 = nil
|
770
|
+
end
|
763
771
|
s0 << r6
|
764
772
|
if r6
|
765
|
-
r7 =
|
773
|
+
r7 = _nt_space
|
766
774
|
s0 << r7
|
775
|
+
if r7
|
776
|
+
r8 = _nt_ip_address
|
777
|
+
s0 << r8
|
778
|
+
end
|
767
779
|
end
|
768
780
|
end
|
769
781
|
end
|
@@ -952,20 +964,24 @@ module DNS
|
|
952
964
|
elements[1]
|
953
965
|
end
|
954
966
|
|
955
|
-
def
|
967
|
+
def ms_age
|
956
968
|
elements[2]
|
957
969
|
end
|
958
970
|
|
959
|
-
def
|
971
|
+
def ttl
|
960
972
|
elements[3]
|
961
973
|
end
|
962
974
|
|
975
|
+
def klass
|
976
|
+
elements[4]
|
977
|
+
end
|
978
|
+
|
963
979
|
def space2
|
964
|
-
elements[
|
980
|
+
elements[6]
|
965
981
|
end
|
966
982
|
|
967
983
|
def ip_address
|
968
|
-
elements[
|
984
|
+
elements[7]
|
969
985
|
end
|
970
986
|
end
|
971
987
|
|
@@ -973,6 +989,10 @@ module DNS
|
|
973
989
|
def to_s
|
974
990
|
"#{host} #{ttl} #{klass} AAAA #{ip_address}"
|
975
991
|
end
|
992
|
+
|
993
|
+
def record_type
|
994
|
+
"AAAA"
|
995
|
+
end
|
976
996
|
end
|
977
997
|
|
978
998
|
def _nt_aaaa_record
|
@@ -993,26 +1013,30 @@ module DNS
|
|
993
1013
|
r2 = _nt_space
|
994
1014
|
s0 << r2
|
995
1015
|
if r2
|
996
|
-
r3 =
|
1016
|
+
r3 = _nt_ms_age
|
997
1017
|
s0 << r3
|
998
1018
|
if r3
|
999
|
-
r4 =
|
1019
|
+
r4 = _nt_ttl
|
1000
1020
|
s0 << r4
|
1001
1021
|
if r4
|
1002
|
-
|
1003
|
-
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1004
|
-
@index += match_len
|
1005
|
-
else
|
1006
|
-
terminal_parse_failure('"AAAA"')
|
1007
|
-
r5 = nil
|
1008
|
-
end
|
1022
|
+
r5 = _nt_klass
|
1009
1023
|
s0 << r5
|
1010
1024
|
if r5
|
1011
|
-
|
1025
|
+
if (match_len = has_terminal?("AAAA", false, index))
|
1026
|
+
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1027
|
+
@index += match_len
|
1028
|
+
else
|
1029
|
+
terminal_parse_failure('"AAAA"')
|
1030
|
+
r6 = nil
|
1031
|
+
end
|
1012
1032
|
s0 << r6
|
1013
1033
|
if r6
|
1014
|
-
r7 =
|
1034
|
+
r7 = _nt_space
|
1015
1035
|
s0 << r7
|
1036
|
+
if r7
|
1037
|
+
r8 = _nt_ip6_address
|
1038
|
+
s0 << r8
|
1039
|
+
end
|
1016
1040
|
end
|
1017
1041
|
end
|
1018
1042
|
end
|
@@ -1093,20 +1117,24 @@ module DNS
|
|
1093
1117
|
elements[1]
|
1094
1118
|
end
|
1095
1119
|
|
1096
|
-
def
|
1120
|
+
def ms_age
|
1097
1121
|
elements[2]
|
1098
1122
|
end
|
1099
1123
|
|
1100
|
-
def
|
1124
|
+
def ttl
|
1101
1125
|
elements[3]
|
1102
1126
|
end
|
1103
1127
|
|
1128
|
+
def klass
|
1129
|
+
elements[4]
|
1130
|
+
end
|
1131
|
+
|
1104
1132
|
def space2
|
1105
|
-
elements[
|
1133
|
+
elements[6]
|
1106
1134
|
end
|
1107
1135
|
|
1108
1136
|
def target
|
1109
|
-
elements[
|
1137
|
+
elements[7]
|
1110
1138
|
end
|
1111
1139
|
end
|
1112
1140
|
|
@@ -1123,16 +1151,20 @@ module DNS
|
|
1123
1151
|
elements[2]
|
1124
1152
|
end
|
1125
1153
|
|
1126
|
-
def
|
1154
|
+
def ms_age
|
1127
1155
|
elements[3]
|
1128
1156
|
end
|
1129
1157
|
|
1158
|
+
def ttl
|
1159
|
+
elements[4]
|
1160
|
+
end
|
1161
|
+
|
1130
1162
|
def space2
|
1131
|
-
elements[
|
1163
|
+
elements[6]
|
1132
1164
|
end
|
1133
1165
|
|
1134
1166
|
def target
|
1135
|
-
elements[
|
1167
|
+
elements[7]
|
1136
1168
|
end
|
1137
1169
|
end
|
1138
1170
|
|
@@ -1145,16 +1177,20 @@ module DNS
|
|
1145
1177
|
elements[1]
|
1146
1178
|
end
|
1147
1179
|
|
1148
|
-
def
|
1180
|
+
def ms_age
|
1149
1181
|
elements[2]
|
1150
1182
|
end
|
1151
1183
|
|
1184
|
+
def ttl
|
1185
|
+
elements[3]
|
1186
|
+
end
|
1187
|
+
|
1152
1188
|
def space2
|
1153
|
-
elements[
|
1189
|
+
elements[5]
|
1154
1190
|
end
|
1155
1191
|
|
1156
1192
|
def target
|
1157
|
-
elements[
|
1193
|
+
elements[6]
|
1158
1194
|
end
|
1159
1195
|
end
|
1160
1196
|
|
@@ -1184,6 +1220,10 @@ module DNS
|
|
1184
1220
|
def to_s
|
1185
1221
|
"#{host} #{ttl} #{klass} CNAME #{target}"
|
1186
1222
|
end
|
1223
|
+
|
1224
|
+
def record_type
|
1225
|
+
"CNAME"
|
1226
|
+
end
|
1187
1227
|
end
|
1188
1228
|
|
1189
1229
|
def _nt_cname_record
|
@@ -1205,26 +1245,30 @@ module DNS
|
|
1205
1245
|
r3 = _nt_space
|
1206
1246
|
s1 << r3
|
1207
1247
|
if r3
|
1208
|
-
r4 =
|
1248
|
+
r4 = _nt_ms_age
|
1209
1249
|
s1 << r4
|
1210
1250
|
if r4
|
1211
|
-
r5 =
|
1251
|
+
r5 = _nt_ttl
|
1212
1252
|
s1 << r5
|
1213
1253
|
if r5
|
1214
|
-
|
1215
|
-
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1216
|
-
@index += match_len
|
1217
|
-
else
|
1218
|
-
terminal_parse_failure('"CNAME"')
|
1219
|
-
r6 = nil
|
1220
|
-
end
|
1254
|
+
r6 = _nt_klass
|
1221
1255
|
s1 << r6
|
1222
1256
|
if r6
|
1223
|
-
|
1257
|
+
if (match_len = has_terminal?("CNAME", false, index))
|
1258
|
+
r7 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1259
|
+
@index += match_len
|
1260
|
+
else
|
1261
|
+
terminal_parse_failure('"CNAME"')
|
1262
|
+
r7 = nil
|
1263
|
+
end
|
1224
1264
|
s1 << r7
|
1225
1265
|
if r7
|
1226
|
-
r8 =
|
1266
|
+
r8 = _nt_space
|
1227
1267
|
s1 << r8
|
1268
|
+
if r8
|
1269
|
+
r9 = _nt_host
|
1270
|
+
s1 << r9
|
1271
|
+
end
|
1228
1272
|
end
|
1229
1273
|
end
|
1230
1274
|
end
|
@@ -1243,131 +1287,139 @@ module DNS
|
|
1243
1287
|
r0 = r1
|
1244
1288
|
r0.extend(CnameRecord4)
|
1245
1289
|
else
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
if
|
1250
|
-
|
1251
|
-
|
1252
|
-
if
|
1253
|
-
|
1254
|
-
|
1255
|
-
if
|
1256
|
-
|
1257
|
-
|
1258
|
-
if
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
if
|
1271
|
-
|
1272
|
-
|
1290
|
+
i10, s10 = index, []
|
1291
|
+
r11 = _nt_host
|
1292
|
+
s10 << r11
|
1293
|
+
if r11
|
1294
|
+
r12 = _nt_space
|
1295
|
+
s10 << r12
|
1296
|
+
if r12
|
1297
|
+
r13 = _nt_klass
|
1298
|
+
s10 << r13
|
1299
|
+
if r13
|
1300
|
+
r14 = _nt_ms_age
|
1301
|
+
s10 << r14
|
1302
|
+
if r14
|
1303
|
+
r15 = _nt_ttl
|
1304
|
+
s10 << r15
|
1305
|
+
if r15
|
1306
|
+
if (match_len = has_terminal?("CNAME", false, index))
|
1307
|
+
r16 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1308
|
+
@index += match_len
|
1309
|
+
else
|
1310
|
+
terminal_parse_failure('"CNAME"')
|
1311
|
+
r16 = nil
|
1312
|
+
end
|
1313
|
+
s10 << r16
|
1314
|
+
if r16
|
1315
|
+
r17 = _nt_space
|
1316
|
+
s10 << r17
|
1317
|
+
if r17
|
1318
|
+
r18 = _nt_host
|
1319
|
+
s10 << r18
|
1320
|
+
end
|
1273
1321
|
end
|
1274
1322
|
end
|
1275
1323
|
end
|
1276
1324
|
end
|
1277
1325
|
end
|
1278
1326
|
end
|
1279
|
-
if
|
1280
|
-
|
1281
|
-
|
1327
|
+
if s10.last
|
1328
|
+
r10 = instantiate_node(SyntaxNode,input, i10...index, s10)
|
1329
|
+
r10.extend(CnameRecord1)
|
1282
1330
|
else
|
1283
|
-
@index =
|
1284
|
-
|
1331
|
+
@index = i10
|
1332
|
+
r10 = nil
|
1285
1333
|
end
|
1286
|
-
if
|
1287
|
-
|
1288
|
-
r0 =
|
1334
|
+
if r10
|
1335
|
+
r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true
|
1336
|
+
r0 = r10
|
1289
1337
|
r0.extend(CnameRecord4)
|
1290
1338
|
else
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
if
|
1295
|
-
|
1296
|
-
|
1297
|
-
if
|
1298
|
-
|
1299
|
-
|
1300
|
-
if
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
if
|
1313
|
-
|
1314
|
-
|
1339
|
+
i19, s19 = index, []
|
1340
|
+
r20 = _nt_host
|
1341
|
+
s19 << r20
|
1342
|
+
if r20
|
1343
|
+
r21 = _nt_space
|
1344
|
+
s19 << r21
|
1345
|
+
if r21
|
1346
|
+
r22 = _nt_ms_age
|
1347
|
+
s19 << r22
|
1348
|
+
if r22
|
1349
|
+
r23 = _nt_ttl
|
1350
|
+
s19 << r23
|
1351
|
+
if r23
|
1352
|
+
if (match_len = has_terminal?("CNAME", false, index))
|
1353
|
+
r24 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1354
|
+
@index += match_len
|
1355
|
+
else
|
1356
|
+
terminal_parse_failure('"CNAME"')
|
1357
|
+
r24 = nil
|
1358
|
+
end
|
1359
|
+
s19 << r24
|
1360
|
+
if r24
|
1361
|
+
r25 = _nt_space
|
1362
|
+
s19 << r25
|
1363
|
+
if r25
|
1364
|
+
r26 = _nt_host
|
1365
|
+
s19 << r26
|
1366
|
+
end
|
1315
1367
|
end
|
1316
1368
|
end
|
1317
1369
|
end
|
1318
1370
|
end
|
1319
1371
|
end
|
1320
|
-
if
|
1321
|
-
|
1322
|
-
|
1372
|
+
if s19.last
|
1373
|
+
r19 = instantiate_node(SyntaxNode,input, i19...index, s19)
|
1374
|
+
r19.extend(CnameRecord2)
|
1323
1375
|
else
|
1324
|
-
@index =
|
1325
|
-
|
1376
|
+
@index = i19
|
1377
|
+
r19 = nil
|
1326
1378
|
end
|
1327
|
-
if
|
1328
|
-
|
1329
|
-
r0 =
|
1379
|
+
if r19
|
1380
|
+
r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true
|
1381
|
+
r0 = r19
|
1330
1382
|
r0.extend(CnameRecord4)
|
1331
1383
|
else
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
if
|
1336
|
-
|
1337
|
-
|
1338
|
-
if
|
1339
|
-
|
1340
|
-
|
1341
|
-
if
|
1384
|
+
i27, s27 = index, []
|
1385
|
+
r28 = _nt_host
|
1386
|
+
s27 << r28
|
1387
|
+
if r28
|
1388
|
+
r29 = _nt_space
|
1389
|
+
s27 << r29
|
1390
|
+
if r29
|
1391
|
+
r30 = _nt_klass
|
1392
|
+
s27 << r30
|
1393
|
+
if r30
|
1342
1394
|
if (match_len = has_terminal?("CNAME", false, index))
|
1343
|
-
|
1395
|
+
r31 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1344
1396
|
@index += match_len
|
1345
1397
|
else
|
1346
1398
|
terminal_parse_failure('"CNAME"')
|
1347
|
-
|
1399
|
+
r31 = nil
|
1348
1400
|
end
|
1349
|
-
|
1350
|
-
if
|
1351
|
-
|
1352
|
-
|
1353
|
-
if
|
1354
|
-
|
1355
|
-
|
1401
|
+
s27 << r31
|
1402
|
+
if r31
|
1403
|
+
r32 = _nt_space
|
1404
|
+
s27 << r32
|
1405
|
+
if r32
|
1406
|
+
r33 = _nt_host
|
1407
|
+
s27 << r33
|
1356
1408
|
end
|
1357
1409
|
end
|
1358
1410
|
end
|
1359
1411
|
end
|
1360
1412
|
end
|
1361
|
-
if
|
1362
|
-
|
1363
|
-
|
1413
|
+
if s27.last
|
1414
|
+
r27 = instantiate_node(SyntaxNode,input, i27...index, s27)
|
1415
|
+
r27.extend(CnameRecord3)
|
1364
1416
|
else
|
1365
|
-
@index =
|
1366
|
-
|
1417
|
+
@index = i27
|
1418
|
+
r27 = nil
|
1367
1419
|
end
|
1368
|
-
if
|
1369
|
-
|
1370
|
-
r0 =
|
1420
|
+
if r27
|
1421
|
+
r27 = SyntaxNode.new(input, (index-1)...index) if r27 == true
|
1422
|
+
r0 = r27
|
1371
1423
|
r0.extend(CnameRecord4)
|
1372
1424
|
else
|
1373
1425
|
@index = i0
|
@@ -1420,6 +1472,10 @@ module DNS
|
|
1420
1472
|
def to_s
|
1421
1473
|
"#{host} #{ttl} #{klass} MX #{priority} #{exchanger}"
|
1422
1474
|
end
|
1475
|
+
|
1476
|
+
def record_type
|
1477
|
+
"MX"
|
1478
|
+
end
|
1423
1479
|
end
|
1424
1480
|
|
1425
1481
|
def _nt_mx_record
|
@@ -1497,20 +1553,24 @@ module DNS
|
|
1497
1553
|
elements[1]
|
1498
1554
|
end
|
1499
1555
|
|
1500
|
-
def
|
1556
|
+
def ms_age
|
1501
1557
|
elements[2]
|
1502
1558
|
end
|
1503
1559
|
|
1504
|
-
def
|
1560
|
+
def ttl
|
1505
1561
|
elements[3]
|
1506
1562
|
end
|
1507
1563
|
|
1564
|
+
def klass
|
1565
|
+
elements[4]
|
1566
|
+
end
|
1567
|
+
|
1508
1568
|
def space2
|
1509
|
-
elements[
|
1569
|
+
elements[6]
|
1510
1570
|
end
|
1511
1571
|
|
1512
1572
|
def data
|
1513
|
-
elements[
|
1573
|
+
elements[7]
|
1514
1574
|
end
|
1515
1575
|
end
|
1516
1576
|
|
@@ -1518,6 +1578,10 @@ module DNS
|
|
1518
1578
|
def to_s
|
1519
1579
|
"#{host} #{ttl} #{klass} NAPTR #{data}"
|
1520
1580
|
end
|
1581
|
+
|
1582
|
+
def record_type
|
1583
|
+
"NAPTR"
|
1584
|
+
end
|
1521
1585
|
end
|
1522
1586
|
|
1523
1587
|
def _nt_naptr_record
|
@@ -1538,26 +1602,30 @@ module DNS
|
|
1538
1602
|
r2 = _nt_space
|
1539
1603
|
s0 << r2
|
1540
1604
|
if r2
|
1541
|
-
r3 =
|
1605
|
+
r3 = _nt_ms_age
|
1542
1606
|
s0 << r3
|
1543
1607
|
if r3
|
1544
|
-
r4 =
|
1608
|
+
r4 = _nt_ttl
|
1545
1609
|
s0 << r4
|
1546
1610
|
if r4
|
1547
|
-
|
1548
|
-
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1549
|
-
@index += match_len
|
1550
|
-
else
|
1551
|
-
terminal_parse_failure('"NAPTR"')
|
1552
|
-
r5 = nil
|
1553
|
-
end
|
1611
|
+
r5 = _nt_klass
|
1554
1612
|
s0 << r5
|
1555
1613
|
if r5
|
1556
|
-
|
1614
|
+
if (match_len = has_terminal?("NAPTR", false, index))
|
1615
|
+
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1616
|
+
@index += match_len
|
1617
|
+
else
|
1618
|
+
terminal_parse_failure('"NAPTR"')
|
1619
|
+
r6 = nil
|
1620
|
+
end
|
1557
1621
|
s0 << r6
|
1558
1622
|
if r6
|
1559
|
-
r7 =
|
1623
|
+
r7 = _nt_space
|
1560
1624
|
s0 << r7
|
1625
|
+
if r7
|
1626
|
+
r8 = _nt_data
|
1627
|
+
s0 << r8
|
1628
|
+
end
|
1561
1629
|
end
|
1562
1630
|
end
|
1563
1631
|
end
|
@@ -1587,20 +1655,24 @@ module DNS
|
|
1587
1655
|
elements[1]
|
1588
1656
|
end
|
1589
1657
|
|
1590
|
-
def
|
1658
|
+
def ms_age
|
1591
1659
|
elements[2]
|
1592
1660
|
end
|
1593
1661
|
|
1594
|
-
def
|
1662
|
+
def ttl
|
1595
1663
|
elements[3]
|
1596
1664
|
end
|
1597
1665
|
|
1666
|
+
def klass
|
1667
|
+
elements[4]
|
1668
|
+
end
|
1669
|
+
|
1598
1670
|
def space2
|
1599
|
-
elements[
|
1671
|
+
elements[6]
|
1600
1672
|
end
|
1601
1673
|
|
1602
1674
|
def nameserver
|
1603
|
-
elements[
|
1675
|
+
elements[7]
|
1604
1676
|
end
|
1605
1677
|
end
|
1606
1678
|
|
@@ -1608,6 +1680,10 @@ module DNS
|
|
1608
1680
|
def to_s
|
1609
1681
|
"#{host} #{ttl} #{klass} NS #{nameserver}"
|
1610
1682
|
end
|
1683
|
+
|
1684
|
+
def record_type
|
1685
|
+
"NS"
|
1686
|
+
end
|
1611
1687
|
end
|
1612
1688
|
|
1613
1689
|
def _nt_ns_record
|
@@ -1628,26 +1704,30 @@ module DNS
|
|
1628
1704
|
r2 = _nt_space
|
1629
1705
|
s0 << r2
|
1630
1706
|
if r2
|
1631
|
-
r3 =
|
1707
|
+
r3 = _nt_ms_age
|
1632
1708
|
s0 << r3
|
1633
1709
|
if r3
|
1634
|
-
r4 =
|
1710
|
+
r4 = _nt_ttl
|
1635
1711
|
s0 << r4
|
1636
1712
|
if r4
|
1637
|
-
|
1638
|
-
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1639
|
-
@index += match_len
|
1640
|
-
else
|
1641
|
-
terminal_parse_failure('"NS"')
|
1642
|
-
r5 = nil
|
1643
|
-
end
|
1713
|
+
r5 = _nt_klass
|
1644
1714
|
s0 << r5
|
1645
1715
|
if r5
|
1646
|
-
|
1716
|
+
if (match_len = has_terminal?("NS", false, index))
|
1717
|
+
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1718
|
+
@index += match_len
|
1719
|
+
else
|
1720
|
+
terminal_parse_failure('"NS"')
|
1721
|
+
r6 = nil
|
1722
|
+
end
|
1647
1723
|
s0 << r6
|
1648
1724
|
if r6
|
1649
|
-
r7 =
|
1725
|
+
r7 = _nt_space
|
1650
1726
|
s0 << r7
|
1727
|
+
if r7
|
1728
|
+
r8 = _nt_host
|
1729
|
+
s0 << r8
|
1730
|
+
end
|
1651
1731
|
end
|
1652
1732
|
end
|
1653
1733
|
end
|
@@ -1677,20 +1757,24 @@ module DNS
|
|
1677
1757
|
elements[1]
|
1678
1758
|
end
|
1679
1759
|
|
1680
|
-
def
|
1760
|
+
def ms_age
|
1681
1761
|
elements[2]
|
1682
1762
|
end
|
1683
1763
|
|
1684
|
-
def
|
1764
|
+
def ttl
|
1685
1765
|
elements[3]
|
1686
1766
|
end
|
1687
1767
|
|
1768
|
+
def klass
|
1769
|
+
elements[4]
|
1770
|
+
end
|
1771
|
+
|
1688
1772
|
def space2
|
1689
|
-
elements[
|
1773
|
+
elements[6]
|
1690
1774
|
end
|
1691
1775
|
|
1692
1776
|
def target
|
1693
|
-
elements[
|
1777
|
+
elements[7]
|
1694
1778
|
end
|
1695
1779
|
end
|
1696
1780
|
|
@@ -1698,6 +1782,10 @@ module DNS
|
|
1698
1782
|
def to_s
|
1699
1783
|
"#{host} #{ttl} #{klass} PTR #{target}"
|
1700
1784
|
end
|
1785
|
+
|
1786
|
+
def record_type
|
1787
|
+
"PTR"
|
1788
|
+
end
|
1701
1789
|
end
|
1702
1790
|
|
1703
1791
|
def _nt_ptr_record
|
@@ -1718,26 +1806,30 @@ module DNS
|
|
1718
1806
|
r2 = _nt_space
|
1719
1807
|
s0 << r2
|
1720
1808
|
if r2
|
1721
|
-
r3 =
|
1809
|
+
r3 = _nt_ms_age
|
1722
1810
|
s0 << r3
|
1723
1811
|
if r3
|
1724
|
-
r4 =
|
1812
|
+
r4 = _nt_ttl
|
1725
1813
|
s0 << r4
|
1726
1814
|
if r4
|
1727
|
-
|
1728
|
-
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1729
|
-
@index += match_len
|
1730
|
-
else
|
1731
|
-
terminal_parse_failure('"PTR"')
|
1732
|
-
r5 = nil
|
1733
|
-
end
|
1815
|
+
r5 = _nt_klass
|
1734
1816
|
s0 << r5
|
1735
1817
|
if r5
|
1736
|
-
|
1818
|
+
if (match_len = has_terminal?("PTR", false, index))
|
1819
|
+
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1820
|
+
@index += match_len
|
1821
|
+
else
|
1822
|
+
terminal_parse_failure('"PTR"')
|
1823
|
+
r6 = nil
|
1824
|
+
end
|
1737
1825
|
s0 << r6
|
1738
1826
|
if r6
|
1739
|
-
r7 =
|
1827
|
+
r7 = _nt_space
|
1740
1828
|
s0 << r7
|
1829
|
+
if r7
|
1830
|
+
r8 = _nt_host
|
1831
|
+
s0 << r8
|
1832
|
+
end
|
1741
1833
|
end
|
1742
1834
|
end
|
1743
1835
|
end
|
@@ -1767,36 +1859,40 @@ module DNS
|
|
1767
1859
|
elements[1]
|
1768
1860
|
end
|
1769
1861
|
|
1770
|
-
def
|
1862
|
+
def ms_age
|
1771
1863
|
elements[2]
|
1772
1864
|
end
|
1773
1865
|
|
1774
|
-
def
|
1866
|
+
def ttl
|
1775
1867
|
elements[3]
|
1776
1868
|
end
|
1777
1869
|
|
1870
|
+
def klass
|
1871
|
+
elements[4]
|
1872
|
+
end
|
1873
|
+
|
1778
1874
|
def space2
|
1779
|
-
elements[
|
1875
|
+
elements[6]
|
1780
1876
|
end
|
1781
1877
|
|
1782
1878
|
def ns
|
1783
|
-
elements[
|
1879
|
+
elements[7]
|
1784
1880
|
end
|
1785
1881
|
|
1786
1882
|
def space3
|
1787
|
-
elements[
|
1883
|
+
elements[8]
|
1788
1884
|
end
|
1789
1885
|
|
1790
1886
|
def rp
|
1791
|
-
elements[
|
1887
|
+
elements[9]
|
1792
1888
|
end
|
1793
1889
|
|
1794
1890
|
def space4
|
1795
|
-
elements[
|
1891
|
+
elements[10]
|
1796
1892
|
end
|
1797
1893
|
|
1798
1894
|
def data
|
1799
|
-
elements[
|
1895
|
+
elements[11]
|
1800
1896
|
end
|
1801
1897
|
end
|
1802
1898
|
|
@@ -1804,6 +1900,10 @@ module DNS
|
|
1804
1900
|
def to_s
|
1805
1901
|
"#{origin} #{ttl} #{klass} SOA #{ns} #{rp} (#{space})"
|
1806
1902
|
end
|
1903
|
+
|
1904
|
+
def record_type
|
1905
|
+
"SOA"
|
1906
|
+
end
|
1807
1907
|
end
|
1808
1908
|
|
1809
1909
|
def _nt_soa_record
|
@@ -1824,38 +1924,42 @@ module DNS
|
|
1824
1924
|
r2 = _nt_space
|
1825
1925
|
s0 << r2
|
1826
1926
|
if r2
|
1827
|
-
r3 =
|
1927
|
+
r3 = _nt_ms_age
|
1828
1928
|
s0 << r3
|
1829
1929
|
if r3
|
1830
|
-
r4 =
|
1930
|
+
r4 = _nt_ttl
|
1831
1931
|
s0 << r4
|
1832
1932
|
if r4
|
1833
|
-
|
1834
|
-
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1835
|
-
@index += match_len
|
1836
|
-
else
|
1837
|
-
terminal_parse_failure('"SOA"')
|
1838
|
-
r5 = nil
|
1839
|
-
end
|
1933
|
+
r5 = _nt_klass
|
1840
1934
|
s0 << r5
|
1841
1935
|
if r5
|
1842
|
-
|
1936
|
+
if (match_len = has_terminal?("SOA", false, index))
|
1937
|
+
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
1938
|
+
@index += match_len
|
1939
|
+
else
|
1940
|
+
terminal_parse_failure('"SOA"')
|
1941
|
+
r6 = nil
|
1942
|
+
end
|
1843
1943
|
s0 << r6
|
1844
1944
|
if r6
|
1845
|
-
r7 =
|
1945
|
+
r7 = _nt_space
|
1846
1946
|
s0 << r7
|
1847
1947
|
if r7
|
1848
|
-
r8 =
|
1948
|
+
r8 = _nt_ns
|
1849
1949
|
s0 << r8
|
1850
1950
|
if r8
|
1851
|
-
r9 =
|
1951
|
+
r9 = _nt_space
|
1852
1952
|
s0 << r9
|
1853
1953
|
if r9
|
1854
|
-
r10 =
|
1954
|
+
r10 = _nt_rp
|
1855
1955
|
s0 << r10
|
1856
1956
|
if r10
|
1857
|
-
r11 =
|
1957
|
+
r11 = _nt_space
|
1858
1958
|
s0 << r11
|
1959
|
+
if r11
|
1960
|
+
r12 = _nt_data
|
1961
|
+
s0 << r12
|
1962
|
+
end
|
1859
1963
|
end
|
1860
1964
|
end
|
1861
1965
|
end
|
@@ -1889,44 +1993,48 @@ module DNS
|
|
1889
1993
|
elements[1]
|
1890
1994
|
end
|
1891
1995
|
|
1892
|
-
def
|
1996
|
+
def ms_age
|
1893
1997
|
elements[2]
|
1894
1998
|
end
|
1895
1999
|
|
1896
|
-
def
|
2000
|
+
def ttl
|
1897
2001
|
elements[3]
|
1898
2002
|
end
|
1899
2003
|
|
2004
|
+
def klass
|
2005
|
+
elements[4]
|
2006
|
+
end
|
2007
|
+
|
1900
2008
|
def space2
|
1901
|
-
elements[
|
2009
|
+
elements[6]
|
1902
2010
|
end
|
1903
2011
|
|
1904
2012
|
def priority
|
1905
|
-
elements[
|
2013
|
+
elements[7]
|
1906
2014
|
end
|
1907
2015
|
|
1908
2016
|
def space3
|
1909
|
-
elements[
|
2017
|
+
elements[8]
|
1910
2018
|
end
|
1911
2019
|
|
1912
2020
|
def weight
|
1913
|
-
elements[
|
2021
|
+
elements[9]
|
1914
2022
|
end
|
1915
2023
|
|
1916
2024
|
def space4
|
1917
|
-
elements[
|
2025
|
+
elements[10]
|
1918
2026
|
end
|
1919
2027
|
|
1920
2028
|
def port
|
1921
|
-
elements[
|
2029
|
+
elements[11]
|
1922
2030
|
end
|
1923
2031
|
|
1924
2032
|
def space5
|
1925
|
-
elements[
|
2033
|
+
elements[12]
|
1926
2034
|
end
|
1927
2035
|
|
1928
2036
|
def target
|
1929
|
-
elements[
|
2037
|
+
elements[13]
|
1930
2038
|
end
|
1931
2039
|
end
|
1932
2040
|
|
@@ -1943,40 +2051,44 @@ module DNS
|
|
1943
2051
|
elements[2]
|
1944
2052
|
end
|
1945
2053
|
|
1946
|
-
def
|
2054
|
+
def ms_age
|
1947
2055
|
elements[3]
|
1948
2056
|
end
|
1949
2057
|
|
2058
|
+
def ttl
|
2059
|
+
elements[4]
|
2060
|
+
end
|
2061
|
+
|
1950
2062
|
def space2
|
1951
|
-
elements[
|
2063
|
+
elements[6]
|
1952
2064
|
end
|
1953
2065
|
|
1954
2066
|
def priority
|
1955
|
-
elements[
|
2067
|
+
elements[7]
|
1956
2068
|
end
|
1957
2069
|
|
1958
2070
|
def space3
|
1959
|
-
elements[
|
2071
|
+
elements[8]
|
1960
2072
|
end
|
1961
2073
|
|
1962
2074
|
def weight
|
1963
|
-
elements[
|
2075
|
+
elements[9]
|
1964
2076
|
end
|
1965
2077
|
|
1966
2078
|
def space4
|
1967
|
-
elements[
|
2079
|
+
elements[10]
|
1968
2080
|
end
|
1969
2081
|
|
1970
2082
|
def port
|
1971
|
-
elements[
|
2083
|
+
elements[11]
|
1972
2084
|
end
|
1973
2085
|
|
1974
2086
|
def space5
|
1975
|
-
elements[
|
2087
|
+
elements[12]
|
1976
2088
|
end
|
1977
2089
|
|
1978
2090
|
def target
|
1979
|
-
elements[
|
2091
|
+
elements[13]
|
1980
2092
|
end
|
1981
2093
|
end
|
1982
2094
|
|
@@ -1989,40 +2101,44 @@ module DNS
|
|
1989
2101
|
elements[1]
|
1990
2102
|
end
|
1991
2103
|
|
1992
|
-
def
|
2104
|
+
def ms_age
|
1993
2105
|
elements[2]
|
1994
2106
|
end
|
1995
2107
|
|
2108
|
+
def ttl
|
2109
|
+
elements[3]
|
2110
|
+
end
|
2111
|
+
|
1996
2112
|
def space2
|
1997
|
-
elements[
|
2113
|
+
elements[5]
|
1998
2114
|
end
|
1999
2115
|
|
2000
2116
|
def priority
|
2001
|
-
elements[
|
2117
|
+
elements[6]
|
2002
2118
|
end
|
2003
2119
|
|
2004
2120
|
def space3
|
2005
|
-
elements[
|
2121
|
+
elements[7]
|
2006
2122
|
end
|
2007
2123
|
|
2008
2124
|
def weight
|
2009
|
-
elements[
|
2125
|
+
elements[8]
|
2010
2126
|
end
|
2011
2127
|
|
2012
2128
|
def space4
|
2013
|
-
elements[
|
2129
|
+
elements[9]
|
2014
2130
|
end
|
2015
2131
|
|
2016
2132
|
def port
|
2017
|
-
elements[
|
2133
|
+
elements[10]
|
2018
2134
|
end
|
2019
2135
|
|
2020
2136
|
def space5
|
2021
|
-
elements[
|
2137
|
+
elements[11]
|
2022
2138
|
end
|
2023
2139
|
|
2024
2140
|
def target
|
2025
|
-
elements[
|
2141
|
+
elements[12]
|
2026
2142
|
end
|
2027
2143
|
end
|
2028
2144
|
|
@@ -2076,6 +2192,10 @@ module DNS
|
|
2076
2192
|
def to_s
|
2077
2193
|
"#{host} #{ttl} #{klass} SRV #{priority} #{weight} #{port} #{target}"
|
2078
2194
|
end
|
2195
|
+
|
2196
|
+
def record_type
|
2197
|
+
"SRV"
|
2198
|
+
end
|
2079
2199
|
end
|
2080
2200
|
|
2081
2201
|
def _nt_srv_record
|
@@ -2097,44 +2217,48 @@ module DNS
|
|
2097
2217
|
r3 = _nt_space
|
2098
2218
|
s1 << r3
|
2099
2219
|
if r3
|
2100
|
-
r4 =
|
2220
|
+
r4 = _nt_ms_age
|
2101
2221
|
s1 << r4
|
2102
2222
|
if r4
|
2103
|
-
r5 =
|
2223
|
+
r5 = _nt_ttl
|
2104
2224
|
s1 << r5
|
2105
2225
|
if r5
|
2106
|
-
|
2107
|
-
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2108
|
-
@index += match_len
|
2109
|
-
else
|
2110
|
-
terminal_parse_failure('"SRV"')
|
2111
|
-
r6 = nil
|
2112
|
-
end
|
2226
|
+
r6 = _nt_klass
|
2113
2227
|
s1 << r6
|
2114
2228
|
if r6
|
2115
|
-
|
2229
|
+
if (match_len = has_terminal?("SRV", false, index))
|
2230
|
+
r7 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2231
|
+
@index += match_len
|
2232
|
+
else
|
2233
|
+
terminal_parse_failure('"SRV"')
|
2234
|
+
r7 = nil
|
2235
|
+
end
|
2116
2236
|
s1 << r7
|
2117
2237
|
if r7
|
2118
|
-
r8 =
|
2238
|
+
r8 = _nt_space
|
2119
2239
|
s1 << r8
|
2120
2240
|
if r8
|
2121
|
-
r9 =
|
2241
|
+
r9 = _nt_integer
|
2122
2242
|
s1 << r9
|
2123
2243
|
if r9
|
2124
|
-
r10 =
|
2244
|
+
r10 = _nt_space
|
2125
2245
|
s1 << r10
|
2126
2246
|
if r10
|
2127
|
-
r11 =
|
2247
|
+
r11 = _nt_integer
|
2128
2248
|
s1 << r11
|
2129
2249
|
if r11
|
2130
|
-
r12 =
|
2250
|
+
r12 = _nt_space
|
2131
2251
|
s1 << r12
|
2132
2252
|
if r12
|
2133
|
-
r13 =
|
2253
|
+
r13 = _nt_integer
|
2134
2254
|
s1 << r13
|
2135
2255
|
if r13
|
2136
|
-
r14 =
|
2256
|
+
r14 = _nt_space
|
2137
2257
|
s1 << r14
|
2258
|
+
if r14
|
2259
|
+
r15 = _nt_host
|
2260
|
+
s1 << r15
|
2261
|
+
end
|
2138
2262
|
end
|
2139
2263
|
end
|
2140
2264
|
end
|
@@ -2159,51 +2283,55 @@ module DNS
|
|
2159
2283
|
r0 = r1
|
2160
2284
|
r0.extend(SrvRecord4)
|
2161
2285
|
else
|
2162
|
-
|
2163
|
-
|
2164
|
-
|
2165
|
-
if
|
2166
|
-
|
2167
|
-
|
2168
|
-
if
|
2169
|
-
|
2170
|
-
|
2171
|
-
if
|
2172
|
-
|
2173
|
-
|
2174
|
-
if
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
-
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
if
|
2187
|
-
|
2188
|
-
|
2189
|
-
if
|
2190
|
-
|
2191
|
-
|
2192
|
-
if
|
2193
|
-
|
2194
|
-
|
2195
|
-
if
|
2196
|
-
|
2197
|
-
|
2198
|
-
if
|
2199
|
-
|
2200
|
-
|
2201
|
-
if
|
2202
|
-
|
2203
|
-
|
2204
|
-
if
|
2205
|
-
|
2206
|
-
|
2286
|
+
i16, s16 = index, []
|
2287
|
+
r17 = _nt_host
|
2288
|
+
s16 << r17
|
2289
|
+
if r17
|
2290
|
+
r18 = _nt_space
|
2291
|
+
s16 << r18
|
2292
|
+
if r18
|
2293
|
+
r19 = _nt_klass
|
2294
|
+
s16 << r19
|
2295
|
+
if r19
|
2296
|
+
r20 = _nt_ms_age
|
2297
|
+
s16 << r20
|
2298
|
+
if r20
|
2299
|
+
r21 = _nt_ttl
|
2300
|
+
s16 << r21
|
2301
|
+
if r21
|
2302
|
+
if (match_len = has_terminal?("SRV", false, index))
|
2303
|
+
r22 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2304
|
+
@index += match_len
|
2305
|
+
else
|
2306
|
+
terminal_parse_failure('"SRV"')
|
2307
|
+
r22 = nil
|
2308
|
+
end
|
2309
|
+
s16 << r22
|
2310
|
+
if r22
|
2311
|
+
r23 = _nt_space
|
2312
|
+
s16 << r23
|
2313
|
+
if r23
|
2314
|
+
r24 = _nt_integer
|
2315
|
+
s16 << r24
|
2316
|
+
if r24
|
2317
|
+
r25 = _nt_space
|
2318
|
+
s16 << r25
|
2319
|
+
if r25
|
2320
|
+
r26 = _nt_integer
|
2321
|
+
s16 << r26
|
2322
|
+
if r26
|
2323
|
+
r27 = _nt_space
|
2324
|
+
s16 << r27
|
2325
|
+
if r27
|
2326
|
+
r28 = _nt_integer
|
2327
|
+
s16 << r28
|
2328
|
+
if r28
|
2329
|
+
r29 = _nt_space
|
2330
|
+
s16 << r29
|
2331
|
+
if r29
|
2332
|
+
r30 = _nt_host
|
2333
|
+
s16 << r30
|
2334
|
+
end
|
2207
2335
|
end
|
2208
2336
|
end
|
2209
2337
|
end
|
@@ -2216,60 +2344,64 @@ module DNS
|
|
2216
2344
|
end
|
2217
2345
|
end
|
2218
2346
|
end
|
2219
|
-
if
|
2220
|
-
|
2221
|
-
|
2347
|
+
if s16.last
|
2348
|
+
r16 = instantiate_node(SyntaxNode,input, i16...index, s16)
|
2349
|
+
r16.extend(SrvRecord1)
|
2222
2350
|
else
|
2223
|
-
@index =
|
2224
|
-
|
2351
|
+
@index = i16
|
2352
|
+
r16 = nil
|
2225
2353
|
end
|
2226
|
-
if
|
2227
|
-
|
2228
|
-
r0 =
|
2354
|
+
if r16
|
2355
|
+
r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true
|
2356
|
+
r0 = r16
|
2229
2357
|
r0.extend(SrvRecord4)
|
2230
2358
|
else
|
2231
|
-
|
2232
|
-
|
2233
|
-
|
2234
|
-
if
|
2235
|
-
|
2236
|
-
|
2237
|
-
if
|
2238
|
-
|
2239
|
-
|
2240
|
-
if
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
|
2249
|
-
|
2250
|
-
|
2251
|
-
|
2252
|
-
if
|
2253
|
-
|
2254
|
-
|
2255
|
-
if
|
2256
|
-
|
2257
|
-
|
2258
|
-
if
|
2259
|
-
|
2260
|
-
|
2261
|
-
if
|
2262
|
-
|
2263
|
-
|
2264
|
-
if
|
2265
|
-
|
2266
|
-
|
2267
|
-
if
|
2268
|
-
|
2269
|
-
|
2270
|
-
if
|
2271
|
-
|
2272
|
-
|
2359
|
+
i31, s31 = index, []
|
2360
|
+
r32 = _nt_host
|
2361
|
+
s31 << r32
|
2362
|
+
if r32
|
2363
|
+
r33 = _nt_space
|
2364
|
+
s31 << r33
|
2365
|
+
if r33
|
2366
|
+
r34 = _nt_ms_age
|
2367
|
+
s31 << r34
|
2368
|
+
if r34
|
2369
|
+
r35 = _nt_ttl
|
2370
|
+
s31 << r35
|
2371
|
+
if r35
|
2372
|
+
if (match_len = has_terminal?("SRV", false, index))
|
2373
|
+
r36 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2374
|
+
@index += match_len
|
2375
|
+
else
|
2376
|
+
terminal_parse_failure('"SRV"')
|
2377
|
+
r36 = nil
|
2378
|
+
end
|
2379
|
+
s31 << r36
|
2380
|
+
if r36
|
2381
|
+
r37 = _nt_space
|
2382
|
+
s31 << r37
|
2383
|
+
if r37
|
2384
|
+
r38 = _nt_integer
|
2385
|
+
s31 << r38
|
2386
|
+
if r38
|
2387
|
+
r39 = _nt_space
|
2388
|
+
s31 << r39
|
2389
|
+
if r39
|
2390
|
+
r40 = _nt_integer
|
2391
|
+
s31 << r40
|
2392
|
+
if r40
|
2393
|
+
r41 = _nt_space
|
2394
|
+
s31 << r41
|
2395
|
+
if r41
|
2396
|
+
r42 = _nt_integer
|
2397
|
+
s31 << r42
|
2398
|
+
if r42
|
2399
|
+
r43 = _nt_space
|
2400
|
+
s31 << r43
|
2401
|
+
if r43
|
2402
|
+
r44 = _nt_host
|
2403
|
+
s31 << r44
|
2404
|
+
end
|
2273
2405
|
end
|
2274
2406
|
end
|
2275
2407
|
end
|
@@ -2281,60 +2413,60 @@ module DNS
|
|
2281
2413
|
end
|
2282
2414
|
end
|
2283
2415
|
end
|
2284
|
-
if
|
2285
|
-
|
2286
|
-
|
2416
|
+
if s31.last
|
2417
|
+
r31 = instantiate_node(SyntaxNode,input, i31...index, s31)
|
2418
|
+
r31.extend(SrvRecord2)
|
2287
2419
|
else
|
2288
|
-
@index =
|
2289
|
-
|
2420
|
+
@index = i31
|
2421
|
+
r31 = nil
|
2290
2422
|
end
|
2291
|
-
if
|
2292
|
-
|
2293
|
-
r0 =
|
2423
|
+
if r31
|
2424
|
+
r31 = SyntaxNode.new(input, (index-1)...index) if r31 == true
|
2425
|
+
r0 = r31
|
2294
2426
|
r0.extend(SrvRecord4)
|
2295
2427
|
else
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
if
|
2300
|
-
|
2301
|
-
|
2302
|
-
if
|
2303
|
-
|
2304
|
-
|
2305
|
-
if
|
2428
|
+
i45, s45 = index, []
|
2429
|
+
r46 = _nt_host
|
2430
|
+
s45 << r46
|
2431
|
+
if r46
|
2432
|
+
r47 = _nt_space
|
2433
|
+
s45 << r47
|
2434
|
+
if r47
|
2435
|
+
r48 = _nt_klass
|
2436
|
+
s45 << r48
|
2437
|
+
if r48
|
2306
2438
|
if (match_len = has_terminal?("SRV", false, index))
|
2307
|
-
|
2439
|
+
r49 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2308
2440
|
@index += match_len
|
2309
2441
|
else
|
2310
2442
|
terminal_parse_failure('"SRV"')
|
2311
|
-
|
2443
|
+
r49 = nil
|
2312
2444
|
end
|
2313
|
-
|
2314
|
-
if
|
2315
|
-
|
2316
|
-
|
2317
|
-
if
|
2318
|
-
|
2319
|
-
|
2320
|
-
if
|
2321
|
-
|
2322
|
-
|
2323
|
-
if
|
2324
|
-
|
2325
|
-
|
2326
|
-
if
|
2327
|
-
|
2328
|
-
|
2329
|
-
if
|
2330
|
-
|
2331
|
-
|
2332
|
-
if
|
2333
|
-
|
2334
|
-
|
2335
|
-
if
|
2336
|
-
|
2337
|
-
|
2445
|
+
s45 << r49
|
2446
|
+
if r49
|
2447
|
+
r50 = _nt_space
|
2448
|
+
s45 << r50
|
2449
|
+
if r50
|
2450
|
+
r51 = _nt_integer
|
2451
|
+
s45 << r51
|
2452
|
+
if r51
|
2453
|
+
r52 = _nt_space
|
2454
|
+
s45 << r52
|
2455
|
+
if r52
|
2456
|
+
r53 = _nt_integer
|
2457
|
+
s45 << r53
|
2458
|
+
if r53
|
2459
|
+
r54 = _nt_space
|
2460
|
+
s45 << r54
|
2461
|
+
if r54
|
2462
|
+
r55 = _nt_integer
|
2463
|
+
s45 << r55
|
2464
|
+
if r55
|
2465
|
+
r56 = _nt_space
|
2466
|
+
s45 << r56
|
2467
|
+
if r56
|
2468
|
+
r57 = _nt_host
|
2469
|
+
s45 << r57
|
2338
2470
|
end
|
2339
2471
|
end
|
2340
2472
|
end
|
@@ -2346,16 +2478,16 @@ module DNS
|
|
2346
2478
|
end
|
2347
2479
|
end
|
2348
2480
|
end
|
2349
|
-
if
|
2350
|
-
|
2351
|
-
|
2481
|
+
if s45.last
|
2482
|
+
r45 = instantiate_node(SyntaxNode,input, i45...index, s45)
|
2483
|
+
r45.extend(SrvRecord3)
|
2352
2484
|
else
|
2353
|
-
@index =
|
2354
|
-
|
2485
|
+
@index = i45
|
2486
|
+
r45 = nil
|
2355
2487
|
end
|
2356
|
-
if
|
2357
|
-
|
2358
|
-
r0 =
|
2488
|
+
if r45
|
2489
|
+
r45 = SyntaxNode.new(input, (index-1)...index) if r45 == true
|
2490
|
+
r0 = r45
|
2359
2491
|
r0.extend(SrvRecord4)
|
2360
2492
|
else
|
2361
2493
|
@index = i0
|
@@ -2379,20 +2511,24 @@ module DNS
|
|
2379
2511
|
elements[1]
|
2380
2512
|
end
|
2381
2513
|
|
2382
|
-
def
|
2514
|
+
def ms_age
|
2383
2515
|
elements[2]
|
2384
2516
|
end
|
2385
2517
|
|
2386
|
-
def
|
2518
|
+
def ttl
|
2387
2519
|
elements[3]
|
2388
2520
|
end
|
2389
2521
|
|
2522
|
+
def klass
|
2523
|
+
elements[4]
|
2524
|
+
end
|
2525
|
+
|
2390
2526
|
def space2
|
2391
|
-
elements[
|
2527
|
+
elements[6]
|
2392
2528
|
end
|
2393
2529
|
|
2394
2530
|
def data
|
2395
|
-
elements[
|
2531
|
+
elements[7]
|
2396
2532
|
end
|
2397
2533
|
end
|
2398
2534
|
|
@@ -2400,6 +2536,10 @@ module DNS
|
|
2400
2536
|
def to_s
|
2401
2537
|
"#{host} #{ttl} #{klass} SPF #{data}"
|
2402
2538
|
end
|
2539
|
+
|
2540
|
+
def record_type
|
2541
|
+
"SPF"
|
2542
|
+
end
|
2403
2543
|
end
|
2404
2544
|
|
2405
2545
|
def _nt_spf_record
|
@@ -2420,26 +2560,30 @@ module DNS
|
|
2420
2560
|
r2 = _nt_space
|
2421
2561
|
s0 << r2
|
2422
2562
|
if r2
|
2423
|
-
r3 =
|
2563
|
+
r3 = _nt_ms_age
|
2424
2564
|
s0 << r3
|
2425
2565
|
if r3
|
2426
|
-
r4 =
|
2566
|
+
r4 = _nt_ttl
|
2427
2567
|
s0 << r4
|
2428
2568
|
if r4
|
2429
|
-
|
2430
|
-
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2431
|
-
@index += match_len
|
2432
|
-
else
|
2433
|
-
terminal_parse_failure('"SPF"')
|
2434
|
-
r5 = nil
|
2435
|
-
end
|
2569
|
+
r5 = _nt_klass
|
2436
2570
|
s0 << r5
|
2437
2571
|
if r5
|
2438
|
-
|
2572
|
+
if (match_len = has_terminal?("SPF", false, index))
|
2573
|
+
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2574
|
+
@index += match_len
|
2575
|
+
else
|
2576
|
+
terminal_parse_failure('"SPF"')
|
2577
|
+
r6 = nil
|
2578
|
+
end
|
2439
2579
|
s0 << r6
|
2440
2580
|
if r6
|
2441
|
-
r7 =
|
2581
|
+
r7 = _nt_space
|
2442
2582
|
s0 << r7
|
2583
|
+
if r7
|
2584
|
+
r8 = _nt_txt_data
|
2585
|
+
s0 << r8
|
2586
|
+
end
|
2443
2587
|
end
|
2444
2588
|
end
|
2445
2589
|
end
|
@@ -2469,20 +2613,24 @@ module DNS
|
|
2469
2613
|
elements[1]
|
2470
2614
|
end
|
2471
2615
|
|
2472
|
-
def
|
2616
|
+
def ms_age
|
2473
2617
|
elements[2]
|
2474
2618
|
end
|
2475
2619
|
|
2476
|
-
def
|
2620
|
+
def ttl
|
2477
2621
|
elements[3]
|
2478
2622
|
end
|
2479
2623
|
|
2624
|
+
def klass
|
2625
|
+
elements[4]
|
2626
|
+
end
|
2627
|
+
|
2480
2628
|
def space2
|
2481
|
-
elements[
|
2629
|
+
elements[6]
|
2482
2630
|
end
|
2483
2631
|
|
2484
2632
|
def data
|
2485
|
-
elements[
|
2633
|
+
elements[7]
|
2486
2634
|
end
|
2487
2635
|
end
|
2488
2636
|
|
@@ -2490,6 +2638,10 @@ module DNS
|
|
2490
2638
|
def to_s
|
2491
2639
|
"#{host} #{ttl} #{klass} TXT #{data}"
|
2492
2640
|
end
|
2641
|
+
|
2642
|
+
def record_type
|
2643
|
+
"TXT"
|
2644
|
+
end
|
2493
2645
|
end
|
2494
2646
|
|
2495
2647
|
def _nt_txt_record
|
@@ -2510,26 +2662,30 @@ module DNS
|
|
2510
2662
|
r2 = _nt_space
|
2511
2663
|
s0 << r2
|
2512
2664
|
if r2
|
2513
|
-
r3 =
|
2665
|
+
r3 = _nt_ms_age
|
2514
2666
|
s0 << r3
|
2515
2667
|
if r3
|
2516
|
-
r4 =
|
2668
|
+
r4 = _nt_ttl
|
2517
2669
|
s0 << r4
|
2518
2670
|
if r4
|
2519
|
-
|
2520
|
-
r5 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2521
|
-
@index += match_len
|
2522
|
-
else
|
2523
|
-
terminal_parse_failure('"TXT"')
|
2524
|
-
r5 = nil
|
2525
|
-
end
|
2671
|
+
r5 = _nt_klass
|
2526
2672
|
s0 << r5
|
2527
2673
|
if r5
|
2528
|
-
|
2674
|
+
if (match_len = has_terminal?("TXT", false, index))
|
2675
|
+
r6 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
2676
|
+
@index += match_len
|
2677
|
+
else
|
2678
|
+
terminal_parse_failure('"TXT"')
|
2679
|
+
r6 = nil
|
2680
|
+
end
|
2529
2681
|
s0 << r6
|
2530
2682
|
if r6
|
2531
|
-
r7 =
|
2683
|
+
r7 = _nt_space
|
2532
2684
|
s0 << r7
|
2685
|
+
if r7
|
2686
|
+
r8 = _nt_ms_txt_data
|
2687
|
+
s0 << r8
|
2688
|
+
end
|
2533
2689
|
end
|
2534
2690
|
end
|
2535
2691
|
end
|
@@ -2997,12 +3153,7 @@ module DNS
|
|
2997
3153
|
break
|
2998
3154
|
end
|
2999
3155
|
end
|
3000
|
-
|
3001
|
-
@index = i2
|
3002
|
-
r2 = nil
|
3003
|
-
else
|
3004
|
-
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
3005
|
-
end
|
3156
|
+
r2 = instantiate_node(SyntaxNode,input, i2...index, s2)
|
3006
3157
|
s1 << r2
|
3007
3158
|
if r2
|
3008
3159
|
if (match_len = has_terminal?(".", false, index))
|
@@ -3604,6 +3755,111 @@ module DNS
|
|
3604
3755
|
r0
|
3605
3756
|
end
|
3606
3757
|
|
3758
|
+
module MsAge0
|
3759
|
+
def space
|
3760
|
+
elements[3]
|
3761
|
+
end
|
3762
|
+
end
|
3763
|
+
|
3764
|
+
module MsAge1
|
3765
|
+
def to_s
|
3766
|
+
text_value
|
3767
|
+
end
|
3768
|
+
end
|
3769
|
+
|
3770
|
+
def _nt_ms_age
|
3771
|
+
start_index = index
|
3772
|
+
if node_cache[:ms_age].has_key?(index)
|
3773
|
+
cached = node_cache[:ms_age][index]
|
3774
|
+
if cached
|
3775
|
+
node_cache[:ms_age][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
3776
|
+
@index = cached.interval.end
|
3777
|
+
end
|
3778
|
+
return cached
|
3779
|
+
end
|
3780
|
+
|
3781
|
+
i0 = index
|
3782
|
+
i1, s1 = index, []
|
3783
|
+
if (match_len = has_terminal?("[AGE:", false, index))
|
3784
|
+
r2 = instantiate_node(SyntaxNode,input, index...(index + match_len))
|
3785
|
+
@index += match_len
|
3786
|
+
else
|
3787
|
+
terminal_parse_failure('"[AGE:"')
|
3788
|
+
r2 = nil
|
3789
|
+
end
|
3790
|
+
s1 << r2
|
3791
|
+
if r2
|
3792
|
+
s3, i3 = [], index
|
3793
|
+
loop do
|
3794
|
+
if has_terminal?(@regexps[gr = '\A[\\d]'] ||= Regexp.new(gr), :regexp, index)
|
3795
|
+
r4 = true
|
3796
|
+
@index += 1
|
3797
|
+
else
|
3798
|
+
terminal_parse_failure('[\\d]')
|
3799
|
+
r4 = nil
|
3800
|
+
end
|
3801
|
+
if r4
|
3802
|
+
s3 << r4
|
3803
|
+
else
|
3804
|
+
break
|
3805
|
+
end
|
3806
|
+
end
|
3807
|
+
if s3.empty?
|
3808
|
+
@index = i3
|
3809
|
+
r3 = nil
|
3810
|
+
else
|
3811
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
3812
|
+
end
|
3813
|
+
s1 << r3
|
3814
|
+
if r3
|
3815
|
+
if (match_len = has_terminal?("]", false, index))
|
3816
|
+
r5 = true
|
3817
|
+
@index += match_len
|
3818
|
+
else
|
3819
|
+
terminal_parse_failure('"]"')
|
3820
|
+
r5 = nil
|
3821
|
+
end
|
3822
|
+
s1 << r5
|
3823
|
+
if r5
|
3824
|
+
r6 = _nt_space
|
3825
|
+
s1 << r6
|
3826
|
+
end
|
3827
|
+
end
|
3828
|
+
end
|
3829
|
+
if s1.last
|
3830
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
3831
|
+
r1.extend(MsAge0)
|
3832
|
+
else
|
3833
|
+
@index = i1
|
3834
|
+
r1 = nil
|
3835
|
+
end
|
3836
|
+
if r1
|
3837
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
3838
|
+
r0 = r1
|
3839
|
+
r0.extend(MsAge1)
|
3840
|
+
else
|
3841
|
+
if (match_len = has_terminal?('', false, index))
|
3842
|
+
r7 = true
|
3843
|
+
@index += match_len
|
3844
|
+
else
|
3845
|
+
terminal_parse_failure('\'\'')
|
3846
|
+
r7 = nil
|
3847
|
+
end
|
3848
|
+
if r7
|
3849
|
+
r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true
|
3850
|
+
r0 = r7
|
3851
|
+
r0.extend(MsAge1)
|
3852
|
+
else
|
3853
|
+
@index = i0
|
3854
|
+
r0 = nil
|
3855
|
+
end
|
3856
|
+
end
|
3857
|
+
|
3858
|
+
node_cache[:ms_age][start_index] = r0
|
3859
|
+
|
3860
|
+
r0
|
3861
|
+
end
|
3862
|
+
|
3607
3863
|
module Ttl0
|
3608
3864
|
def time_interval
|
3609
3865
|
elements[0]
|
@@ -3820,6 +4076,123 @@ module DNS
|
|
3820
4076
|
r0
|
3821
4077
|
end
|
3822
4078
|
|
4079
|
+
module MsTxtData0
|
4080
|
+
def data
|
4081
|
+
elements[2]
|
4082
|
+
end
|
4083
|
+
|
4084
|
+
end
|
4085
|
+
|
4086
|
+
module MsTxtData1
|
4087
|
+
def data
|
4088
|
+
elements[0]
|
4089
|
+
end
|
4090
|
+
end
|
4091
|
+
|
4092
|
+
module MsTxtData2
|
4093
|
+
def to_s
|
4094
|
+
data.to_s
|
4095
|
+
end
|
4096
|
+
end
|
4097
|
+
|
4098
|
+
def _nt_ms_txt_data
|
4099
|
+
start_index = index
|
4100
|
+
if node_cache[:ms_txt_data].has_key?(index)
|
4101
|
+
cached = node_cache[:ms_txt_data][index]
|
4102
|
+
if cached
|
4103
|
+
node_cache[:ms_txt_data][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4104
|
+
@index = cached.interval.end
|
4105
|
+
end
|
4106
|
+
return cached
|
4107
|
+
end
|
4108
|
+
|
4109
|
+
i0 = index
|
4110
|
+
i1, s1 = index, []
|
4111
|
+
if (match_len = has_terminal?("(", false, index))
|
4112
|
+
r2 = true
|
4113
|
+
@index += match_len
|
4114
|
+
else
|
4115
|
+
terminal_parse_failure('"("')
|
4116
|
+
r2 = nil
|
4117
|
+
end
|
4118
|
+
s1 << r2
|
4119
|
+
if r2
|
4120
|
+
s3, i3 = [], index
|
4121
|
+
loop do
|
4122
|
+
r4 = _nt_space
|
4123
|
+
if r4
|
4124
|
+
s3 << r4
|
4125
|
+
else
|
4126
|
+
break
|
4127
|
+
end
|
4128
|
+
end
|
4129
|
+
r3 = instantiate_node(SyntaxNode,input, i3...index, s3)
|
4130
|
+
s1 << r3
|
4131
|
+
if r3
|
4132
|
+
r5 = _nt_txt_data
|
4133
|
+
s1 << r5
|
4134
|
+
if r5
|
4135
|
+
s6, i6 = [], index
|
4136
|
+
loop do
|
4137
|
+
r7 = _nt_space
|
4138
|
+
if r7
|
4139
|
+
s6 << r7
|
4140
|
+
else
|
4141
|
+
break
|
4142
|
+
end
|
4143
|
+
end
|
4144
|
+
r6 = instantiate_node(SyntaxNode,input, i6...index, s6)
|
4145
|
+
s1 << r6
|
4146
|
+
if r6
|
4147
|
+
if (match_len = has_terminal?(")", false, index))
|
4148
|
+
r8 = true
|
4149
|
+
@index += match_len
|
4150
|
+
else
|
4151
|
+
terminal_parse_failure('")"')
|
4152
|
+
r8 = nil
|
4153
|
+
end
|
4154
|
+
s1 << r8
|
4155
|
+
end
|
4156
|
+
end
|
4157
|
+
end
|
4158
|
+
end
|
4159
|
+
if s1.last
|
4160
|
+
r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
|
4161
|
+
r1.extend(MsTxtData0)
|
4162
|
+
else
|
4163
|
+
@index = i1
|
4164
|
+
r1 = nil
|
4165
|
+
end
|
4166
|
+
if r1
|
4167
|
+
r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true
|
4168
|
+
r0 = r1
|
4169
|
+
r0.extend(MsTxtData2)
|
4170
|
+
else
|
4171
|
+
i9, s9 = index, []
|
4172
|
+
r10 = _nt_txt_data
|
4173
|
+
s9 << r10
|
4174
|
+
if s9.last
|
4175
|
+
r9 = instantiate_node(SyntaxNode,input, i9...index, s9)
|
4176
|
+
r9.extend(MsTxtData1)
|
4177
|
+
else
|
4178
|
+
@index = i9
|
4179
|
+
r9 = nil
|
4180
|
+
end
|
4181
|
+
if r9
|
4182
|
+
r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true
|
4183
|
+
r0 = r9
|
4184
|
+
r0.extend(MsTxtData2)
|
4185
|
+
else
|
4186
|
+
@index = i0
|
4187
|
+
r0 = nil
|
4188
|
+
end
|
4189
|
+
end
|
4190
|
+
|
4191
|
+
node_cache[:ms_txt_data][start_index] = r0
|
4192
|
+
|
4193
|
+
r0
|
4194
|
+
end
|
4195
|
+
|
3823
4196
|
module TxtData0
|
3824
4197
|
def space
|
3825
4198
|
elements[0]
|