1YAML::PP::Grammar(3)  User Contributed Perl Documentation YAML::PP::Grammar(3)
2
3
4

NAME

6       YAML::PP::Grammar - YAML grammar
7

GRAMMAR

9       This is the Grammar in YAML
10
11           # START OF YAML INLINE
12
13           # DO NOT CHANGE THIS
14           # This grammar is automatically generated from etc/grammar.yaml
15
16           ---
17           NODETYPE_NODE:
18             DASH:
19               match: cb_seqstart
20               EOL: { new: FULLNODE }
21               WS: { new: FULLNODE }
22
23             DEFAULT: { new: NODETYPE_SCALAR_OR_MAP }
24
25           NODETYPE_SCALAR_OR_MAP:
26
27             # Flow nodes can follow tabs
28             WS: { new: FULLMAPVALUE_INLINE }
29
30             ALIAS:
31               match: cb_alias
32               EOL: { match: cb_send_alias_from_stack }
33               WS:
34                 COLON:
35                   match: cb_insert_map_alias
36                   EOL: { new: FULLNODE }
37                   WS: { new: FULLMAPVALUE_INLINE }
38
39             QUESTION:
40               match: cb_questionstart
41               EOL: { new: FULLNODE }
42               WS: { new: FULLNODE }
43
44             QUOTED:
45               match: cb_take_quoted
46               EOL: { match: cb_send_scalar }
47               WS:
48                 COLON:
49                   match: cb_insert_map
50                   EOL: { new: FULLNODE }
51                   WS: { new: FULLMAPVALUE_INLINE }
52               COLON:
53                 match: cb_insert_map
54                 EOL: { new: FULLNODE }
55                 WS: { new: FULLMAPVALUE_INLINE }
56
57             QUOTED_MULTILINE:
58               match: cb_quoted_multiline
59               EOL: {  }
60
61
62             PLAIN:
63               match: cb_start_plain
64               EOL:
65                 match: cb_send_scalar
66               WS:
67                 COLON:
68                   match: cb_insert_map
69                   EOL: { new: FULLNODE }
70                   WS: { new: FULLMAPVALUE_INLINE }
71               COLON:
72                 match: cb_insert_map
73                 EOL: { new: FULLNODE }
74                 WS: { new: FULLMAPVALUE_INLINE }
75
76             PLAIN_MULTI:
77               match: cb_send_plain_multi
78               EOL: { }
79
80             COLON:
81               match: cb_insert_empty_map
82               EOL: { new: FULLNODE }
83               WS: { new: FULLMAPVALUE_INLINE }
84
85             BLOCK_SCALAR:
86               match: cb_send_block_scalar
87               EOL: { }
88
89             FLOWSEQ_START:
90               match: cb_start_flowseq
91               new: NEWFLOWSEQ
92
93             FLOWMAP_START:
94               match: cb_start_flowmap
95               new: NEWFLOWMAP
96
97             DOC_END:
98               match: cb_end_document
99               EOL: { }
100
101             DOC_START:
102               match: cb_end_doc_start_document
103               EOL: { new: FULLNODE }
104               WS: { new: FULLNODE }
105
106             EOL:
107               new: NODETYPE_SCALAR_OR_MAP
108
109           NODETYPE_COMPLEX:
110             COLON:
111               match: cb_complexcolon
112               EOL: { new: FULLNODE }
113               WS: { new: FULLNODE }
114             DEFAULT:
115               match: cb_empty_complexvalue
116               new: NODETYPE_MAP
117             EOL:
118               new: NODETYPE_COMPLEX
119
120           RULE_FULLFLOWSCALAR:
121             ANCHOR:
122               match: cb_anchor
123               EOL: { new: RULE_FULLFLOWSCALAR_ANCHOR }
124               DEFAULT: { new: RULE_FULLFLOWSCALAR_ANCHOR }
125             TAG:
126               match: cb_tag
127               EOL: { new: RULE_FULLFLOWSCALAR_TAG }
128               DEFAULT: { new: RULE_FULLFLOWSCALAR_TAG }
129             DEFAULT: { new: RULE_FLOWSCALAR }
130
131           RULE_FULLFLOWSCALAR_ANCHOR:
132             WS: { new: RULE_FULLFLOWSCALAR_ANCHOR }
133             TAG:
134               match: cb_tag
135               WS: { new: RULE_FLOWSCALAR }
136               EOL: { new: RULE_FLOWSCALAR }
137             DEFAULT: { new: RULE_FLOWSCALAR }
138
139           RULE_FULLFLOWSCALAR_TAG:
140             WS: { new: RULE_FULLFLOWSCALAR_TAG }
141             ANCHOR:
142               match: cb_anchor
143               WS: { new: RULE_FLOWSCALAR }
144               EOL: { new: RULE_FLOWSCALAR }
145             DEFAULT: { new: RULE_FLOWSCALAR }
146
147           RULE_FLOWSCALAR:
148             FLOWSEQ_START: { match: cb_start_flowseq, new: NEWFLOWSEQ }
149             FLOWMAP_START: { match: cb_start_flowmap, new: NEWFLOWMAP }
150
151             ALIAS: { match: cb_send_alias, return: 1 }
152
153             QUOTED:
154               match: cb_take_quoted
155               EOL: { match: cb_send_scalar }
156               WS: { match: cb_send_scalar, return: 1 }
157               DEFAULT: { match: cb_send_scalar, return: 1 }
158
159             QUOTED_MULTILINE: { match: cb_quoted_multiline, return: 1 }
160
161             PLAIN:
162               match: cb_start_plain
163               EOL: { match: cb_send_scalar }
164               DEFAULT: { match: cb_send_scalar, return: 1 }
165
166             PLAIN_MULTI: { match: cb_send_plain_multi, return: 1 }
167
168             FLOW_COMMA: { match: cb_empty_flow_mapkey, return: 1 }
169
170             FLOWMAP_END:
171               match: cb_end_flowmap_empty
172               return: 1
173
174           FLOWSEQ:
175             FLOWSEQ_START: { match: cb_start_flowseq, new: NEWFLOWSEQ }
176             FLOWMAP_START: { match: cb_start_flowmap, new: NEWFLOWMAP }
177
178             ALIAS: { match: cb_send_flow_alias, new: FLOWSEQ_NEXT }
179
180             PLAIN: { match: cb_flow_plain, new: FLOWSEQ_NEXT }
181             PLAIN_MULTI: { match: cb_send_plain_multi, new: FLOWSEQ_NEXT }
182
183             QUOTED: { match: cb_flowkey_quoted, new: FLOWSEQ_NEXT }
184             QUOTED_MULTILINE: { match: cb_quoted_multiline, new: FLOWSEQ_NEXT }
185
186           FLOWSEQ_NEXT:
187             WS: { new: FLOWSEQ_NEXT }
188             EOL: { new: FLOWSEQ_NEXT }
189
190             FLOW_COMMA:
191               match: cb_flow_comma
192               return: 1
193
194             FLOWSEQ_END:
195               match: cb_end_flowseq
196               return: 1
197
198           FLOWMAP:
199             FLOWSEQ_START: { match: cb_start_flowseq, new: NEWFLOWSEQ }
200             FLOWMAP_START: { match: cb_start_flowmap, new: NEWFLOWMAP }
201
202             ALIAS: { match: cb_send_alias, return: 1 }
203
204             PLAIN: { match: cb_flowkey_plain, return: 1 }
205             PLAIN_MULTI: { match: cb_send_plain_multi, return: 1 }
206
207             QUOTED: { match: cb_flowkey_quoted, return: 1 }
208             QUOTED_MULTILINE: { match: cb_quoted_multiline, return: 1 }
209
210             COLON:
211               WS:
212                 match: cb_empty_flow_mapkey
213                 new: RULE_FULLFLOWSCALAR
214               EOL:
215                 match: cb_empty_flow_mapkey
216                 new: RULE_FULLFLOWSCALAR
217
218
219           NEWFLOWSEQ:
220             EOL: { new: NEWFLOWSEQ }
221             WS: { new: NEWFLOWSEQ }
222
223             ANCHOR:
224               match: cb_anchor
225               WS: { new: NEWFLOWSEQ_ANCHOR }
226               EOL: { new: NEWFLOWSEQ_ANCHOR }
227             TAG:
228               match: cb_tag
229               WS: { new: NEWFLOWSEQ_TAG }
230               EOL: { new: NEWFLOWSEQ_TAG }
231
232             FLOWSEQ_END:
233               match: cb_end_flowseq
234               return: 1
235
236             DEFAULT: { new: FLOWSEQ }
237
238           NODETYPE_FLOWSEQ:
239             EOL: { new: NODETYPE_FLOWSEQ }
240             WS: { new: NODETYPE_FLOWSEQ }
241             FLOWSEQ_END:
242               match: cb_end_flowseq
243               return: 1
244             DEFAULT: { new: NEWFLOWSEQ }
245
246           NODETYPE_FLOWMAPVALUE:
247             WS: { new: NODETYPE_FLOWMAPVALUE }
248             EOL: { new: NODETYPE_FLOWMAPVALUE }
249             COLON:
250               match: cb_flow_colon
251               WS: { new: RULE_FULLFLOWSCALAR }
252               EOL: { new: RULE_FULLFLOWSCALAR }
253               DEFAULT: { new: RULE_FULLFLOWSCALAR }
254             FLOW_COMMA:
255               match: cb_empty_flowmap_value
256               return: 1
257             FLOWMAP_END:
258               match: cb_end_flowmap_empty
259               return: 1
260
261           NEWFLOWSEQ_ANCHOR:
262             WS: { new: NEWFLOWSEQ_ANCHOR }
263             EOL: { new: NEWFLOWSEQ_ANCHOR }
264             TAG:
265               match: cb_tag
266               WS: { new: FLOWSEQ }
267               EOL: { new: FLOWSEQ }
268             DEFAULT: { new: FLOWSEQ }
269
270           NEWFLOWSEQ_TAG:
271             WS: { new: NEWFLOWSEQ_TAG }
272             EOL: { new: NEWFLOWSEQ_TAG }
273             ANCHOR:
274               match: cb_anchor
275               WS: { new: FLOWSEQ }
276               EOL: { new: FLOWSEQ }
277             DEFAULT: { new: FLOWSEQ }
278
279
280           NEWFLOWMAP_ANCHOR:
281             WS: { new: NEWFLOWMAP_ANCHOR }
282             EOL: { new: NEWFLOWMAP_ANCHOR }
283             TAG:
284               match: cb_tag
285               WS: { new: FLOWMAP }
286               EOL: { new: FLOWMAP }
287             DEFAULT: { new: FLOWMAP }
288
289           NEWFLOWMAP_TAG:
290             WS: { new: NEWFLOWMAP_TAG }
291             EOL: { new: NEWFLOWMAP_TAG }
292             ANCHOR:
293               match: cb_anchor
294               WS: { new: FLOWMAP }
295               EOL: { new: FLOWMAP }
296             DEFAULT: { new: FLOWMAP }
297
298           NEWFLOWMAP:
299             EOL: { new: NEWFLOWMAP }
300             WS: { new: NEWFLOWMAP }
301             # TODO
302             QUESTION: { match: cb_flow_question, new: NEWFLOWMAP }
303
304             ANCHOR:
305               match: cb_anchor
306               WS: { new: NEWFLOWMAP_ANCHOR }
307               EOL: { new: NEWFLOWMAP_ANCHOR }
308             TAG:
309               match: cb_tag
310               WS: { new: NEWFLOWMAP_TAG }
311               EOL: { new: NEWFLOWMAP_TAG }
312
313             FLOWMAP_END:
314               match: cb_end_flowmap
315               return: 1
316
317             COLON:
318               WS:
319                 match: cb_empty_flow_mapkey
320                 new: RULE_FULLFLOWSCALAR
321               EOL:
322                 match: cb_empty_flow_mapkey
323                 new: RULE_FULLFLOWSCALAR
324
325             DEFAULT: { new: FLOWMAP }
326
327           NODETYPE_FLOWMAP:
328             EOL: { new: NODETYPE_FLOWMAP }
329             WS: { new: NODETYPE_FLOWMAP }
330             FLOWMAP_END:
331               match: cb_end_flowmap
332               return: 1
333             FLOW_COMMA: { match: cb_flow_comma, new: NEWFLOWMAP }
334             DEFAULT: { new: NEWFLOWMAP }
335
336
337           RULE_MAPKEY:
338             QUESTION:
339               match: cb_question
340               EOL: { new: FULLNODE }
341               WS: { new: FULLNODE }
342             ALIAS:
343               match: cb_send_alias
344               WS:
345                 COLON:
346                   EOL: { new: FULLNODE }
347                   WS: { new: FULLMAPVALUE_INLINE }
348
349             QUOTED:
350               match: cb_take_quoted_key
351               WS:
352                 COLON:
353                   EOL: { new: FULLNODE }
354                   WS: { new: FULLMAPVALUE_INLINE }
355               COLON:
356                 EOL: { new: FULLNODE }
357                 WS: { new: FULLMAPVALUE_INLINE }
358
359             PLAIN:
360               match: cb_mapkey
361               WS:
362                 COLON:
363                   match: cb_send_mapkey
364                   EOL: { new: FULLNODE }
365                   WS: { new: FULLMAPVALUE_INLINE }
366               COLON:
367                 match: cb_send_mapkey
368                 EOL: { new: FULLNODE }
369                 WS: { new: FULLMAPVALUE_INLINE }
370
371             COLON:
372               match: cb_empty_mapkey
373               EOL: { new: FULLNODE }
374               WS: { new: FULLMAPVALUE_INLINE }
375
376             DOC_END:
377               match: cb_end_document
378               EOL: { }
379
380             DOC_START:
381               match: cb_end_doc_start_document
382               EOL: { new: FULLNODE }
383               WS: { new: FULLNODE }
384
385             EOL:
386               new: RULE_MAPKEY
387
388
389           NODETYPE_SEQ:
390             DASH:
391               match: cb_seqitem
392               EOL: { new: FULLNODE }
393               WS: { new: FULLNODE }
394             DOC_END:
395               match: cb_end_document
396               EOL: { }
397             DOC_START:
398               match: cb_end_doc_start_document
399               EOL: { new: FULLNODE }
400               WS: { new: FULLNODE }
401
402             EOL:
403               new: NODETYPE_SEQ
404
405           NODETYPE_MAP:
406             ANCHOR:
407               match: cb_anchor
408               WS:
409                 TAG:
410                   match: cb_tag
411                   WS: { new: RULE_MAPKEY  }
412                 DEFAULT: { new: RULE_MAPKEY }
413             TAG:
414               match: cb_tag
415               WS:
416                 ANCHOR:
417                   match: cb_anchor
418                   WS: { new: RULE_MAPKEY  }
419                 DEFAULT: { new: RULE_MAPKEY }
420             DEFAULT: { new: RULE_MAPKEY }
421
422           FULLNODE_ANCHOR:
423             TAG:
424               match: cb_tag
425               EOL: { match: cb_property_eol, new: FULLNODE_TAG_ANCHOR }
426               WS:
427                 ANCHOR:
428                   match: cb_anchor
429                   WS: { new: NODETYPE_SCALAR_OR_MAP  }
430                 DEFAULT: { new: NODETYPE_SCALAR_OR_MAP }
431             ANCHOR:
432               match: cb_anchor
433               WS:
434                 TAG:
435                   match: cb_tag
436                   WS: { new: NODETYPE_SCALAR_OR_MAP  }
437                 DEFAULT: { new: NODETYPE_SCALAR_OR_MAP }
438             EOL: { new: FULLNODE_ANCHOR }
439             DEFAULT: { new: NODETYPE_NODE }
440
441           FULLNODE_TAG:
442             ANCHOR:
443               match: cb_anchor
444               EOL: { match: cb_property_eol, new: FULLNODE_TAG_ANCHOR }
445               WS:
446                 TAG:
447                   match: cb_tag
448                   WS: { new: NODETYPE_SCALAR_OR_MAP  }
449                 DEFAULT: { new: NODETYPE_SCALAR_OR_MAP, }
450             TAG:
451               match: cb_tag
452               WS:
453                 ANCHOR:
454                   match: cb_anchor
455                   WS: { new: NODETYPE_SCALAR_OR_MAP  }
456                 DEFAULT: { new: NODETYPE_SCALAR_OR_MAP }
457             EOL: { new: FULLNODE_TAG }
458             DEFAULT: { new: NODETYPE_NODE }
459
460           FULLNODE_TAG_ANCHOR:
461             ANCHOR:
462               match: cb_anchor
463               WS:
464                 TAG:
465                   match: cb_tag
466                   WS: { new: NODETYPE_SCALAR_OR_MAP  }
467                 DEFAULT: { new: NODETYPE_SCALAR_OR_MAP }
468             TAG:
469               match: cb_tag
470               WS:
471                 ANCHOR:
472                   match: cb_anchor
473                   WS: { new: NODETYPE_SCALAR_OR_MAP  }
474                 DEFAULT: { new: NODETYPE_SCALAR_OR_MAP }
475             EOL: { new: FULLNODE_TAG_ANCHOR }
476             DEFAULT: { new: NODETYPE_NODE }
477
478           FULLNODE:
479             ANCHOR:
480               match: cb_anchor
481               EOL: { match: cb_property_eol, new: FULLNODE_ANCHOR }
482               WS:
483                 TAG:
484                   match: cb_tag
485                   EOL: { match: cb_property_eol, new: FULLNODE_TAG_ANCHOR }
486                   WS: { new: NODETYPE_SCALAR_OR_MAP  }
487                 DEFAULT: { new: NODETYPE_SCALAR_OR_MAP }
488             TAG:
489               match: cb_tag
490               EOL: { match: cb_property_eol, new: FULLNODE_TAG }
491               WS:
492                 ANCHOR:
493                   match: cb_anchor
494                   EOL: { match: cb_property_eol, new: FULLNODE_TAG_ANCHOR }
495                   WS: { new: NODETYPE_SCALAR_OR_MAP  }
496                 DEFAULT: { new: NODETYPE_SCALAR_OR_MAP }
497             EOL: { new: FULLNODE }
498             DEFAULT: { new: NODETYPE_NODE }
499
500           FULLMAPVALUE_INLINE:
501             ANCHOR:
502               match: cb_anchor
503               EOL: { match: cb_property_eol, new: FULLNODE_ANCHOR }
504               WS:
505                 TAG:
506                   match: cb_tag
507                   EOL: { match: cb_property_eol, new: FULLNODE_TAG_ANCHOR }
508                   WS: { new: NODETYPE_MAPVALUE_INLINE  }
509                 DEFAULT: { new: NODETYPE_MAPVALUE_INLINE }
510             TAG:
511               match: cb_tag
512               EOL: { match: cb_property_eol, new: FULLNODE_TAG }
513               WS:
514                 ANCHOR:
515                   match: cb_anchor
516                   EOL: { match: cb_property_eol, new: FULLNODE_TAG_ANCHOR }
517                   WS: { new: NODETYPE_MAPVALUE_INLINE  }
518                 DEFAULT: { new: NODETYPE_MAPVALUE_INLINE }
519             DEFAULT: { new: NODETYPE_MAPVALUE_INLINE }
520
521
522           NODETYPE_MAPVALUE_INLINE:
523             ALIAS:
524               match: cb_send_alias
525               EOL: { }
526
527             QUOTED:
528               match: cb_take_quoted
529               EOL: { match: cb_send_scalar }
530
531             QUOTED_MULTILINE:
532               match: cb_quoted_multiline
533               EOL: { }
534
535             PLAIN:
536               match: cb_start_plain
537               EOL:
538                 match: cb_send_scalar
539
540             PLAIN_MULTI:
541               match: cb_send_plain_multi
542               EOL: { }
543
544             BLOCK_SCALAR:
545               match: cb_send_block_scalar
546               EOL: { }
547
548             FLOWSEQ_START:
549               match: cb_start_flowseq
550               new: NEWFLOWSEQ
551
552             FLOWMAP_START:
553               match: cb_start_flowmap
554               new: NEWFLOWMAP
555
556             DOC_END:
557               match: cb_end_document
558               EOL: { }
559
560
561           DOCUMENT_END:
562             DOC_END:
563               match: cb_end_document
564               EOL: { }
565             DOC_START:
566               match: cb_end_doc_start_document
567               EOL: { new: FULLNODE }
568               WS: { new: FULLNODE }
569
570             EOL:
571               new: DOCUMENT_END
572
573
574           STREAM:
575
576             DOC_END:
577               match: cb_end_document_empty
578               EOL: {  }
579             DOC_START:
580               match: cb_doc_start_explicit
581               EOL: { new: FULLNODE }
582               WS: { new: FULLNODE }
583             YAML_DIRECTIVE:
584               match: cb_set_yaml_version_directive
585               EOL: { new: DIRECTIVE }
586               WS: { new: DIRECTIVE }
587             RESERVED_DIRECTIVE:
588               match: cb_reserved_directive
589               EOL: { new: DIRECTIVE }
590               WS: { new: DIRECTIVE }
591             TAG_DIRECTIVE:
592               match: cb_tag_directive
593               EOL: { new: DIRECTIVE }
594               WS: { new: DIRECTIVE }
595
596             EOL:
597               new: STREAM
598
599             DEFAULT:
600               match: cb_doc_start_implicit
601               new: FULLNODE
602
603           DIRECTIVE:
604             DOC_START:
605               match: cb_doc_start_explicit
606               EOL: { new: FULLNODE }
607               WS: { new: FULLNODE }
608
609             YAML_DIRECTIVE:
610               match: cb_set_yaml_version_directive
611               EOL: { new: DIRECTIVE }
612               WS: { new: DIRECTIVE }
613             RESERVED_DIRECTIVE:
614               match: cb_reserved_directive
615               EOL: { new: DIRECTIVE }
616               WS: { new: DIRECTIVE }
617             TAG_DIRECTIVE:
618               match: cb_tag_directive
619               EOL: { new: DIRECTIVE }
620               WS: { new: DIRECTIVE }
621
622             EOL:
623               new: DIRECTIVE
624
625
626           # END OF YAML INLINE
627
628
629
630perl v5.30.1                      2020-03-02              YAML::PP::Grammar(3)
Impressum