Skip to content

Commit

Permalink
pretty-printing
Browse files Browse the repository at this point in the history
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@623 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed May 5, 2009
1 parent bbf2f84 commit a192a16
Show file tree
Hide file tree
Showing 69 changed files with 611 additions and 543 deletions.
1 change: 1 addition & 0 deletions topics/java/lci/xbgf/correct-app1.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down
17 changes: 9 additions & 8 deletions topics/java/lci/xbgf/correct-app2.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -28,7 +29,7 @@
<!-- ISSUE CORRECT SPECERROR
They forgot to define a nonterminal with "intuitive" name - we predicted it in ISO N3977! -->
<!-- GENERALITY -->
<!-- INITCORR -->
<!-- INITCORR -->
<xbgf:define>
<bgf:production>
<nonterminal>ForUpdateOpt</nonterminal>
Expand All @@ -45,7 +46,7 @@

<!-- ISSUE CORRECT SPECERROR
let's complete some of the statements with a trailing semicolon-->
<!-- CORRECTION -->
<!-- CORRECTION -->
<xbgf:inject>
<bgf:production>
<nonterminal>Statement</nonterminal>
Expand All @@ -72,10 +73,10 @@
</bgf:expression>
</bgf:production>
</xbgf:inject>

<!-- ISSUE CORRECT SPECERROR
Same for BreakStatement -->
<!-- CORRECTION -->
<!-- CORRECTION -->
<xbgf:inject>
<bgf:production>
<nonterminal>Statement</nonterminal>
Expand Down Expand Up @@ -121,14 +122,14 @@
<nonterminal>Expression</nonterminal>
</bgf:expression>
</xbgf:replace>
<!-- ISSUE CORRECT INCOMPATIBILITY

<!-- ISSUE CORRECT INCOMPATIBILITY
- Fail: VoidInterfaceMethodDeclaratorRest.
- [], ,([n(FormalParameters), ?(,([t(throws), n(QualifiedIdentifierList)])), t((;))])
vs.
- [], ,([n(FormalParameters), n(BracketsOpt), ?(,([t(throws), n(QualifiedIdentifierList)])), t((;))])
-->
<!-- CORRECTION -->
<!-- CORRECTION -->
<xbgf:appear>
<bgf:production>
<nonterminal>VoidInterfaceMethodDeclaratorRest</nonterminal>
Expand Down Expand Up @@ -182,7 +183,7 @@
<nonterminal>VoidInterfaceMethodDeclaratorRest</nonterminal>
</in>
</xbgf:fold>

<!-- ISSUE CORRECT SPECERROR
undefined non-terminals -->
<!-- GENERALITY -->
Expand Down
9 changes: 5 additions & 4 deletions topics/java/lci/xbgf/correct-app3.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -110,10 +111,10 @@ Annotation:
</bgf:expression>
</bgf:production>
</xbgf:inject>

<!-- ISSUE CORRECT SPECERROR
same with continue -->
<!-- CORRECTION -->
<!-- CORRECTION -->
<xbgf:inject>
<bgf:production>
<nonterminal>Statement</nonterminal>
Expand Down Expand Up @@ -286,7 +287,7 @@ FormalParameter:
</bgf:expression>
</bgf:production>
</xbgf:define>

<!-- ISSUE CORRECT
as in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6442525
* 18.1 does not permit the obsolescent array syntax in a method declaration of an annotation type:
Expand Down Expand Up @@ -335,7 +336,7 @@ FormalParameter:
</bgf:expression>
</bgf:production>
</xbgf:appear>

<!-- I S S U E C O R R E C T
as in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6442525
* 18.1 defines TypeArgument incorrectly, e.g. '? extends int' is legal.
Expand Down
5 changes: 3 additions & 2 deletions topics/java/lci/xbgf/correct-doc1.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -88,7 +89,7 @@

<!-- ISSUE CORRECT SPECERROR
Another typo of JLS2 -->
<!-- INITCORR -->
<!-- INITCORR -->
<xbgf:unite>
<add>Identifer</add>
<to>Identifier</to>
Expand Down Expand Up @@ -228,5 +229,5 @@
<xbgf:vertical>
<nonterminal>CastExpression</nonterminal>
</xbgf:vertical>

</xbgf:sequence>
9 changes: 5 additions & 4 deletions topics/java/lci/xbgf/correct-doc2.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand All @@ -6,7 +7,7 @@
<xbgf:reroot>
<root>CompilationUnit</root>
</xbgf:reroot>

<!-- ISSUE CORRECT SPECERROR
This is an error (typo) in JLS2.
Expand All @@ -20,7 +21,7 @@
<add>ConstantModifer</add>
<to>ConstantModifier</to>
</xbgf:unite>

<!-- ISSUE CORRECT SPECERROR
Another typo of JLS2 -->
<!-- INITCORR -->
Expand Down Expand Up @@ -61,7 +62,7 @@
<xbgf:vertical>
<nonterminal>ClassName</nonterminal>
</xbgf:vertical>

<!-- ISSUE CORRECT SPECERROR
- Fail: ConstructorDeclarator.
- [], ,([n(Identifier), t((), ?(n(FormalParameterList)), t())])
Expand Down Expand Up @@ -210,5 +211,5 @@
<xbgf:vertical>
<nonterminal>CastExpression</nonterminal>
</xbgf:vertical>

</xbgf:sequence>
3 changes: 2 additions & 1 deletion topics/java/lci/xbgf/correct-doc3.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -421,7 +422,7 @@
the same problem
-->
<!-- KNOWNBUG -->
<!-- KNOWNBUG -->
<xbgf:widen>
<bgf:expression>
<nonterminal>VariableModifiers</nonterminal>
Expand Down
7 changes: 4 additions & 3 deletions topics/java/lci/xbgf/deyaccifyStatements.xbgf
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">

<!--
- Fail: SwitchBlockStatementGroups.
- [], *(n(SwitchBlockStatementGroup))
Expand Down Expand Up @@ -42,7 +43,7 @@
</bgf:expression>
</bgf:production>
</xbgf:extract>

<!--
- Fail: Catches.
- [], ,([n(CatchClause), *(n(CatchClause))])
Expand All @@ -59,4 +60,4 @@
-->
<xbgf:deyaccify>BlockStatements</xbgf:deyaccify>

</xbgf:sequence>
</xbgf:sequence>
7 changes: 4 additions & 3 deletions topics/java/lci/xbgf/edit-doc1.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -50,7 +51,7 @@
<nonterminal>TypeImportOnDemandDeclaration</nonterminal>
</in>
</xbgf:fold>


<!--
Local substitution:
Expand Down Expand Up @@ -308,5 +309,5 @@
<xbgf:vertical>
<nonterminal>ClassInstanceCreationExpression</nonterminal>
</xbgf:vertical>
</xbgf:sequence>

</xbgf:sequence>
3 changes: 2 additions & 1 deletion topics/java/lci/xbgf/edit-doc2.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -1380,7 +1381,7 @@
<xbgf:vertical>
<nonterminal>ArrayInitializer</nonterminal>
</xbgf:vertical>
<!-- CORRECTION -->
<!-- CORRECTION -->
<xbgf:disappear>
<bgf:production>
<nonterminal>ArrayInitializer</nonterminal>
Expand Down
5 changes: 3 additions & 2 deletions topics/java/lci/xbgf/edit-doc3.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -39,12 +40,12 @@
</bgf:production>
</vertical>
</xbgf:add>

<!-- finishing touches -->
<xbgf:eliminate>FormalParameterList</xbgf:eliminate>
<xbgf:eliminate>LastFormalParameter</xbgf:eliminate>
<xbgf:eliminate>NonWildTypeArguments</xbgf:eliminate>
<xbgf:eliminate>ReferenceTypeList</xbgf:eliminate>
<xbgf:eliminate>TypeDeclSpecifier</xbgf:eliminate>

</xbgf:sequence>
7 changes: 4 additions & 3 deletions topics/java/lci/xbgf/editDeclarations.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -254,7 +255,7 @@
<xbgf:fold>
<nonterminal>QualifiedIdentifierList</nonterminal>
</xbgf:fold>

<!--
- Fail: InterfaceDeclaration.
- [], ,([?(n(Modifiers)), t(interface), n(Identifier), ?(n(ExtendsInterfaces)), n(InterfaceBody)])
Expand Down Expand Up @@ -1315,7 +1316,7 @@
</in>
</xbgf:extract>
</xbgf:atomic>

<!-- ISSUE EXTEND
- Fail: InterfaceMemberDecl.
- [], ;([n(InterfaceMethodOrFieldDecl), ,([t(void), n(Identifier), n(VoidInterfaceMethodDeclaratorRest)])])
Expand Down Expand Up @@ -1985,7 +1986,7 @@ Block:
</bgf:production>
</xbgf:upgrade>
<xbgf:inline>ConstructorBody</xbgf:inline>

<!-- ISSUE EXTEND
Empty class body declaration -->
<!-- EXTENSION -->
Expand Down
7 changes: 4 additions & 3 deletions topics/java/lci/xbgf/editExpressions-doc2.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -257,8 +258,8 @@
</bgf:expression>
</bgf:production>
</xbgf:introduce>
<!-- RELAXATION -->
<xbgf:add>
<!-- RELAXATION -->
<xbgf:add>
<vertical>
<bgf:production>
<nonterminal>Primary</nonterminal>
Expand Down Expand Up @@ -720,4 +721,4 @@
</vertical>
</xbgf:remove>

</xbgf:sequence>
</xbgf:sequence>
3 changes: 2 additions & 1 deletion topics/java/lci/xbgf/editExpressions-doc3.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -1099,7 +1100,7 @@
<nonterminal>ForControl</nonterminal>
</in>
</xbgf:narrow>
<xbgf:extract>
<xbgf:extract>
<bgf:production>
<nonterminal>ForVarControlRest</nonterminal>
<bgf:expression>
Expand Down
7 changes: 4 additions & 3 deletions topics/java/lci/xbgf/editExpressions-jls1.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down Expand Up @@ -398,8 +399,8 @@
</bgf:production>
</xbgf:define>
<!-- GENERALITY -->
<!-- RELAXATION -->
<xbgf:define>
<!-- RELAXATION -->
<xbgf:define>
<bgf:production>
<nonterminal>ArrayCreatorRest</nonterminal>
<bgf:expression>
Expand Down Expand Up @@ -598,4 +599,4 @@
</bgf:production>
</xbgf:appear>

</xbgf:sequence>
</xbgf:sequence>
1 change: 1 addition & 0 deletions topics/java/lci/xbgf/eliminate-doc2.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down
1 change: 1 addition & 0 deletions topics/java/lci/xbgf/extend-doc1.xbgf
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<xbgf:sequence
xmlns:bgf="http://planet-sl.org/bgf"
xmlns:xbgf="http://planet-sl.org/xbgf">
Expand Down

0 comments on commit a192a16

Please sign in to comment.