7204867 Move antlr from the FOSS consolidation into Userland
authorRich Burridge <rich.burridge@oracle.com>
Tue, 30 Oct 2012 06:55:04 -0700
changeset 1035 ffa1c1456e97
parent 1034 976708995283
child 1036 3b51f60a0267
7204867 Move antlr from the FOSS consolidation into Userland
components/antlr/Makefile
components/antlr/antlr.license
components/antlr/antlr.p5m
components/antlr/files/antlr.1
components/antlr/patches/antlr-2.7.7-newgcc.patch
components/antlr/patches/antlr-jedit.patch
components/meta-packages/history/SUNWantlr2.p5m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/antlr/Makefile	Tue Oct 30 06:55:04 2012 -0700
@@ -0,0 +1,73 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+#
+
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		antlr
+COMPONENT_VERSION=	2.7.7
+COMPONENT_PROJECT_URL=	http://www.antlr.org/
+COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH=	\
+    sha256:853aeb021aef7586bda29e74a6b03006bcb565a755c86b66032d8ec31b67dbb9
+COMPONENT_ARCHIVE_URL=	http://www.antlr2.org/download/$(COMPONENT_ARCHIVE)
+
+# Use version of Java defined in ../../make-rules/shared-macros.mk
+PATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
+
+include ../../make-rules/prep.mk
+include ../../make-rules/configure.mk
+include ../../make-rules/ips.mk
+
+PATCH_LEVEL =		0
+
+CONFIGURE_OPTIONS +=	--without-examples
+
+# pkgdepend doesn't like the first line of a Python script to be:
+# '#!/usr/bin/env python' so turn it into '#!/usr/bin/python2.6'
+COMPONENT_POST_CONFIGURE_ACTION = \
+	$(GSED) -i -e 's/env python/python2.6/' \
+		$(BUILD_DIR_32)/scripts/pyantlr.sh
+
+COMPONENT_INSTALL_ARGS += prefix=$(PROTOUSRDIR)
+COMPONENT_INSTALL_ARGS += libdir=$(PROTOUSRLIBDIR)
+COMPONENT_INSTALL_ARGS += bindir=$(PROTOUSRBINDIR)
+COMPONENT_INSTALL_ARGS += sbindir=$(PROTOUSRSBINDIR)
+
+# Needed to find the antlr man page.
+PKG_PROTO_DIRS +=	$(COMPONENT_DIR)/files
+
+COMPONENT_TEST_TARGETS = test
+
+# common targets
+build:          $(BUILD_32)
+
+install:        $(INSTALL_32)
+
+test:           $(TEST_32)
+
+BUILD_PKG_DEPENDENCIES =        $(BUILD_TOOLS)
+
+include ../../make-rules/depend.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/antlr/antlr.license	Tue Oct 30 06:55:04 2012 -0700
@@ -0,0 +1,36 @@
+----------------------
+- antlr 2.7.7 -
+----------------------
+Oracle Internal Tracking Number 5546
+
+SOFTWARE RIGHTS
+
+ANTLR 1989-2006 Developed by Terence Parr
+Partially supported by University of San Francisco & jGuru.com
+
+We reserve no legal rights to the ANTLR--it is fully in the
+public domain. An individual or company may do whatever
+they wish with source code distributed with ANTLR or the
+code generated by ANTLR, including the incorporation of
+ANTLR, or its output, into commerical software.
+
+We encourage users to develop software with ANTLR. However,
+we do ask that credit is given to us for developing
+ANTLR. By "credit", we mean that if you use ANTLR or
+incorporate any source code into one of your programs
+(commercial product, research project, or otherwise) that
+you acknowledge this fact somewhere in the documentation,
+research report, etc... If you like ANTLR and have
+developed a nice tool with the output, please mention that
+you developed it using ANTLR. In addition, we ask that the
+headers remain intact in our source code. As long as these
+guidelines are kept, we expect to continue enhancing this
+system and expect to make other tools available as they are
+completed.
+
+The primary ANTLR guy:
+
+Terence Parr
[email protected]
[email protected]
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/antlr/antlr.p5m	Tue Oct 30 06:55:04 2012 -0700
@@ -0,0 +1,148 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+#
+
+<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
+set name=pkg.fmri \
+    value=pkg:/developer/parser/antlr-2@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="ANother Tool for Language Recognition"
+set name=pkg.description \
+    value="ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing C++ or Java actions [You can use PCCTS 1.xx to generate C-based parsers]."
+set name=info.classification \
+    value="org.opensolaris.category.2008:Development/Other Languages"
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=LSARC/2009/049
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+dir  path=usr
+dir  path=usr/bin
+file path=usr/bin/antlr
+file path=usr/bin/antlr-config
+dir  path=usr/include
+dir  path=usr/include/antlr
+file path=usr/include/antlr/ANTLRException.hpp
+file path=usr/include/antlr/ANTLRUtil.hpp
+file path=usr/include/antlr/AST.hpp
+file path=usr/include/antlr/ASTArray.hpp
+file path=usr/include/antlr/ASTFactory.hpp
+file path=usr/include/antlr/ASTNULLType.hpp
+file path=usr/include/antlr/ASTPair.hpp
+file path=usr/include/antlr/ASTRefCount.hpp
+file path=usr/include/antlr/BaseAST.hpp
+file path=usr/include/antlr/BitSet.hpp
+file path=usr/include/antlr/CharBuffer.hpp
+file path=usr/include/antlr/CharInputBuffer.hpp
+file path=usr/include/antlr/CharScanner.hpp
+file path=usr/include/antlr/CharStreamException.hpp
+file path=usr/include/antlr/CharStreamIOException.hpp
+file path=usr/include/antlr/CircularQueue.hpp
+file path=usr/include/antlr/CommonAST.hpp
+file path=usr/include/antlr/CommonASTWithHiddenTokens.hpp
+file path=usr/include/antlr/CommonHiddenStreamToken.hpp
+file path=usr/include/antlr/CommonToken.hpp
+file path=usr/include/antlr/IOException.hpp
+file path=usr/include/antlr/InputBuffer.hpp
+file path=usr/include/antlr/LLkParser.hpp
+file path=usr/include/antlr/LexerSharedInputState.hpp
+file path=usr/include/antlr/MismatchedCharException.hpp
+file path=usr/include/antlr/MismatchedTokenException.hpp
+file path=usr/include/antlr/NoViableAltException.hpp
+file path=usr/include/antlr/NoViableAltForCharException.hpp
+file path=usr/include/antlr/Parser.hpp
+file path=usr/include/antlr/ParserSharedInputState.hpp
+file path=usr/include/antlr/RecognitionException.hpp
+file path=usr/include/antlr/RefCount.hpp
+file path=usr/include/antlr/SemanticException.hpp
+file path=usr/include/antlr/String.hpp
+file path=usr/include/antlr/Token.hpp
+file path=usr/include/antlr/TokenBuffer.hpp
+file path=usr/include/antlr/TokenRefCount.hpp
+file path=usr/include/antlr/TokenStream.hpp
+file path=usr/include/antlr/TokenStreamBasicFilter.hpp
+file path=usr/include/antlr/TokenStreamException.hpp
+file path=usr/include/antlr/TokenStreamHiddenTokenFilter.hpp
+file path=usr/include/antlr/TokenStreamIOException.hpp
+file path=usr/include/antlr/TokenStreamRecognitionException.hpp
+file path=usr/include/antlr/TokenStreamRetryException.hpp
+file path=usr/include/antlr/TokenStreamRewriteEngine.hpp
+file path=usr/include/antlr/TokenStreamSelector.hpp
+file path=usr/include/antlr/TokenWithIndex.hpp
+file path=usr/include/antlr/TreeParser.hpp
+file path=usr/include/antlr/TreeParserSharedInputState.hpp
+file path=usr/include/antlr/config.hpp
+dir  path=usr/lib
+file path=usr/lib/antlr.jar
+file path=usr/lib/antlr.py pkg.tmp.autopyc=false
+dir  path=usr/sbin
+file path=usr/sbin/pyantlr.sh
+dir  path=usr/share
+dir  path=usr/share/antlr-2.7.7
+file path=usr/share/antlr-2.7.7/__init__.py pkg.tmp.autopyc=false
+file path=usr/share/antlr-2.7.7/antlr-jedit.xml
+file path=usr/share/antlr-2.7.7/antlr-mode.el
+file path=usr/share/antlr-2.7.7/antlr.jar
+file path=usr/share/antlr-2.7.7/antlr.jar
+file path=usr/share/antlr-2.7.7/antlr.py pkg.tmp.autopyc=false
+dir  path=usr/share/doc
+dir  path=usr/share/doc/antlr-2.7.7
+file path=usr/share/doc/antlr-2.7.7/closure.gif
+file path=usr/share/doc/antlr-2.7.7/cpp-runtime.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/csharp-runtime.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/err.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/glossary.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/hidden.stream.gif
+file path=usr/share/doc/antlr-2.7.7/index.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/inheritance.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/j-guru-blue.jpg
+file path=usr/share/doc/antlr-2.7.7/jguru-logo.gif
+file path=usr/share/doc/antlr-2.7.7/lexer.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/lexer.to.parser.tokens.gif
+file path=usr/share/doc/antlr-2.7.7/logo.gif
+file path=usr/share/doc/antlr-2.7.7/metalang.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/optional.gif
+file path=usr/share/doc/antlr-2.7.7/options.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/posclosure.gif
+file path=usr/share/doc/antlr-2.7.7/python-runtime.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/runtime.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/sor.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/stream.perspectives.gif
+file path=usr/share/doc/antlr-2.7.7/stream.selector.gif
+file path=usr/share/doc/antlr-2.7.7/stream.splitter.gif
+file path=usr/share/doc/antlr-2.7.7/streams.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/subrule.gif
+file path=usr/share/doc/antlr-2.7.7/trees.html facet.doc.html=true
+file path=usr/share/doc/antlr-2.7.7/vocab.html facet.doc.html=true
+dir path=usr/share/man
+dir path=usr/share/man/man1
+file antlr.1 path=usr/share/man/man1/antlr.1
+legacy pkg=SUNWantlr2 \
+    desc="ANTLR, (AN)other (T)ool for (L)anguage (R)ecognition" \
+    name="ANTLR, (AN)other (T)ool for (L)anguage (R)ecognition"
+license antlr.license license="Public Domain"
+depend type=require fmri=shell/ksh
+
+# antlr-2 was previously in the 'desktop' consolidation. This optional
+# dependency is here to facilitate the safe transfer of the package 
+# to the 'userland' consolidation.
+depend type=optional fmri=consolidation/desktop/[email protected]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/antlr/files/antlr.1	Tue Oct 30 06:55:04 2012 -0700
@@ -0,0 +1,84 @@
+'\" t
+.TH antlr 1 "23 Oct 2012"
+.SH NAME
+antlr \- (AN)other (T)ool for (L)anguage (R)ecognition 
+.SH SYNOPSIS
+.B antlr
+[
+.B \-o 
+.I outputDir
+]
+[
+.B \-glib 
+.I superGrammar
+]
+[
+.B \-debug
+]
+[
+.B \-html
+]
+[
+.B \-diagnostic
+]
+[
+.B \-trace
+]
+[
+.B \-traceParser
+]
+[
+.B \-traceLexer
+]
+[
+.B \-traceTreeParser
+]
+.SH DESCRIPTION
+antlr (AN)other (T)ool for (L)anguage (R)ecognition - formerly known 
+as PCCTS - is a language tool that provides a framework for constructing 
+recognizers, compilers, and translators from grammatical descriptions 
+containing actions in the following languages: Java, C++, C# or Python.
+For additional information on using antlr, browse the complete HTML 
+documentation at:
+.IP
+.B file:/usr/share/doc/antlr-2.7.7/index.html 
+.LP
+.SH OPTIONS
+.TP
+.BI \-o " outputDir"
+Specify output directory where all output generated. 
+.TP
+.BI \-glib " superGrammar"
+Specify location of supergrammar file. 
+.TP
+.B \-debug
+Launch the ParseView debugger upon parser invocation. 
+.TP
+.B \-html
+Generate an html file from your grammar (minus actions). 
+.TP
+.B \-diagnostic
+Generate a textfile with diagnostics. 
+.TP
+.B \-trace
+Have all rules call traceIn/traceOut. 
+.TP
+.B \-traceParser
+Have parser rules call traceIn/traceOut. 
+.TP
+.B \-traceLexer
+Have lexer rules call traceIn/traceOut. 
+.TP
+.B \-traceTreeParser
+Have tree parser rules call traceIn/traceOut. 
+.SH FILES
+/usr/share/antlr-2.7.7/antlr.jar
+.IP
+antlr jar file
+.LP
+/usr/share/doc/antlr-2.7.7/index.html 
+.IP
+antlr API documentation generated with javadoc. 
+.LP
+.SH SEE ALSO
+\fBjava\fR(1), http://www.antlr2.org/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/antlr/patches/antlr-2.7.7-newgcc.patch	Tue Oct 30 06:55:04 2012 -0700
@@ -0,0 +1,12 @@
+diff -up ./lib/cpp/antlr/CharScanner.hpp.sav ./lib/cpp/antlr/CharScanner.hpp
+--- ./lib/cpp/antlr/CharScanner.hpp.sav	2009-03-20 14:42:43.000000000 -0400
++++ ./lib/cpp/antlr/CharScanner.hpp	2009-03-20 14:43:29.000000000 -0400
+@@ -11,6 +11,8 @@
+ #include <antlr/config.hpp>
+ 
+ #include <map>
++#include <strings.h>
++#include <cstdio>
+ 
+ #ifdef HAS_NOT_CCTYPE_H
+ #include <ctype.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/antlr/patches/antlr-jedit.patch	Tue Oct 30 06:55:04 2012 -0700
@@ -0,0 +1,33 @@
+--- extras/antlr-jedit.xml~	2003-03-01 23:28:04.000000000 +0200
++++ extras/antlr-jedit.xml	2003-03-01 23:38:17.000000000 +0200
+@@ -16,9 +16,6 @@
+ 	</PROPS>
+    
+    <RULES DEFAULT="KEYWORD1">
+-		<!-- whitespace: (space and tab) -->
+-		<WHITESPACE> </WHITESPACE>
+-		<WHITESPACE>	</WHITESPACE>
+ 
+       <!-- antlr specific rules -->
+       <SPAN DELEGATE="java::MAIN" TYPE="KEYWORD1">
+@@ -97,9 +94,7 @@
+    </RULES>
+    
+    <RULES DEFAULT="KEYWORD2" SET="PRODUCTION">
+-		<!-- whitespace: (space and tab) -->
+-		<WHITESPACE> </WHITESPACE>
+-		<WHITESPACE>	</WHITESPACE>
++
+ 		<!-- Silly comment -->
+ 		<SEQ TYPE="COMMENT1">/**/</SEQ>
+ 
+@@ -149,9 +144,6 @@
+    </RULES>
+ 
+    <RULES SET="KEYVALUE">
+-		<!-- whitespace: (space and tab) -->
+-		<WHITESPACE> </WHITESPACE>
+-		<WHITESPACE>	</WHITESPACE>
+       
+       <SEQ TYPE="KEYWORD1">{</SEQ>
+       
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/meta-packages/history/SUNWantlr2.p5m	Tue Oct 30 06:55:04 2012 -0700
@@ -0,0 +1,33 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+#
+
+#
+# Legacy package information for renamed SUNWantlr2 package
+#
+
+set name=pkg.fmri value=pkg:/[email protected],5.11-0.175.0.0.0.0.0
+set name=pkg.renamed value=true
+
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+
+depend fmri=developer/parser/[email protected] type=require