summaryrefslogtreecommitdiff
path: root/peripheral/libupm/doxy/node/grammars/xml.peg
diff options
context:
space:
mode:
Diffstat (limited to 'peripheral/libupm/doxy/node/grammars/xml.peg')
-rw-r--r--peripheral/libupm/doxy/node/grammars/xml.peg45
1 files changed, 0 insertions, 45 deletions
diff --git a/peripheral/libupm/doxy/node/grammars/xml.peg b/peripheral/libupm/doxy/node/grammars/xml.peg
deleted file mode 100644
index bca96d5..0000000
--- a/peripheral/libupm/doxy/node/grammars/xml.peg
+++ /dev/null
@@ -1,45 +0,0 @@
-document
- = _ ignore* _ "<doxygen " _ attr:attr* _ ">" body:elements _ "</doxygen>" _ { return body; }
-
-
-elements
- = element*
-
-element
- = _ "<" startTag:id _ attr:attr* _ ">" _ children:elements _ "</" endTag:id ">" _ {
- if (startTag != endTag) {
- throw new Error("Expected </" + startTag + "> but </" + endTag + "> found.");
- }
- return {name: startTag, attr: attr, children: children }
- }
- / "<" tag:id _ attr:attr* _ "/>" _ {
- return {name: tag, attr: attr }
- }
- / _ text:text _ { return text }
-
-ignore
- = "<?xml" _ attr* _ "?>" { return }
-
-attr
- = name:id _ "=" _ value:string { return { name:name, value:value } }
-
-string
- = '"' '"' _ { return ""; }
- / "'" "'" _ { return ""; }
- / '"' text:quoted '"' _ { return text; }
- / "'" text:quoted "'" _ { return text; }
-
-quoted
- = chars:[^<>'" \t\n\r]+ { return chars.join(""); }
-
-text
- = chars:[^<> \t\n\r]+ { return chars.join(""); }
-
-id
- = chars:[^<>/'"=? \t\n\r]+ { return chars.join(""); }
-
-_ "whitespace"
- = whitespace*
-
-whitespace
- = [ \t\n\r]