Permalink
Browse files

changed undefine syntax; propagated the changes everywhere

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@769 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information...
grammarware committed Feb 15, 2010
1 parent 713a491 commit f628ffd9ba9e0d4d1f12e710a54f0fbc447bf7ac
@@ -347,10 +347,11 @@ xml2xbgf(T,unchain(P2))
child(name(bgf:production),T,P1),
xmlToP(P1,P2).
xml2xbgf(T,undefine(N))
xml2xbgf(T,undefine(Ns2))
:-
self(name(xbgf:undefine),T),
content(T,N).
children(name(nonterminal),T,Ns1),
maplist(content,Ns1,Ns2).
xml2xbgf(T,redefine(Ps2))
:-
View
@@ -109,7 +109,7 @@ ps2n(Ps1,N)
redefine(Ps1,G1,G2)
:-
ps2n(Ps1,N),
undefine(N,G1,G3),
undefine1(N,G1,G3),
define(Ps1,G3,G2).
@@ -1379,8 +1379,13 @@ unchain(P1,g(Rs,Ps1),g(Rs,Ps4))
%
% Undefine a nonterminal, i.e., remove all productions
%
undefine([],g(Rs1,Ps1),g(Rs1,Ps1)).
undefine([N|Ns],g(Rs1,Ps1),g(Rs3,Ps3))
:-
undefine1(N,g(Rs1,Ps1),g(Rs2,Ps2)),
undefine(Ns,g(Rs2,Ps2),g(Rs3,Ps3)).
undefine(N,g(Rs1,Ps1),g(Rs2,Ps2))
undefine1(N,g(Rs1,Ps1),g(Rs2,Ps2))
:-
definedNs(Ps1,Defined),
require(
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>slps_xsd</RootNamespace>
<AssemblyName>slps-xsd</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -32,6 +32,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -59,6 +60,7 @@
</Target>
-->
<ItemGroup>
<None Include="app.config" />
<None Include="bgf.xsd" />
<None Include="btf.xsd" />
<None Include="edd.xsd">
View
@@ -1084,11 +1084,10 @@
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="bgf:nonterminal">
<xsd:attribute name="tag" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
<xsd:sequence>
<xsd:element name="nonterminal" type="bgf:nonterminal" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="tag" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
@@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>slps_xsl</RootNamespace>
<AssemblyName>slps-xsl</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -32,6 +32,7 @@
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -97,4 +98,7 @@
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
</Project>
View
@@ -5,7 +5,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:import href="bgf2bnf.xslt" />
<xsl:output
method="text"
encoding="UTF-8"
@@ -39,7 +39,7 @@
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- chain, define, ... -->
<xsl:template match="xbgf:*">
@@ -91,7 +91,19 @@
</xsl:text>
</xsl:template>
<xsl:template match="xbgf:deyaccify|xbgf:eliminate|xbgf:horizontal|xbgf:inline|xbgf:undefine">
<xsl:template match="xbgf:undefine">
<xsl:value-of select="local-name()" />
<xsl:text>(</xsl:text>
<xsl:value-of select="*[1]/text()"/>
<xsl:for-each select="*[position()>1]">
<xsl:text>, </xsl:text>
<xsl:value-of select="text()"/>
</xsl:for-each>
<xsl:text>);
</xsl:text>
</xsl:template>
<xsl:template match="xbgf:deyaccify|xbgf:eliminate|xbgf:horizontal|xbgf:inline">
<xsl:value-of select="local-name()" />
<xsl:text>(</xsl:text>
<xsl:value-of select="text()"/>
@@ -198,7 +210,7 @@
<xsl:text>);
</xsl:text>
</xsl:template>
<xsl:template match="xbgf:reroot">
<xsl:value-of select="local-name()" />
<xsl:text>(</xsl:text>
@@ -258,4 +270,4 @@
</xsl:text>
</xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,8 +10,29 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>java_lci</RootNamespace>
<AssemblyName>java-lci</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -54,6 +75,7 @@
<None Include="..\..\..\shared\xsd\xbgf.xsd">
<Link>xbgf.xsd</Link>
</None>
<None Include="app.config" />
<None Include="java.lcf" />
<None Include="xbgf\correct-impl1.xbgf" />
<None Include="xbgf\correct-impl2.xbgf" />
@@ -126,4 +148,26 @@
<None Include="xbgf\rename-read21.xbgf" />
<None Include="xbgf\rename-read3.xbgf" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.VisualBasic.PowerPacks.10.0">
<Visible>False</Visible>
<ProductName>Microsoft Visual Basic PowerPacks 10.0</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
</Project>
@@ -1,6 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C# Express 2008
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "java-lci", "java-lci.csproj", "{9DF685A6-6572-47F9-8DE3-1E827BFDB62F}"
EndProject
Global
@@ -214,7 +214,9 @@
<!-- undefine lexical term -->
<!-- GENERALITY -->
<!-- RELAXATION -->
<xbgf:undefine>Identifier</xbgf:undefine>
<xbgf:undefine>
<nonterminal>Identifier</nonterminal>
</xbgf:undefine>
<!-- ISSUE CORRECT SPECERROR
Real error in JLS2:
@@ -187,7 +187,9 @@ Annotation:
<!-- undefine lexical term -->
<!-- GENERALITY -->
<!-- RELAXATION -->
<xbgf:undefine>Identifier</xbgf:undefine>
<xbgf:undefine>
<nonterminal>Identifier</nonterminal>
</xbgf:undefine>
<!-- ISSUE CORRECT SPECERROR -->
<!-- not right because VariableDeclarator starts with Identifier:
@@ -8,7 +8,9 @@
{ [ ExplicitConstructorInvocation ] [ BlockStatements ] }
-->
<!-- RELAXATION -->
<xbgf:undefine>ConstructorBody</xbgf:undefine>
<xbgf:undefine>
<nonterminal>ConstructorBody</nonterminal>
</xbgf:undefine>
<!-- RELAXATION -->
<xbgf:unite>
<add>ConstructorBody</add>
@@ -136,7 +136,9 @@
<xbgf:inline>IfThenStatement</xbgf:inline>
<!-- GENERALITY -->
<!-- RELAXATION -->
<xbgf:undefine>StatementNoShortIf</xbgf:undefine>
<xbgf:undefine>
<nonterminal>StatementNoShortIf</nonterminal>
</xbgf:undefine>
<xbgf:eliminate>WhileStatementNoShortIf</xbgf:eliminate>
<xbgf:eliminate>IfThenElseStatementNoShortIf</xbgf:eliminate>
<xbgf:eliminate>ForStatementNoShortIf</xbgf:eliminate>
@@ -725,21 +725,16 @@ vs
</xbgf:vertical>
</xbgf:atomic>
<!-- BREFACTOR -->
<xbgf:undefine>MultiplicativeExpression</xbgf:undefine>
<!-- BREFACTOR -->
<xbgf:undefine>AdditiveExpression</xbgf:undefine>
<!-- BREFACTOR -->
<xbgf:undefine>ShiftExpression</xbgf:undefine>
<!-- BREFACTOR -->
<xbgf:undefine>RelationalExpression</xbgf:undefine>
<!-- BREFACTOR -->
<xbgf:undefine>EqualityExpression</xbgf:undefine>
<!-- BREFACTOR -->
<xbgf:undefine>AndExpression</xbgf:undefine>
<!-- BREFACTOR -->
<xbgf:undefine>ExclusiveOrExpression</xbgf:undefine>
<!-- BREFACTOR -->
<xbgf:undefine>InclusiveOrExpression</xbgf:undefine>
<xbgf:undefine>
<nonterminal>MultiplicativeExpression</nonterminal>
<nonterminal>AdditiveExpression</nonterminal>
<nonterminal>ShiftExpression</nonterminal>
<nonterminal>RelationalExpression</nonterminal>
<nonterminal>EqualityExpression</nonterminal>
<nonterminal>AndExpression</nonterminal>
<nonterminal>ExclusiveOrExpression</nonterminal>
<nonterminal>InclusiveOrExpression</nonterminal>
</xbgf:undefine>
<xbgf:eliminate>ConditionalAndExpression</xbgf:eliminate>
<!-- And now "Expression1" -->
@@ -823,9 +818,10 @@ vs
<!-- last effort for Expression1-->
<!-- BREFACTOR -->
<xbgf:undefine>LeftHandSide</xbgf:undefine>
<!-- BREFACTOR -->
<xbgf:undefine>Assignment</xbgf:undefine>
<xbgf:undefine>
<nonterminal>LeftHandSide</nonterminal>
<nonterminal>Assignment</nonterminal>
</xbgf:undefine>
<!-- RELAXATION -->
<xbgf:remove>
<vertical>
@@ -646,7 +646,9 @@
ExceptionTypeList vs QualifiedIdentifierList -->
<!-- GENERALITY -->
<!-- RELAXATION -->
<xbgf:undefine>ExceptionTypeList</xbgf:undefine>
<xbgf:undefine>
<nonterminal>ExceptionTypeList</nonterminal>
</xbgf:undefine>
<!-- RELAXATION -->
<xbgf:unite>
<add>ExceptionTypeList</add>
@@ -274,7 +274,9 @@
<!-- Getting rid of all of them -->
<!-- BREFACTOR -->
<xbgf:undefine>StatementNoShortIf</xbgf:undefine>
<xbgf:undefine>
<nonterminal>StatementNoShortIf</nonterminal>
</xbgf:undefine>
<xbgf:eliminate>ForStatementNoShortIf</xbgf:eliminate>
<xbgf:eliminate>WhileStatementNoShortIf</xbgf:eliminate>
<xbgf:eliminate>LabeledStatementNoShortIf</xbgf:eliminate>
Oops, something went wrong.

0 comments on commit f628ffd

Please sign in to comment.