summaryrefslogtreecommitdiff
path: root/testdata/integration/user_defined_syntax/ontologies
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/integration/user_defined_syntax/ontologies')
-rw-r--r--testdata/integration/user_defined_syntax/ontologies/poem.osml22
-rw-r--r--testdata/integration/user_defined_syntax/ontologies/token_escaping.osml12
-rw-r--r--testdata/integration/user_defined_syntax/ontologies/wikilike.osml37
3 files changed, 71 insertions, 0 deletions
diff --git a/testdata/integration/user_defined_syntax/ontologies/poem.osml b/testdata/integration/user_defined_syntax/ontologies/poem.osml
new file mode 100644
index 0000000..0c7b065
--- /dev/null
+++ b/testdata/integration/user_defined_syntax/ontologies/poem.osml
@@ -0,0 +1,22 @@
+\ontology#poem{
+ \struct#poem[root=true]
+ \field
+ \childRef[ref=stanza]
+ \struct#stanza[transparent=true]
+ \syntax
+ \close{\paragraph}
+ \field
+ \childRef[ref=line]
+ \childRef[ref=indentation]
+ \struct#line[transparent=true]
+ \syntax
+ \close{\newline}
+ \primitive[type=string]
+ \struct#indentation
+ \syntax
+ \open{\indent}
+ \close{\dedent}
+ \field
+ \childRef[ref=line]
+ \childRef[ref=indentation]
+}
diff --git a/testdata/integration/user_defined_syntax/ontologies/token_escaping.osml b/testdata/integration/user_defined_syntax/ontologies/token_escaping.osml
new file mode 100644
index 0000000..1f76ad7
--- /dev/null
+++ b/testdata/integration/user_defined_syntax/ontologies/token_escaping.osml
@@ -0,0 +1,12 @@
+\ontology#test{
+ \struct#a[root=true]
+ \field
+ \childRef[ref=b]
+ \childRef[ref=c]
+ \struct#b
+ \syntax
+ \short{\!=}
+ \struct#c
+ \syntax
+ \short{=}
+}
diff --git a/testdata/integration/user_defined_syntax/ontologies/wikilike.osml b/testdata/integration/user_defined_syntax/ontologies/wikilike.osml
new file mode 100644
index 0000000..694b8ee
--- /dev/null
+++ b/testdata/integration/user_defined_syntax/ontologies/wikilike.osml
@@ -0,0 +1,37 @@
+\ontology#book{
+ \struct#book[root=true]
+ \field
+ \childRef[ref=section]
+ \childRef[ref=paragraph]
+ \struct#section
+ \primitive#title[type=string,subtree=true]
+ \syntax
+ \open{==}
+ \close{==}
+ \field
+ \childRef[ref=paragraph]
+ \struct#paragraph[transparent=true]
+ \syntax
+ \close{\paragraph}
+ \field
+ \childRef[ref=text]
+ \childRef[ref=code]
+ \childRef[ref=speech]
+ \childRef[ref=thought]
+ \struct#code
+ \syntax
+ \open{`}
+ \close{`}
+ \field
+ \childRef[ref=text]
+ \struct#speech
+ \syntax
+ \open{<<}
+ \close{>>}
+ \fieldRef[ref=paragraph.$default]
+ \struct#text[transparent=true]
+ \primitive[type=string]
+ \struct#thought
+ \syntax
+ \short{--}
+}