Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@126 ab42f6e0-554d-0410-b580-99e487e6eeb2
- Loading branch information
Showing
16 changed files
with
497 additions
and
7 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
:- ensure_loaded('ll.pro'). | ||
:- ensure_loaded('slps.pro'). | ||
|
||
|
||
main | ||
|
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
source = ../../fl/java1/fl.g | ||
source = ../../fl/java1/FL.g | ||
target = tests/fl | ||
pkg = slps/antlr2bgf | ||
|
||
|
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,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path=""/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="output" path=""/> | ||
</classpath> |
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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>java2bgf</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
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 |
---|---|---|
@@ -1,14 +1,29 @@ | ||
source = ../../fl/shared/fl.xsd | ||
target = tests/fl | ||
fl = ../../../../slps/topics/fl | ||
xsd = ${fl}/xsd/fl.xsd | ||
factorial = ${fl}/xsd/factorial.xml | ||
bgf = ../../../shared/xsd/bgf.xsd | ||
xbgf = ../../../shared/xsd/xbgf.xsd | ||
btf = ../../../shared/xsd/btf.xsd | ||
apps = ../../transformation/xbgf/apps | ||
validator = ../../../download/msv/msv.jar | ||
xsd2btf = ../../../shared/tools/xsd2btf | ||
|
||
build: | ||
|
||
test: | ||
${xsd2btf} ${xsd} ${factorial} tests/factorial.btf | ||
${xsd2btf} ${xbgf} ${apps}/bgf/bgf1.xbgf tests/bgf1.btf | ||
${xsd2btf} ${xbgf} ${apps}/bgf/bgf2.xbgf tests/bgf2.btf | ||
${xsd2btf} ${xbgf} ${apps}/xbgf/xbgf1.xbgf tests/xbgf1.btf | ||
${xsd2btf} ${xbgf} ${apps}/xbgf/xbgf2.xbgf tests/xbgf2.btf | ||
make check | ||
|
||
check: | ||
ls tests/*.btf | xargs java -jar ${validator} ${btf} | ||
|
||
clean: | ||
make clean-tests | ||
rm -f *~ | ||
|
||
clean-tests: | ||
rm -f tests/*.btf | ||
rm -f tests/*.out |
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,16 @@ | ||
build: | ||
cd apps/bgf; make build | ||
cd apps/xbgf; make build | ||
|
||
rebuild: | ||
make clean | ||
make build | ||
|
||
test: | ||
cd apps/bgf; make test | ||
cd apps/xbgf; make test | ||
|
||
clean: | ||
rm -f *~ | ||
cd apps/bgf; make clean | ||
cd apps/xbgf; make clean |
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,23 @@ | ||
shared = ../../../../../shared | ||
tools = ${shared}/tools | ||
xsd = ${shared}/xsd | ||
|
||
build: bgf2.bgf | ||
|
||
bgf2.bgf: *.xbgf | ||
${tools}/xsd2bgf ${xsd}/bgf.xsd bgf0.bgf | ||
${tools}/xbgf bgf0.bgf bgf1.xbgf bgf1.bgf | ||
${tools}/xbgf bgf1.bgf bgf2.xbgf bgf2.bgf | ||
|
||
rebuild: | ||
make clean | ||
make build | ||
|
||
test: build | ||
|
||
show: build | ||
${tools}/showbgf bgf2.bgf | ||
|
||
clean: | ||
rm -f *~ | ||
rm -f *.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<xbgf:sequence xmlns:xbgf="http://planet-sl.org/xbgf"> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>xsd:anyURI</from> | ||
<to>uri</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>xsd:string</from> | ||
<to>string</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:vertical> | ||
<nonterminal>expression</nonterminal> | ||
</xbgf:vertical> | ||
<xbgf:strip> | ||
<selector>label</selector> | ||
</xbgf:strip> | ||
<xbgf:strip> | ||
<selector>nonterminal</selector> | ||
</xbgf:strip> | ||
</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,122 @@ | ||
<xbgf:sequence | ||
xmlns:lgf="http://planet-sl.org/lgf" | ||
xmlns:xbgf="http://planet-sl.org/xbgf"> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>grammar</from> | ||
<to>g</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>production</from> | ||
<to>p</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>expression</from> | ||
<to>x</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>label</from> | ||
<to>l</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>nonterminal</from> | ||
<to>n</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>selector</from> | ||
<to>s</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>terminal</from> | ||
<to>t</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>epsilon</from> | ||
<to>true</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>empty</from> | ||
<to>fail</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>any</from> | ||
<to>a</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>terminal</from> | ||
<to>t</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>nonterminal</from> | ||
<to>n</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>selectable</from> | ||
<to>s</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>choice</from> | ||
<to>;</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>sequence</from> | ||
<to>,</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>optional</from> | ||
<to>?</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>plus</from> | ||
<to>+</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<label> | ||
<from>star</from> | ||
<to>*</to> | ||
</label> | ||
</xbgf:rename> | ||
<xbgf:strip> | ||
<selector>selector</selector> | ||
</xbgf:strip> | ||
<xbgf:strip> | ||
<selector>name</selector> | ||
</xbgf:strip> | ||
<xbgf:strip> | ||
<selector>root</selector> | ||
</xbgf:strip> | ||
<xbgf:prune>uri</xbgf:prune> | ||
</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,23 @@ | ||
shared = ../../../../../shared | ||
tools = ${shared}/tools | ||
xsd = ${shared}/xsd | ||
|
||
build: xbgf2.bgf | ||
|
||
xbgf2.bgf: *.xbgf | ||
${tools}/xsd2bgf ${xsd}/xbgf.xsd xbgf0.bgf | ||
${tools}/xbgf xbgf0.bgf xbgf1.xbgf xbgf1.bgf | ||
${tools}/xbgf xbgf1.bgf xbgf2.xbgf xbgf2.bgf | ||
|
||
rebuild: | ||
make clean | ||
make build | ||
|
||
test: build | ||
|
||
show: build | ||
${tools}/showbgf xbgf2.bgf | ||
|
||
clean: | ||
rm -f *~ | ||
rm -f *.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<xbgf:sequence | ||
xmlns:bgf="http://planet-sl.org/bgf" | ||
xmlns:xbgf="http://planet-sl.org/xbgf"> | ||
<xbgf:reroot> | ||
<root>transformation</root> | ||
</xbgf:reroot> | ||
<xbgf:vertical> | ||
<nonterminal>transformation</nonterminal> | ||
</xbgf:vertical> | ||
<xbgf:unchain>add</xbgf:unchain> | ||
<xbgf:unchain>define</xbgf:unchain> | ||
<xbgf:unchain>downcase</xbgf:unchain> | ||
<xbgf:unchain>eliminate</xbgf:unchain> | ||
<xbgf:unchain>extract</xbgf:unchain> | ||
<xbgf:unchain>fold</xbgf:unchain> | ||
<xbgf:unchain>horizontal</xbgf:unchain> | ||
<xbgf:unchain>id</xbgf:unchain> | ||
<xbgf:unchain>inline</xbgf:unchain> | ||
<xbgf:unchain>introduce</xbgf:unchain> | ||
<xbgf:unchain>label</xbgf:unchain> | ||
<xbgf:unchain>massage</xbgf:unchain> | ||
<xbgf:unchain>permute</xbgf:unchain> | ||
<xbgf:unchain>project</xbgf:unchain> | ||
<xbgf:unchain>prune</xbgf:unchain> | ||
<xbgf:unchain>remove</xbgf:unchain> | ||
<xbgf:unchain>relabel</xbgf:unchain> | ||
<xbgf:unchain>rename</xbgf:unchain> | ||
<xbgf:unchain>reroot</xbgf:unchain> | ||
<xbgf:unchain>relax</xbgf:unchain> | ||
<xbgf:unchain>restrict</xbgf:unchain> | ||
<xbgf:unchain>sequence</xbgf:unchain> | ||
<xbgf:unchain>skip</xbgf:unchain> | ||
<xbgf:unchain>strip</xbgf:unchain> | ||
<xbgf:unchain>unchain</xbgf:unchain> | ||
<xbgf:unchain>undefine</xbgf:unchain> | ||
<xbgf:unchain>unfold</xbgf:unchain> | ||
<xbgf:unchain>unite</xbgf:unchain> | ||
<xbgf:unchain>vertical</xbgf:unchain> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>bgf:production</from> | ||
<to>production</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>bgf:label</from> | ||
<to>label</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>bgf:nonterminal</from> | ||
<to>nonterminal</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>bgf:selector</from> | ||
<to>selector</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
<xbgf:rename> | ||
<nonterminal> | ||
<from>bgf:terminal</from> | ||
<to>terminal</to> | ||
</nonterminal> | ||
</xbgf:rename> | ||
</xbgf:sequence> |
Oops, something went wrong.