Experiment with porting SGML to YAP, and trying to preserve SWI code as much

as possible.
This commit is contained in:
Vitor Santos Costa
2009-03-13 19:39:06 +00:00
parent 754f00d311
commit d6a06fe092
260 changed files with 31894 additions and 0 deletions

View File

@@ -0,0 +1 @@
[element(test, [], [element(p, [], [&])])].

View File

@@ -0,0 +1,2 @@
[element(foo, [bar='10'], [])].
[].

View 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 "& "')].

View File

@@ -0,0 +1 @@
[element(bar, [a='Major Mynah', b=abc, c='12', d='foo bar ugh'], [])].

View 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"')].

View File

@@ -0,0 +1,2 @@
[element(test, [], ['[Ora Lassila]'])].
[].

View File

@@ -0,0 +1 @@
[element(test, [], ['Test for handling character entities: A \n'])].

View 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"')].

View 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'])].
[].

View File

@@ -0,0 +1 @@
[element(a, [], [])].

View 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')].

View File

@@ -0,0 +1 @@
[element(con, [missing=missing], [])].

View File

@@ -0,0 +1,2 @@
[element(conref, [], [element(b, [], ['1.']), element(b, [x='2'], []), element(b, [], ['3.']), element(b, [x='4'], []), element(b, [], ['5.'])])].
[].

View File

@@ -0,0 +1,2 @@
[element(text, [], [element(p, [], ['par 1']), element(p, [], ['par 2'])])].
[].

View File

@@ -0,0 +1,2 @@
[element(def, [], ['AB C@ D', sdata(?), 'B', sdata(?)])].
[].

View File

@@ -0,0 +1 @@
[element(oops, [], ['<snag attr=2>'])].

View File

@@ -0,0 +1,2 @@
[element(oops, [], ['<snag attr=2>'])].
[].

View File

@@ -0,0 +1 @@
[element(foo, [], [element(name, [title='Dr', sex='M'], ['Neddie Seagoon']), element(name, [title='Miss', sex='F'], ['Minnie Bannister'])])].

View File

@@ -0,0 +1 @@
[element(test, [], ['<q>! Hello ', element(q, [], ['you there']), ', I\'m ', sdata(special)])].

View 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'])].
[].

View 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, [], [])])].
[].

View File

@@ -0,0 +1,2 @@
[element(ent, [], ['One: [missing].\nTwo: [missing].\nThree: [missing].'])].
[].

View File

@@ -0,0 +1,2 @@
[element('x--y', [], [])].
[].

View 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'])])].
[].

View File

@@ -0,0 +1,2 @@
[element(test, [or=a, and=e, seq=i], [])].
[].

View 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.'])])].

View File

@@ -0,0 +1 @@
[element(not, [], [element(formula, [notation=tex], ['$$E = MC^2$$'])])].

View File

@@ -0,0 +1,2 @@
[element(oma, [foo=foo], [element(obo, [bar=bar], [element(p, [], ['Hello world.']), element(p, [], ['Where did the attributes go?'])])])].
[].

View 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])])])])].

View File

@@ -0,0 +1 @@
[element(per, [], [element(jim, [], [snark])])].

View File

@@ -0,0 +1,2 @@
[element(test, [], ['\n', pi('this is a pi'), '\n'])].
[].

View File

@@ -0,0 +1 @@
[element(doc, [], [element(t, [], ['This is rcdata Hello & World Hello']), element(a, [], ['This is an a'])])].

View File

@@ -0,0 +1,2 @@
[element(foo, [], ['_'])].
[].

View 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.'])])])].
[].

View File

@@ -0,0 +1 @@
[element(text, [], ['Van Alpha tot ', sdata('\\Omega')])].

View File

@@ -0,0 +1 @@
[element(num, [val='2'], [])].

View File

@@ -0,0 +1,2 @@
[element(test, [name=value], ['Some content'])].
[].

View 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'])])])].

View File

@@ -0,0 +1 @@
[element(test, [], [element(t, [], [element(name, [], [n]), element(arg, [], [a])])])].

View 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'])])].

View 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'])].
[].

View File

@@ -0,0 +1,2 @@
[element('Человек', [язык=мова], ['Borys'])].
[].

View File

@@ -0,0 +1,2 @@
[element(utf8, [], ['\n', element(name, [], ['Dürst']), '\n', element(name, [name='Dürst'], []), '\n'])].
[].

View 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'])].
[].

View 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'])].
[].