[up] [log] [?]
[first]  [entry] [exit]  [last]

(meg/match ~{:close-tag (drop (* "</" (cmt (* (backref :tag-name) (capture :w+)) "<function =>") ">")) :main (* :tagged -1) :open-tag (* (constant :tag) "<" (capture :w+ :tag-name) ">") :tagged (unref (replace (* :open-tag :value :close-tag) "<cfunction struct>")) :untagged (capture (some (if-not "<" 1))) :value (* (constant :value) (group (any (+ :tagged :untagged))))}
           "<p><em>Hello</em> <strong>world</strong>!</p>")

captures and tags
captures: @[:tag "p" :value {:tag "em" :value @["Hello"]} " " :tag "strong" :value @["world"] "strong"]
tagged-captures:
  tags: @[nil :tag-name nil nil nil :tag-name nil nil nil :tag-name]
  values: @[:tag "p" :value " " :tag "strong" :value "world" @["world"] "strong"]

current frame
status: entered frame 218
peg: :w
text: <p><em>Hello</em> <strong>world</strong>!</p>
index: 33

frames call stack
218 :w
217 (some :w)
216 :w+
215 (capture :w+)
213 (* (backref :tag-name) (capture :w+))
212 (cmt (* (backref :tag-name) (capture :w+)) "<function =>")
210 (* "</" (cmt (* (backref :tag-name) (capture :w+)) "<function =>") ">")
209 (drop (* "</" (cmt (* (backref :tag-name) (capture :w+)) "<function =>") ">"))
208 :close-tag
132 (* :open-tag :value :close-tag)
131 (replace (* :open-tag :value :close-tag) "<cfunction struct>")
130 (unref (replace (* :open-tag :value :close-tag) "<cfunction struct>"))
129 :tagged
128 (+ :tagged :untagged)
21 (any (+ :tagged :untagged))
20 (group (any (+ :tagged :untagged)))
18 (* (constant :value) (group (any (+ :tagged :untagged))))
17 :value
4 (* :open-tag :value :close-tag)
3 (replace (* :open-tag :value :close-tag) "<cfunction struct>")
2 (unref (replace (* :open-tag :value :close-tag) "<cfunction struct>"))
1 :tagged
0 (* :tagged -1)