[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/yaml a15b045399 010/124: Condense grammar functions to
From: |
ELPA Syncer |
Subject: |
[elpa] externals/yaml a15b045399 010/124: Condense grammar functions to one |
Date: |
Fri, 29 Nov 2024 15:59:53 -0500 (EST) |
branch: externals/yaml
commit a15b0453998b9e3ed24a5bcf35508f15239fb521
Author: Zachary Romero <zacromero@posteo.net>
Commit: Zachary Romero <zacromero@posteo.net>
Condense grammar functions to one
---
grammargen.bb | 50 +-
yaml-tests.el | 31 +
yaml.el | 2188 ++++++++++++++++++---------------------------------------
3 files changed, 732 insertions(+), 1537 deletions(-)
diff --git a/grammargen.bb b/grammargen.bb
index 7962ac877e..3f67d0bc52 100755
--- a/grammargen.bb
+++ b/grammargen.bb
@@ -1,12 +1,14 @@
#!/usr/bin/env bb
(def package-prefix "yaml")
+(def fn-name "yaml--parse-from-grammar")
(defn prefix-package-symbol [name]
- (symbol (str package-prefix "-" name)))
+ (symbol (str "'" name)))
(defn prefix-package-symbol-quoted [name]
- (symbol (str "#'" package-prefix "-" name)))
+ (list 'lambda (list)
+ (list (symbol fn-name) (symbol (str "'" name)))))
(defn extract-params
"Extract the parameters of a rule and return them as a list of symbols."
@@ -37,11 +39,11 @@
(= "(match)" var-name)
(list 'yaml--match)
- (#{"flow-out" "flow-in" "block-in" "block-out"} var-name)
+ (#{"in-flow" "flow-out" "flow-in" "block-key" "block-in" "block-out"}
var-name)
var-name
(> (count var-name) 2)
- (list (prefix-package-symbol var-name))
+ (list (symbol fn-name) (prefix-package-symbol var-name))
(= "m" var-name)
(list 'yaml--state-m)
@@ -51,6 +53,9 @@
:else (symbol var-name)))
+(defmethod gen-elisp-fn-arg "clojure.lang.MapEntry" [var-name]
+ (list (symbol (first var-name)) (symbol (second var-name))))
+
(defmethod gen-elisp-fn-arg "clojure.lang.PersistentArrayMap" [m]
(cond
(get m "(+)")
@@ -66,20 +71,23 @@
:else
(let [[f args] (first m)]
- (concat (list (prefix-package-symbol f))
+ (concat (list (symbol fn-name) (prefix-package-symbol f))
(map gen-elisp-fn-arg (flatten (list args)))))))
(defmulti gen-elisp-parse-expr #(.getName (class %)))
(defn gen-elsip-char-symbol [c]
- (symbol (str "?\\"
- (if (= c "N")
- "n"
- c))))
+ (cond
+ (re-matches #"[a-zA-Z]" c)
+ (symbol (str "?" c))
+ :else
+ (symbol (str "?\\" (if (= c "N") "n" c)))))
(defmethod gen-elisp-parse-expr "java.lang.String" [chr]
(cond (= "<start-of-line>" chr)
(list 'yaml--start-of-line)
+ (#{"in-flow" "block-key" "flow-out" "flow-in" "block-in" "block-out"}
chr)
+ chr
(= "<end-of-stream>" chr)
(list 'yaml--end-of-stream)
(= "<empty>" chr)
@@ -89,7 +97,7 @@
(= "N" chr)
(list (prefix-package-symbol "\n"))
:else
- (list (prefix-package-symbol chr))))
+ (list (symbol fn-name) (prefix-package-symbol chr))))
(defmethod gen-elisp-parse-expr "clojure.lang.PersistentVector" [[min max]]
(list 'yaml--chr-range
@@ -159,12 +167,12 @@
(list 'yaml--chk "<=" (gen-elisp-fn-arg expr)))
(get m "(===)")
- (let [[a b] (first (get m "(===)"))]
- (list 'yaml--chk "=" (list (first (gen-elisp-fn-arg a))
(gen-elisp-fn-arg b))))
+ (let [x (get m "(===)")]
+ (list 'yaml--chk "=" (gen-elisp-fn-arg x)))
(get m "(!==)")
- (let [[a b] (first (get m "(!==)"))]
- (list 'yaml--chk "!" (list (first (gen-elisp-fn-arg a))
(gen-elisp-fn-arg b))))
+ (let [x (get m "(!==)")]
+ (list 'yaml--chk "!" (gen-elisp-fn-arg x)))
(get m "(max)")
(list 'yaml--max (get m "(max)"))
@@ -189,15 +197,21 @@
:else
(let [[f args] (first m)]
;;(println "[debug-2]" (pr-str f) (pr-str args))
- (concat (list (prefix-package-symbol f))
+ (concat (list (symbol fn-name) (prefix-package-symbol f))
(map gen-elisp-fn-arg (flatten (list args)))))))
+(defn gen-elisp-arg-let [params body]
+ (list 'let (map-indexed (fn [idx param]
+ (list param (list 'nth idx 'args)))
+ params)
+ body))
+
(defn gen-elisp-defun [[name rule]]
(let [params (extract-params rule)
rule (if (map? rule) (dissoc rule "(...)") rule)]
- (list 'defun (prefix-package-symbol name) params
- "Documentation string."
- (list 'yaml--frame name (gen-elisp-parse-expr rule)))))
+ (list (list 'eq 'state (symbol (str "'" name)))
+ (gen-elisp-arg-let params
+ (list 'yaml--frame name (gen-elisp-parse-expr
rule))))))
(def json-grammar (into {} (filter (fn [[k _]] (not (= ":" (subs k 0 1))))
(json/parse-string (slurp "./yaml-spec-1.2.json")))))
diff --git a/yaml-tests.el b/yaml-tests.el
index 62dc20a257..a7362a653c 100644
--- a/yaml-tests.el
+++ b/yaml-tests.el
@@ -267,6 +267,20 @@
h1)
res)))
+(ert-deftest yaml-parsing-scalar ()
+ "Test conversion of !!str to JSON scalar"
+ (should (equal :null (yaml--resolve-scalar-tag "null")))
+ (should (equal :false (yaml--resolve-scalar-tag "false")))
+ (should (equal t (yaml--resolve-scalar-tag "true")))
+ (should (equal "xtruex" (yaml--resolve-scalar-tag "xtruex")))
+ (should (equal 0 (yaml--resolve-scalar-tag "0")))
+ (should (equal 10 (yaml--resolve-scalar-tag "10")))
+ (should (equal "x10" (yaml--resolve-scalar-tag "x10")))
+ (should (equal 10.52 (yaml--resolve-scalar-tag "10.52")))
+ (should (equal 52.0 (yaml--resolve-scalar-tag ".52e2")))
+ (should (equal 1.0e+INF (yaml--resolve-scalar-tag ".Inf")))
+ (should (equal "hello world" (yaml--resolve-scalar-tag "hello world"))))
+
(ert-deftest yaml-parsing-yaml ()
"Tests YAML parsing."
(should (yaml--hash-table-equal
@@ -292,4 +306,21 @@
;; }")))
)
+;; (yaml-parse-string "apiVersion: v1
+;; description: A Helm chart for bidder canary
+;; home: https://github.com/travelaudience/bidder-bidder
+;; maintainers:
+;; - name: realtime-team
+;; name: rtb-canary
+;; version: 1.26.3
+;; ")
+
+(defun yaml-c-ns-flow-map-separate-value (n c)
+ "Documentation string."
+ (yaml--frame "c-ns-flow-map-separate-value"
+ (yaml--all (yaml--chr ?\:)
+ (yaml--chk "!" (ns-plain-safe c))
+ (yaml--any (yaml--all (yaml-s-separate n c) (yaml-ns-flow-node
n c))
+ (yaml-e-node)))))
+
(provide 'yaml-tests)
diff --git a/yaml.el b/yaml.el
index fcc41d1d13..d397c15534 100644
--- a/yaml.el
+++ b/yaml.el
@@ -30,7 +30,12 @@
;;; Code:
-(defconst yaml-tracing-ignore '("s-space"
+(defvar yaml--parse-debug nil
+ "Turn on debugging messages when parsing YAML when non-nil.
+
+This flag is intended for development purposes.")
+
+(defconst yaml--tracing-ignore '("s-space"
"s-tab"
"s-white"
"l-comment"
@@ -46,15 +51,16 @@
"c-printable"
"b-as-space"))
-(defvar yaml-parsing-input "ABC")
-(defvar yaml-parsing-position 0)
-(defvar yaml-states nil)
+(defvar yaml--parsing-input "")
+(defvar yaml--parsing-position 0)
+(defvar yaml--states nil)
(defvar yaml--parsing-object-type nil)
(defvar yaml--parsing-sequence-type nil)
(defvar yaml--parsing-null-object nil)
(defvar yaml--parsing-false-object nil)
+;; TODO: rename this to have two dashes.
(cl-defstruct (yaml-state (:constructor yaml-state-create)
(:copier nil))
doc tt m name lvl beg end)
@@ -62,22 +68,21 @@
(defmacro yaml-parse (data &rest forms)
"Parse DATA according to FORMS."
(declare (indent defun))
- `(progn (setq yaml-parsing-input ,data)
- (setq yaml-parsing-position 0)
+ `(progn (setq yaml--parsing-input ,data)
+ (setq yaml--parsing-position 0)
(yaml--initialize-state)
,@forms))
-
(defun yaml--state-curr ()
"Return the current state."
- (or (car yaml-states)
+ (or (car yaml--states)
(yaml-state-create
:name nil :doc nil :lvl 0 :beg 0 :end 0 :m nil :tt nil)))
(defun yaml-state-set-m (val)
"Set the current value of m to VAL."
(let* ((top-state (yaml--state-curr)))
- (setcar yaml-states
+ (setcar yaml--states
(yaml-state-create :doc (yaml-state-doc top-state)
:tt (yaml-state-tt top-state)
:m val
@@ -88,7 +93,7 @@
(defun yaml-state-set-t (val)
"Set the current value of t to VAL."
(let* ((top-state (yaml--state-curr)))
- (setcar yaml-states
+ (setcar yaml--states
(yaml-state-create :doc (yaml-state-doc top-state)
:tt val
:m (yaml-state-m top-state)
@@ -122,27 +127,27 @@
:m (yaml--state-m)
:name name
:lvl (1+ (yaml-state-lvl curr-state))
- :beg yaml-parsing-position
+ :beg yaml--parsing-position
:end nil)))
- (push new-state yaml-states)))
+ (push new-state yaml--states)))
(defun yaml--pop-state ()
"Pop the current state."
- (let ((popped-state (car yaml-states)))
- (setq yaml-states (cdr yaml-states))
- (let ((top-state (car yaml-states)))
- (setcar yaml-states
+ (let ((popped-state (car yaml--states)))
+ (setq yaml--states (cdr yaml--states))
+ (let ((top-state (car yaml--states)))
+ (setcar yaml--states
(yaml-state-create :doc (yaml-state-doc top-state)
:tt (yaml-state-tt top-state)
:m (yaml-state-m top-state)
:name (yaml-state-m top-state)
:lvl (yaml-state-lvl top-state)
:beg (yaml-state-beg popped-state)
- :end yaml-parsing-position)))))
+ :end yaml--parsing-position)))))
(defun yaml--initialize-state ()
"Initialize the yaml state for parsing."
- (setq yaml-states
+ (setq yaml--states
(list (yaml-state-create :doc nil
:tt nil
:m nil
@@ -497,30 +502,30 @@
(declare (indent defun))
(let ((res-symbol (make-symbol "res")))
`(progn
- ;;(message "%2d: %s" (length yaml-states) ,name)
+ ;;(message "%2d: %s" (length yaml--states) ,name)
(yaml--push-state ,name)
- (when (not (member ,name yaml-tracing-ignore))
+ (when (and yaml--parse-debug (not (member ,name yaml--tracing-ignore)))
(message "|%s>%s %40s \"%s\""
- (make-string (length yaml-states) ?-)
- (make-string (- 40 (length yaml-states)) ?\s)
+ (make-string (length yaml--states) ?-)
+ (make-string (- 40 (length yaml--states)) ?\s)
,name
(replace-regexp-in-string
"\n"
"\\n"
- (substring yaml-parsing-input yaml-parsing-position)
+ (substring yaml--parsing-input yaml--parsing-position)
nil
'literal)))
- (let ((beg yaml-parsing-position)
+ (let ((beg yaml--parsing-position)
(,res-symbol ,rule))
- (when (and ,res-symbol (not (member ,name yaml-tracing-ignore)))
+ (when (and yaml--parse-debug ,res-symbol (not (member ,name
yaml--tracing-ignore)))
(message "<%s|%s %40s \"%s\" = %s"
- (make-string (length yaml-states) ?-)
- (make-string (- 40 (length yaml-states)) ?\s)
+ (make-string (length yaml--states) ?-)
+ (make-string (- 40 (length yaml--states)) ?\s)
,name
(replace-regexp-in-string
"\n"
"\\n"
- (substring yaml-parsing-input beg yaml-parsing-position)
+ (substring yaml--parsing-input beg yaml--parsing-position)
nil
'literal)
,res-symbol))
@@ -531,26 +536,26 @@
(cond
((or (assoc ,name yaml--grammar-events-in)
(assoc ,name yaml--grammar-events-out))
- (list ,name (substring yaml-parsing-input beg
yaml-parsing-position) ,res-symbol))
+ (list ,name (substring yaml--parsing-input beg
yaml--parsing-position) ,res-symbol))
((equal res-type 'list) (list ,name ,res-symbol))
- ((equal res-type 'literal) (substring yaml-parsing-input beg
yaml-parsing-position))
+ ((equal res-type 'literal) (substring yaml--parsing-input beg
yaml--parsing-position))
(t ,res-symbol))))))))
(defun yaml--end-of-stream ()
- ""
- (>= yaml-parsing-position (length yaml-parsing-input)))
+ "Return non-nil if the current position is after the end of the document."
+ (>= yaml--parsing-position (length yaml--parsing-input)))
(defun yaml--char-at-pos (pos)
"Return the character at POS."
- (aref yaml-parsing-input pos))
+ (aref yaml--parsing-input pos))
(defun yaml--slice (pos)
"Return the character at POS."
- (substring yaml-parsing-input pos))
+ (substring yaml--parsing-input pos))
(defun yaml--at-char ()
"Return the current character."
- (yaml--char-at-pos yaml-parsing-position))
+ (yaml--char-at-pos yaml--parsing-position))
(defun yaml--char-match (at &rest chars)
"Return non-nil if AT match any of CHARS."
@@ -563,19 +568,19 @@
"Try to match the character C."
(if (or (yaml--end-of-stream) (not (equal (yaml--at-char) c)))
nil
- (setq yaml-parsing-position (1+ yaml-parsing-position))
+ (setq yaml--parsing-position (1+ yaml--parsing-position))
t))
(defun yaml--chr-range (min max)
"Return non-nil if the current character is between MIN and MAX."
(if (or (yaml--end-of-stream) (not (<= min (yaml--at-char) max)))
nil
- (setq yaml-parsing-position (1+ yaml-parsing-position))
+ (setq yaml--parsing-position (1+ yaml--parsing-position))
t))
(defun yaml--run-all (&rest funcs)
"Return list of all evaluated FUNCS if all of FUNCS pass."
- (let* ((start-pos yaml-parsing-position)
+ (let* ((start-pos yaml--parsing-position)
(ress '())
(res (catch 'break
(while funcs
@@ -586,7 +591,7 @@
(setq funcs (cdr funcs))))
ress)))
(unless res
- (setq yaml-parsing-position start-pos))
+ (setq yaml--parsing-position start-pos))
res))
(defmacro yaml--all (&rest forms)
@@ -602,10 +607,10 @@
(car forms)
(let ((idx-sym (make-symbol "idx"))
(start-pos-sym (make-symbol "start")))
- `(let ((,start-pos-sym yaml-parsing-position)
+ `(let ((,start-pos-sym yaml--parsing-position)
(,idx-sym ,(car forms)))
(or ,idx-sym
- (progn (setq yaml-parsing-position ,start-pos-sym)
+ (progn (setq yaml--parsing-position ,start-pos-sym)
(yaml--any ,@(cdr forms))))))))
(defmacro yaml--may (action)
@@ -629,19 +634,19 @@
(defun yaml--match ()
""
- (let* ((states yaml-states)
+ (let* ((states yaml--states)
(res nil))
(while (and states (not res))
(let ((top-state (car states)))
(if (yaml-state-end top-state)
(let ((beg (yaml-state-beg top-state))
(end (yaml-state-end top-state)))
- (setq res (substring yaml-parsing-input beg end)))
+ (setq res (substring yaml--parsing-input beg end)))
(setq states (cdr states)))))))
(defun yaml--auto-detect-indent (n)
"Detect the indentation given N."
- (let* ((pos yaml-parsing-position)
+ (let* ((pos yaml--parsing-position)
(in-seq (and (> pos 0)
(yaml--char-match (yaml--char-at-pos (1- pos)) ?\- ?\?
?\:)))
(slice (yaml--slice pos))
@@ -660,11 +665,11 @@
(defun yaml--the-end ()
"Return non-nil if at the end of input (?)."
- (or (>= yaml-parsing-position (length yaml-parsing-input))
+ (or (>= yaml--parsing-position (length yaml--parsing-input))
(and (yaml--state-doc)
(yaml--start-of-line)
;; TODO Test this Regex
- (string-match "\\^g(?:---|\\.\\.\\.\\)\\([[:blank:]]\\|$\\)"
(substring yaml-parsing-input yaml-parsing-position)))))
+ (string-match "\\^g(?:---|\\.\\.\\.\\)\\([[:blank:]]\\|$\\)"
(substring yaml--parsing-input yaml--parsing-position)))))
(defun yaml--ord (f)
(let ((res (funcall f)))
@@ -674,19 +679,19 @@
"Match the first FS but none of the others."
(if (yaml--the-end)
nil
- (let ((pos1 yaml-parsing-position))
+ (let ((pos1 yaml--parsing-position))
(if (not (funcall (car fs)))
nil
- (let ((pos2 yaml-parsing-position))
- (setq yaml-parsing-position pos1)
+ (let ((pos2 yaml--parsing-position))
+ (setq yaml--parsing-position pos1)
(if (equal ':error (catch 'break
(dolist (f (cdr fs))
(if (funcall f)
(progn
- (setq yaml-parsing-position pos1)
+ (setq yaml--parsing-position pos1)
(throw 'break ':error))))))
nil
- (setq yaml-parsing-position pos2)
+ (setq yaml--parsing-position pos2)
t))))))
(defun yaml--rep (min max func)
@@ -699,36 +704,37 @@
nil
(let* ((res-list '())
(count 0)
- (pos yaml-parsing-position)
+ (pos yaml--parsing-position)
(pos-start pos))
(catch 'break
(while (or (not max) (< count max))
(let ((res (funcall func)))
(when (or (not res)
- (= yaml-parsing-position pos))
+ (= yaml--parsing-position pos))
(throw 'break nil))
(setq res-list (cons res res-list))
(setq count (1+ count))
- (setq pos yaml-parsing-position))))
+ (setq pos yaml--parsing-position))))
(if (and (>= count min)
(or (not max) (<= count max)))
(progn
- (setq yaml-parsing-position pos)
+ (setq yaml--parsing-position pos)
(if (zerop count)
t
res-list))
- (setq yaml-parsing-position pos-start)
+ (setq yaml--parsing-position pos-start)
nil))))
(defun yaml--start-of-line ()
"Return non-nil if start of line."
- (or (= yaml-parsing-position 0)
- (>= yaml-parsing-position (length yaml-parsing-input))
- (equal (yaml--char-at-pos (1- yaml-parsing-position)) ?\n)))
+ (or (= yaml--parsing-position 0)
+ (>= yaml--parsing-position (length yaml--parsing-input))
+ (equal (yaml--char-at-pos (1- yaml--parsing-position)) ?\n)))
(defun yaml--top ()
"Perform top level YAML parsing rule."
- (yaml-l-yaml-stream))
+ ;;(yaml-l-yaml-stream)
+ (yaml--parse-from-grammar 'l-yaml-stream))
(defmacro yaml--set (variable value)
"Set the current state of VARIABLE to VALUE"
@@ -743,31 +749,15 @@
(defmacro yaml--chk (type expr)
(let ((start-symbol (make-symbol "start"))
(ok-symbol (make-symbol "ok")))
- `(let ((,start-symbol yaml-parsing-position))
+ `(let ((,start-symbol yaml--parsing-position))
(when (equal ,type "<=")
- (setq yaml-parsing-position (1- yaml-parsing-position)))
- (let ((ok (and (>= yaml-parsing-position 0) ,expr)))
- (setq yaml-parsing-position ,start-symbol)
+ (setq yaml--parsing-position (1- yaml--parsing-position)))
+ (let ((ok (and (>= yaml--parsing-position 0) ,expr)))
+ (setq yaml--parsing-position ,start-symbol)
(if (equal ,type "!")
(not ok)
ok)))))
-(defun yaml-parse-string (str)
- "Parse STR as YAML."
- (setq yaml--cache nil)
- (setq yaml--object-stack nil)
- (setq yaml--state-stack nil)
- (setq yaml--root nil)
- (let ((res (yaml-parse str
- (yaml--top))))
- (when (< yaml-parsing-position (length yaml-parsing-input))
- (error (format "parser finished before end of input %s/%s"
- yaml-parsing-position
- (length yaml-parsing-input))))
- (message "Parsed data: %s" res)
- (yaml--walk-events res)
- yaml--root))
-
(defun yaml-parse-string (string &rest args)
"Parse the YAML value in STRING. Keyword ARGS are as follows:
@@ -811,1454 +801,614 @@ value. It defaults to the symbol :false."
(setq yaml--parsing-false-object (or false-object :false))
(let ((res (yaml-parse string
(yaml--top))))
- (when (< yaml-parsing-position (length yaml-parsing-input))
+
+ (when (and yaml--parse-debug (< yaml--parsing-position (length
yaml--parsing-input)))
(error (format "parser finished before end of input %s/%s"
- yaml-parsing-position
- (length yaml-parsing-input))))
+ yaml--parsing-position
+ (length yaml--parsing-input))))
(message "Parsed data: %s" res)
(yaml--walk-events res)
yaml--root)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defun yaml-c-flow-sequence (n c)
- "Documentation string."
- (yaml--frame "c-flow-sequence"
- (yaml--all (yaml--chr ?\[)
- (yaml--rep 0 1 (lambda () (yaml-s-separate n c)))
- (yaml--rep 0 1 (lambda ()
(yaml-ns-s-flow-seq-entries n (yaml-in-flow c))))
- (yaml--chr ?\]))))
-
-(defun yaml-c-indentation-indicator (m)
- "Documentation string."
- (yaml--frame "c-indentation-indicator"
- (yaml--any
- (yaml--set m (yaml--ord (lambda () (yaml--match))))
- (yaml--set m (yaml-auto-detect)))))
-
-(defun yaml-ns-reserved-directive ()
- "Documentation string."
- (yaml--frame "ns-reserved-directive"
- (yaml--all (yaml-ns-directive-name)
- (yaml--rep2 0 nil (lambda () (yaml--all
(yaml-s-separate-in-line) (yaml-ns-directive-parameter)))))))
-
-(defun yaml-ns-flow-map-implicit-entry (n c)
- "Documentation string."
- (yaml--frame "ns-flow-map-implicit-entry"
- (yaml--any (yaml-ns-flow-map-yaml-key-entry n c)
- (yaml-c-ns-flow-map-empty-key-entry n c)
- (yaml-c-ns-flow-map-json-key-entry n c))))
-
-(defun yaml-ns-esc-double-quote ()
- "Documentation string."
- (yaml--frame "ns-esc-double-quote"
- (yaml--chr ?\")))
-
-(defun yaml-c-mapping-start ()
- "Documentation string."
- (yaml--frame "c-mapping-start"
- (yaml--chr ?\{)))
-
-(defun yaml-ns-flow-seq-entry (n c)
- "Documentation string."
- (yaml--frame "ns-flow-seq-entry"
- (yaml--any (yaml-ns-flow-pair n c)
- (yaml-ns-flow-node n c))))
-
-(defun yaml-l-empty (n c)
- "Documentation string."
- (yaml--frame "l-empty"
- (yaml--all (yaml--any (yaml-s-line-prefix n c)
- (yaml-s-indent-lt n))
- (yaml-b-as-line-feed))))
-
-(defun yaml-c-primary-tag-handle ()
- "Documentation string."
- (yaml--frame "c-primary-tag-handle"
- (yaml--chr ?\!)))
-
-(defun yaml-ns-plain-safe-out ()
- "Documentation string."
- (yaml--frame "ns-plain-safe-out"
- (yaml-ns-char)))
-
-(defun yaml-c-ns-shorthand-tag ()
- "Documentation string."
- (yaml--frame "c-ns-shorthand-tag"
- (yaml--all (yaml-c-tag-handle)
- (yaml--rep 1 nil (lambda () (yaml-ns-tag-char))))))
-
-(defun yaml-nb-ns-single-in-line ()
- "Documentation string."
- (yaml--frame "nb-ns-single-in-line"
- (yaml--rep2 0 nil (lambda () (yaml--all (yaml--rep2 0 nil
(lambda () (yaml-s-white))) (yaml-ns-single-char))))))
-
-(defun yaml-l-strip-empty (n)
- "Documentation string."
- (yaml--frame "l-strip-empty"
- (yaml--all (yaml--rep2 0 nil (lambda () (yaml--all
(yaml-s-indent-le n)
-
(yaml-b-non-content))))
- (yaml--rep 0 1 (lambda () (yaml-l-trail-comments
n))))))
-
-(defun yaml-c-indicator ()
- "Documentation string."
- (yaml--frame "c-indicator"
- (yaml--any (yaml--chr ?\-)
- (yaml--chr ?\?)
- (yaml--chr ?\:)
- (yaml--chr ?\,)
- (yaml--chr ?\[)
- (yaml--chr ?\])
- (yaml--chr ?\{)
- (yaml--chr ?\})
- (yaml--chr ?\#)
- (yaml--chr ?\&)
- (yaml--chr ?\*)
- (yaml--chr ?\!)
- (yaml--chr ?\|)
- (yaml--chr ?\>)
- (yaml--chr ?\')
- (yaml--chr ?\")
- (yaml--chr ?\%)
- (yaml--chr ?\@)
- (yaml--chr ?\`))))
-
-(defun yaml-c-l+literal (n)
- "Documentation string."
- (yaml--frame "c-l+literal" (yaml--all (yaml--chr ?\|)
- (yaml-c-b-block-header (yaml--state-m)
(yaml--state-t))
- (yaml-l-literal-content (+ n
(yaml--state-m)) (yaml--state-t)))))
-
-(defun yaml-c-single-quoted (n c)
- "Documentation string."
- (yaml--frame "c-single-quoted" (yaml--all (yaml--chr ?\')
- (yaml-nb-single-text n c)
- (yaml--chr ?\'))))
-
-(defun yaml-c-forbidden ()
- "Documentation string."
- (yaml--frame "c-forbidden" (yaml--all (yaml--start-of-line)
- (yaml--any (yaml-c-directives-end)
- (yaml-c-document-end))
- (yaml--any (yaml-b-char)
- (yaml-s-white)
- (yaml--end-of-stream)))))
-
-(defun yaml-c-ns-alias-node ()
- "Documentation string."
- (yaml--frame "c-ns-alias-node"
- (yaml--all (yaml--chr ?\*)
- (yaml-ns-anchor-name))))
-
-(defun yaml-c-secondary-tag-handle ()
- "Documentation string."
- (yaml--frame "c-secondary-tag-handle"
- (yaml--all (yaml--chr ?\!)
- (yaml--chr ?\!))))
-
-(defun yaml-ns-esc-next-line ()
- "Documentation string."
- (yaml--frame "ns-esc-next-line"
- (yaml--chr ?N)))
-
-(defun yaml-l-nb-same-lines (n)
- "Documentation string."
- (yaml--frame "l-nb-same-lines"
- (yaml--all (yaml--rep2 0 nil (lambda () (yaml-l-empty n
"block-in")))
- (yaml--any (yaml-l-nb-folded-lines n)
- (yaml-l-nb-spaced-lines n)))))
-
-(defun yaml-c-alias ()
- "Documentation string."
- (yaml--frame "c-alias" (yaml--chr ?\*)))
-
-(defun yaml-ns-single-char ()
- "Documentation string."
- (yaml--frame "ns-single-char"
- (yaml--but (lambda () (yaml-nb-single-char))
- (lambda () (yaml-s-white)))))
-
-(defun yaml-c-l-block-map-implicit-value (n)
- "Documentation string."
- (yaml--frame "c-l-block-map-implicit-value"
- (yaml--all (yaml--chr ?\:)
- (yaml--any (yaml-s-l+block-node n "block-out")
- (yaml--all (yaml-e-node)
(yaml-s-l-comments))))))
-
-(defun yaml-ns-uri-char ()
- "Documentation string."
- (yaml--frame "ns-uri-char"
- (yaml--any (yaml--all (yaml--chr ?\%) (yaml-ns-hex-digit)
(yaml-ns-hex-digit))
- (yaml-ns-word-char)
- (yaml--chr ?\#)
- (yaml--chr ?\;)
- (yaml--chr ?\/)
- (yaml--chr ?\?)
- (yaml--chr ?\:)
- (yaml--chr ?\@)
- (yaml--chr ?\&)
- (yaml--chr ?\=)
- (yaml--chr ?\+)
- (yaml--chr ?\$)
- (yaml--chr ?\,)
- (yaml--chr ?\_)
- (yaml--chr ?\.)
- (yaml--chr ?\!)
- (yaml--chr ?\~)
- (yaml--chr ?\*)
- (yaml--chr ?\')
- (yaml--chr ?\()
- (yaml--chr ?\))
- (yaml--chr ?\[)
- (yaml--chr ?\]))))
-
-(defun yaml-ns-esc-16-bit ()
- "Documentation string."
- (yaml--frame "ns-esc-16-bit"
- (yaml--all (yaml--chr ?u)
- (yaml--rep 4 4 #'yaml-ns-hex-digit))))
-
-(defun yaml-l-nb-spaced-lines (n)
- "Documentation string."
- (yaml--frame "l-nb-spaced-lines"
- (yaml--all (yaml-s-nb-spaced-text n)
- (yaml--rep2 0 nil (lambda () (yaml--all
(yaml-b-l-spaced n)
-
(yaml-s-nb-spaced-text n)))))))
-
-(defun yaml-ns-plain (n c)
- "Documentation string."
- (yaml--frame "ns-plain"
- (cond ((equal c "block-key") (yaml-ns-plain-one-line c))
- ((equal c "flow-in") (yaml-ns-plain-multi-line n c))
- ((equal c "flow-key") (yaml-ns-plain-one-line c))
- ((equal c "flow-out") (yaml-ns-plain-multi-line n c)))))
-
-(defun yaml-c-printable ()
- "Documentation string."
- (yaml--frame "c-printable"
- (yaml--any (yaml--chr ?\x09)
- (yaml--chr ?\x0A)
- (yaml--chr ?\x0D)
- (yaml--chr-range ?\x20 ?\x7E)
- (yaml--chr ?\x85)
- (yaml--chr-range ?\xA0 ?\xD7FF)
- (yaml--chr-range ?\xE000 ?\xFFFD)
- (yaml--chr-range ?\x010000 ?\x10FFFF))))
-
-(defun yaml-c-mapping-value ()
- "Documentation string."
- (yaml--frame "c-mapping-value" (yaml--chr ?\:)))
-
-(defun yaml-l-nb-literal-text (n)
- "Documentation string."
- (yaml--frame "l-nb-literal-text"
- (yaml--all (yaml--rep2 0 nil (lambda () (yaml-l-empty n
"block-in")))
- (yaml-s-indent n)
- (yaml--rep 1 nil (lambda () (yaml-nb-char))))))
-
-(defun yaml-ns-plain-char (c)
- "Documentation string."
- (yaml--frame "ns-plain-char"
- (yaml--any (yaml--but (lambda () (yaml-ns-plain-safe c))
- (lambda () (yaml--chr ?\:))
- (lambda () (yaml--chr ?\#)))
- (yaml--all (yaml--chk "<=" (yaml-ns-char))
- (yaml--chr ?\#))
- (yaml--all (yaml--chr ?\:)
- (yaml--chk "=" (yaml-ns-plain-safe c))))))
-
-(defun yaml-ns-anchor-char ()
- "Documentation string."
- (yaml--frame "ns-anchor-char"
- (yaml--but (lambda () (yaml-ns-char))
- (lambda () (yaml-c-flow-indicator)))))
-
-(defun yaml-s-l+block-scalar (n c)
- "Documentation string."
- (yaml--frame "s-l+block-scalar"
- (yaml--all (yaml-s-separate (+ n 1) c)
- (yaml--rep 0 1 (lambda () (yaml--all
(yaml-c-ns-properties (+ n 1) c)
-
(yaml-s-separate (+ n 1) c))))
- (yaml--any (yaml-c-l+literal n)
- (yaml-c-l+folded n)))))
-
-(defun yaml-ns-plain-safe-in ()
- "Documentation string."
- (yaml--frame "ns-plain-safe-in"
- (yaml--but (lambda () (yaml-ns-char))
- (lambda () (yaml-c-flow-indicator)))))
-
-(defun yaml-nb-single-text (n c)
- "Documentation string."
- (yaml--frame "nb-single-text"
- (cond ((equal c "block-key") (yaml-nb-single-one-line))
- ((equal c "flow-in") (yaml-nb-single-multi-line n))
- ((equal c "flow-key") (yaml-nb-single-one-line))
- ((equal c "flow-out") (yaml-nb-single-multi-line n)))))
-
-(defun yaml-s-indent-le (n)
- "Documentation string."
- (yaml--frame "s-indent-le"
- (yaml--may (yaml--all (yaml--rep2 0 nil (lambda ()
(yaml-s-space)))
- (<= (length (yaml--match)) n)))))
-
-(defun yaml-ns-esc-carriage-return ()
- "Documentation string."
- (yaml--frame "ns-esc-carriage-return" (yaml--chr ?\r)))
-
-(defun yaml-l-chomped-empty (n t)
- "Documentation string."
- (yaml--frame "l-chomped-empty"
- (cond ((equal t "clip") (yaml-l-strip-empty n))
- ((equal t "keep") (yaml-l-keep-empty n))
- ((equal t "strip") (yaml-l-strip-empty n)))))
-
-(defun yaml-c-s-implicit-json-key (c)
- "Documentation string."
- (yaml--frame "c-s-implicit-json-key"
- (yaml--all (yaml--max 1024)
- (yaml-c-flow-json-node nil c)
- (yaml--rep 0 1 (lambda ()
(yaml-s-separate-in-line))))))
-
-(defun yaml-b-as-space ()
- "Documentation string."
- (yaml--frame "b-as-space" (yaml-b-break)))
-
-(defun yaml-ns-s-flow-seq-entries (n c)
- "Documentation string."
- (yaml--frame "ns-s-flow-seq-entries"
- (yaml--all (yaml-ns-flow-seq-entry n c)
- (yaml--rep 0 1 (lambda () (yaml-s-separate n c)))
- (yaml--rep 0 1 (lambda () (yaml--all (yaml--chr ?\,)
- (yaml--rep 0 1
(lambda () (yaml-s-separate n c)))
- (yaml--rep 0 1
(lambda () (yaml-ns-s-flow-seq-entries n c)))))))))
-
-(defun yaml-l-block-map-explicit-value (n)
- "Documentation string."
- (yaml--frame "l-block-map-explicit-value"
- (yaml--all (yaml-s-indent n)
- (yaml--chr ?\:)
- (yaml-s-l+block-indented n "block-out"))))
-
-(defun yaml-c-ns-flow-map-json-key-entry (n c)
- "Documentation string."
- (yaml--frame "c-ns-flow-map-json-key-entry"
- (yaml--all (yaml-c-flow-json-node n c)
- (yaml--any (yaml--all (yaml--rep 0 1 (lambda ()
(yaml-s-separate n c)))
-
(yaml-c-ns-flow-map-adjacent-value n c))
- (yaml-e-node)))))
-
-(defun yaml-c-sequence-entry ()
- "Documentation string."
- (yaml--frame "c-sequence-entry"
- (yaml--chr ?\-)))
-
-(defun yaml-l-bare-document ()
- "Documentation string."
- (yaml--frame "l-bare-document"
- (yaml--all (yaml--exclude "c-forbidden")
- (yaml-s-l+block-node -1 "block-in"))))
-
-(defun yaml-b-chomped-last (t)
- "Documentation string."
- (yaml--frame "b-chomped-last"
- (cond ((equal t "clip") (yaml--any (yaml-b-as-line-feed)
(yaml--end-of-stream)))
- ((equal t "keep") (yaml--any (yaml-b-as-line-feed)
(yaml--end-of-stream)))
- ((equal t "strip") (yaml--any (yaml-b-non-content)
(yaml--end-of-stream))))))
-
-(defun yaml-b-chomped-last (t)
- "Documentation string."
- (yaml--frame "b-chomped-last"
- (cond ((equal t "clip") (yaml--any (yaml-b-as-line-feed)
(yaml--end-of-stream)))
- ((equal t "keep") (yaml--any (yaml-b-as-line-feed)
(yaml--end-of-stream)))
- ((equal t "strip") (yaml--any (yaml-b-non-content)
(yaml--end-of-stream))))))
-
-(defun yaml-l-trail-comments (n)
- "Documentation string."
- (yaml--frame "l-trail-comments"
- (yaml--all (yaml-s-indent-lt n)
- (yaml-c-nb-comment-text)
- (yaml-b-comment)
- (yaml--rep2 0 nil (lambda () (yaml-l-comment))))))
-
-(defun yaml-ns-flow-map-yaml-key-entry (n c)
- "Documentation string."
- (yaml--frame "ns-flow-map-yaml-key-entry"
- (yaml--all (yaml-ns-flow-yaml-node n c)
- (yaml--any (yaml--all (yaml--rep 0 1 (lambda ()
(yaml-s-separate n c)))
-
(yaml-c-ns-flow-map-separate-value n c))
- (yaml-e-node)))))
-
-(defun yaml-s-indent (n)
- "Documentation string."
- (yaml--frame "s-indent" (yaml--rep n n #'yaml-s-space)))
-
-(defun yaml-ns-esc-line-separator ()
- "Documentation string."
- (yaml--frame "ns-esc-line-separator" (yaml--chr ?\L)))
-
-(defun yaml-ns-flow-yaml-content (n c)
- "Documentation string."
- (yaml--frame "ns-flow-yaml-content"
- (yaml-ns-plain n c)))
-
-(defun yaml-ns-flow-yaml-node (n c)
- "Documentation string."
- (yaml--frame "ns-flow-yaml-node"
- (yaml--any (yaml-c-ns-alias-node)
- (yaml-ns-flow-yaml-content n c)
- (yaml--all (yaml-c-ns-properties n c)
- (yaml--any (yaml--all (yaml-s-separate n
c) (yaml-ns-flow-yaml-content n c)) (yaml-e-scalar))))))
-
-(defun yaml-ns-yaml-version ()
- "Documentation string."
- (yaml--frame "ns-yaml-version"
- (yaml--all (yaml--rep 1 nil (lambda () (yaml-ns-dec-digit)))
- (yaml--chr ?\.)
- (yaml--rep 1 nil (lambda () (yaml-ns-dec-digit))))))
-
-(defun yaml-c-folded ()
- "Documentation string."
- (yaml--frame "c-folded" (yaml--chr ?\>)))
-
-(defun yaml-c-directives-end ()
- "Documentation string."
- (yaml--frame "c-directives-end"
- (yaml--all (yaml--chr ?\-)
- (yaml--chr ?\-)
- (yaml--chr ?\-))))
-
-(defun yaml-s-double-break (n)
- "Documentation string."
- (yaml--frame "s-double-break"
- (yaml--any (yaml-s-double-escaped n)
- (yaml-s-flow-folded n))))
-
-(defun yaml-s-nb-spaced-text (n)
- "Documentation string."
- (yaml--frame "s-nb-spaced-text"
- (yaml--all (yaml-s-indent n)
- (yaml-s-white)
- (yaml--rep2 0 nil (lambda () (yaml-nb-char))))))
-
-(defun yaml-l-folded-content (n t)
- "Documentation string."
- (yaml--frame "l-folded-content"
- (yaml--all (yaml--rep 0 1 (lambda () (yaml--all
(yaml-l-nb-diff-lines n)
-
(yaml-b-chomped-last (yaml--state-t)))))
- (yaml-l-chomped-empty n (yaml--state-t)))))
-
-(defun yaml-nb-ns-plain-in-line (c)
- "Documentation string."
- (yaml--frame "nb-ns-plain-in-line"
- (yaml--rep2 0 nil (lambda ()
- (yaml--all (yaml--rep2 0 nil (lambda ()
(yaml-s-white)))
- (yaml-ns-plain-char c))))))
-
-(defun yaml-nb-single-multi-line (n)
- "Documentation string."
- (yaml--frame "nb-single-multi-line"
- (yaml--all (yaml-nb-ns-single-in-line)
- (yaml--any (yaml-s-single-next-line n)
- (yaml--rep2 0 nil (lambda ()
(yaml-s-white)))))))
-
-(defun yaml-l-document-suffix ()
- "Documentation string."
- (yaml--frame "l-document-suffix"
- (yaml--all (yaml-c-document-end)
- (yaml-s-l-comments))))
-
-(defun yaml-c-sequence-start ()
- "Documentation string."
- (yaml--frame "c-sequence-start"
- (yaml--chr ?\[)))
-
-(defun yaml-ns-l-block-map-entry (n)
- "Documentation string."
- (yaml--frame "ns-l-block-map-entry"
- (yaml--any (yaml-c-l-block-map-explicit-entry n)
- (yaml-ns-l-block-map-implicit-entry n))))
-
-(defun yaml-ns-l-compact-mapping (n)
- "Documentation string."
- (yaml--frame "ns-l-compact-mapping"
- (yaml--all (yaml-ns-l-block-map-entry n)
- (yaml--rep2 0 nil (lambda () (yaml--all
(yaml-s-indent n)
-
(yaml-ns-l-block-map-entry n)))))))
-
-(defun yaml-ns-esc-space ()
- "Documentation string."
- (yaml--frame "ns-esc-space"
- (yaml--chr ?\x20)))
-
-(defun yaml-ns-esc-vertical-tab ()
- "Documentation string."
- (yaml--frame "ns-esc-vertical-tab"
- (yaml--chr ?v)))
-
-(defun yaml-ns-s-implicit-yaml-key (c)
- "Documentation string."
- (yaml--frame "ns-s-implicit-yaml-key"
- (yaml--all (yaml--max 1024)
- (yaml-ns-flow-yaml-node nil c)
- (yaml--rep 0 1 (lambda ()
(yaml-s-separate-in-line))))))
-
-(defun yaml-b-l-folded (n c)
- "Documentation string."
- (yaml--frame "b-l-folded"
- (yaml--any (yaml-b-l-trimmed n c)
- (yaml-b-as-space))))
-
-(defun yaml-s-l+block-collection (n c)
- "Documentation string."
- (yaml--frame "s-l+block-collection"
- (yaml--all (yaml--rep 0 1 (lambda () (yaml--all (yaml-s-separate (+ n 1) c)
- (yaml-c-ns-properties (+ n
1) c))))
- (yaml-s-l-comments)
- (yaml--any (yaml-l+block-sequence (yaml-seq-spaces n c))
- (yaml-l+block-mapping n)))))
-
-(defun yaml-c-quoted-quote ()
- "Documentation string."
- (yaml--frame "c-quoted-quote"
- (yaml--all (yaml--chr ?\')
- (yaml--chr ?\'))))
-
-(defun yaml-l+block-sequence (n)
- "Documentation string."
- (yaml--frame "l+block-sequence"
- (yaml--all (yaml--set m (yaml--auto-detect-indent n))
- (yaml--rep 1 nil (lambda () (yaml--all
(yaml-s-indent (+ n (yaml--state-m)))
-
(yaml-c-l-block-seq-entry (+ n (yaml--state-m)))))))))
-
-(defun yaml-c-double-quote ()
- "Documentation string."
- (yaml--frame "c-double-quote" (yaml--chr ?\")))
-
-(defun yaml-ns-esc-backspace ()
- "Documentation string."
- (yaml--frame "ns-esc-backspace" (yaml--chr ?b)))
-
-(defun yaml-c-flow-json-content (n c)
- "Documentation string."
- (yaml--frame "c-flow-json-content"
- (yaml--any (yaml-c-flow-sequence n c)
- (yaml-c-flow-mapping n c)
- (yaml-c-single-quoted n c)
- (yaml-c-double-quoted n c))))
-
-(defun yaml-c-mapping-end ()
- "Documentation string."
- (yaml--frame "c-mapping-end" (yaml--chr ?\})))
-
-(defun yaml-nb-single-char ()
- "Documentation string."
- (yaml--frame "nb-single-char"
- (yaml--any (yaml-c-quoted-quote)
- (yaml--but (lambda () (yaml-nb-json)) (lambda ()
(yaml--chr ?\'))))))
-
-(defun yaml-ns-flow-node (n c)
- "Documentation string."
- (yaml--frame "ns-flow-node"
- (yaml--any (yaml-c-ns-alias-node)
- (yaml-ns-flow-content n c)
- (yaml--all (yaml-c-ns-properties n c)
- (yaml--any (yaml--all (yaml-s-separate n
c) (yaml-ns-flow-content n c))
- (yaml-e-scalar))))))
-
-(defun yaml-c-non-specific-tag ()
- "Documentation string."
- (yaml--frame "c-non-specific-tag"
- (yaml--chr ?\!)))
-
-(defun yaml-l-directive-document ()
- "Documentation string."
- (yaml--frame "l-directive-document"
- (yaml--all (yaml--rep 1 nil (lambda () (yaml-l-directive)))
- (yaml-l-explicit-document))))
-
-(defun yaml-c-l-block-map-explicit-entry (n)
- "Documentation string."
- (yaml--frame "c-l-block-map-explicit-entry"
- (yaml--all (yaml-c-l-block-map-explicit-key n)
- (yaml--any (yaml-l-block-map-explicit-value n)
- (yaml-e-node)))))
-
-(defun yaml-e-node ()
- "Documentation string."
- (yaml--frame "e-node" (yaml-e-scalar)))
-
-(defun yaml-seq-spaces (n c)
- "Documentation string."
- (yaml--frame "seq-spaces"
- (cond ((equal c "block-in") n)
- ((equal c "block-out") (yaml--sub n 1)))))
-
-
-(defun yaml-l-yaml-stream ()
- "Documentation string."
- (yaml--frame "l-yaml-stream"
- (yaml--all (yaml--rep2 0 nil (lambda () (yaml-l-document-prefix)))
- (yaml--rep 0 1 (lambda () (yaml-l-any-document)))
- (yaml--rep2 0 nil (lambda ()
- (yaml--any (yaml--all (yaml--rep 1 nil
(lambda () (yaml-l-document-suffix)))
- (yaml--rep2 0 nil
(lambda () (yaml-l-document-prefix)))
- (yaml--rep 0 1
(lambda () (yaml-l-any-document))))
- (yaml--all (yaml--rep2 0 nil
(lambda () (yaml-l-document-prefix)))
- (yaml--rep 0 1
(lambda () (yaml-l-explicit-document))))))))))
-
-(defun yaml-nb-double-one-line ()
- "Documentation string."
- (yaml--frame "nb-double-one-line"
- (yaml--rep2 0 nil (lambda () (yaml-nb-double-char)))))
-
-(defun yaml-s-l-comments ()
- "Documentation string."
- (yaml--frame "s-l-comments" (yaml--all (yaml--any (yaml-s-b-comment)
- (yaml--start-of-line))
- (yaml--rep2 0 nil (lambda ()
(yaml-l-comment))))))
-
-(defun yaml-nb-char ()
- "Documentation string."
- (yaml--frame "nb-char"
- (yaml--but (lambda () (yaml-c-printable))
- (lambda () (yaml-b-char))
- (lambda () (yaml-c-byte-order-mark)))))
-
-(defun yaml-ns-plain-first (c)
- "Documentation string."
- (yaml--frame "ns-plain-first"
- (yaml--any (yaml--but (lambda () (yaml-ns-char))
- (lambda () (yaml-c-indicator)))
- (yaml--all (yaml--any (yaml--chr ?\?)
- (yaml--chr ?\:)
- (yaml--chr ?\-))
- (yaml--chk "=" (yaml-ns-plain-safe c))))))
-
-(defun yaml-c-ns-esc-char ()
- "Documentation string."
- (yaml--frame "c-ns-esc-char"
- (yaml--all (yaml--chr ?\\)
- (yaml--any (yaml-ns-esc-null)
- (yaml-ns-esc-bell)
- (yaml-ns-esc-backspace)
- (yaml-ns-esc-horizontal-tab)
- (yaml-ns-esc-line-feed)
- (yaml-ns-esc-vertical-tab)
- (yaml-ns-esc-form-feed)
- (yaml-ns-esc-carriage-return)
- (yaml-ns-esc-escape)
- (yaml-ns-esc-space)
- (yaml-ns-esc-double-quote)
- (yaml-ns-esc-slash)
- (yaml-ns-esc-backslash)
- (yaml-ns-esc-next-line)
- (yaml-ns-esc-non-breaking-space)
- (yaml-ns-esc-line-separator)
- (yaml-ns-esc-paragraph-separator)
- (yaml-ns-esc-8-bit)
- (yaml-ns-esc-16-bit)
- (yaml-ns-esc-32-bit)))))
-
-(defun yaml-ns-flow-map-entry (n c)
- "Documentation string."
- (yaml--frame "ns-flow-map-entry"
- (yaml--any (yaml--all (yaml--chr ?\?)
- (yaml-s-separate n c)
- (yaml-ns-flow-map-explicit-entry n c))
- (yaml-ns-flow-map-implicit-entry n c))))
-
-(defun yaml-l-explicit-document ()
- "Documentation string."
- (yaml--frame "l-explicit-document"
- (yaml--all (yaml-c-directives-end)
- (yaml--any (yaml-l-bare-document)
- (yaml--all (yaml-e-node)
- (yaml-s-l-comments))))))
-
-(defun yaml-s-white ()
- "Documentation string."
- (yaml--frame "s-white"
- (yaml--any (yaml-s-space)
- (yaml-s-tab))))
-
-(defun yaml-l-keep-empty (n)
- "Documentation string."
- (yaml--frame "l-keep-empty"
- (yaml--all (yaml--rep2 0 nil (lambda () (yaml-l-empty n "block-in")))
- (yaml--rep 0 1 (lambda () (yaml-l-trail-comments n))))))
-
-(defun yaml-ns-tag-prefix ()
- "Documentation string."
- (yaml--frame "ns-tag-prefix"
- (yaml--any (yaml-c-ns-local-tag-prefix)
- (yaml-ns-global-tag-prefix))))
-
-(defun yaml-c-l+folded (n)
- "Documentation string."
- (yaml--frame "c-l+folded"
- (yaml--all (yaml--chr ?\>) (yaml-c-b-block-header (yaml--state-m)
(yaml--state-t))
- (yaml-l-folded-content (+ n (yaml--state-m)) (yaml--state-t)))))
-
-(defun yaml-ns-directive-name ()
- "Documentation string."
- (yaml--frame "ns-directive-name"
- (yaml--rep 1 nil (lambda () (yaml-ns-char)))))
-
-(defun yaml-b-char ()
- "Documentation string."
- (yaml--frame "b-char"
- (yaml--any (yaml-b-line-feed)
- (yaml-b-carriage-return))))
-
-(defun yaml-ns-plain-multi-line (n c)
- "Documentation string."
- (yaml--frame "ns-plain-multi-line"
- (yaml--all (yaml-ns-plain-one-line c)
- (yaml--rep2 0 nil (lambda () (yaml-s-ns-plain-next-line n
c))))))
-
-(defun yaml-ns-char ()
- "Documentation string."
- (yaml--frame "ns-char"
- (yaml--but (lambda () (yaml-nb-char))
- (lambda () (yaml-s-white)))))
-
-(defun yaml-s-space ()
- "Documentation string."
- (yaml--frame "s-space" (yaml--chr ?\x20)))
-
-(defun yaml-c-l-block-seq-entry (n)
- "Documentation string."
- (yaml--frame "c-l-block-seq-entry"
- (yaml--all (yaml--chr ?\-)
- (yaml--chk "!" (yaml-ns-char))
- (yaml-s-l+block-indented n "block-in"))))
-
-(defun yaml-c-ns-properties (n c)
- "Documentation string."
- (yaml--frame "c-ns-properties"
- (yaml--any (yaml--all (yaml-c-ns-tag-property)
- (yaml--rep 0 1 (lambda () (yaml--all
(yaml-s-separate n c)
-
(yaml-c-ns-anchor-property)))))
- (yaml--all (yaml-c-ns-anchor-property)
- (yaml--rep 0 1 (lambda () (yaml--all
(yaml-s-separate n c)
-
(yaml-c-ns-tag-property))))))))
-
-(defun yaml-ns-directive-parameter ()
- "Documentation string."
- (yaml--frame "ns-directive-parameter"
- (yaml--rep 1 nil (lambda () (yaml-ns-char)))))
-
-(defun yaml-c-chomping-indicator (t)
- "Documentation string."
- (yaml--frame "c-chomping-indicator"
- (yaml--any (yaml--set t (yaml-strip))
- (yaml--set t (yaml-keep))
- (yaml--set t (yaml-clip)))))
-
-(defun yaml-ns-global-tag-prefix ()
- "Documentation string."
- (yaml--frame "ns-global-tag-prefix"
- (yaml--all (yaml-ns-tag-char)
- (yaml--rep2 0 nil (lambda () (yaml-ns-uri-char))))))
-
-(defun yaml-c-ns-flow-pair-json-key-entry (n c)
- "Documentation string."
- (yaml--frame "c-ns-flow-pair-json-key-entry"
- (yaml--all (yaml-c-s-implicit-json-key "flow-key")
- (yaml-c-ns-flow-map-adjacent-value n c))))
-
-(defun yaml-l-literal-content (n t)
- "Documentation string."
- (yaml--frame "l-literal-content"
- (yaml--all (yaml--rep 0 1 (lambda () (yaml--all (yaml-l-nb-literal-text n)
(yaml--rep2 0 nil (lambda () (yaml-b-nb-literal-next n))) (yaml-b-chomped-last
(yaml--state-t)))))
- (yaml-l-chomped-empty n (yaml--state-t)))))
-
-(defun yaml-c-document-end ()
- "Documentation string."
- (yaml--frame "c-document-end"
- (yaml--all (yaml--chr ?\.) (yaml--chr ?\.) (yaml--chr ?\.))))
-
-(defun yaml-nb-double-text (n c)
- "Documentation string."
- (yaml--frame "nb-double-text"
- (cond ((equal c "block-key") (yaml-nb-double-one-line))
- ((equal c "flow-in") (yaml-nb-double-multi-line n))
- ((equal c "flow-key") (yaml-nb-double-one-line))
- ((equal c "flow-out") (yaml-nb-double-multi-line n)))))
-
-(defun yaml-s-b-comment ()
- "Documentation string."
- (yaml--frame "s-b-comment"
- (yaml--all (yaml--rep 0 1 (lambda () (yaml--all (yaml-s-separate-in-line)
- (yaml--rep 0 1 (lambda ()
(yaml-c-nb-comment-text))))))
- (yaml-b-comment))))
-
-(defun yaml-s-block-line-prefix (n)
- "Documentation string."
- (yaml--frame "s-block-line-prefix"
- (yaml-s-indent n)))
-
-(defun yaml-c-tag-handle ()
- "Documentation string."
- (yaml--frame "c-tag-handle"
- (yaml--any (yaml-c-named-tag-handle)
- (yaml-c-secondary-tag-handle)
- (yaml-c-primary-tag-handle))))
-
-(defun yaml-ns-plain-one-line (c)
- "Documentation string."
- (yaml--frame "ns-plain-one-line"
- (yaml--all (yaml-ns-plain-first c)
- (yaml-nb-ns-plain-in-line c))))
-
-(defun yaml-nb-json ()
- "Documentation string."
- (yaml--frame "nb-json"
- (yaml--any (yaml--chr ?\x09) (yaml--chr-range ?\x20 ?\x10FFFF))))
-
-(defun yaml-s-ns-plain-next-line (n c)
- "Documentation string."
- (yaml--frame "s-ns-plain-next-line"
- (yaml--all (yaml-s-flow-folded n)
- (yaml-ns-plain-char c)
- (yaml-nb-ns-plain-in-line c))))
-
-(defun yaml-c-reserved ()
- "Documentation string."
- (yaml--frame "c-reserved"
- (yaml--any (yaml--chr ?\@) (yaml--chr ?\`))))
-
-(defun yaml-b-l-trimmed (n c)
- "Documentation string."
- (yaml--frame "b-l-trimmed"
- (yaml--all (yaml-b-non-content)
- (yaml--rep 1 nil (lambda () (yaml-l-empty n c))))))
-
-(defun yaml-l-document-prefix ()
- "Documentation string."
- (yaml--frame "l-document-prefix"
- (yaml--all (yaml--rep 0 1 (lambda () (yaml-c-byte-order-mark)))
- (yaml--rep2 0 nil (lambda () (yaml-l-comment))))))
-
-(defun yaml-c-byte-order-mark ()
- "Documentation string."
- (yaml--frame "c-byte-order-mark"
- (yaml--chr ?\xFEFF)))
-
-(defun yaml-c-anchor ()
- "Documentation string."
- (yaml--frame "c-anchor"
- (yaml--chr ?\&)))
-
-(defun yaml-s-double-escaped (n)
- "Documentation string."
- (yaml--frame "s-double-escaped"
- (yaml--all (yaml--rep2 0 nil (lambda () (yaml-s-white)))
- (yaml--chr ?\\)
- (yaml-b-non-content)
- (yaml--rep2 0 nil (lambda () (yaml-l-empty n "flow-in")))
- (yaml-s-flow-line-prefix n))))
-
-(defun yaml-ns-esc-32-bit ()
- "Documentation string."
- (yaml--frame "ns-esc-32-bit"
- (yaml--all
- (yaml--chr ?U)
- (yaml--rep 8 8 #'yaml-ns-hex-digit))))
-
-(defun yaml-b-non-content ()
- "Documentation string."
- (yaml--frame "b-non-content" (yaml-b-break)))
-
-(defun yaml-ns-tag-char ()
- "Documentation string."
- (yaml--frame "ns-tag-char"
- (yaml--but (lambda () (yaml-ns-uri-char))
- (lambda () (yaml--chr ?\!))
- (lambda () (yaml-c-flow-indicator)))))
-
-(defun yaml-b-carriage-return ()
- "Documentation string."
- (yaml--frame "b-carriage-return"
- (yaml--chr ?\x0D)))
-
-(defun yaml-s-double-next-line (n)
- "Documentation string."
- (yaml--frame "s-double-next-line"
- (yaml--all (yaml-s-double-break n)
- (yaml--rep 0 1 (lambda () (yaml--all (yaml-ns-double-char)
- (yaml-nb-ns-double-in-line)
- (yaml--any
(yaml-s-double-next-line n)
- (yaml--rep2 0
nil (lambda () (yaml-s-white))))))))))
-
-(defun yaml-ns-esc-non-breaking-space ()
- "Documentation string."
- (yaml--frame "ns-esc-non-breaking-space"
- (yaml--chr ?\_)))
-
-(defun yaml-l-nb-diff-lines (n)
- "Documentation string."
- (yaml--frame "l-nb-diff-lines"
- (yaml--all (yaml-l-nb-same-lines )
- (yaml--rep2 0 nil (lambda () (yaml--all (yaml-b-as-line-feed)
(yaml-l-nb-same-lines n)))))))
-
-(defun yaml-s-flow-folded (n)
- "Documentation string."
- (yaml--frame "s-flow-folded"
- (yaml--all (yaml--rep 0 1 (lambda () (yaml-s-separate-in-line)))
- (yaml-b-l-folded n "flow-in")
- (yaml-s-flow-line-prefix n))))
-
-(defun yaml-ns-flow-map-explicit-entry (n c)
- "Documentation string."
- (yaml--frame "ns-flow-map-explicit-entry"
- (yaml--any (yaml-ns-flow-map-implicit-entry n c)
- (yaml--all (yaml-e-node) (yaml-e-node)))))
-
-(defun yaml-ns-l-block-map-implicit-entry (n)
- "Documentation string."
- (yaml--frame "ns-l-block-map-implicit-entry"
- (yaml--all (yaml--any (yaml-ns-s-block-map-implicit-key)
- (yaml-e-node))
- (yaml-c-l-block-map-implicit-value n))))
-
-(defun yaml-l-nb-folded-lines (n)
- "Documentation string."
- (yaml--frame "l-nb-folded-lines"
- (yaml--all (yaml-s-nb-folded-text n)
- (yaml--rep2 0 nil (lambda () (yaml--all (yaml-b-l-folded n
"block-in")
- (yaml-s-nb-folded-text
n)))))))
-
-(defun yaml-c-l-block-map-explicit-key (n)
- "Documentation string."
- (yaml--frame "c-l-block-map-explicit-key"
- (yaml--all (yaml--chr ?\?)
- (yaml-s-l+block-indented n "block-out"))))
-
-(defun yaml-s-separate (n c)
- "Documentation string."
- (yaml--frame "s-separate"
- (cond ((equal c "block-in") (yaml-s-separate-lines n))
- ((equal c "block-key") (yaml-s-separate-in-line))
- ((equal c "block-out") (yaml-s-separate-lines n))
- ((equal c "flow-in") (yaml-s-separate-lines n))
- ((equal c "flow-key") (yaml-s-separate-in-line))
- ((equal c "flow-out") (yaml-s-separate-lines n)))))
-
-(defun yaml-ns-flow-pair-entry (n c)
- "Documentation string."
- (yaml--frame "ns-flow-pair-entry"
- (yaml--any (yaml-ns-flow-pair-yaml-key-entry n c)
- (yaml-c-ns-flow-map-empty-key-entry n c)
- (yaml-c-ns-flow-pair-json-key-entry n c))))
-
-(defun yaml-c-flow-indicator ()
- "Documentation string."
- (yaml--frame "c-flow-indicator"
- (yaml--any (yaml--chr ?\,)
- (yaml--chr ?\[)
- (yaml--chr ?\])
- (yaml--chr ?\{)
- (yaml--chr ?\}))))
-
-(defun yaml-ns-flow-pair-yaml-key-entry (n c)
- "Documentation string."
- (yaml--frame "ns-flow-pair-yaml-key-entry"
- (yaml--all (yaml-ns-s-implicit-yaml-key "flow-key")
- (yaml-c-ns-flow-map-separate-value n c))))
-
-(defun yaml-e-scalar ()
- "Documentation string."
- (yaml--frame "e-scalar"
- (yaml--empty)))
-
-(defun yaml-s-indent-lt (n)
- "Documentation string."
- (yaml--frame "s-indent-lt"
- (yaml--may (yaml--all (yaml--rep2 0 nil (lambda () (yaml-s-space)))
- (< (length (yaml--match)) n)))))
-
-(defun yaml-nb-single-one-line ()
- "Documentation string."
- (yaml--frame "nb-single-one-line"
- (yaml--rep2 0 nil (lambda () (yaml-nb-single-char)))))
-
-(defun yaml-c-collect-entry ()
- "Documentation string."
- (yaml--frame "c-collect-entry" (yaml--chr ?\,)))
-
-(defun yaml-ns-l-compact-sequence (n)
- "Documentation string."
- (yaml--frame "ns-l-compact-sequence"
- (yaml--all (yaml-c-l-block-seq-entry n)
- (yaml--rep2 0 nil (lambda () (yaml--all (yaml-s-indent n)
-
(yaml-c-l-block-seq-entry n)))))))
-
-(defun yaml-c-comment ()
- "Documentation string."
- (yaml--frame "c-comment" (yaml--chr ?\#)))
-
-(defun yaml-s-line-prefix (n c)
- "Documentation string."
- (yaml--frame "s-line-prefix"
- (cond ((equal c "block-in") (yaml-s-block-line-prefix n))
- ((equal c "block-out") (yaml-s-block-line-prefix n))
- ((equal c "flow-in") (yaml-s-flow-line-prefix n))
- ((equal c "flow-out") (yaml-s-flow-line-prefix n)))))
-
-(defun yaml-s-tab ()
- "Documentation string."
- (yaml--frame "s-tab" (yaml--chr ?\x09)))
-
-(defun yaml-c-directive ()
- "Documentation string."
- (yaml--frame "c-directive" (yaml--chr ?\%)))
-
-(defun yaml-ns-flow-pair (n c)
- "Documentation string."
- (yaml--frame "ns-flow-pair"
- (yaml--any (yaml--all (yaml--chr ?\?)
- (yaml-s-separate n c)
- (yaml-ns-flow-map-explicit-entry n c))
- (yaml-ns-flow-pair-entry n c))))
-
-(defun yaml-s-l+block-indented (n c)
- "Documentation string."
- (yaml--frame "s-l+block-indented"
- (yaml--any (yaml--all (yaml-s-indent (yaml--state-m))
- (yaml--any (yaml-ns-l-compact-sequence (+ n (+ 1
(yaml--state-m))))
- (yaml-ns-l-compact-mapping (+ n (+ 1
(yaml--state-m))))))
- (yaml-s-l+block-node n c)
- (yaml--all (yaml-e-node)
- (yaml-s-l-comments)))))
-
-(defun yaml-c-single-quote ()
- "Documentation string."
- (yaml--frame "c-single-quote"
- (yaml--chr ?\')))
-
-(defun yaml-s-flow-line-prefix (n)
- "Documentation string."
- (yaml--frame "s-flow-line-prefix"
- (yaml--all (yaml-s-indent n)
- (yaml--rep 0 1 (lambda () (yaml-s-separate-in-line))))))
-
-(defun yaml-nb-double-char ()
- "Documentation string."
- (yaml--frame "nb-double-char"
- (yaml--any (yaml-c-ns-esc-char)
- (yaml--but (lambda () (yaml-nb-json))
- (lambda () (yaml--chr ?\\))
- (lambda () (yaml--chr ?\"))))))
-
-(defun yaml-l-comment ()
- "Documentation string."
- (yaml--frame "l-comment"
- (yaml--all (yaml-s-separate-in-line)
- (yaml--rep 0 1 (lambda () (yaml-c-nb-comment-text)))
- (yaml-b-comment))))
-
-(defun yaml-ns-hex-digit ()
- "Documentation string."
- (yaml--frame "ns-hex-digit"
- (yaml--any (yaml-ns-dec-digit)
- (yaml--chr-range ?\x41 ?\x46)
- (yaml--chr-range ?\x61 ?\x66))))
-
-(defun yaml-s-l+flow-in-block (n)
- "Documentation string."
- (yaml--frame "s-l+flow-in-block"
- (yaml--all (yaml-s-separate (+ n 1) "flow-out")
- (yaml-ns-flow-node (+ n 1) "flow-out")
- (yaml-s-l-comments))))
-
-(defun yaml-s-l+flow-in-block (n)
- "Documentation string."
- (yaml--frame "s-l+flow-in-block"
- (yaml--all (yaml-s-separate (+ n 1) "flow-out")
- (yaml-ns-flow-node (+ n 1) "flow-out")
- (yaml-s-l-comments))))
-
-(defun yaml-c-flow-json-node (n c)
- "Documentation string."
- (yaml--frame "c-flow-json-node"
- (yaml--all (yaml--rep 0 1 (lambda () (yaml--all (yaml-c-ns-properties n c)
(yaml-s-separate n c))))
- (yaml-c-flow-json-content n c))))
-
-(defun yaml-c-b-block-header (m t)
- "Documentation string."
- (yaml--frame "c-b-block-header"
- (yaml--all (yaml--any (yaml--all (yaml-c-indentation-indicator
(yaml--state-m))
- (yaml-c-chomping-indicator
(yaml--state-t)))
- (yaml--all (yaml-c-chomping-indicator
(yaml--state-t))
- (yaml-c-indentation-indicator
(yaml--state-m))))
- (yaml-s-b-comment))))
-
-(defun yaml-ns-esc-8-bit ()
- "Documentation string."
- (yaml--frame "ns-esc-8-bit"
- (yaml--all (yaml--chr ?x)
- (yaml--rep 2 2 #'yaml-ns-hex-digit))))
-
-(defun yaml-ns-anchor-name ()
- "Documentation string."
- (yaml--frame "ns-anchor-name"
- (yaml--rep 1 nil (lambda () (yaml-ns-anchor-char)))))
-
-(defun yaml-ns-esc-slash ()
- "Documentation string."
- (yaml--frame "ns-esc-slash" (yaml--chr ?\/)))
-
-(defun yaml-s-nb-folded-text (n)
- "Documentation string."
- (yaml--frame "s-nb-folded-text"
- (yaml--all (yaml-s-indent n)
- (yaml-ns-char)
- (yaml--rep2 0 nil (lambda () (yaml-nb-char))))))
-
-(defun yaml-ns-word-char ()
- "Documentation string."
- (yaml--frame "ns-word-char"
- (yaml--any (yaml-ns-dec-digit)
- (yaml-ns-ascii-letter)
- (yaml--chr ?\-))))
-
-(defun yaml-ns-esc-form-feed ()
- "Documentation string."
- (yaml--frame "ns-esc-form-feed" (yaml--chr ?\f)))
-
-(defun yaml-ns-s-block-map-implicit-key ()
- "Documentation string."
- (yaml--frame "ns-s-block-map-implicit-key"
- (yaml--any (yaml-c-s-implicit-json-key "block-key")
- (yaml-ns-s-implicit-yaml-key "block-key"))))
-
-(defun yaml-ns-esc-null ()
- "Documentation string."
- (yaml--frame "ns-esc-null" (yaml--chr ?0)))
-
-(defun yaml-c-ns-tag-property ()
- "Documentation string."
- (yaml--frame "c-ns-tag-property"
- (yaml--any (yaml-c-verbatim-tag)
- (yaml-c-ns-shorthand-tag)
- (yaml-c-non-specific-tag))))
-
-(defun yaml-c-ns-local-tag-prefix ()
- "Documentation string."
- (yaml--frame "c-ns-local-tag-prefix"
- (yaml--all
- (yaml--chr ?\!)
- (yaml--rep2 0 nil (lambda () (yaml-ns-uri-char))))))
-
-(defun yaml-ns-tag-directive ()
- "Documentation string."
- (yaml--frame "ns-tag-directive"
- (yaml--all (yaml--chr ?T)
- (yaml--chr ?A)
- (yaml--chr ?G)
- (yaml-s-separate-in-line)
- (yaml-c-tag-handle)
- (yaml-s-separate-in-line)
- (yaml-ns-tag-prefix))))
-
-(defun yaml-c-flow-mapping (n c)
- "Documentation string."
- (yaml--frame "c-flow-mapping"
- (yaml--all (yaml--chr ?\{)
- (yaml--rep 0 1 (lambda () (yaml-s-separate n c)))
- (yaml--rep 0 1 (lambda () (yaml-ns-s-flow-map-entries n
(yaml-in-flow c))))
- (yaml--chr ?\}))))
-
-(defun yaml-ns-double-char ()
- "Documentation string."
- (yaml--frame "ns-double-char"
- (yaml--but (lambda () (yaml-nb-double-char))
- (lambda () (yaml-s-white)))))
-
-(defun yaml-ns-ascii-letter ()
- "Documentation string."
- (yaml--frame "ns-ascii-letter"
- (yaml--any (yaml--chr-range ?\x41 ?\x5A)
- (yaml--chr-range ?\x61 ?\x7A))))
-
-(defun yaml-b-break ()
- "Documentation string."
- (yaml--frame "b-break"
- (yaml--any
- (yaml--all (yaml-b-carriage-return)
- (yaml-b-line-feed))
- (yaml-b-carriage-return)
- (yaml-b-line-feed))))
-
-(defun yaml-nb-ns-double-in-line ()
- "Documentation string."
- (yaml--frame "nb-ns-double-in-line"
- (yaml--rep2 0 nil (lambda () (yaml--all (yaml--rep2 0 nil (lambda ()
(yaml-s-white)))
- (yaml-ns-double-char))))))
-
-(defun yaml-s-l+block-node (n c)
- "Documentation string."
- (yaml--frame "s-l+block-node"
- (yaml--any (yaml-s-l+block-in-block n c)
- (yaml-s-l+flow-in-block n))))
-
-(defun yaml-ns-esc-bell ()
- "Documentation string."
- (yaml--frame "ns-esc-bell" (yaml--chr ?a)))
-
-(defun yaml-c-named-tag-handle ()
- "Documentation string."
- (yaml--frame "c-named-tag-handle"
- (yaml--all (yaml--chr ?\!)
- (yaml--rep 1 nil (lambda () (yaml-ns-word-char)))
- (yaml--chr ?\!))))
-
-(defun yaml-s-separate-lines (n)
- "Documentation string."
- (yaml--frame "s-separate-lines"
- (yaml--any (yaml--all (yaml-s-l-comments)
- (yaml-s-flow-line-prefix n))
- (yaml-s-separate-in-line))))
-
-(defun yaml-l-directive ()
- "Documentation string."
- (yaml--frame "l-directive"
- (yaml--all (yaml--chr ?\%)
- (yaml--any (yaml-ns-yaml-directive)
- (yaml-ns-tag-directive)
- (yaml-ns-reserved-directive))
- (yaml-s-l-comments))))
-
-(defun yaml-ns-esc-escape ()
- "Documentation string."
- (yaml--frame "ns-esc-escape"
- (yaml--chr ?e)))
-
-(defun yaml-b-nb-literal-next (n)
- "Documentation string."
- (yaml--frame "b-nb-literal-next"
- (yaml--all (yaml-b-as-line-feed)
- (yaml-l-nb-literal-text n))))
-
-(defun yaml-ns-s-flow-map-entries (n c)
- "Documentation string."
- (yaml--frame "ns-s-flow-map-entries"
- (yaml--all (yaml-ns-flow-map-entry n c)
- (yaml--rep 0 1 (lambda () (yaml-s-separate n c)))
- (yaml--rep 0 1 (lambda () (yaml--all (yaml--chr ?\,)
- (yaml--rep 0 1 (lambda ()
(yaml-s-separate n c)))
- (yaml--rep 0 1 (lambda ()
(yaml-ns-s-flow-map-entries n c)))))))))
-
-(defun yaml-c-nb-comment-text ()
- "Documentation string."
- (yaml--frame "c-nb-comment-text"
- (yaml--all (yaml--chr ?\#)
- (yaml--rep2 0 nil (lambda () (yaml-nb-char))))))
-
-(defun yaml-ns-dec-digit ()
- "Documentation string."
- (yaml--frame "ns-dec-digit"
- (yaml--chr-range ?\x30 ?\x39)))
-
-(defun yaml-ns-yaml-directive ()
- "Documentation string."
- (yaml--frame "ns-yaml-directive"
- (yaml--all (yaml--chr ?Y)
- (yaml--chr ?A)
- (yaml--chr ?M)
- (yaml--chr ?L)
- (yaml-s-separate-in-line)
- (yaml-ns-yaml-version))))
-
-(defun yaml-c-mapping-key ()
- "Documentation string."
- (yaml--frame "c-mapping-key"
- (yaml--chr ?\?)))
-
-(defun yaml-b-as-line-feed ()
- "Documentation string."
- (yaml--frame "b-as-line-feed"
- (yaml-b-break)))
-
-(defun yaml-s-l+block-in-block (n c)
- "Documentation string."
- (yaml--frame "s-l+block-in-block"
- (yaml--any (yaml-s-l+block-scalar n c)
- (yaml-s-l+block-collection n c))))
-
-(defun yaml-ns-esc-paragraph-separator ()
- "Documentation string."
- (yaml--frame "ns-esc-paragraph-separator"
- (yaml--chr ?\P)))
-
-(defun yaml-c-double-quoted (n c)
- "Documentation string."
- (yaml--frame "c-double-quoted"
- (yaml--all (yaml--chr ?\")
- (yaml-nb-double-text n c)
- (yaml--chr ?\"))))
-
-(defun yaml-b-line-feed ()
- "Documentation string."
- (yaml--frame "b-line-feed"
- (yaml--chr ?\x0A)))
-
-(defun yaml-ns-esc-horizontal-tab ()
- "Documentation string."
- (yaml--frame "ns-esc-horizontal-tab"
- (yaml--any (yaml--chr ?t)
- (yaml--chr ?\x09))))
-
-(defun yaml-c-ns-flow-map-empty-key-entry (n c)
- "Documentation string."
- (yaml--frame "c-ns-flow-map-empty-key-entry"
- (yaml--all (yaml-e-node)
- (yaml-c-ns-flow-map-separate-value n c))))
-
-(defun yaml-l-any-document ()
- "Documentation string."
- (yaml--frame "l-any-document"
- (yaml--any (yaml-l-directive-document)
- (yaml-l-explicit-document)
- (yaml-l-bare-document))))
-
-(defun yaml-c-tag ()
- "Documentation string."
- (yaml--frame "c-tag"
- (yaml--chr ?\!)))
-
-(defun yaml-c-escape ()
- "Documentation string."
- (yaml--frame "c-escape"
- (yaml--chr ?\\)))
-
-(defun yaml-c-sequence-end ()
- "Documentation string."
- (yaml--frame "c-sequence-end"
- (yaml--chr ?\])))
-
-(defun yaml-l+block-mapping (n)
- "Documentation string."
- (yaml--frame "l+block-mapping"
- (yaml--all (yaml--set m (yaml--auto-detect-indent n))
- (yaml--rep 1 nil (lambda () (yaml--all (yaml-s-indent (+ n
(yaml--state-m)))
-
(yaml-ns-l-block-map-entry (+ n (yaml--state-m)))))))))
-
-(defun yaml-c-ns-flow-map-adjacent-value (n c)
- "Documentation string."
- (yaml--frame "c-ns-flow-map-adjacent-value"
- (yaml--all (yaml--chr ?\:)
- (yaml--any (yaml--all (yaml--rep 0 1 (lambda ()
(yaml-s-separate n c)))
- (yaml-ns-flow-node n c))
- (yaml-e-node)))))
-
-(defun yaml-s-single-next-line (n)
- "Documentation string."
- (yaml--frame "s-single-next-line"
- (yaml--all (yaml-s-flow-folded n)
- (yaml--rep 0 1 (lambda () (yaml--all (yaml-ns-single-char)
- (yaml-nb-ns-single-in-line)
- (yaml--any
(yaml-s-single-next-line n)
- (yaml--rep2 0
nil (lambda () (yaml-s-white))))))))))
-
-(defun yaml-s-separate-in-line ()
- "Documentation string."
- (yaml--frame "s-separate-in-line"
- (yaml--any (yaml--rep 1 nil (lambda () (yaml-s-white)))
- (yaml--start-of-line))))
-
-(defun yaml-b-comment ()
- "Documentation string."
- (yaml--frame "b-comment"
- (yaml--any (yaml-b-non-content)
- (yaml--end-of-stream))))
-
-(defun yaml-ns-esc-backslash ()
- "Documentation string."
- (yaml--frame "ns-esc-backslash"
- (yaml--chr ?\\)))
-
-(defun yaml-c-ns-anchor-property ()
- "Documentation string."
- (yaml--frame "c-ns-anchor-property"
- (yaml--all (yaml--chr ?\&)
- (yaml-ns-anchor-name))))
-
-(defun yaml-ns-plain-safe (c)
- "Documentation string."
- (yaml--frame "ns-plain-safe"
- (cond ((equal c "block-key") (yaml-ns-plain-safe-out))
- ((equal c "flow-in") (yaml-ns-plain-safe-in))
- ((equal c "flow-key") (yaml-ns-plain-safe-in))
- ((equal c "flow-out") (yaml-ns-plain-safe-out)))))
-
-(defun yaml-ns-flow-content (n c)
- "Documentation string."
- (yaml--frame "ns-flow-content"
- (yaml--any (yaml-ns-flow-yaml-content n c)
- (yaml-c-flow-json-content n c))))
-
-
-(defun yaml-c-ns-flow-map-separate-value (n c)
- "Documentation string."
- (yaml--frame "c-ns-flow-map-separate-value"
- (yaml--all (yaml--chr ?\:)
- (yaml--chk "!" ((yaml-ns-plain-safe) c))
- (yaml--any (yaml--all (yaml-s-separate n c) (yaml-ns-flow-node
n c)) (yaml-e-node)))))
-
-(defun yaml-c-ns-flow-map-separate-value
- (n c)
- "Documentation string."
- (yaml--frame "c-ns-flow-map-separate-value"
- (yaml--all (yaml--chr ?\:)
- (yaml--chk "!" (yaml-ns-plain-safe c))
- (yaml--any (yaml--all (yaml-s-separate n c)
- (yaml-ns-flow-node n c))
- (yaml-e-node)))))
-
-(defun yaml-in-flow (c)
- "Documentation string."
- (yaml--frame "in-flow"
- (cond ((equal c "block-key") "flow-key")
- ((equal c "flow-in") "flow-in")
- ((equal c "flow-key") "flow-key")
- ((equal c "flow-out") "flow-in"))))
-
-(defun yaml-c-verbatim-tag ()
- "Documentation string."
- (yaml--frame "c-verbatim-tag"
- (yaml--all (yaml--chr ?\!)
- (yaml--chr ?\<)
- (yaml--rep 1 nil (lambda () (yaml-ns-uri-char)))
- (yaml--chr ?\>))))
-
-(defun yaml-c-literal ()
- "Documentation string."
- (yaml--frame "c-literal" (yaml--chr ?\|)))
-
-(defun yaml-ns-esc-line-feed ()
- "Documentation string."
- (yaml--frame "ns-esc-line-feed"
- (yaml--chr ?n)))
-
-(defun yaml-nb-double-multi-line (n)
- "Documentation string."
- (yaml--frame "nb-double-multi-line"
- (yaml--all (yaml-nb-ns-double-in-line)
- (yaml--any (yaml-s-double-next-line n)
- (yaml--rep2 0 nil (lambda () (yaml-s-white)))))))
-
-(defun yaml-b-l-spaced (n)
- "Documentation string."
- (yaml--frame "b-l-spaced"
- (yaml--all (yaml-b-as-line-feed)
- (yaml--rep2 0 nil (lambda () (yaml-l-empty n "block-in"))))))
+
+(defun yaml--parse-from-grammar (state &rest args)
+ "Parse YAML grammar for given STATE and ARGS.
+
+Rules for this function are defined by the yaml-spec JSON file."
+
+ (cond
+ ((eq state 'c-flow-sequence)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (yaml--frame "c-flow-sequence"
+ (yaml--all (yaml--chr ?\[)
+ (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
's-separate n c)))
+ (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
'ns-s-flow-seq-entries n
+
(yaml--parse-from-grammar 'in-flow c))))
+ (yaml--chr ?\])))))
+
+ ((eq state 'c-indentation-indicator)
+ (let ((m (nth 0 args)))
+ (yaml--frame "c-indentation-indicator"
+ (yaml--any (yaml--set m (yaml--ord (lambda () (yaml--match))))
+ (yaml--set m (yaml--parse-from-grammar 'auto-detect))))))
+
+ ((eq state 'ns-reserved-directive)
+ (let ()
+ (yaml--frame "ns-reserved-directive"
+ (yaml--all (yaml--parse-from-grammar 'ns-directive-name)
+ (yaml--rep2 0 nil (lambda () (yaml--all
(yaml--parse-from-grammar 's-separate-in-line)
+
(yaml--parse-from-grammar 'ns-directive-parameter))))))))
+
+ ((eq state 'ns-flow-map-implicit-entry)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (yaml--frame "ns-flow-map-implicit-entry"
+ (yaml--any (yaml--parse-from-grammar 'ns-flow-map-yaml-key-entry n c)
+ (yaml--parse-from-grammar 'c-ns-flow-map-empty-key-entry n
c)
+ (yaml--parse-from-grammar 'c-ns-flow-map-json-key-entry n
c)))))
+
+ ((eq state 'ns-esc-double-quote)
+ (let ()
+ (yaml--frame "ns-esc-double-quote"
+ (yaml--chr ?\"))))
+
+ ((eq state 'c-mapping-start)
+ (let ()
+ (yaml--frame "c-mapping-start" (yaml--chr ?\{))))
+
+ ((eq state 'ns-flow-seq-entry)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (yaml--frame "ns-flow-seq-entry"
+ (yaml--any (yaml--parse-from-grammar 'ns-flow-pair n c)
+ (yaml--parse-from-grammar 'ns-flow-node n c)))))
+
+ ((eq state 'l-empty)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (yaml--frame "l-empty"
+ (yaml--all (yaml--any (yaml--parse-from-grammar 's-line-prefix n c)
+ (yaml--parse-from-grammar 's-indent-lt n))
+ (yaml--parse-from-grammar 'b-as-line-feed)))))
+
+ ((eq state 'c-primary-tag-handle)
+ (let ()
+ (yaml--frame "c-primary-tag-handle" (yaml--chr ?\!))))
+
+ ((eq state 'ns-plain-safe-out)
+ (let ()
+ (yaml--frame "ns-plain-safe-out"
+ (yaml--parse-from-grammar 'ns-char))))
+
+ ((eq state 'c-ns-shorthand-tag)
+ (let ()
+ (yaml--frame "c-ns-shorthand-tag"
+ (yaml--all (yaml--parse-from-grammar 'c-tag-handle)
+ (yaml--rep 1 nil (lambda () (yaml--parse-from-grammar
'ns-tag-char)))))))
+
+ ((eq state 'nb-ns-single-in-line)
+ (let ()
+ (yaml--frame "nb-ns-single-in-line"
+ (yaml--rep2 0 nil (lambda () (yaml--all (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 's-white)))
+ (yaml--parse-from-grammar
'ns-single-char)))))))
+
+ ((eq state 'l-strip-empty)
+ (let ((n (nth 0 args)))
+ (yaml--frame "l-strip-empty"
+ (yaml--all (yaml--rep2 0 nil (lambda () (yaml--all
(yaml--parse-from-grammar 's-indent-le n)
+
(yaml--parse-from-grammar 'b-non-content))))
+ (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
'l-trail-comments n)))))))
+
+ ((eq state 'c-indicator)
+ (let ()
+ (yaml--frame "c-indicator"
+ (yaml--any (yaml--chr ?\-)
+ (yaml--chr ?\?)
+ (yaml--chr ?\:)
+ (yaml--chr ?\,)
+ (yaml--chr ?\[)
+ (yaml--chr ?\])
+ (yaml--chr ?\{)
+ (yaml--chr ?\})
+ (yaml--chr ?\#)
+ (yaml--chr ?\&)
+ (yaml--chr ?\*)
+ (yaml--chr ?\!)
+ (yaml--chr ?\|)
+ (yaml--chr ?\>)
+ (yaml--chr ?\')
+ (yaml--chr ?\")
+ (yaml--chr ?\%)
+ (yaml--chr ?\@)
+ (yaml--chr ?\`)))))
+ ((eq state 'c-l+literal)
+ (let ((n (nth 0 args)))
+ (yaml--frame "c-l+literal"
+ (yaml--all (yaml--chr ?\|)
+ (yaml--parse-from-grammar 'c-b-block-header (yaml--state-m)
(yaml--state-t))
+ (yaml--parse-from-grammar 'l-literal-content (+ n
(yaml--state-m)) (yaml--state-t))))))
+
+ ((eq state 'c-single-quoted)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (yaml--frame "c-single-quoted"
+ (yaml--all (yaml--chr ?\')
+ (yaml--parse-from-grammar 'nb-single-text n c)
+ (yaml--chr ?\')))))
+
+ ((eq state 'c-forbidden)
+ (let ()
+ (yaml--frame "c-forbidden"
+ (yaml--all (yaml--start-of-line)
+ (yaml--any (yaml--parse-from-grammar 'c-directives-end)
+ (yaml--parse-from-grammar 'c-document-end))
+ (yaml--any (yaml--parse-from-grammar 'b-char)
(yaml--parse-from-grammar 's-white) (yaml--end-of-stream))))))
+
+ ((eq state 'c-ns-alias-node)
+ (let ()
+ (yaml--frame "c-ns-alias-node"
+ (yaml--all (yaml--chr ?\*)
+ (yaml--parse-from-grammar 'ns-anchor-name)))))
+
+ ((eq state 'c-secondary-tag-handle)
+ (let ()
+ (yaml--frame "c-secondary-tag-handle"
+ (yaml--all (yaml--chr ?\!) (yaml--chr ?\!)))))
+
+ ((eq state 'ns-esc-next-line)
+ (let ()
+ (yaml--frame "ns-esc-next-line" (yaml--chr ?\n))))
+
+ ((eq state 'l-nb-same-lines)
+ (let ((n (nth 0 args)))
+ (yaml--frame "l-nb-same-lines"
+ (yaml--all (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar
'l-empty n "block-in")))
+ (yaml--any (yaml--parse-from-grammar 'l-nb-folded-lines n)
+ (yaml--parse-from-grammar 'l-nb-spaced-lines
n))))))
+
+ ((eq state 'c-alias)
+ (let ()
+ (yaml--frame "c-alias" (yaml--chr ?\*))))
+
+ ((eq state 'ns-single-char)
+ (let ()
+ (yaml--frame "ns-single-char"
+ (yaml--but (lambda () (yaml--parse-from-grammar 'nb-single-char))
+ (lambda () (yaml--parse-from-grammar 's-white))))))
+
+ ((eq state 'c-l-block-map-implicit-value)
+ (let ((n (nth 0 args)))
+ (yaml--frame "c-l-block-map-implicit-value"
+ (yaml--all (yaml--chr ?\:)
+ (yaml--any (yaml--parse-from-grammar 's-l+block-node n
"block-out")
+ (yaml--all (yaml--parse-from-grammar 'e-node)
+ (yaml--parse-from-grammar
's-l-comments)))))))
+
+ ((eq state 'ns-uri-char)
+ (let ()
+ (yaml--frame "ns-uri-char"
+ (yaml--any (yaml--all (yaml--chr ?\%)
+ (yaml--parse-from-grammar 'ns-hex-digit)
+ (yaml--parse-from-grammar 'ns-hex-digit))
+ (yaml--parse-from-grammar 'ns-word-char)
+ (yaml--chr ?\#)
+ (yaml--chr ?\;)
+ (yaml--chr ?\/)
+ (yaml--chr ?\?)
+ (yaml--chr ?\:)
+ (yaml--chr ?\@)
+ (yaml--chr ?\&)
+ (yaml--chr ?\=)
+ (yaml--chr ?\+)
+ (yaml--chr ?\$)
+ (yaml--chr ?\,)
+ (yaml--chr ?\_)
+ (yaml--chr ?\.)
+ (yaml--chr ?\!)
+ (yaml--chr ?\~)
+ (yaml--chr ?\*)
+ (yaml--chr ?\')
+ (yaml--chr ?\()
+ (yaml--chr ?\))
+ (yaml--chr ?\[)
+ (yaml--chr ?\])))))
+
+ ((eq state 'ns-esc-16-bit)
+ (let ()
+ (yaml--frame "ns-esc-16-bit"
+ (yaml--all (yaml--chr ?u)
+ (yaml--rep 4 4 (lambda () (yaml--parse-from-grammar
'ns-hex-digit)))))))
+
+ ((eq state 'l-nb-spaced-lines)
+ (let ((n (nth 0 args)))
+ (yaml--frame "l-nb-spaced-lines"
+ (yaml--all (yaml--parse-from-grammar 's-nb-spaced-text n)
+ (yaml--rep2 0 nil (lambda () (yaml--all
(yaml--parse-from-grammar 'b-l-spaced n)
+
(yaml--parse-from-grammar 's-nb-spaced-text n))))))))
+
+ ((eq state 'ns-plain)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (message "DEBUG: %s %s" n c)
+ (yaml--frame "ns-plain"
+ (cond
+ ((equal c "block-key") (yaml--parse-from-grammar 'ns-plain-one-line
c))
+ ((equal c "flow-in") (yaml--parse-from-grammar 'ns-plain-multi-line n
c))
+ ((equal c "flow-key") (yaml--parse-from-grammar 'ns-plain-one-line c))
+ ((equal c "flow-out") (yaml--parse-from-grammar 'ns-plain-multi-line
n c))))))
+
+ ((eq state 'c-printable)
+ (let ()
+ (yaml--frame "c-printable"
+ (yaml--any (yaml--chr ?\x09)
+ (yaml--chr ?\x0A)
+ (yaml--chr ?\x0D)
+ (yaml--chr-range ?\x20 ?\x7E)
+ (yaml--chr ?\x85)
+ (yaml--chr-range ?\xA0 ?\xD7FF)
+ (yaml--chr-range ?\xE000 ?\xFFFD)
+ (yaml--chr-range ?\x010000 ?\x10FFFF)))))
+
+ ((eq state 'c-mapping-value)
+ (let ()
+ (yaml--frame "c-mapping-value" (yaml--chr ?\:))))
+
+ ((eq state 'l-nb-literal-text)
+ (let ((n (nth 0 args)))
+ (yaml--frame "l-nb-literal-text"
+ (yaml--all (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar
'l-empty n "block-in")))
+ (yaml--parse-from-grammar 's-indent n)
+ (yaml--rep 1 nil (lambda () (yaml--parse-from-grammar
'nb-char)))))))
+
+ ((eq state 'ns-plain-char)
+ (let ((c (nth 0 args)))
+ (yaml--frame "ns-plain-char"
+ (yaml--any (yaml--but (lambda () (yaml--parse-from-grammar
'ns-plain-safe c))
+ (lambda () (yaml--chr ?\:)) (lambda ()
(yaml--chr ?\#)))
+ (yaml--all (yaml--chk "<=" (yaml--parse-from-grammar
'ns-char))
+ (yaml--chr ?\#))
+ (yaml--all (yaml--chr ?\:)
+ (yaml--chk "=" (yaml--parse-from-grammar
'ns-plain-safe c)))))))
+
+ ((eq state 'ns-anchor-char)
+ (let ()
+ (yaml--frame "ns-anchor-char"
+ (yaml--but (lambda () (yaml--parse-from-grammar 'ns-char))
+ (lambda () (yaml--parse-from-grammar 'c-flow-indicator))))))
+
+ ((eq state 's-l+block-scalar) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "s-l+block-scalar" (yaml--all (yaml--parse-from-grammar
's-separate (+ n 1) c) (yaml--rep 0 1 (lambda () (yaml--all
(yaml--parse-from-grammar 'c-ns-properties (+ n 1) c) (yaml--parse-from-grammar
's-separate (+ n 1) c)))) (yaml--any (yaml--parse-from-grammar 'c-l+literal n)
(yaml--parse-from-grammar 'c-l+folded n))))))
+
+ ((eq state 'ns-plain-safe-in)
+ (let ()
+ (yaml--frame "ns-plain-safe-in"
+ (yaml--but (lambda () (yaml--parse-from-grammar 'ns-char))
+ (lambda () (yaml--parse-from-grammar 'c-flow-indicator))))))
+
+ ((eq state 'nb-single-text)
+ (let ((n (nth 0 args)) (c (nth 1 args)))
+ (yaml--frame "nb-single-text"
+ (cond ((equal c "block-key") (yaml--parse-from-grammar
'nb-single-one-line))
+ ((equal c "flow-in") (yaml--parse-from-grammar
'nb-single-multi-line n))
+ ((equal c "flow-key") (yaml--parse-from-grammar
'nb-single-one-line))
+ ((equal c "flow-out") (yaml--parse-from-grammar
'nb-single-multi-line n))))))
+
+ ((eq state 's-indent-le)
+ (let ((n (nth 0 args)))
+ (yaml--frame "s-indent-le"
+ (yaml--may (yaml--all (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 's-space)))
+ (<= (length (yaml--match)) n))))))
+
+ ((eq state 'ns-esc-carriage-return)
+ (let () (yaml--frame "ns-esc-carriage-return" (yaml--chr ?\r))))
+
+ ((eq state 'l-chomped-empty)
+ (let ((n (nth 0 args))
+ (t (nth 1 args)))
+ (yaml--frame "l-chomped-empty"
+ (cond ((equal t "clip") (yaml--parse-from-grammar 'l-strip-empty n))
+ ((equal t "keep") (yaml--parse-from-grammar 'l-keep-empty n))
+ ((equal t "strip") (yaml--parse-from-grammar 'l-strip-empty
n))))))
+
+ ((eq state 'c-s-implicit-json-key)
+ (let ((c (nth 0 args)))
+ (yaml--frame "c-s-implicit-json-key"
+ (yaml--all (yaml--max 1024)
+ (yaml--parse-from-grammar 'c-flow-json-node nil c)
+ (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
's-separate-in-line)))))))
+
+ ((eq state 'b-as-space)
+ (let ()
+ (yaml--frame "b-as-space"
+ (yaml--parse-from-grammar 'b-break))))
+
+ ((eq state 'ns-s-flow-seq-entries)
+ (let ((n (nth 0 args)) (c (nth 1 args)))
+ (yaml--frame "ns-s-flow-seq-entries"
+ (yaml--all (yaml--parse-from-grammar 'ns-flow-seq-entry n c)
+ (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
's-separate n c)))
+ (yaml--rep 0 1 (lambda () (yaml--all (yaml--chr ?\,)
+ (yaml--rep 0 1 (lambda
() (yaml--parse-from-grammar 's-separate n c)))
+ (yaml--rep 0 1 (lambda
() (yaml--parse-from-grammar 'ns-s-flow-seq-entries n c))))))))))
+
+ ((eq state 'l-block-map-explicit-value)
+ (let ((n (nth 0 args)))
+ (yaml--frame "l-block-map-explicit-value"
+ (yaml--all (yaml--parse-from-grammar 's-indent n)
+ (yaml--chr ?\:)
+ (yaml--parse-from-grammar 's-l+block-indented n
"block-out")))))
+
+ ((eq state 'c-ns-flow-map-json-key-entry)
+ (let ((n (nth 0 args)) (c (nth 1 args)))
+ (yaml--frame "c-ns-flow-map-json-key-entry"
+ (yaml--all (yaml--parse-from-grammar 'c-flow-json-node n c)
+ (yaml--any (yaml--all (yaml--rep 0 1 (lambda ()
(yaml--parse-from-grammar 's-separate n c)))
+ (yaml--parse-from-grammar
'c-ns-flow-map-adjacent-value n c))
+ (yaml--parse-from-grammar 'e-node))))))
+
+ ((eq state 'c-sequence-entry) (let () (yaml--frame "c-sequence-entry"
(yaml--chr ?\-))))
+
+ ((eq state 'l-bare-document)
+ (let ()
+ (yaml--frame "l-bare-document"
+ (yaml--all (yaml--exclude "c-forbidden")
+ (yaml--parse-from-grammar 's-l+block-node -1 "block-in")))))
+
+ ((eq state 'b-chomped-last) (let ((t (nth 0 args))) (yaml--frame
"b-chomped-last" (cond ((equal t "clip") (yaml--parse-from-grammar '(any)
(yaml--parse-from-grammar 'b-as-line-feed) (yaml--parse-from-grammar
'<end-of-stream>))) ((equal t "keep") (yaml--parse-from-grammar '(any)
(yaml--parse-from-grammar 'b-as-line-feed) (yaml--parse-from-grammar
'<end-of-stream>))) ((equal t "strip") (yaml--parse-from-grammar '(any)
(yaml--parse-from-grammar 'b-non-content) (yaml--parse-from-grammar ' [...]
+ ((eq state 'l-trail-comments) (let ((n (nth 0 args))) (yaml--frame
"l-trail-comments" (yaml--all (yaml--parse-from-grammar 's-indent-lt n)
(yaml--parse-from-grammar 'c-nb-comment-text) (yaml--parse-from-grammar
'b-comment) (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar
'l-comment)))))))
+ ((eq state 'ns-flow-map-yaml-key-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "ns-flow-map-yaml-key-entry" (yaml--all
(yaml--parse-from-grammar 'ns-flow-yaml-node n c) (yaml--any (yaml--all
(yaml--rep 0 1 (lambda () (yaml--parse-from-grammar 's-separate n c)))
(yaml--parse-from-grammar 'c-ns-flow-map-separate-value n c))
(yaml--parse-from-grammar 'e-node))))))
+ ((eq state 's-indent) (let ((n (nth 0 args))) (yaml--frame "s-indent"
(yaml--rep n n (lambda () (yaml--parse-from-grammar 's-space))))))
+ ((eq state 'ns-esc-line-separator) (let () (yaml--frame
"ns-esc-line-separator" (yaml--chr ?\L))))
+ ((eq state 'ns-flow-yaml-node)
+ (let ((n (nth 0 args)) (c (nth 1 args)))
+ (message "ns-flow-yaml-node: %s %s" n c)
+ (yaml--frame "ns-flow-yaml-node"
+ (yaml--any (yaml--parse-from-grammar 'c-ns-alias-node)
+ (yaml--parse-from-grammar 'ns-flow-yaml-content n c)
+ (yaml--all (yaml--parse-from-grammar 'c-ns-properties n c)
+ (yaml--any (yaml--all (yaml--parse-from-grammar
's-separate n c)
+ (yaml--parse-from-grammar
'ns-flow-yaml-content n c))
+ (yaml--parse-from-grammar
'e-scalar)))))))
+
+ ((eq state 'ns-yaml-version) (let () (yaml--frame "ns-yaml-version"
(yaml--all (yaml--rep 1 nil (lambda () (yaml--parse-from-grammar
'ns-dec-digit))) (yaml--chr ?\.) (yaml--rep 1 nil (lambda ()
(yaml--parse-from-grammar 'ns-dec-digit)))))))
+ ((eq state 'c-folded) (let () (yaml--frame "c-folded" (yaml--chr ?\>))))
+ ((eq state 'c-directives-end) (let () (yaml--frame "c-directives-end"
(yaml--all (yaml--chr ?\-) (yaml--chr ?\-) (yaml--chr ?\-)))))
+ ((eq state 's-double-break) (let ((n (nth 0 args))) (yaml--frame
"s-double-break" (yaml--any (yaml--parse-from-grammar 's-double-escaped n)
(yaml--parse-from-grammar 's-flow-folded n)))))
+ ((eq state 's-nb-spaced-text) (let ((n (nth 0 args))) (yaml--frame
"s-nb-spaced-text" (yaml--all (yaml--parse-from-grammar 's-indent n)
(yaml--parse-from-grammar 's-white) (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 'nb-char)))))))
+ ((eq state 'l-folded-content) (let ((n (nth 0 args)) (t (nth 1 args)))
(yaml--frame "l-folded-content" (yaml--all (yaml--rep 0 1 (lambda () (yaml--all
(yaml--parse-from-grammar 'l-nb-diff-lines n) (yaml--parse-from-grammar
'b-chomped-last (yaml--state-t))))) (yaml--parse-from-grammar 'l-chomped-empty
n (yaml--state-t))))))
+ ((eq state 'nb-ns-plain-in-line) (let ((c (nth 0 args))) (yaml--frame
"nb-ns-plain-in-line" (yaml--rep2 0 nil (lambda () (yaml--all (yaml--rep2 0 nil
(lambda () (yaml--parse-from-grammar 's-white))) (yaml--parse-from-grammar
'ns-plain-char c)))))))
+ ((eq state 'nb-single-multi-line) (let ((n (nth 0 args))) (yaml--frame
"nb-single-multi-line" (yaml--all (yaml--parse-from-grammar
'nb-ns-single-in-line) (yaml--any (yaml--parse-from-grammar 's-single-next-line
n) (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 's-white))))))))
+ ((eq state 'l-document-suffix) (let () (yaml--frame "l-document-suffix"
(yaml--all (yaml--parse-from-grammar 'c-document-end) (yaml--parse-from-grammar
's-l-comments)))))
+ ((eq state 'c-sequence-start) (let () (yaml--frame "c-sequence-start"
(yaml--chr ?\[))))
+ ((eq state 'ns-l-block-map-entry) (let ((n (nth 0 args))) (yaml--frame
"ns-l-block-map-entry" (yaml--any (yaml--parse-from-grammar
'c-l-block-map-explicit-entry n) (yaml--parse-from-grammar
'ns-l-block-map-implicit-entry n)))))
+ ((eq state 'ns-l-compact-mapping) (let ((n (nth 0 args))) (yaml--frame
"ns-l-compact-mapping" (yaml--all (yaml--parse-from-grammar
'ns-l-block-map-entry n) (yaml--rep2 0 nil (lambda () (yaml--all
(yaml--parse-from-grammar 's-indent n) (yaml--parse-from-grammar
'ns-l-block-map-entry n))))))))
+ ((eq state 'ns-esc-space) (let () (yaml--frame "ns-esc-space" (yaml--chr
?\x20))))
+ ((eq state 'ns-esc-vertical-tab) (let () (yaml--frame "ns-esc-vertical-tab"
(yaml--chr ?\v))))
+
+ ((eq state 'ns-s-implicit-yaml-key)
+ (let ((c (nth 0 args)))
+ (yaml--frame "ns-s-implicit-yaml-key"
+ (yaml--all (yaml--max 1024)
+ (yaml--parse-from-grammar 'ns-flow-yaml-node nil c)
+ (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
's-separate-in-line)))))))
+
+ ((eq state 'b-l-folded) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "b-l-folded" (yaml--any (yaml--parse-from-grammar 'b-l-trimmed n
c) (yaml--parse-from-grammar 'b-as-space)))))
+
+ ((eq state 's-l+block-collection)
+ (let ((n (nth 0 args)) (c (nth 1 args)))
+ (yaml--frame "s-l+block-collection"
+ (yaml--all (yaml--rep 0 1 (lambda () (yaml--all
(yaml--parse-from-grammar 's-separate (+ n 1) c) (yaml--parse-from-grammar
'c-ns-properties (+ n 1) c))))
+ (yaml--parse-from-grammar 's-l-comments)
+ (yaml--any (yaml--parse-from-grammar 'l+block-sequence
(yaml--parse-from-grammar 'seq-spaces n c))
+ (yaml--parse-from-grammar 'l+block-mapping
n))))))
+
+ ((eq state 'c-quoted-quote) (let () (yaml--frame "c-quoted-quote"
(yaml--all (yaml--chr ?\') (yaml--chr ?\')))))
+ ((eq state 'l+block-sequence) (let ((n (nth 0 args))) (yaml--frame
"l+block-sequence" (yaml--all (yaml--set m (yaml--auto-detect-indent n))
(yaml--rep 1 nil (lambda () (yaml--all (yaml--parse-from-grammar 's-indent (+ n
(yaml--state-m))) (yaml--parse-from-grammar 'c-l-block-seq-entry (+ n
(yaml--state-m))))))))))
+ ((eq state 'c-double-quote) (let () (yaml--frame "c-double-quote"
(yaml--chr ?\"))))
+ ((eq state 'ns-esc-backspace) (let () (yaml--frame "ns-esc-backspace"
(yaml--chr ?\b))))
+ ((eq state 'c-flow-json-content) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "c-flow-json-content" (yaml--any (yaml--parse-from-grammar
'c-flow-sequence n c) (yaml--parse-from-grammar 'c-flow-mapping n c)
(yaml--parse-from-grammar 'c-single-quoted n c) (yaml--parse-from-grammar
'c-double-quoted n c)))))
+ ((eq state 'c-mapping-end) (let () (yaml--frame "c-mapping-end" (yaml--chr
?\}))))
+ ((eq state 'nb-single-char) (let () (yaml--frame "nb-single-char"
(yaml--any (yaml--parse-from-grammar 'c-quoted-quote) (yaml--but (lambda ()
(yaml--parse-from-grammar 'nb-json)) (lambda () (yaml--chr ?\')))))))
+ ((eq state 'ns-flow-node) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-flow-node" (yaml--any (yaml--parse-from-grammar
'c-ns-alias-node) (yaml--parse-from-grammar 'ns-flow-content n c) (yaml--all
(yaml--parse-from-grammar 'c-ns-properties n c) (yaml--any (yaml--all
(yaml--parse-from-grammar 's-separate n c) (yaml--parse-from-grammar
'ns-flow-content n c)) (yaml--parse-from-grammar 'e-scalar)))))))
+ ((eq state 'c-non-specific-tag) (let () (yaml--frame "c-non-specific-tag"
(yaml--chr ?\!))))
+ ((eq state 'l-directive-document) (let () (yaml--frame
"l-directive-document" (yaml--all (yaml--rep 1 nil (lambda ()
(yaml--parse-from-grammar 'l-directive))) (yaml--parse-from-grammar
'l-explicit-document)))))
+ ((eq state 'c-l-block-map-explicit-entry) (let ((n (nth 0 args)))
(yaml--frame "c-l-block-map-explicit-entry" (yaml--all
(yaml--parse-from-grammar 'c-l-block-map-explicit-key n) (yaml--any
(yaml--parse-from-grammar 'l-block-map-explicit-value n)
(yaml--parse-from-grammar 'e-node))))))
+ ((eq state 'e-node) (let () (yaml--frame "e-node" (yaml--parse-from-grammar
'e-scalar))))
+ ((eq state 'seq-spaces) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "seq-spaces" (cond ((equal c "block-in") n) ((equal c "block-out")
(yaml--sub n 1))))))
+ ((eq state 'l-yaml-stream) (let () (yaml--frame "l-yaml-stream" (yaml--all
(yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 'l-document-prefix)))
(yaml--rep 0 1 (lambda () (yaml--parse-from-grammar 'l-any-document)))
(yaml--rep2 0 nil (lambda () (yaml--any (yaml--all (yaml--rep 1 nil (lambda ()
(yaml--parse-from-grammar 'l-document-suffix))) (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 'l-document-prefix))) (yaml--rep 0 1 (lambda ()
(yaml--parse-from-grammar 'l-any-doc [...]
+ ((eq state 'nb-double-one-line) (let () (yaml--frame "nb-double-one-line"
(yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 'nb-double-char))))))
+ ((eq state 's-l-comments) (let () (yaml--frame "s-l-comments" (yaml--all
(yaml--any (yaml--parse-from-grammar 's-b-comment) (yaml--start-of-line))
(yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 'l-comment)))))))
+ ((eq state 'nb-char) (let () (yaml--frame "nb-char" (yaml--but (lambda ()
(yaml--parse-from-grammar 'c-printable)) (lambda () (yaml--parse-from-grammar
'b-char)) (lambda () (yaml--parse-from-grammar 'c-byte-order-mark))))))
+ ((eq state 'ns-plain-first) (let ((c (nth 0 args))) (yaml--frame
"ns-plain-first" (yaml--any (yaml--but (lambda () (yaml--parse-from-grammar
'ns-char)) (lambda () (yaml--parse-from-grammar 'c-indicator))) (yaml--all
(yaml--any (yaml--chr ?\?) (yaml--chr ?\:) (yaml--chr ?\-)) (yaml--chk "="
(yaml--parse-from-grammar 'ns-plain-safe c)))))))
+ ((eq state 'c-ns-esc-char) (let () (yaml--frame "c-ns-esc-char" (yaml--all
(yaml--chr ?\\) (yaml--any (yaml--parse-from-grammar 'ns-esc-null)
(yaml--parse-from-grammar 'ns-esc-bell) (yaml--parse-from-grammar
'ns-esc-backspace) (yaml--parse-from-grammar 'ns-esc-horizontal-tab)
(yaml--parse-from-grammar 'ns-esc-line-feed) (yaml--parse-from-grammar
'ns-esc-vertical-tab) (yaml--parse-from-grammar 'ns-esc-form-feed)
(yaml--parse-from-grammar 'ns-esc-carriage-return) (yaml--parse-from-gramm [...]
+ ((eq state 'ns-flow-map-entry) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-flow-map-entry" (yaml--any (yaml--all (yaml--chr ?\?)
(yaml--parse-from-grammar 's-separate n c) (yaml--parse-from-grammar
'ns-flow-map-explicit-entry n c)) (yaml--parse-from-grammar
'ns-flow-map-implicit-entry n c)))))
+ ((eq state 'l-explicit-document) (let () (yaml--frame "l-explicit-document"
(yaml--all (yaml--parse-from-grammar 'c-directives-end) (yaml--any
(yaml--parse-from-grammar 'l-bare-document) (yaml--all
(yaml--parse-from-grammar 'e-node) (yaml--parse-from-grammar
's-l-comments)))))))
+ ((eq state 's-white) (let () (yaml--frame "s-white" (yaml--any
(yaml--parse-from-grammar 's-space) (yaml--parse-from-grammar 's-tab)))))
+ ((eq state 'l-keep-empty) (let ((n (nth 0 args))) (yaml--frame
"l-keep-empty" (yaml--all (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 'l-empty n "block-in"))) (yaml--rep 0 1 (lambda ()
(yaml--parse-from-grammar 'l-trail-comments n)))))))
+ ((eq state 'ns-tag-prefix) (let () (yaml--frame "ns-tag-prefix" (yaml--any
(yaml--parse-from-grammar 'c-ns-local-tag-prefix) (yaml--parse-from-grammar
'ns-global-tag-prefix)))))
+ ((eq state 'c-l+folded) (let ((n (nth 0 args))) (yaml--frame "c-l+folded"
(yaml--all (yaml--chr ?\>) (yaml--parse-from-grammar 'c-b-block-header
(yaml--state-m) (yaml--state-t)) (yaml--parse-from-grammar 'l-folded-content (+
n (yaml--state-m)) (yaml--state-t))))))
+ ((eq state 'ns-directive-name) (let () (yaml--frame "ns-directive-name"
(yaml--rep 1 nil (lambda () (yaml--parse-from-grammar 'ns-char))))))
+ ((eq state 'b-char) (let () (yaml--frame "b-char" (yaml--any
(yaml--parse-from-grammar 'b-line-feed) (yaml--parse-from-grammar
'b-carriage-return)))))
+ ((eq state 'ns-plain-multi-line) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-plain-multi-line" (yaml--all (yaml--parse-from-grammar
'ns-plain-one-line c) (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar
's-ns-plain-next-line n c)))))))
+ ((eq state 'ns-char) (let () (yaml--frame "ns-char" (yaml--but (lambda ()
(yaml--parse-from-grammar 'nb-char)) (lambda () (yaml--parse-from-grammar
's-white))))))
+ ((eq state 's-space) (let () (yaml--frame "s-space" (yaml--chr ?\x20))))
+ ((eq state 'c-l-block-seq-entry) (let ((n (nth 0 args))) (yaml--frame
"c-l-block-seq-entry" (yaml--all (yaml--chr ?\-) (yaml--chk "!"
(yaml--parse-from-grammar 'ns-char)) (yaml--parse-from-grammar
's-l+block-indented n "block-in")))))
+ ((eq state 'c-ns-properties) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "c-ns-properties" (yaml--any (yaml--all (yaml--parse-from-grammar
'c-ns-tag-property) (yaml--rep 0 1 (lambda () (yaml--all
(yaml--parse-from-grammar 's-separate n c) (yaml--parse-from-grammar
'c-ns-anchor-property))))) (yaml--all (yaml--parse-from-grammar
'c-ns-anchor-property) (yaml--rep 0 1 (lambda () (yaml--all
(yaml--parse-from-grammar 's-separate n c) (yaml--parse-from-grammar
'c-ns-tag-property)))))))))
+ ((eq state 'ns-directive-parameter) (let () (yaml--frame
"ns-directive-parameter" (yaml--rep 1 nil (lambda () (yaml--parse-from-grammar
'ns-char))))))
+ ((eq state 'c-chomping-indicator) (let ((t (nth 0 args))) (yaml--frame
"c-chomping-indicator" (yaml--any (yaml--set t (yaml--parse-from-grammar
'strip)) (yaml--set t (yaml--parse-from-grammar 'keep)) (yaml--set t
(yaml--parse-from-grammar 'clip))))))
+ ((eq state 'ns-global-tag-prefix) (let () (yaml--frame
"ns-global-tag-prefix" (yaml--all (yaml--parse-from-grammar 'ns-tag-char)
(yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 'ns-uri-char)))))))
+ ((eq state 'c-ns-flow-pair-json-key-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "c-ns-flow-pair-json-key-entry" (yaml--all
(yaml--parse-from-grammar 'c-s-implicit-json-key (yaml--parse-from-grammar
'flow-key)) (yaml--parse-from-grammar 'c-ns-flow-map-adjacent-value n c)))))
+ ((eq state 'l-literal-content) (let ((n (nth 0 args)) (t (nth 1 args)))
(yaml--frame "l-literal-content" (yaml--all (yaml--rep 0 1 (lambda ()
(yaml--all (yaml--parse-from-grammar 'l-nb-literal-text n) (yaml--rep2 0 nil
(lambda () (yaml--parse-from-grammar 'b-nb-literal-next n)))
(yaml--parse-from-grammar 'b-chomped-last (yaml--state-t)))))
(yaml--parse-from-grammar 'l-chomped-empty n (yaml--state-t))))))
+ ((eq state 'c-document-end) (let () (yaml--frame "c-document-end"
(yaml--all (yaml--chr ?\.) (yaml--chr ?\.) (yaml--chr ?\.)))))
+ ((eq state 'nb-double-text) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "nb-double-text" (cond ((equal c "block-key")
(yaml--parse-from-grammar 'nb-double-one-line)) ((equal c "flow-in")
(yaml--parse-from-grammar 'nb-double-multi-line n)) ((equal c "flow-key")
(yaml--parse-from-grammar 'nb-double-one-line)) ((equal c "flow-out")
(yaml--parse-from-grammar 'nb-double-multi-line n))))))
+ ((eq state 's-b-comment) (let () (yaml--frame "s-b-comment" (yaml--all
(yaml--rep 0 1 (lambda () (yaml--all (yaml--parse-from-grammar
's-separate-in-line) (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
'c-nb-comment-text)))))) (yaml--parse-from-grammar 'b-comment)))))
+ ((eq state 's-block-line-prefix) (let ((n (nth 0 args))) (yaml--frame
"s-block-line-prefix" (yaml--parse-from-grammar 's-indent n))))
+ ((eq state 'c-tag-handle) (let () (yaml--frame "c-tag-handle" (yaml--any
(yaml--parse-from-grammar 'c-named-tag-handle) (yaml--parse-from-grammar
'c-secondary-tag-handle) (yaml--parse-from-grammar 'c-primary-tag-handle)))))
+ ((eq state 'ns-plain-one-line)
+ (let ((c (nth 0 args)))
+ (yaml--frame "ns-plain-one-line"
+ (yaml--all (yaml--parse-from-grammar 'ns-plain-first c)
+ (yaml--parse-from-grammar 'nb-ns-plain-in-line c)))))
+
+ ((eq state 'nb-json) (let () (yaml--frame "nb-json" (yaml--any (yaml--chr
?\x09) (yaml--chr-range ?\x20 ?\x10FFFF)))))
+ ((eq state 's-ns-plain-next-line) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "s-ns-plain-next-line" (yaml--all (yaml--parse-from-grammar
's-flow-folded n) (yaml--parse-from-grammar 'ns-plain-char c)
(yaml--parse-from-grammar 'nb-ns-plain-in-line c)))))
+ ((eq state 'c-reserved) (let () (yaml--frame "c-reserved" (yaml--any
(yaml--chr ?\@) (yaml--chr ?\`)))))
+ ((eq state 'b-l-trimmed) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "b-l-trimmed" (yaml--all (yaml--parse-from-grammar 'b-non-content)
(yaml--rep 1 nil (lambda () (yaml--parse-from-grammar 'l-empty n c)))))))
+ ((eq state 'l-document-prefix) (let () (yaml--frame "l-document-prefix"
(yaml--all (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
'c-byte-order-mark))) (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar
'l-comment)))))))
+ ((eq state 'c-byte-order-mark) (let () (yaml--frame "c-byte-order-mark"
(yaml--chr ?\xFEFF))))
+ ((eq state 'c-anchor) (let () (yaml--frame "c-anchor" (yaml--chr ?\&))))
+ ((eq state 's-double-escaped) (let ((n (nth 0 args))) (yaml--frame
"s-double-escaped" (yaml--all (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 's-white))) (yaml--chr ?\\) (yaml--parse-from-grammar
'b-non-content) (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 'l-empty
n "flow-in"))) (yaml--parse-from-grammar 's-flow-line-prefix n)))))
+
+ ((eq state 'ns-esc-32-bit)
+ (let ()
+ (yaml--frame "ns-esc-32-bit"
+ (yaml--all (yaml--chr ?U)
+ (yaml--rep 8 8 (lambda () (yaml--parse-from-grammar
'ns-hex-digit)))))))
+
+ ((eq state 'b-non-content) (let () (yaml--frame "b-non-content"
(yaml--parse-from-grammar 'b-break))))
+ ((eq state 'ns-tag-char) (let () (yaml--frame "ns-tag-char" (yaml--but
(lambda () (yaml--parse-from-grammar 'ns-uri-char)) (lambda () (yaml--chr ?\!))
(lambda () (yaml--parse-from-grammar 'c-flow-indicator))))))
+ ((eq state 'b-carriage-return) (let () (yaml--frame "b-carriage-return"
(yaml--chr ?\x0D))))
+ ((eq state 's-double-next-line) (let ((n (nth 0 args))) (yaml--frame
"s-double-next-line" (yaml--all (yaml--parse-from-grammar 's-double-break n)
(yaml--rep 0 1 (lambda () (yaml--all (yaml--parse-from-grammar 'ns-double-char)
(yaml--parse-from-grammar 'nb-ns-double-in-line) (yaml--any
(yaml--parse-from-grammar 's-double-next-line n) (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 's-white)))))))))))
+ ((eq state 'ns-esc-non-breaking-space) (let () (yaml--frame
"ns-esc-non-breaking-space" (yaml--chr ?\_))))
+ ((eq state 'l-nb-diff-lines) (let ((n (nth 0 args))) (yaml--frame
"l-nb-diff-lines" (yaml--all (yaml--parse-from-grammar 'l-nb-same-lines n)
(yaml--rep2 0 nil (lambda () (yaml--all (yaml--parse-from-grammar
'b-as-line-feed) (yaml--parse-from-grammar 'l-nb-same-lines n))))))))
+ ((eq state 's-flow-folded) (let ((n (nth 0 args))) (yaml--frame
"s-flow-folded" (yaml--all (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
's-separate-in-line))) (yaml--parse-from-grammar 'b-l-folded n "flow-in")
(yaml--parse-from-grammar 's-flow-line-prefix n)))))
+ ((eq state 'ns-flow-map-explicit-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "ns-flow-map-explicit-entry" (yaml--any
(yaml--parse-from-grammar 'ns-flow-map-implicit-entry n c) (yaml--all
(yaml--parse-from-grammar 'e-node) (yaml--parse-from-grammar 'e-node))))))
+ ((eq state 'ns-l-block-map-implicit-entry) (let ((n (nth 0 args)))
(yaml--frame "ns-l-block-map-implicit-entry" (yaml--all (yaml--any
(yaml--parse-from-grammar 'ns-s-block-map-implicit-key)
(yaml--parse-from-grammar 'e-node)) (yaml--parse-from-grammar
'c-l-block-map-implicit-value n)))))
+ ((eq state 'l-nb-folded-lines) (let ((n (nth 0 args))) (yaml--frame
"l-nb-folded-lines" (yaml--all (yaml--parse-from-grammar 's-nb-folded-text n)
(yaml--rep2 0 nil (lambda () (yaml--all (yaml--parse-from-grammar 'b-l-folded n
"block-in") (yaml--parse-from-grammar 's-nb-folded-text n))))))))
+ ((eq state 'c-l-block-map-explicit-key) (let ((n (nth 0 args)))
(yaml--frame "c-l-block-map-explicit-key" (yaml--all (yaml--chr ?\?)
(yaml--parse-from-grammar 's-l+block-indented n "block-out")))))
+
+ ((eq state 's-separate)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (yaml--frame "s-separate"
+ (cond ((equal c "block-in") (yaml--parse-from-grammar
's-separate-lines n))
+ ((equal c "block-key") (yaml--parse-from-grammar
's-separate-in-line))
+ ((equal c "block-out") (yaml--parse-from-grammar
's-separate-lines n))
+ ((equal c "flow-in") (yaml--parse-from-grammar 's-separate-lines
n))
+ ((equal c "flow-key") (yaml--parse-from-grammar
's-separate-in-line))
+ ((equal c "flow-out") (yaml--parse-from-grammar
's-separate-lines n))))))
+
+ ((eq state 'ns-flow-pair-entry) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-flow-pair-entry" (yaml--any (yaml--parse-from-grammar
'ns-flow-pair-yaml-key-entry n c) (yaml--parse-from-grammar
'c-ns-flow-map-empty-key-entry n c) (yaml--parse-from-grammar
'c-ns-flow-pair-json-key-entry n c)))))
+ ((eq state 'c-flow-indicator) (let () (yaml--frame "c-flow-indicator"
(yaml--any (yaml--chr ?\,) (yaml--chr ?\[) (yaml--chr ?\]) (yaml--chr ?\{)
(yaml--chr ?\})))))
+ ((eq state 'ns-flow-pair-yaml-key-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "ns-flow-pair-yaml-key-entry" (yaml--all
(yaml--parse-from-grammar 'ns-s-implicit-yaml-key (yaml--parse-from-grammar
'flow-key)) (yaml--parse-from-grammar 'c-ns-flow-map-separate-value n c)))))
+ ((eq state 'e-scalar) (let () (yaml--frame "e-scalar" (yaml--empty))))
+ ((eq state 's-indent-lt) (let ((n (nth 0 args))) (yaml--frame "s-indent-lt"
(yaml--may (yaml--all (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar
's-space))) (< (length (yaml--match)) n))))))
+ ((eq state 'nb-single-one-line) (let () (yaml--frame "nb-single-one-line"
(yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 'nb-single-char))))))
+ ((eq state 'c-collect-entry) (let () (yaml--frame "c-collect-entry"
(yaml--chr ?\,))))
+ ((eq state 'ns-l-compact-sequence) (let ((n (nth 0 args))) (yaml--frame
"ns-l-compact-sequence" (yaml--all (yaml--parse-from-grammar
'c-l-block-seq-entry n) (yaml--rep2 0 nil (lambda () (yaml--all
(yaml--parse-from-grammar 's-indent n) (yaml--parse-from-grammar
'c-l-block-seq-entry n))))))))
+ ((eq state 'c-comment) (let () (yaml--frame "c-comment" (yaml--chr ?\#))))
+ ((eq state 's-line-prefix) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "s-line-prefix" (cond ((equal c "block-in")
(yaml--parse-from-grammar 's-block-line-prefix n)) ((equal c "block-out")
(yaml--parse-from-grammar 's-block-line-prefix n)) ((equal c "flow-in")
(yaml--parse-from-grammar 's-flow-line-prefix n)) ((equal c "flow-out")
(yaml--parse-from-grammar 's-flow-line-prefix n))))))
+ ((eq state 's-tab) (let () (yaml--frame "s-tab" (yaml--chr ?\x09))))
+ ((eq state 'c-directive) (let () (yaml--frame "c-directive" (yaml--chr
?\%))))
+ ((eq state 'ns-flow-pair) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-flow-pair" (yaml--any (yaml--all (yaml--chr ?\?)
(yaml--parse-from-grammar 's-separate n c) (yaml--parse-from-grammar
'ns-flow-map-explicit-entry n c)) (yaml--parse-from-grammar 'ns-flow-pair-entry
n c)))))
+
+ ((eq state 's-l+block-indented) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "s-l+block-indented" (yaml--any (yaml--all
(yaml--parse-from-grammar 's-indent (yaml--state-m)) (yaml--any
(yaml--parse-from-grammar 'ns-l-compact-sequence (+ n (+ 1 (yaml--state-m))))
(yaml--parse-from-grammar 'ns-l-compact-mapping (+ n (+ 1 (yaml--state-m))))))
(yaml--parse-from-grammar 's-l+block-node n c) (yaml--all
(yaml--parse-from-grammar 'e-node) (yaml--parse-from-grammar 's-l-comments))))))
+
+ ((eq state 'c-single-quote) (let () (yaml--frame "c-single-quote"
(yaml--chr ?\'))))
+ ((eq state 's-flow-line-prefix) (let ((n (nth 0 args))) (yaml--frame
"s-flow-line-prefix" (yaml--all (yaml--parse-from-grammar 's-indent n)
(yaml--rep 0 1 (lambda () (yaml--parse-from-grammar 's-separate-in-line)))))))
+ ((eq state 'nb-double-char) (let () (yaml--frame "nb-double-char"
(yaml--any (yaml--parse-from-grammar 'c-ns-esc-char) (yaml--but (lambda ()
(yaml--parse-from-grammar 'nb-json)) (lambda () (yaml--chr ?\\)) (lambda ()
(yaml--chr ?\")))))))
+ ((eq state 'l-comment) (let () (yaml--frame "l-comment" (yaml--all
(yaml--parse-from-grammar 's-separate-in-line) (yaml--rep 0 1 (lambda ()
(yaml--parse-from-grammar 'c-nb-comment-text))) (yaml--parse-from-grammar
'b-comment)))))
+ ((eq state 'ns-hex-digit) (let () (yaml--frame "ns-hex-digit" (yaml--any
(yaml--parse-from-grammar 'ns-dec-digit) (yaml--chr-range ?\x41 ?\x46)
(yaml--chr-range ?\x61 ?\x66)))))
+
+ ((eq state 's-l+flow-in-block) (let ((n (nth 0 args))) (yaml--frame
"s-l+flow-in-block" (yaml--all (yaml--parse-from-grammar 's-separate (+ n 1)
"flow-out") (yaml--parse-from-grammar 'ns-flow-node (+ n 1) "flow-out")
(yaml--parse-from-grammar 's-l-comments)))))
+
+ ((eq state 'c-flow-json-node) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "c-flow-json-node" (yaml--all (yaml--rep 0 1 (lambda () (yaml--all
(yaml--parse-from-grammar 'c-ns-properties n c) (yaml--parse-from-grammar
's-separate n c)))) (yaml--parse-from-grammar 'c-flow-json-content n c)))))
+ ((eq state 'c-b-block-header) (let ((m (nth 0 args)) (t (nth 1 args)))
(yaml--frame "c-b-block-header" (yaml--all (yaml--any (yaml--all
(yaml--parse-from-grammar 'c-indentation-indicator (yaml--state-m))
(yaml--parse-from-grammar 'c-chomping-indicator (yaml--state-t))) (yaml--all
(yaml--parse-from-grammar 'c-chomping-indicator (yaml--state-t))
(yaml--parse-from-grammar 'c-indentation-indicator (yaml--state-m))))
(yaml--parse-from-grammar 's-b-comment)))))
+ ((eq state 'ns-esc-8-bit) (let () (yaml--frame "ns-esc-8-bit" (yaml--all
(yaml--chr ?\x) (yaml--rep 2 2 (lambda () (yaml--parse-from-grammar
'ns-hex-digit)))))))
+ ((eq state 'ns-anchor-name) (let () (yaml--frame "ns-anchor-name"
(yaml--rep 1 nil (lambda () (yaml--parse-from-grammar 'ns-anchor-char))))))
+ ((eq state 'ns-esc-slash) (let () (yaml--frame "ns-esc-slash" (yaml--chr
?\/))))
+ ((eq state 's-nb-folded-text) (let ((n (nth 0 args))) (yaml--frame
"s-nb-folded-text" (yaml--all (yaml--parse-from-grammar 's-indent n)
(yaml--parse-from-grammar 'ns-char) (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 'nb-char)))))))
+ ((eq state 'ns-word-char) (let () (yaml--frame "ns-word-char" (yaml--any
(yaml--parse-from-grammar 'ns-dec-digit) (yaml--parse-from-grammar
'ns-ascii-letter) (yaml--chr ?\-)))))
+ ((eq state 'ns-esc-form-feed) (let () (yaml--frame "ns-esc-form-feed"
(yaml--chr ?\f))))
+ ((eq state 'ns-s-block-map-implicit-key)
+ (let () (yaml--frame "ns-s-block-map-implicit-key"
+ (yaml--any (yaml--parse-from-grammar 'c-s-implicit-json-key
"block-key")
+ (yaml--parse-from-grammar 'ns-s-implicit-yaml-key
"block-key")))))
+
+ ((eq state 'ns-esc-null) (let () (yaml--frame "ns-esc-null" (yaml--chr
?\0))))
+ ((eq state 'c-ns-tag-property) (let () (yaml--frame "c-ns-tag-property"
(yaml--any (yaml--parse-from-grammar 'c-verbatim-tag) (yaml--parse-from-grammar
'c-ns-shorthand-tag) (yaml--parse-from-grammar 'c-non-specific-tag)))))
+ ((eq state 'c-ns-local-tag-prefix) (let () (yaml--frame
"c-ns-local-tag-prefix" (yaml--all (yaml--chr ?\!) (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 'ns-uri-char)))))))
+
+ ((eq state 'ns-tag-directive)
+ (let ()
+ (yaml--frame "ns-tag-directive"
+ (yaml--all (yaml--chr ?T) (yaml--chr ?A) (yaml--chr ?G)
+ (yaml--parse-from-grammar 's-separate-in-line)
(yaml--parse-from-grammar 'c-tag-handle) (yaml--parse-from-grammar
's-separate-in-line) (yaml--parse-from-grammar 'ns-tag-prefix)))))
+
+ ((eq state 'c-flow-mapping) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "c-flow-mapping" (yaml--all (yaml--chr ?\{) (yaml--rep 0 1 (lambda
() (yaml--parse-from-grammar 's-separate n c))) (yaml--rep 0 1 (lambda ()
(yaml--parse-from-grammar 'ns-s-flow-map-entries n (yaml--parse-from-grammar
'in-flow c)))) (yaml--chr ?\})))))
+ ((eq state 'ns-double-char) (let () (yaml--frame "ns-double-char"
(yaml--but (lambda () (yaml--parse-from-grammar 'nb-double-char)) (lambda ()
(yaml--parse-from-grammar 's-white))))))
+ ((eq state 'ns-ascii-letter) (let () (yaml--frame "ns-ascii-letter"
(yaml--any (yaml--chr-range ?\x41 ?\x5A) (yaml--chr-range ?\x61 ?\x7A)))))
+ ((eq state 'b-break) (let () (yaml--frame "b-break" (yaml--any (yaml--all
(yaml--parse-from-grammar 'b-carriage-return) (yaml--parse-from-grammar
'b-line-feed)) (yaml--parse-from-grammar 'b-carriage-return)
(yaml--parse-from-grammar 'b-line-feed)))))
+ ((eq state 'nb-ns-double-in-line) (let () (yaml--frame
"nb-ns-double-in-line" (yaml--rep2 0 nil (lambda () (yaml--all (yaml--rep2 0
nil (lambda () (yaml--parse-from-grammar 's-white))) (yaml--parse-from-grammar
'ns-double-char)))))))
+
+ ((eq state 's-l+block-node)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (yaml--frame "s-l+block-node"
+ (yaml--any (yaml--parse-from-grammar 's-l+block-in-block n c)
+ (yaml--parse-from-grammar 's-l+flow-in-block n)))))
+
+ ((eq state 'ns-esc-bell) (let () (yaml--frame "ns-esc-bell" (yaml--chr
?\a))))
+ ((eq state 'c-named-tag-handle) (let () (yaml--frame "c-named-tag-handle"
(yaml--all (yaml--chr ?\!) (yaml--rep 1 nil (lambda ()
(yaml--parse-from-grammar 'ns-word-char))) (yaml--chr ?\!)))))
+ ((eq state 's-separate-lines) (let ((n (nth 0 args))) (yaml--frame
"s-separate-lines" (yaml--any (yaml--all (yaml--parse-from-grammar
's-l-comments) (yaml--parse-from-grammar 's-flow-line-prefix n))
(yaml--parse-from-grammar 's-separate-in-line)))))
+ ((eq state 'l-directive) (let () (yaml--frame "l-directive" (yaml--all
(yaml--chr ?\%) (yaml--any (yaml--parse-from-grammar 'ns-yaml-directive)
(yaml--parse-from-grammar 'ns-tag-directive) (yaml--parse-from-grammar
'ns-reserved-directive)) (yaml--parse-from-grammar 's-l-comments)))))
+ ((eq state 'ns-esc-escape) (let () (yaml--frame "ns-esc-escape" (yaml--chr
?\e))))
+ ((eq state 'b-nb-literal-next) (let ((n (nth 0 args))) (yaml--frame
"b-nb-literal-next" (yaml--all (yaml--parse-from-grammar 'b-as-line-feed)
(yaml--parse-from-grammar 'l-nb-literal-text n)))))
+ ((eq state 'ns-s-flow-map-entries) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-s-flow-map-entries" (yaml--all (yaml--parse-from-grammar
'ns-flow-map-entry n c) (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
's-separate n c))) (yaml--rep 0 1 (lambda () (yaml--all (yaml--chr ?\,)
(yaml--rep 0 1 (lambda () (yaml--parse-from-grammar 's-separate n c)))
(yaml--rep 0 1 (lambda () (yaml--parse-from-grammar 'ns-s-flow-map-entries n
c))))))))))
+ ((eq state 'c-nb-comment-text) (let () (yaml--frame "c-nb-comment-text"
(yaml--all (yaml--chr ?\#) (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 'nb-char)))))))
+ ((eq state 'ns-dec-digit) (let () (yaml--frame "ns-dec-digit"
(yaml--chr-range ?\x30 ?\x39))))
+
+ ((eq state 'ns-yaml-directive)
+ (let ()
+ (yaml--frame "ns-yaml-directive"
+ (yaml--all (yaml--chr ?Y) (yaml--chr ?A) (yaml--chr ?M) (yaml--chr ?L)
+ (yaml--parse-from-grammar 's-separate-in-line)
+ (yaml--parse-from-grammar 'ns-yaml-version)))))
+
+ ((eq state 'c-mapping-key) (let () (yaml--frame "c-mapping-key" (yaml--chr
?\?))))
+ ((eq state 'b-as-line-feed) (let () (yaml--frame "b-as-line-feed"
(yaml--parse-from-grammar 'b-break))))
+
+ ((eq state 's-l+block-in-block)
+ (let ((n (nth 0 args))
+ (c (nth 1 args)))
+ (yaml--frame "s-l+block-in-block"
+ (yaml--any (yaml--parse-from-grammar 's-l+block-scalar n c)
+ (yaml--parse-from-grammar 's-l+block-collection n c)))))
+
+ ((eq state 'ns-esc-paragraph-separator) (let () (yaml--frame
"ns-esc-paragraph-separator" (yaml--chr ?\P))))
+ ((eq state 'c-double-quoted) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "c-double-quoted" (yaml--all (yaml--chr ?\")
(yaml--parse-from-grammar 'nb-double-text n c) (yaml--chr ?\")))))
+ ((eq state 'b-line-feed) (let () (yaml--frame "b-line-feed" (yaml--chr
?\x0A))))
+ ((eq state 'ns-esc-horizontal-tab) (let () (yaml--frame
"ns-esc-horizontal-tab" (yaml--any (yaml--chr ?\t) (yaml--chr ?\x09)))))
+ ((eq state 'c-ns-flow-map-empty-key-entry) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "c-ns-flow-map-empty-key-entry" (yaml--all
(yaml--parse-from-grammar 'e-node) (yaml--parse-from-grammar
'c-ns-flow-map-separate-value n c)))))
+ ((eq state 'l-any-document) (let () (yaml--frame "l-any-document"
(yaml--any (yaml--parse-from-grammar 'l-directive-document)
(yaml--parse-from-grammar 'l-explicit-document) (yaml--parse-from-grammar
'l-bare-document)))))
+ ((eq state 'c-tag) (let () (yaml--frame "c-tag" (yaml--chr ?\!))))
+ ((eq state 'c-escape) (let () (yaml--frame "c-escape" (yaml--chr ?\\))))
+ ((eq state 'c-sequence-end) (let () (yaml--frame "c-sequence-end"
(yaml--chr ?\]))))
+ ((eq state 'l+block-mapping) (let ((n (nth 0 args))) (yaml--frame
"l+block-mapping" (yaml--all (yaml--set m (yaml--auto-detect-indent n))
(yaml--rep 1 nil (lambda () (yaml--all (yaml--parse-from-grammar 's-indent (+ n
(yaml--state-m))) (yaml--parse-from-grammar 'ns-l-block-map-entry (+ n
(yaml--state-m))))))))))
+ ((eq state 'c-ns-flow-map-adjacent-value) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "c-ns-flow-map-adjacent-value" (yaml--all (yaml--chr ?\:)
(yaml--any (yaml--all (yaml--rep 0 1 (lambda () (yaml--parse-from-grammar
's-separate n c))) (yaml--parse-from-grammar 'ns-flow-node n c))
(yaml--parse-from-grammar 'e-node))))))
+ ((eq state 's-single-next-line) (let ((n (nth 0 args))) (yaml--frame
"s-single-next-line" (yaml--all (yaml--parse-from-grammar 's-flow-folded n)
(yaml--rep 0 1 (lambda () (yaml--all (yaml--parse-from-grammar 'ns-single-char)
(yaml--parse-from-grammar 'nb-ns-single-in-line) (yaml--any
(yaml--parse-from-grammar 's-single-next-line n) (yaml--rep2 0 nil (lambda ()
(yaml--parse-from-grammar 's-white)))))))))))
+ ((eq state 's-separate-in-line) (let () (yaml--frame "s-separate-in-line"
(yaml--any (yaml--rep 1 nil (lambda () (yaml--parse-from-grammar 's-white)))
(yaml--start-of-line)))))
+ ((eq state 'b-comment) (let () (yaml--frame "b-comment" (yaml--any
(yaml--parse-from-grammar 'b-non-content) (yaml--end-of-stream)))))
+ ((eq state 'ns-esc-backslash) (let () (yaml--frame "ns-esc-backslash"
(yaml--chr ?\\))))
+ ((eq state 'c-ns-anchor-property) (let () (yaml--frame
"c-ns-anchor-property" (yaml--all (yaml--chr ?\&) (yaml--parse-from-grammar
'ns-anchor-name)))))
+ ((eq state 'ns-plain-safe) (let ((c (nth 0 args))) (yaml--frame
"ns-plain-safe" (cond ((equal c "block-key") (yaml--parse-from-grammar
'ns-plain-safe-out)) ((equal c "flow-in") (yaml--parse-from-grammar
'ns-plain-safe-in)) ((equal c "flow-key") (yaml--parse-from-grammar
'ns-plain-safe-in)) ((equal c "flow-out") (yaml--parse-from-grammar
'ns-plain-safe-out))))))
+ ((eq state 'ns-flow-content) (let ((n (nth 0 args)) (c (nth 1 args)))
(yaml--frame "ns-flow-content" (yaml--any (yaml--parse-from-grammar
'ns-flow-yaml-content n c) (yaml--parse-from-grammar 'c-flow-json-content n
c)))))
+ ((eq state 'c-ns-flow-map-separate-value) (let ((n (nth 0 args)) (c (nth 1
args))) (yaml--frame "c-ns-flow-map-separate-value" (yaml--all (yaml--chr ?\:)
(yaml--chk "!" (yaml--parse-from-grammar 'ns-plain-safe c)) (yaml--any
(yaml--all (yaml--parse-from-grammar 's-separate n c) (yaml--parse-from-grammar
'ns-flow-node n c)) (yaml--parse-from-grammar 'e-node))))))
+ ((eq state 'in-flow) (let ((c (nth 0 args))) (yaml--frame "in-flow" (cond
((equal c "block-key") (yaml--parse-from-grammar 'flow-key)) ((equal c
"flow-in") "flow-in") ((equal c "flow-key") (yaml--parse-from-grammar
'flow-key)) ((equal c "flow-out") "flow-in")))))
+ ((eq state 'c-verbatim-tag) (let () (yaml--frame "c-verbatim-tag"
(yaml--all (yaml--chr ?\!) (yaml--chr ?\<) (yaml--rep 1 nil (lambda ()
(yaml--parse-from-grammar 'ns-uri-char))) (yaml--chr ?\>)))))
+ ((eq state 'c-literal) (let () (yaml--frame "c-literal" (yaml--chr ?\|))))
+ ((eq state 'ns-esc-line-feed) (let () (yaml--frame "ns-esc-line-feed"
(yaml--chr ?\n))))
+ ((eq state 'nb-double-multi-line) (let ((n (nth 0 args))) (yaml--frame
"nb-double-multi-line" (yaml--all (yaml--parse-from-grammar
'nb-ns-double-in-line) (yaml--any (yaml--parse-from-grammar 's-double-next-line
n) (yaml--rep2 0 nil (lambda () (yaml--parse-from-grammar 's-white))))))))
+ ((eq state 'b-l-spaced) (let ((n (nth 0 args))) (yaml--frame "b-l-spaced"
(yaml--all (yaml--parse-from-grammar 'b-as-line-feed) (yaml--rep2 0 nil (lambda
() (yaml--parse-from-grammar 'l-empty n "block-in")))))))
+ ((eq state 'ns-flow-yaml-content)
+ (let ((n (nth 0 args)) (c (nth 1 args)))
+ (yaml--frame "ns-flow-yaml-content"
+ (yaml--parse-from-grammar 'ns-plain n c))))
+ (t (error "Unknown parsing grammar state: %s %s" state args))))
(provide 'yaml)
- [elpa] externals/yaml 04aae95584 043/124: Fix/add pcase usages, (continued)
- [elpa] externals/yaml 04aae95584 043/124: Fix/add pcase usages, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 67d4b64d15 022/124: Bug fixes, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 95283d460f 034/124: Add emacs 25.1 CI test, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 67e8b5f3dc 096/124: Fix off-by-one bug for storing position, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml a47f5a8274 054/124: indent buffer, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 164cd43d6e 087/124: Merge pull request #34 from zkry/fix-bad-anchor-map->list-conversion, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml e711e774b1 074/124: Allow parsing false and/or null as nil, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 50a3a00cb8 061/124: FIX insert symbol name when not equal to :null or :false, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml ee9001e091 063/124: Fix the escape character in parser (after /), ELPA Syncer, 2024/11/29
- [elpa] externals/yaml ee86566af1 114/124: Merge pull request #47 from tarsiiformes/typos, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml a15b045399 010/124: Condense grammar functions to one,
ELPA Syncer <=
- [elpa] externals/yaml 0bb76de608 009/124: Add YAML scalar conversion and type conversion, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 840be1b2b2 012/124: | blocks parse, initial wip, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 64c117d084 052/124: Fix encoding issues for nil, false, and arrays, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 67d86e158e 033/124: Add code documentation; remove unused code, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 091521769e 019/124: Add readme file, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 8a3303b59e 015/124: Fix indentation bug, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 9ebddb5523 047/124: Merge pull request #5 from zkry/improve-parsing-error-message, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 0db4ab0a1e 046/124: Improve parsing error message, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml e2fe7e2e57 042/124: Merge pull request #3 from zkry/add-yaml-spec-json, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 6d52649383 076/124: Fix list encoding indentation #29, ELPA Syncer, 2024/11/29