summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-07-08 12:28:15 +0800
committerJSDurand <mmemmew@gmail.com>2023-07-08 12:28:15 +0800
commit691f969eb104fa3d4c2a1667693fd0382eb9d6b5 (patch)
tree133a45fa4f3feaaf6f1c819784038a5a2ac1e6c1
parent3a4c22e931470fb1280ad0777e3a524b68314846 (diff)
adding test grammar and test document
Adding a grammar and a document for testing purposes.
-rw-r--r--grammar/abnf grammars/test.abnf15
-rw-r--r--test-data/test.document7
2 files changed, 22 insertions, 0 deletions
diff --git a/grammar/abnf grammars/test.abnf b/grammar/abnf grammars/test.abnf
new file mode 100644
index 0000000..c960577
--- /dev/null
+++ b/grammar/abnf grammars/test.abnf
@@ -0,0 +1,15 @@
+document = 1*( item )
+
+item = header [ price ] *1( note )
+
+header = *1star "SP" title %xA *( "SP" / %xA )
+
+title = 1*"TEXT"
+
+star = %x2A
+
+note = "note:" note-content %xA *( "SP" / %xA )
+
+note-content = 1*"TEXT"
+
+price = "price:" "SP" 1*"DIGIT" %xA *( "SP" / %xA )
diff --git a/test-data/test.document b/test-data/test.document
new file mode 100644
index 0000000..2797f7e
--- /dev/null
+++ b/test-data/test.document
@@ -0,0 +1,7 @@
+* haha
+price: 256
+* hehe
+price: 512
+* test
+price: 123
+note: does this work?