Skip to content

Commit

Permalink
more transformations, better structure, JLS1 use
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@253 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Sep 11, 2008
1 parent 81cefcb commit bf3adfe
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 17 deletions.
2 changes: 1 addition & 1 deletion topics/java/lci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ validator = ../../../shared/tools/checkxml
build:

diff: test
gdt bgf/jls2.prefer3.mkSignature.addFeatures2to3.bgf bgf/jls3.fixErrors3.mkSignature.make3converge.bgf
gdt bgf/jls1.prepare1.structure1.bgf bgf/jls2.prepare2.bgf

test:
python ../../convergence/lci/lci.py java.lcf architecture
Expand Down
6 changes: 5 additions & 1 deletion topics/java/lci/java-lci.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
<Link>xbgf.xsd</Link>
</None>
<None Include="java.lcf" />
<None Include="xbgf\mkSignature.xbgf" />
<None Include="xbgf\addFeatures2to3.xbgf" />
<None Include="xbgf\prepare1.xbgf" />
<None Include="xbgf\prepare2.xbgf" />
<None Include="xbgf\prepare3.xbgf" />
<None Include="xbgf\structure1.xbgf" />
</ItemGroup>
</Project>
8 changes: 5 additions & 3 deletions topics/java/lci/java.lcf
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,26 @@
<name>onetwo</name>
<branch>
<input>jls1</input>
<perform>prepare1</perform>
<perform>structure1</perform>
</branch>
<branch>
<input>jls2</input>
<perform>prepare2</perform>
</branch>
</target>

<target>
<name>limit</name>
<branch>
<input>jls2</input>
<input>onetwo</input>
<perform>prefer3</perform>
<perform>mkSignature</perform>
<perform>addFeatures2to3</perform>
</branch>
<branch>
<input>jls3</input>
<perform>fixErrors3</perform>
<perform>mkSignature</perform>
<perform>prepare3</perform>
<perform>make3converge</perform>
</branch>
</target>
Expand Down
21 changes: 21 additions & 0 deletions topics/java/lci/xbgf/prepare1.xbgf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
<xbgf:vertical>
<nonterminal>Type</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Primary</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Modifier</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Statement</nonterminal>
</xbgf:vertical>
<!--xbgf:vertical>
<nonterminal>ForStatement</nonterminal>
</xbgf:vertical-->

<xbgf:eliminate>Goal</xbgf:eliminate>
</xbgf:sequence>
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,31 @@
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
<xbgf:vertical>
<nonterminal>Modifier</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Selector</nonterminal>
<nonterminal>Type</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>IdentifierSuffix</nonterminal>
<nonterminal>Primary</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Type</nonterminal>
<nonterminal>Modifier</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>MemberDecl</nonterminal>
<nonterminal>Statement</nonterminal>
</xbgf:vertical>

<xbgf:vertical>
<nonterminal>Expression3</nonterminal>
<nonterminal>Selector</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>InterfaceMemberDecl</nonterminal>
<nonterminal>IdentifierSuffix</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Statement</nonterminal>
<nonterminal>MemberDecl</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Primary</nonterminal>
<nonterminal>Expression3</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Statement</nonterminal>
<nonterminal>InterfaceMemberDecl</nonterminal>
</xbgf:vertical>
</xbgf:sequence>
43 changes: 43 additions & 0 deletions topics/java/lci/xbgf/prepare3.xbgf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
<xbgf:vertical>
<nonterminal>Type</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Primary</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Modifier</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Statement</nonterminal>
</xbgf:vertical>

<xbgf:vertical>
<nonterminal>Selector</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>IdentifierSuffix</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>MemberDecl</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>Expression3</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>InterfaceMemberDecl</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>ClassDeclaration</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>SwitchLabel</nonterminal>
</xbgf:vertical>
<xbgf:vertical>
<nonterminal>InterfaceDeclaration</nonterminal>
</xbgf:vertical>

<xbgf:inline>FormalParameterDecls</xbgf:inline>
</xbgf:sequence>
60 changes: 60 additions & 0 deletions topics/java/lci/xbgf/structure1.xbgf
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
<xbgf:inline>ForStatement</xbgf:inline>
<xbgf:inline>WhileStatement</xbgf:inline>
<xbgf:inline>IfThenStatement</xbgf:inline>
<xbgf:inline>LabeledStatement</xbgf:inline>
<xbgf:inline>IfThenElseStatement</xbgf:inline>
<xbgf:inline>StatementWithoutTrailingSubstatement</xbgf:inline>

<!--xbgf:restrict>

</xbgf:restrict-->
<xbgf:undefine>StatementExpression</xbgf:undefine>
<xbgf:define>
<bgf:production>
<nonterminal>StatementExpression</nonterminal>
<bgf:expression>
<nonterminal>Expression</nonterminal>
</bgf:expression>
</bgf:production>
</xbgf:define>

<xbgf:project>
<bgf:production>
<nonterminal>ClassDeclaration</nonterminal>
<bgf:expression>
<sequence>
<bgf:expression>
<terminal>class</terminal>
</bgf:expression>
<bgf:expression>
<nonterminal>Identifier</nonterminal>
</bgf:expression>
<bgf:expression>
<optional>
<bgf:expression>
<nonterminal>Super</nonterminal>
</bgf:expression>
</optional>
</bgf:expression>
<bgf:expression>
<optional>
<bgf:expression>
<nonterminal>Interfaces</nonterminal>
</bgf:expression>
</optional>
</bgf:expression>
<bgf:expression>
<nonterminal>ClassBody</nonterminal>
</bgf:expression>
</sequence>
</bgf:expression>
</bgf:production>
</xbgf:project>
<xbgf:inline>Super</xbgf:inline>
<xbgf:inline>Interfaces</xbgf:inline>

<xbgf:inline>PackageDeclaration</xbgf:inline>
</xbgf:sequence>

0 comments on commit bf3adfe

Please sign in to comment.