Experiment with porting SGML to YAP, and trying to preserve SWI code as much
as possible.
This commit is contained in:
1
packages/sgml/Test/ok/amp.ok
Normal file
1
packages/sgml/Test/ok/amp.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(test, [], [element(p, [], [&])])].
|
2
packages/sgml/Test/ok/att.ok
Normal file
2
packages/sgml/Test/ok/att.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(foo, [bar='10'], [])].
|
||||
[].
|
2
packages/sgml/Test/ok/badxmlent.ok
Normal file
2
packages/sgml/Test/ok/badxmlent.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [a='John & Mary'], ['\n John & Mary\n'])].
|
||||
[sgml(sgml_parser(1949540), 'badxmlent.xml', 3, 'Syntax error: Illegal entity, found "& Mary""'), sgml(sgml_parser(1949540), 'badxmlent.xml', 4, 'Syntax error: Illegal entity, found "& "')].
|
1
packages/sgml/Test/ok/bar.ok
Normal file
1
packages/sgml/Test/ok/bar.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(bar, [a='Major Mynah', b=abc, c='12', d='foo bar ugh'], [])].
|
2
packages/sgml/Test/ok/bat.ok
Normal file
2
packages/sgml/Test/ok/bat.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(bat, [], [element(x, [a=foo], []), element(x, [a=bar], []), element(x, [a='foo&bar'], []), element(x, [a='file.cgi?y=1'], []), element(x, [b=en], []), element(x, [b=en], []), element(x, [b='en en'], []), element(x, [c=[en]], []), element(x, [c=[en]], []), element(x, [c=[en, en]], []), element(x, [c=[un]], []), element(x, [c=['12']], []), element(x, [d='an-id'], []), element(x, [d='an*id'], []), element(x, [d='*id*'], []), element(x, [d='an id'], []), element(x, [e='an-id'], []), element(x, [e='un-id'], []), element(x, [f=['']], []), element(x, [f=['an-id']], []), element(x, [f=['an-id', 'an-id']], []), element(x, [g='1'], []), element(x, [g=''], []), element(x, [g='a-rather-long-name'], []), element(x, [g='a%name%with%percents'], []), element(x, [g='a name'], []), element(x, [g='a-name'], []), element(x, [h=['']], []), element(x, [h=[a]], []), element(x, [h=[name]], []), element(x, [h=[a, name]], []), element(x, [k='1'], []), element(x, [k='999999999999999999999999999999999999999999999'], []), element(x, [k=0], []), element(x, [k=0], []), element(x, [k=0], []), element(x, [n=[one, two]], []), element(x, [n=['1a', '2a']], []), element(x, [n=['1*ft', '2*in']], []), element(x, [o=no], []), element(x, [o=un], []), element(x, [p='--a--'], []), element(x, [p='--b--'], []), element(x, [p=' --a-- '], [])])].
|
||||
[sgml(sgml_parser(423746), 'bat.sgml', 27, 'Syntax error: Attribute value requires quotes, found "foo&bar"'), sgml(sgml_parser(423746), 'bat.sgml', 28, 'Syntax error: Attribute value requires quotes, found "file.cgi?y=1"'), sgml(sgml_parser(423746), 'bat.sgml', 30, 'Element "x" has no attribute with value "en"'), sgml(sgml_parser(423746), 'bat.sgml', 30, 'Syntax error: Bad attribute list, found "b=en en"'), sgml(sgml_parser(423746), 'bat.sgml', 33, 'Element "x" has no attribute with value "en"'), sgml(sgml_parser(423746), 'bat.sgml', 33, 'Syntax error: Bad attribute list, found "c=en en"'), sgml(sgml_parser(423746), 'bat.sgml', 36, 'Syntax error: entity NAMES expected, found "12"'), sgml(sgml_parser(423746), 'bat.sgml', 38, 'Syntax error: Attribute value requires quotes, found "an*id"'), sgml(sgml_parser(423746), 'bat.sgml', 38, 'Syntax error: NAME expected, found "an*id"'), sgml(sgml_parser(423746), 'bat.sgml', 39, 'Syntax error: Attribute value requires quotes, found "*id*"'), sgml(sgml_parser(423746), 'bat.sgml', 39, 'Syntax error: NAME expected, found "*id*"'), sgml(sgml_parser(423746), 'bat.sgml', 43, 'Syntax error: NAMES expected, found """"'), sgml(sgml_parser(423746), 'bat.sgml', 46, 'Syntax error: NAME expected, found "1"'), sgml(sgml_parser(423746), 'bat.sgml', 47, 'Syntax error: NAME expected, found "\'\'"'), sgml(sgml_parser(423746), 'bat.sgml', 49, 'Syntax error: Attribute value requires quotes, found "a%name%with%percents"'), sgml(sgml_parser(423746), 'bat.sgml', 49, 'Syntax error: NAME expected, found "a%name%with%percents"'), sgml(sgml_parser(423746), 'bat.sgml', 52, 'Syntax error: NAMES expected, found """"'), sgml(sgml_parser(423746), 'bat.sgml', 58, 'Syntax error: NUMBER expected, found "1.2"'), sgml(sgml_parser(423746), 'bat.sgml', 59, 'Syntax error: NUMBER expected, found ""1.2""'), sgml(sgml_parser(423746), 'bat.sgml', 60, 'Syntax error: NUMBER expected, found ""-1.2""'), sgml(sgml_parser(423746), 'bat.sgml', 61, 'Syntax error: NUTOKENS expected, found ""one two""'), sgml(sgml_parser(423746), 'bat.sgml', 63, 'Syntax error: NUTOKENS expected, found ""1*ft 2*in""'), sgml(sgml_parser(423746), 'bat.sgml', 66, 'Element "x" has no attribute "p"')].
|
2
packages/sgml/Test/ok/cdata.ok
Normal file
2
packages/sgml/Test/ok/cdata.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [], ['[Ora Lassila]'])].
|
||||
[].
|
1
packages/sgml/Test/ok/ce.ok
Normal file
1
packages/sgml/Test/ok/ce.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(test, [], ['Test for handling character entities: A \n'])].
|
2
packages/sgml/Test/ok/cent-nul.ok
Normal file
2
packages/sgml/Test/ok/cent-nul.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [], ['This content holds a byte that should be skipped'])].
|
||||
[sgml(sgml_parser(482992), 'cent-nul.xml', 1, 'Syntax error: Bad character entity, found "#0"')].
|
2
packages/sgml/Test/ok/cent-utf8.ok
Normal file
2
packages/sgml/Test/ok/cent-utf8.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(testdoc, [id='t7-20020923', resp='MSM'], ['\n', element(names, [], ['From Española -- a ‘test’ for you.']), '\n', element(nums, [], ['From Española -- a ‘test’ for you.']), '\n', element(names, [], ['From Española -- a ‘test’ for you.']), '\n', element(nums, [], ['From Española -- a ‘test’ for you.']), '\n'])].
|
||||
[].
|
1
packages/sgml/Test/ok/cmt.ok
Normal file
1
packages/sgml/Test/ok/cmt.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(a, [], [])].
|
2
packages/sgml/Test/ok/comment.ok
Normal file
2
packages/sgml/Test/ok/comment.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [], ['\n \n \n \n \n \n'])].
|
||||
[sgml(sgml_parser(1951880), 'comment.xml', 5, 'Syntax error: Illegal comment, found "<!---"'), sgml(sgml_parser(1951880), 'comment.xml', 6, 'Syntax error: Illegal comment'), sgml(sgml_parser(1951880), 'comment.xml', 8, 'Syntax error: Illegal comment')].
|
1
packages/sgml/Test/ok/conref.ok
Normal file
1
packages/sgml/Test/ok/conref.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(con, [missing=missing], [])].
|
2
packages/sgml/Test/ok/conref2.ok
Normal file
2
packages/sgml/Test/ok/conref2.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(conref, [], [element(b, [], ['1.']), element(b, [x='2'], []), element(b, [], ['3.']), element(b, [x='4'], []), element(b, [], ['5.'])])].
|
||||
[].
|
2
packages/sgml/Test/ok/crlf.ok
Normal file
2
packages/sgml/Test/ok/crlf.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(text, [], [element(p, [], ['par 1']), element(p, [], ['par 2'])])].
|
||||
[].
|
2
packages/sgml/Test/ok/defent.ok
Normal file
2
packages/sgml/Test/ok/defent.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(def, [], ['AB C@ D', sdata(?), 'B', sdata(?)])].
|
||||
[].
|
1
packages/sgml/Test/ok/entent.ok
Normal file
1
packages/sgml/Test/ok/entent.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(oops, [], ['<snag attr=2>'])].
|
2
packages/sgml/Test/ok/estag.ok
Normal file
2
packages/sgml/Test/ok/estag.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(oops, [], ['<snag attr=2>'])].
|
||||
[].
|
1
packages/sgml/Test/ok/foo.ok
Normal file
1
packages/sgml/Test/ok/foo.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(foo, [], [element(name, [title='Dr', sex='M'], ['Neddie Seagoon']), element(name, [title='Miss', sex='F'], ['Minnie Bannister'])])].
|
1
packages/sgml/Test/ok/i.ok
Normal file
1
packages/sgml/Test/ok/i.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(test, [], ['<q>! Hello ', element(q, [], ['you there']), ', I\'m ', sdata(special)])].
|
2
packages/sgml/Test/ok/layout.ok
Normal file
2
packages/sgml/Test/ok/layout.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(document, [name=value], ['\n ', element(ul, [], ['\n ', element(li, [], ['Line one']), '\n ', element(li, [], ['Line with ', element(em, [], [emphasised]), ' text']), '\n ']), '\n\n', element(p, [], ['This is a nice paragraph with some ', element(b, [], [bold]), ' text']), '\n\n'])].
|
||||
[].
|
2
packages/sgml/Test/ok/mapbug.ok
Normal file
2
packages/sgml/Test/ok/mapbug.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(d, [], [element(p, [], ['The ', element(q, [], [first]), ' paragraph.']), element(p, [], ['The ', element(q, [], [element(m, [], ['2']), nd]), ' paragraph.']), element(p, [], ['The ', element(m, [], ['3']), 'rd paragraph.']), element(p, [], [])])].
|
||||
[].
|
2
packages/sgml/Test/ok/ment.ok
Normal file
2
packages/sgml/Test/ok/ment.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(ent, [], ['One: [missing].\nTwo: [missing].\nThree: [missing].'])].
|
||||
[].
|
2
packages/sgml/Test/ok/minus2.ok
Normal file
2
packages/sgml/Test/ok/minus2.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element('x--y', [], [])].
|
||||
[].
|
2
packages/sgml/Test/ok/netc.ok
Normal file
2
packages/sgml/Test/ok/netc.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(shref, [], [element(netc, [], [element(frob, [], [element(twit, [], ['This slash should end netc:'])])]), element(twat, [], ['This is a twat']), element(twit, [], ['This is a simple shortref'])])].
|
||||
[].
|
2
packages/sgml/Test/ok/ng.ok
Normal file
2
packages/sgml/Test/ok/ng.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [or=a, and=e, seq=i], [])].
|
||||
[].
|
1
packages/sgml/Test/ok/noent.ok
Normal file
1
packages/sgml/Test/ok/noent.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element('tiny-htm', [], [element(p, [], ['This demonstrates the problem:']), element(pre, [], [' ', element(var, [], [status]), ' = DOM_', element(var, [], [operation]), ', &', element(var, [], [result]), ');']), element(p, [], ['I hope this helps.'])])].
|
1
packages/sgml/Test/ok/not.ok
Normal file
1
packages/sgml/Test/ok/not.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(not, [], [element(formula, [notation=tex], ['$$E = MC^2$$'])])].
|
2
packages/sgml/Test/ok/oma.ok
Normal file
2
packages/sgml/Test/ok/oma.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(oma, [foo=foo], [element(obo, [bar=bar], [element(p, [], ['Hello world.']), element(p, [], ['Where did the attributes go?'])])])].
|
||||
[].
|
1
packages/sgml/Test/ok/omit1.ok
Normal file
1
packages/sgml/Test/ok/omit1.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(bar, [], [element(foo, [], [element(a, [], [element(b, [], [x]), element(c, [], [y])]), element(a, [], [element(b, [], [x]), element(c, [], [y])]), element(a, [], [element(b, [], [x]), element(c, [], [y])]), element(a, [], [element(b, [], [x]), element(c, [], [y])])])])].
|
1
packages/sgml/Test/ok/per.ok
Normal file
1
packages/sgml/Test/ok/per.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(per, [], [element(jim, [], [snark])])].
|
2
packages/sgml/Test/ok/pi.ok
Normal file
2
packages/sgml/Test/ok/pi.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [], ['\n', pi('this is a pi'), '\n'])].
|
||||
[].
|
1
packages/sgml/Test/ok/rcdata.ok
Normal file
1
packages/sgml/Test/ok/rcdata.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(doc, [], [element(t, [], ['This is rcdata Hello & World Hello']), element(a, [], ['This is an a'])])].
|
2
packages/sgml/Test/ok/rdefent.ok
Normal file
2
packages/sgml/Test/ok/rdefent.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(foo, [], ['_'])].
|
||||
[].
|
2
packages/sgml/Test/ok/rsre.ok
Normal file
2
packages/sgml/Test/ok/rsre.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(text, [], [element(page, [], [element(line, [], ['SGML does NOT add record start characters at the beginning or']), element(line, [], ['record end characters at the end of entities unless they are']), element(line, [], ['already there. In this document, there IS a record start']), element(line, [], ['character for the first line of text and there IS a record end']), element(line, [], ['character for the last line of text. The #RS character reference']), element(line, [], ['should match at the beginning of each line except possibly the']), element(line, [], ['first one, so we expect SEVEN (LINE) elements for this file.'])])])].
|
||||
[].
|
1
packages/sgml/Test/ok/sdata.ok
Normal file
1
packages/sgml/Test/ok/sdata.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(text, [], ['Van Alpha tot ', sdata('\\Omega')])].
|
1
packages/sgml/Test/ok/shortval.ok
Normal file
1
packages/sgml/Test/ok/shortval.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(num, [val='2'], [])].
|
2
packages/sgml/Test/ok/simple.ok
Normal file
2
packages/sgml/Test/ok/simple.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [name=value], ['Some content'])].
|
||||
[].
|
1
packages/sgml/Test/ok/sr.ok
Normal file
1
packages/sgml/Test/ok/sr.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(test, [], [element(p, [], ['Peter said: ', element(q, [], ['He, this is a nice program']), '.']), element(p, [], ['Bob said: ', element(q, [], ['Yes, it is'])])])].
|
1
packages/sgml/Test/ok/sr2.ok
Normal file
1
packages/sgml/Test/ok/sr2.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(test, [], [element(t, [], [element(name, [], [n]), element(arg, [], [a])])])].
|
1
packages/sgml/Test/ok/ugh.ok
Normal file
1
packages/sgml/Test/ok/ugh.ok
Normal file
@@ -0,0 +1 @@
|
||||
[element(ugh, [], [element(extension, [missing=missing, exchange='479'], []), element(extension, [exchange='479'], ['8494']), element(extension, [exchange='555'], ['1234']), element(extension, [exchange='03-555'], ['1234'])])].
|
2
packages/sgml/Test/ok/utf8-cent.ok
Normal file
2
packages/sgml/Test/ok/utf8-cent.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(testdoc, [id='t7-20020923', resp='MSM'], ['\n', element(names, [], ['From Española -- a ‘test’ for you.']), '\n', element(nums, [], ['From Española -- a ‘test’ for you.']), '\n', element(names, [], ['From Española -- a ‘test’ for you.']), '\n', element(nums, [], ['From Española -- a ‘test’ for you.']), '\n'])].
|
||||
[].
|
2
packages/sgml/Test/ok/utf8-ru.ok
Normal file
2
packages/sgml/Test/ok/utf8-ru.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element('Человек', [язык=мова], ['Borys'])].
|
||||
[].
|
2
packages/sgml/Test/ok/utf8.ok
Normal file
2
packages/sgml/Test/ok/utf8.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(utf8, [], ['\n', element(name, [], ['Dürst']), '\n', element(name, [name='Dürst'], []), '\n'])].
|
||||
[].
|
2
packages/sgml/Test/ok/wchar.ok
Normal file
2
packages/sgml/Test/ok/wchar.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [], ['\n ', element(li, [], ['Some cyrillic chars: ий']), '\n ', element(li, [], ['This a an sizzors symbol: ✄']), '\n ', element(li, [], ['OK, entered via entity: ✓']), '\n ', element(a, [att='Cirle with 1: ➀', ok='✓'], []), '\n'])].
|
||||
[].
|
2
packages/sgml/Test/ok/wcharlong.ok
Normal file
2
packages/sgml/Test/ok/wcharlong.ok
Normal file
@@ -0,0 +1,2 @@
|
||||
[element(test, [], ['\n', element(p, [], ['\nThis is a long test holding, with the intention to switch to wide character\nencoding from the local buffer to malloc\'ed buffer. This (✌) is a\npiece symbol.\n']), '\n', element(p, [], ['\nThis is a long test holding, with the intention to switch to wide character\nencoding after the output buffer has been switched to malloc\'ed mode. For this\nreason, our buffer should should hold more than 256 character, as defined in\nutil.h in the structure ocharbuf. This (➽) is a fat arrow.\n']), '\n'])].
|
||||
[].
|
Reference in New Issue
Block a user