Update to upstream version 3.5
This commit is contained in:
parent
5c8dec1642
commit
533493fb4c
|
@ -7,3 +7,4 @@ antlr-3.2.jar
|
||||||
/libantlr3c-3.4.tar.gz
|
/libantlr3c-3.4.tar.gz
|
||||||
/antlr-3.4.tar.gz
|
/antlr-3.4.tar.gz
|
||||||
/antlr_python_runtime-3.1.3.tar.gz
|
/antlr_python_runtime-3.1.3.tar.gz
|
||||||
|
/antlr-3.5.tar.gz
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
From d0aa3d0a4f323cb1464c02d53711c2a0cd24c10d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Simacek <msimacek@redhat.com>
|
||||||
|
Date: Tue, 17 Jun 2014 19:36:24 +0200
|
||||||
|
Subject: [PATCH] java8 fix
|
||||||
|
|
||||||
|
Signed-off-by: Michael Simacek <msimacek@redhat.com>
|
||||||
|
---
|
||||||
|
tool/src/main/java/org/antlr/codegen/CodeGenerator.java | 2 +-
|
||||||
|
tool/src/main/java/org/antlr/tool/ErrorManager.java | 1 -
|
||||||
|
tool/src/main/java/org/antlr/tool/Grammar.java | 4 ++--
|
||||||
|
tool/src/main/java/org/antlr/tool/Strip.java | 2 +-
|
||||||
|
4 files changed, 4 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tool/src/main/java/org/antlr/codegen/CodeGenerator.java b/tool/src/main/java/org/antlr/codegen/CodeGenerator.java
|
||||||
|
index 57495b2..eada38e 100644
|
||||||
|
--- a/tool/src/main/java/org/antlr/codegen/CodeGenerator.java
|
||||||
|
+++ b/tool/src/main/java/org/antlr/codegen/CodeGenerator.java
|
||||||
|
@@ -1087,7 +1087,7 @@ public class CodeGenerator {
|
||||||
|
catch (Exception tse) {
|
||||||
|
ErrorManager.internalError("can't parse template action",tse);
|
||||||
|
}
|
||||||
|
- GrammarAST rewriteTree = parseResult.getTree();
|
||||||
|
+ GrammarAST rewriteTree = (GrammarAST)parseResult.getTree();
|
||||||
|
|
||||||
|
// then translate via codegen.g
|
||||||
|
CodeGenTreeWalker gen = new CodeGenTreeWalker(new CommonTreeNodeStream(rewriteTree));
|
||||||
|
diff --git a/tool/src/main/java/org/antlr/tool/ErrorManager.java b/tool/src/main/java/org/antlr/tool/ErrorManager.java
|
||||||
|
index d3223ae..122c861 100644
|
||||||
|
--- a/tool/src/main/java/org/antlr/tool/ErrorManager.java
|
||||||
|
+++ b/tool/src/main/java/org/antlr/tool/ErrorManager.java
|
||||||
|
@@ -385,7 +385,6 @@ public class ErrorManager {
|
||||||
|
public void runTimeError(STMessage msg) {
|
||||||
|
switch (msg.error) {
|
||||||
|
case NO_SUCH_ATTRIBUTE:
|
||||||
|
- case NO_SUCH_ATTRIBUTE_PASS_THROUGH:
|
||||||
|
case NO_SUCH_PROPERTY:
|
||||||
|
ErrorManager.warning(ErrorManager.MSG_STRING_TEMPLATE_ERROR, msg.toString());
|
||||||
|
return;
|
||||||
|
diff --git a/tool/src/main/java/org/antlr/tool/Grammar.java b/tool/src/main/java/org/antlr/tool/Grammar.java
|
||||||
|
index 91bbad9..dc4774a 100644
|
||||||
|
--- a/tool/src/main/java/org/antlr/tool/Grammar.java
|
||||||
|
+++ b/tool/src/main/java/org/antlr/tool/Grammar.java
|
||||||
|
@@ -706,7 +706,7 @@ public class Grammar {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- setGrammarTree(result.getTree());
|
||||||
|
+ setGrammarTree((GrammarAST)result.getTree());
|
||||||
|
|
||||||
|
//if ( grammarTree!=null ) System.out.println("grammar tree: "+grammarTree.toStringTree());
|
||||||
|
|
||||||
|
@@ -927,7 +927,7 @@ public class Grammar {
|
||||||
|
parser.setGrammarType(this.type);
|
||||||
|
try {
|
||||||
|
ANTLRParser.rule_return result = parser.rule();
|
||||||
|
- return result.getTree();
|
||||||
|
+ return (GrammarAST)result.getTree();
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
ErrorManager.error(ErrorManager.MSG_ERROR_CREATING_ARTIFICIAL_RULE,
|
||||||
|
diff --git a/tool/src/main/java/org/antlr/tool/Strip.java b/tool/src/main/java/org/antlr/tool/Strip.java
|
||||||
|
index f411090..ddda4ed 100644
|
||||||
|
--- a/tool/src/main/java/org/antlr/tool/Strip.java
|
||||||
|
+++ b/tool/src/main/java/org/antlr/tool/Strip.java
|
||||||
|
@@ -64,7 +64,7 @@ public class Strip {
|
||||||
|
tokens = new TokenRewriteStream(lex);
|
||||||
|
ANTLRv3Parser g = new ANTLRv3Parser(tokens);
|
||||||
|
ANTLRv3Parser.grammarDef_return r = g.grammarDef();
|
||||||
|
- CommonTree t = r.getTree();
|
||||||
|
+ CommonTree t = (CommonTree)r.getTree();
|
||||||
|
if (tree_option) System.out.println(t.toStringTree());
|
||||||
|
rewrite(g.getTreeAdaptor(),t,g.getTokenNames());
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.9.3
|
||||||
|
|
61
antlr3.spec
61
antlr3.spec
|
@ -1,19 +1,21 @@
|
||||||
#%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
#%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||||
|
|
||||||
%global antlr_version 3.4
|
%global antlr_version 3.5
|
||||||
|
%global c_runtime_version 3.4
|
||||||
#%global python_runtime_version 3.1.3
|
#%global python_runtime_version 3.1.3
|
||||||
%global javascript_runtime_version 3.1
|
%global javascript_runtime_version 3.1
|
||||||
|
|
||||||
Summary: ANother Tool for Language Recognition
|
Summary: ANother Tool for Language Recognition
|
||||||
Name: antlr3
|
Name: antlr3
|
||||||
Version: %{antlr_version}
|
Version: %{antlr_version}
|
||||||
Release: 18%{?dist}
|
Release: 1%{?dist}
|
||||||
URL: http://www.antlr.org/
|
URL: http://www.antlr3.org/
|
||||||
Source0: http://www.antlr.org/download/antlr-%{antlr_version}.tar.gz
|
Source0: http://www.antlr3.org/download/antlr-%{antlr_version}.tar.gz
|
||||||
Source1: http://www.antlr.org/download/C/libantlr3c-%{antlr_version}.tar.gz
|
Source1: http://www.antlr3.org/download/C/libantlr3c-%{c_runtime_version}.tar.gz
|
||||||
Source2: http://www.antlr.org/download/Python/antlr_python_runtime-%{python_runtime_version}.tar.gz
|
#Source2: http://www.antlr3.org/download/Python/antlr_python_runtime-%{python_runtime_version}.tar.gz
|
||||||
Source3: http://www.antlr.org/download/antlr-javascript-runtime-%{javascript_runtime_version}.zip
|
Source3: http://www.antlr3.org/download/antlr-javascript-runtime-%{javascript_runtime_version}.zip
|
||||||
Source9: antlr-runtime-MANIFEST.MF
|
Source9: antlr-runtime-MANIFEST.MF
|
||||||
|
Patch1: 0001-java8-fix.patch
|
||||||
License: BSD
|
License: BSD
|
||||||
BuildRequires: maven-local
|
BuildRequires: maven-local
|
||||||
BuildRequires: maven-enforcer-plugin
|
BuildRequires: maven-enforcer-plugin
|
||||||
|
@ -69,13 +71,14 @@ Javascript run-time support for ANTLR-generated parsers
|
||||||
|
|
||||||
%package C
|
%package C
|
||||||
Summary: C run-time support for ANTLR-generated parsers
|
Summary: C run-time support for ANTLR-generated parsers
|
||||||
|
Version: %{c_runtime_version}
|
||||||
|
|
||||||
%description C
|
%description C
|
||||||
C run-time support for ANTLR-generated parsers
|
C run-time support for ANTLR-generated parsers
|
||||||
|
|
||||||
%package C-devel
|
%package C-devel
|
||||||
Summary: Header files for the C bindings for ANTLR-generated parsers
|
Summary: Header files for the C bindings for ANTLR-generated parsers
|
||||||
Requires: %{name}-C = %{antlr_version}-%{release}
|
Requires: %{name}-C = %{c_runtime_version}-%{release}
|
||||||
|
|
||||||
%description C-devel
|
%description C-devel
|
||||||
Header files for the C bindings for ANTLR-generated parsers
|
Header files for the C bindings for ANTLR-generated parsers
|
||||||
|
@ -85,7 +88,7 @@ Summary: API documentation for the C run-time support for ANTLR-generated
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: graphviz
|
BuildRequires: graphviz
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
Requires: %{name}-C = %{antlr_version}-%{release}
|
Requires: %{name}-C = %{c_runtime_version}-%{release}
|
||||||
|
|
||||||
%description C-docs
|
%description C-docs
|
||||||
This package contains doxygen documentation with instruction
|
This package contains doxygen documentation with instruction
|
||||||
|
@ -103,13 +106,25 @@ C run-time support for ANTLR-generated parsers.
|
||||||
#%description python
|
#%description python
|
||||||
#Python run-time support for ANTLR-generated parsers
|
#Python run-time support for ANTLR-generated parsers
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: API documentation for %{name}
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n antlr-%{antlr_version} -a 1 -a 2 -a 3
|
%setup -q -n antlr3-antlr-%{antlr_version} -a 1 -a 3
|
||||||
sed -i "s,\${buildNumber},`cat %{_sysconfdir}/fedora-release` `date`," tool/src/main/resources/org/antlr/antlr.properties
|
sed -i "s,\${buildNumber},`cat %{_sysconfdir}/fedora-release` `date`," tool/src/main/resources/org/antlr/antlr.properties
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%pom_disable_module antlr3-maven-archetype
|
%pom_disable_module antlr3-maven-archetype
|
||||||
%pom_disable_module gunit
|
%pom_disable_module gunit
|
||||||
%pom_disable_module gunit-maven-plugin
|
%pom_disable_module gunit-maven-plugin
|
||||||
|
%pom_disable_module antlr-complete
|
||||||
|
|
||||||
|
%pom_remove_plugin :maven-source-plugin
|
||||||
|
%pom_remove_plugin :maven-javadoc-plugin
|
||||||
|
|
||||||
# compile for target 1.6, see BZ#842572
|
# compile for target 1.6, see BZ#842572
|
||||||
sed -i 's/jsr14/1.6/' antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml \
|
sed -i 's/jsr14/1.6/' antlr3-maven-archetype/src/main/resources/archetype-resources/pom.xml \
|
||||||
|
@ -123,15 +138,13 @@ sed -i 's/jsr14/1.6/' antlr3-maven-archetype/src/main/resources/archetype-resour
|
||||||
# remove corrupted files:
|
# remove corrupted files:
|
||||||
find . -name '._*' -delete
|
find . -name '._*' -delete
|
||||||
|
|
||||||
%pom_remove_plugin :maven-source-plugin antlr3-maven-plugin
|
%pom_xpath_remove pom:bootclasspath
|
||||||
%pom_remove_plugin :maven-javadoc-plugin antlr3-maven-plugin
|
|
||||||
%pom_remove_plugin :buildnumber-maven-plugin
|
|
||||||
|
|
||||||
%pom_xpath_inject pom:parent '<relativePath>../../</relativePath>' runtime/Java
|
|
||||||
|
|
||||||
# workarounds bug in filtering (Mark invalid)
|
# workarounds bug in filtering (Mark invalid)
|
||||||
%pom_xpath_remove pom:resource/pom:filtering
|
%pom_xpath_remove pom:resource/pom:filtering
|
||||||
|
|
||||||
|
%pom_xpath_set -r 'pom:source|pom:target' 1.6
|
||||||
|
|
||||||
%mvn_package :antlr-runtime java
|
%mvn_package :antlr-runtime java
|
||||||
%mvn_package : tool
|
%mvn_package : tool
|
||||||
|
|
||||||
|
@ -140,7 +153,7 @@ find . -name '._*' -delete
|
||||||
%mvn_file :antlr-maven-plugin antlr3-maven-plugin
|
%mvn_file :antlr-maven-plugin antlr3-maven-plugin
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%mvn_build -f -j
|
%mvn_build -f
|
||||||
|
|
||||||
## Build the python runtime
|
## Build the python runtime
|
||||||
#pushd antlr_python_runtime-%{python_runtime_version}
|
#pushd antlr_python_runtime-%{python_runtime_version}
|
||||||
|
@ -148,10 +161,10 @@ find . -name '._*' -delete
|
||||||
#popd
|
#popd
|
||||||
|
|
||||||
# Build the C runtime
|
# Build the C runtime
|
||||||
pushd libantlr3c-%{antlr_version}-beta4
|
pushd libantlr3c-%{c_runtime_version}-beta4
|
||||||
|
|
||||||
%configure --disable-abiflags --enable-debuginfo \
|
%configure --disable-abiflags --enable-debuginfo \
|
||||||
%ifarch x86_64 ppc64 s390x sparc64
|
%if 0%{?__isa_bits} == 64
|
||||||
--enable-64bit
|
--enable-64bit
|
||||||
%else
|
%else
|
||||||
%{nil}
|
%{nil}
|
||||||
|
@ -185,7 +198,7 @@ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/antlr
|
||||||
#popd
|
#popd
|
||||||
|
|
||||||
# install C runtime
|
# install C runtime
|
||||||
pushd libantlr3c-%{antlr_version}-beta4
|
pushd libantlr3c-%{c_runtime_version}-beta4
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
rm $RPM_BUILD_ROOT%{_libdir}/libantlr3c.{a,la}
|
rm $RPM_BUILD_ROOT%{_libdir}/libantlr3c.{a,la}
|
||||||
pushd api/man/man3
|
pushd api/man/man3
|
||||||
|
@ -209,7 +222,7 @@ popd
|
||||||
%postun C -p /sbin/ldconfig
|
%postun C -p /sbin/ldconfig
|
||||||
|
|
||||||
%files tool -f .mfiles-tool
|
%files tool -f .mfiles-tool
|
||||||
%doc tool/{README.txt,LICENSE.txt,CHANGES.txt}
|
%doc README.txt tool/{LICENSE.txt,CHANGES.txt}
|
||||||
%{_bindir}/antlr3
|
%{_bindir}/antlr3
|
||||||
|
|
||||||
#%files python
|
#%files python
|
||||||
|
@ -226,7 +239,7 @@ popd
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%files C-docs
|
%files C-docs
|
||||||
%doc libantlr3c-%{antlr_version}-beta4/api/
|
%doc libantlr3c-%{c_runtime_version}-beta4/api/
|
||||||
|
|
||||||
%files java -f .mfiles-java
|
%files java -f .mfiles-java
|
||||||
%doc tool/LICENSE.txt
|
%doc tool/LICENSE.txt
|
||||||
|
@ -235,7 +248,13 @@ popd
|
||||||
%doc tool/LICENSE.txt
|
%doc tool/LICENSE.txt
|
||||||
%{_datadir}/antlr/
|
%{_datadir}/antlr/
|
||||||
|
|
||||||
|
%files javadoc -f .mfiles-javadoc
|
||||||
|
%doc tool/LICENSE.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 17 2014 Michael Simacek <msimacek@redhat.com> - 3.5-1
|
||||||
|
- Update to upstream version 3.5
|
||||||
|
|
||||||
* Tue Jun 17 2014 Michael Simacek <msimacek@redhat.com> - 3.4-18
|
* Tue Jun 17 2014 Michael Simacek <msimacek@redhat.com> - 3.4-18
|
||||||
- Specfile cleanup
|
- Specfile cleanup
|
||||||
|
|
||||||
|
|
7
sources
7
sources
|
@ -1,6 +1,3 @@
|
||||||
5f58e5f8c8a052225d57d518d77742fc antlr-javascript-runtime-3.1.zip
|
247bfb9dbb4977b59cd491d6fe02195a antlr-3.5.tar.gz
|
||||||
b5e66bec4b95d5af7363906a5f3d27a8 antlr3-maven-plugin-3.2.jar
|
|
||||||
ee7dc3fb20cf3e9efd871e297c0d532b antlr-3.2.jar
|
|
||||||
68840c922b1465dc11b06fce3d73f64f libantlr3c-3.4.tar.gz
|
68840c922b1465dc11b06fce3d73f64f libantlr3c-3.4.tar.gz
|
||||||
065c14673692db35c83dc26b75223fdb antlr-3.4.tar.gz
|
5f58e5f8c8a052225d57d518d77742fc antlr-javascript-runtime-3.1.zip
|
||||||
ef7d734646a06c0585d87de2639ad418 antlr_python_runtime-3.1.3.tar.gz
|
|
||||||
|
|
Loading…
Reference in New Issue