diff options
Diffstat (limited to 'testdata')
6 files changed, 75 insertions, 74 deletions
diff --git a/testdata/integration/user_defined_syntax/poem.in.osml b/testdata/integration/user_defined_syntax/poem.in.osml index f1986d9..e8b3796 100644 --- a/testdata/integration/user_defined_syntax/poem.in.osml +++ b/testdata/integration/user_defined_syntax/poem.in.osml @@ -1,27 +1,6 @@ \begin{document} -\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] -} +\import[ontology]{./poem.osml} % To Autumn by John Keats (1820) % http://en.wikisource.org/wiki/Keats;_poems_published_in_1820/To_Autumn diff --git a/testdata/integration/user_defined_syntax/poem.osml b/testdata/integration/user_defined_syntax/poem.osml new file mode 100644 index 0000000..0c7b065 --- /dev/null +++ b/testdata/integration/user_defined_syntax/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/token_escaping.in.osml b/testdata/integration/user_defined_syntax/token_escaping.in.osml index 66ad1eb..79f6bc7 100644 --- a/testdata/integration/user_defined_syntax/token_escaping.in.osml +++ b/testdata/integration/user_defined_syntax/token_escaping.in.osml @@ -2,20 +2,9 @@ This test checks whether tokens starting with the default field indicator at the beginning works by escaping the "!" with a backslash. }% -\document -\ontology#test{ - \struct#a[root=true] - \field - \childRef[ref=b] - \childRef[ref=c] - \struct#b - \syntax - \short{\!=} - \struct#c - \syntax - \short{=} -} +\document +\import[ontology]{./token_escaping.osml} \begin{a} = != \end{a} diff --git a/testdata/integration/user_defined_syntax/token_escaping.osml b/testdata/integration/user_defined_syntax/token_escaping.osml new file mode 100644 index 0000000..1f76ad7 --- /dev/null +++ b/testdata/integration/user_defined_syntax/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/wikilike.in.osml b/testdata/integration/user_defined_syntax/wikilike.in.osml index 9bc80c7..88ffa85 100644 --- a/testdata/integration/user_defined_syntax/wikilike.in.osml +++ b/testdata/integration/user_defined_syntax/wikilike.in.osml @@ -1,43 +1,5 @@ \begin{document} - -\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{--} -} - +\import[ontology]{./wikilike.osml} \begin{book} == This tests somewhat plays with user defined syntax == diff --git a/testdata/integration/user_defined_syntax/wikilike.osml b/testdata/integration/user_defined_syntax/wikilike.osml new file mode 100644 index 0000000..694b8ee --- /dev/null +++ b/testdata/integration/user_defined_syntax/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{--} +} |