Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BNF and EBNF from ASF+SDF Grammar Library
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@949 ab42f6e0-554d-0410-b580-99e487e6eeb2
- Loading branch information
1 parent
f18ac5a
commit eea62bd
Showing
4 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
all: | ||
../../../shared/tools/sdf2bgf ../../../../sdf-library/trunk/library/languages/bnf/syntax/*.sdf bnf-sdf.bgf | ||
../../../shared/tools/sdf2bgf ../../../../sdf-library/trunk/library/languages/ebnf/syntax/*.sdf ebnf-sdf.bgf | ||
../../../shared/tools/xbgf correct.bnf.xbgf bnf-sdf.bgf _.bgf | ||
../../../shared/tools/subgrammar _.bgf Rules bnf-sdf.fix.bgf | ||
../../../shared/tools/xbgf correct.ebnf.xbgf ebnf-sdf.bgf _.bgf | ||
../../../shared/tools/subgrammar _.bgf Grammar ebnf-sdf.fix.bgf | ||
@rm -f _.bgf | ||
|
||
test: | ||
@ls -1 *.bgf | xargs -n1 ../../../shared/tools/validate bgf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xbgf:sequence xmlns:xbgf="http://planet-sl.org/xbgf" xmlns:bgf="http://planet-sl.org/bgf"> | ||
<xbgf:reroot> | ||
<root>Rules</root> | ||
</xbgf:reroot> | ||
<xbgf:define> | ||
<bgf:production> | ||
<nonterminal>NonTerminal</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> | ||
</xbgf:define> | ||
<xbgf:define> | ||
<bgf:production> | ||
<nonterminal>Terminal</nonterminal> | ||
<bgf:expression> | ||
<value>string</value> | ||
</bgf:expression> | ||
</bgf:production> | ||
</xbgf:define> | ||
<xbgf:horizontal> | ||
<nonterminal>Element</nonterminal> | ||
</xbgf:horizontal> | ||
</xbgf:sequence> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xbgf:sequence xmlns:xbgf="http://planet-sl.org/xbgf" xmlns:bgf="http://planet-sl.org/bgf"> | ||
<xbgf:reroot> | ||
<root>Grammar</root> | ||
</xbgf:reroot> | ||
<xbgf:define> | ||
<bgf:production> | ||
<nonterminal>String</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> | ||
</xbgf:define> | ||
<xbgf:define> | ||
<bgf:production> | ||
<nonterminal>IdCon</nonterminal> | ||
<bgf:expression> | ||
<value>string</value> | ||
</bgf:expression> | ||
</bgf:production> | ||
</xbgf:define> | ||
<xbgf:horizontal> | ||
<nonterminal>Expression</nonterminal> | ||
</xbgf:horizontal> | ||
</xbgf:sequence> |