Permalink
Browse files

here be BGF test set

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@813 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Jul 11, 2010
1 parent 2aa98af commit 7b1117fa6c5751a2ffc7fbb35d1706bd718f19ca
@@ -0,0 +1,3 @@
test:
xmllint --noout --schema ../../../../shared/xsd/bgf.xsd *.bgf
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<bgf:grammar xmlns:bgf="http://planet-sl.org/bgf">
<bgf:production>
<label>wez</label>
<nonterminal>foo</nonterminal>
<bgf:expression>
<nonterminal>bar</nonterminal>
</bgf:expression>
</bgf:production>
</bgf:grammar>
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<bgf:grammar xmlns:bgf="http://planet-sl.org/bgf">
<bgf:production>
<nonterminal>foo</nonterminal>
<bgf:expression>
<nonterminal>bar</nonterminal>
</bgf:expression>
</bgf:production>
</bgf:grammar>
@@ -0,0 +1,372 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- BNF as pretty-printed from BGF by LCI framework -->
<bgf:grammar xmlns:bgf="http://planet-sl.org/bgf">
<root>grammar</root>
<root>production</root>
<root>expression</root>
<bgf:production>
<nonterminal>grammar</nonterminal>
<bgf:expression>
<plus>
<bgf:expression>
<nonterminal>production</nonterminal>
</bgf:expression>
</plus>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>production</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<optional>
<bgf:expression>
<nonterminal>label</nonterminal>
</bgf:expression>
</optional>
</bgf:expression>
<bgf:expression>
<nonterminal>defining-nonterminal</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>defining-symbol</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>right-hand-side</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>terminator</nonterminal>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>terminator</nonterminal>
<bgf:expression>
<epsilon/>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>defining-symbol</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<terminal>:</terminal>
</bgf:expression>
<bgf:expression>
<value>cr</value>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>right-hand-side</nonterminal>
<bgf:expression>
<plus>
<bgf:expression>
<sequence>
<bgf:expression>
<nonterminal>INDENT</nonterminal>
</bgf:expression>
<bgf:expression>
<plus>
<bgf:expression>
<nonterminal>symbol</nonterminal>
</bgf:expression>
</plus>
</bgf:expression>
<bgf:expression>
<value>cr</value>
</bgf:expression>
</sequence>
</bgf:expression>
</plus>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>terminal</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<selectable>
<selector>start</selector>
<bgf:expression>
<terminal>"</terminal>
</bgf:expression>
</selectable>
</bgf:expression>
<bgf:expression>
<value>string</value>
</bgf:expression>
<bgf:expression>
<selectable>
<selector>end</selector>
<bgf:expression>
<terminal>"</terminal>
</bgf:expression>
</selectable>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>nonterminal</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<selectable>
<selector>start</selector>
<bgf:expression>
<epsilon/>
</bgf:expression>
</selectable>
</bgf:expression>
<bgf:expression>
<value>string</value>
</bgf:expression>
<bgf:expression>
<selectable>
<selector>end</selector>
<bgf:expression>
<epsilon/>
</bgf:expression>
</selectable>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>selectable</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<selectable>
<selector>selector</selector>
<bgf:expression>
<value>string</value>
</bgf:expression>
</selectable>
</bgf:expression>
<bgf:expression>
<terminal>::</terminal>
</bgf:expression>
<bgf:expression>
<nonterminal>symbol</nonterminal>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>symbol</nonterminal>
<bgf:expression>
<choice>
<bgf:expression>
<nonterminal>epsilon</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>empty</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>number</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>string</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>indentation</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>carriage-return</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>any</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>terminal</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>nonterminal</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>selectable</nonterminal>
</bgf:expression>
<bgf:expression>
<nonterminal>group</nonterminal>
</bgf:expression>
<bgf:expression>
<selectable>
<selector>choice</selector>
<bgf:expression>
<sequence>
<bgf:expression>
<terminal>(</terminal>
</bgf:expression>
<bgf:expression>
<nonterminal>symbol</nonterminal>
</bgf:expression>
<bgf:expression>
<star>
<bgf:expression>
<sequence>
<bgf:expression>
<terminal>|</terminal>
</bgf:expression>
<bgf:expression>
<nonterminal>symbol</nonterminal>
</bgf:expression>
</sequence>
</bgf:expression>
</star>
</bgf:expression>
<bgf:expression>
<terminal>)</terminal>
</bgf:expression>
</sequence>
</bgf:expression>
</selectable>
</bgf:expression>
<bgf:expression>
<selectable>
<selector>optional</selector>
<bgf:expression>
<sequence>
<bgf:expression>
<nonterminal>symbol</nonterminal>
</bgf:expression>
<bgf:expression>
<terminal>?</terminal>
</bgf:expression>
</sequence>
</bgf:expression>
</selectable>
</bgf:expression>
<bgf:expression>
<selectable>
<selector>plus</selector>
<bgf:expression>
<sequence>
<bgf:expression>
<nonterminal>symbol</nonterminal>
</bgf:expression>
<bgf:expression>
<terminal>+</terminal>
</bgf:expression>
</sequence>
</bgf:expression>
</selectable>
</bgf:expression>
<bgf:expression>
<selectable>
<selector>star</selector>
<bgf:expression>
<sequence>
<bgf:expression>
<nonterminal>symbol</nonterminal>
</bgf:expression>
<bgf:expression>
<terminal>*</terminal>
</bgf:expression>
</sequence>
</bgf:expression>
</selectable>
</bgf:expression>
</choice>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>number</nonterminal>
<bgf:expression>
<terminal>INT</terminal>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>string</nonterminal>
<bgf:expression>
<terminal>STR</terminal>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>indentation</nonterminal>
<bgf:expression>
<terminal>INDENT</terminal>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>carriage-return</nonterminal>
<bgf:expression>
<terminal>CR</terminal>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>epsilon</nonterminal>
<bgf:expression>
<terminal>EPSILON</terminal>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>empty</nonterminal>
<bgf:expression>
<terminal>EMPTY</terminal>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>any</nonterminal>
<bgf:expression>
<terminal>ANY</terminal>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>label</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<terminal>[</terminal>
</bgf:expression>
<bgf:expression>
<value>string</value>
</bgf:expression>
<bgf:expression>
<terminal>]</terminal>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>defining-nonterminal</nonterminal>
<bgf:expression>
<value>string</value>
</bgf:expression>
</bgf:production>
<bgf:production>
<nonterminal>group</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<selectable>
<selector>start</selector>
<bgf:expression>
<terminal>(</terminal>
</bgf:expression>
</selectable>
</bgf:expression>
<bgf:expression>
<plus>
<bgf:expression>
<nonterminal>symbol</nonterminal>
</bgf:expression>
</plus>
</bgf:expression>
<bgf:expression>
<selectable>
<selector>end</selector>
<bgf:expression>
<terminal>)</terminal>
</bgf:expression>
</selectable>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
</bgf:grammar>
Oops, something went wrong.

0 comments on commit 7b1117f

Please sign in to comment.