-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more restructuring, struggling to conform to own recipe
git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@616 ab42f6e0-554d-0410-b580-99e487e6eeb2
- Loading branch information
1 parent
5acd4a9
commit 8bed498
Showing
10 changed files
with
1,117 additions
and
950 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
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
File renamed without changes.
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,136 @@ | ||
<xbgf:sequence | ||
xmlns:bgf="http://planet-sl.org/bgf" | ||
xmlns:xbgf="http://planet-sl.org/xbgf"> | ||
|
||
<!-- | ||
Unified modifiers should look like this: | ||
|
||
ModifiersOpt: | ||
{ Modifier } | ||
ClassBodyDeclaration is defined as: | ||
";" | ||
[ "static" ] Block | ||
ModifiersOpt MemberDecl | ||
InterfaceBodyDeclaration is defined as: | ||
";" | ||
ModifiersOpt InterfaceMemberDecl | ||
ClassOrInterfaceDeclaration is defined as: | ||
ModifiersOpt ( ClassDeclaration | InterfaceDeclaration ) | ||
|
||
Non-unified modifiers take this form: | ||
|
||
InterfaceDeclaration is defined as: | ||
[ InterfaceModifiers ] "interface" Identifier [ ExtendsInterfaces ] InterfaceBody | ||
AbstractMethodModifiers is defined as: | ||
AbstractMethodModifier | ||
AbstractMethodModifiers AbstractMethodModifier | ||
ConstantDeclaration is defined as: | ||
[ ConstantModifiers ] Type VariableDeclarators | ||
InterfaceModifiers is defined as: | ||
InterfaceModifier | ||
InterfaceModifiers InterfaceModifier | ||
FieldDeclaration is defined as: | ||
[ FieldModifiers ] Type VariableDeclarators ";" | ||
MethodModifiers is defined as: | ||
MethodModifier | ||
MethodModifiers MethodModifier | ||
AbstractMethodDeclaration is defined as: | ||
[ AbstractMethodModifiers ] ResultType MethodDeclarator [ Throws ] ";" | ||
ClassDeclaration is defined as: | ||
[ ClassModifiers ] "class" Identifier [ Super ] [ Interfaces ] ClassBody | ||
FieldModifiers is defined as: | ||
FieldModifier | ||
FieldModifiers FieldModifier | ||
ConstructorModifiers is defined as: | ||
ConstructorModifier | ||
ConstructorModifiers ConstructorModifier | ||
ClassModifiers is defined as: | ||
ClassModifier | ||
ClassModifiers ClassModifier | ||
MethodHeader is defined as: | ||
[ MethodModifiers ] ResultType MethodDeclarator [ Throws ] | ||
ConstantModifiers is defined as: | ||
ConstantModifier | ||
ConstantModifiers ConstantModifer | ||
--> | ||
|
||
<!-- First the deyaccification --> | ||
<xbgf:deyaccify>Modifiers</xbgf:deyaccify> | ||
<xbgf:deyaccify>AbstractMethodModifiers</xbgf:deyaccify> | ||
<xbgf:deyaccify>InterfaceModifiers</xbgf:deyaccify> | ||
<xbgf:deyaccify>MethodModifiers</xbgf:deyaccify> | ||
<xbgf:deyaccify>FieldModifiers</xbgf:deyaccify> | ||
<xbgf:deyaccify>ConstructorModifiers</xbgf:deyaccify> | ||
<xbgf:deyaccify>ConstantModifiers</xbgf:deyaccify> | ||
|
||
<!-- ISSUE PERMISSIVENESS | ||
Now unification of singulars--> | ||
<xbgf:unite> | ||
<add>InterfaceModifier</add> | ||
<to>Modifier</to> | ||
</xbgf:unite> | ||
<xbgf:unite> | ||
<add>MethodModifier</add> | ||
<to>Modifier</to> | ||
</xbgf:unite> | ||
<xbgf:unite> | ||
<add>FieldModifier</add> | ||
<to>Modifier</to> | ||
</xbgf:unite> | ||
<xbgf:unite> | ||
<add>ConstructorModifier</add> | ||
<to>Modifier</to> | ||
</xbgf:unite> | ||
<xbgf:unite> | ||
<add>AbstractMethodModifier</add> | ||
<to>Modifier</to> | ||
</xbgf:unite> | ||
<xbgf:unite> | ||
<add>ConstantModifier</add> | ||
<to>Modifier</to> | ||
</xbgf:unite> | ||
|
||
<!-- Getting rid of plurals altogether --> | ||
<xbgf:eliminate>Modifiers</xbgf:eliminate> | ||
<xbgf:inline>AbstractMethodModifiers</xbgf:inline> | ||
<xbgf:inline>InterfaceModifiers</xbgf:inline> | ||
<xbgf:inline>MethodModifiers</xbgf:inline> | ||
<xbgf:inline>FieldModifiers</xbgf:inline> | ||
<xbgf:inline>ConstructorModifiers</xbgf:inline> | ||
<xbgf:inline>ConstantModifiers</xbgf:inline> | ||
<xbgf:massage> | ||
<bgf:expression> | ||
<optional> | ||
<bgf:expression> | ||
<plus> | ||
<bgf:expression> | ||
<nonterminal>Modifier</nonterminal> | ||
</bgf:expression> | ||
</plus> | ||
</bgf:expression> | ||
</optional> | ||
</bgf:expression> | ||
<bgf:expression> | ||
<star> | ||
<bgf:expression> | ||
<nonterminal>Modifier</nonterminal> | ||
</bgf:expression> | ||
</star> | ||
</bgf:expression> | ||
</xbgf:massage> | ||
|
||
<!-- Making new nonterminal --> | ||
<xbgf:extract> | ||
<bgf:production> | ||
<nonterminal>ModifiersOpt</nonterminal> | ||
<bgf:expression> | ||
<star> | ||
<bgf:expression> | ||
<nonterminal>Modifier</nonterminal> | ||
</bgf:expression> | ||
</star> | ||
</bgf:expression> | ||
</bgf:production> | ||
</xbgf:extract> | ||
|
||
</xbgf:sequence> |
Oops, something went wrong.