--- coco-java-20081106.orig/cocoj +++ coco-java-20081106/cocoj @@ -0,0 +1,3 @@ +#!/bin/sh +java -jar /usr/share/coco-java/Coco.jar $* + --- coco-java-20081106.orig/Makefile +++ coco-java-20081106/Makefile @@ -0,0 +1,13 @@ +all: + javac -d . -source 1.4 -target 1.4 Trace.java Scanner.java Tab.java DFA.java ParserGen.java Parser.java Coco.java + jar cfm Coco.jar Coco.manifest Coco/*.class + rm -rf Coco + +clean: + rm -f Coco.jar + +install: + install -m 0755 cocoj $(DESTDIR)/usr/bin + install -m 0644 Coco.jar $(DESTDIR)/usr/share/coco-java + install -m 0644 *frame $(DESTDIR)/usr/share/coco-java + --- coco-java-20081106.orig/debian/compat +++ coco-java-20081106/debian/compat @@ -0,0 +1 @@ +7 --- coco-java-20081106.orig/debian/changelog +++ coco-java-20081106/debian/changelog @@ -0,0 +1,220 @@ +coco-java (20081106-1) unstable; urgency=low + + * New upstream release. + * Minor change: code cleanup. + * Minor change: More robust Scanner, never assign Buffer.EOF to a char (which + results in an overflow, should do no harm). + + -- Markus Loeberbauer Mon, 10 Nov 2008 09:45:00 +0100 + +coco-java (20081001-3) unstable; urgency=low + + * Build with java 1.4 compatibility (Closes: 503771). + + -- Markus Loeberbauer Tue, 28 Oct 2008 11:15:00 +0100 + +coco-java (20081001-2) unstable; urgency=low + + * More robust clean target in make file. + + -- Markus Loeberbauer Sat, 04 Oct 2008 10:05:00 +0100 + +coco-java (20081001-1) unstable; urgency=low + + * New upstream release + * Bugfix: bug in the construction of the scanner automaton fixed. + * Minor change: More robust Peek method is Scanner. + * Minor change: Literal check is now handled by a hash-table-lookup instead + of an if-else-if cascade. + * Minor change: Allow underscores (_) in identifiers. + + -- Markus Loeberbauer Tue, 23 Sep 2008 20:10:00 +0100 + +coco-java (20070906-2) unstable; urgency=low + + * Minor Bugfix: Allow buffer position to be set to the end of the file, + this allows grammars without trailing new-line. + + -- Markus Loeberbauer Thu, 10 Sep 2007 14:15:00 +0100 + +coco-java (20070906-1) unstable; urgency=low + + * Enhanced support for input streams: Previously we did support files via + file names and file streams via input streams, but not non seek-able + streams (e.g. network). Now we support both stream types. Please note + since our memory buffer keeps the entire history of a stream, the maximum + supported stream size is limited by the available memory and the runtime + environment. + * The possibility to set the output path with command line option "-o". + * The main method returns 1 if the grammar contained an error. + + -- Markus Loeberbauer Thu, 06 Sep 2007 15:15:00 +0100 + +coco-java (20061206-1) unstable; urgency=low + + * The declaration of standard whitespaces (namely space) is again done in + the file Scanner.frame. + + -- Markus Loeberbauer Wed, 06 Dec 2006 15:00:00 +0100 + +coco-java (20060919-2) unstable; urgency=low + + * Added binary-arch target in debian/rules (Closes: 395586). + * It's now a non native package (Closes: 396539). + + -- Markus Loeberbauer Fri, 10 Nov 2006 14:21:58 +0100 + +coco-java (20060919-1) unstable; urgency=low + + * Misplaced resolvers cause warnings instead of errros now. + * The scanners generated by Coco/R can now also process Unicode + characters in UTF-8 format. This implies that Coco/R itself + supports UTF-8 now. + * Attributes may now also contain the characters '<' and '>' + (e.g. for operators or generic types). Such attributes must + be enclosed in <. and .> brackets. + * Error messages are written to an error stream instead of to the console. + The error stream can be changed by the user. + * The scanner now also recognizes the Unicode byte order mark for UTF-8. + + -- Markus Loeberbauer Tue, 19 Sep 2006 16:00:00 +0100 + +coco-java (20051117-1) unstable; urgency=low + + * The if else if cascade of an alternative does not get optimized to a + switch statement anymore if the alternative contains a LL(1) warning, + thus coco generates at least compileable code in such a situation. + + -- Markus Loeberbauer Thu, 17 Nov 2005 17:00:00 +0100 + +coco-java (20050926-1) unstable; urgency=low + + * Constant declarations are generated for pragma names in the parser now + (in case you want to access those names in semantic actions). + + -- Markus Loeberbauer Tue, 27 Sep 2005 19:18:00 +0100 + +coco-java (20050919-1) unstable; urgency=low + + * Bug fixed in Tab.cs. Coco reported a misplaced resolver if 2 alternatives + at the end of a production were deletable and a resolver was placed + in front of the first one. + + -- Markus Loeberbauer Mon, 19 Sep 2005 16:00:00 +0100 + +coco-java (20050504-1) unstable; urgency=low + + * New Upstream release + * Small bug in DFA fixed (EOF was not recognized correctly if ANY was used). + * Coco/R as well as the generated compilers are reentrant now. + That means that all fields and methods are non-static. + Please look at the user manual to see how to create and + initialize a scanner and a parser object in your compiler. + * In addition to bracket comments (/* ... */), ATG files can also contain + end of line comments now (// ... cr lf) + * Corrected some package troubles. (Closes: #306622) + + -- Markus Loeberbauer Tue, 04 May 2005 16:00:00 +0100 + +coco-java (20050316-3) unstable; urgency=low + + * debian/control: For Build-Depends, unzip, kaffe, jikes, jikes-kaffe + + -- Markus Loeberbauer Tue, 29 Mar 2005 10:00:00 +0100 + +coco-java (20050316-2) unstable; urgency=low + + * Moved from Sun java to kaffe and jikes to become main compliant. + + -- Markus Loeberbauer Tue, 29 Mar 2005 10:00:00 +0100 + +coco-java (20050316-1) unstable; urgency=low + + * Scanners can read arbitrariliy large files now (needed for + parsing log files with several hundred megabytes). + * Generated scanners are substantially faster than before (about 30%). + + -- Markus Loeberbauer Fri, 18 Mar 2005 13:00:00 +0100 + +coco-java (20050111-1) unstable; urgency=low + + * First upload to Debian unstable. + Sponsor: Rene Mayrhofer + * Renamed to coco-java. + * Lexical structures like '(' {char} ')' resulted in an endless loop in + the scanner if char was defined as ANY - ')' and if the terminating ')' + was missing in the input stream of the generated compiler. + + -- Markus Loeberbauer Tue, 11 Jan 2005 18:00:00 +0100 + +cocosourcesjava (2004.10.27-1) unstable; urgency=low + + * If an expression in curly braces or square brackets is deletable + (as in [[x]]) a new LL(1) warning is printed: contents of [...] + or {...} must not be deletable. + + -- Markus Loeberbauer Wed, 27 Oct 2004 17:35:00 +0100 + +cocosourcesjava (2004.10.11-1) unstable; urgency=low + + * Blanks are specified as white space in the scanner frame now, so one can + delete this if one doesn't want to ignore blanks. + (Caution! Use the latests Coco.jar only with the latest Scanner.frame!) + + -- Markus Loeberbauer Tue, 11 Oct 2004 10:00:00 +0100 + +cocosourcesjava (2004.06.28-3) unstable; urgency=low + + * Bug fix in DFA.java and ParserGen.java, Path seperator "\\" changed to + System.getProperty("file.seperator"). + + -- Markus Loeberbauer Tue, 24 Aug 2004 13:50:00 +0100 + +cocosourcesjava (2004.06.28-2) unstable; urgency=low + + * Bug fix in DFA.java, buggy code was generated for CONTEXT phrases. + * Bug fix in Coco.atg, invalid Token Factors and Terms caused Coco to crash. + + -- Markus Loeberbauer Tue, 27 Jul 2004 10:09:00 +0100 + +cocosourcesjava (2004.06.28-1) unstable; urgency=low + + * New upstream release + * Generation of case-insensitive compilers changed + - keyword IGNORECASE instead of IGNORE CASE. + - case is also ignored in tokens and character sets now. + - User manual changed + * The scanner uses '\u0100' instead of '\u0' as an end of file (eof) + character now. This allowes \0 to be used in tokens (useful for parsing + binary files). + * Bug fix in the detection of tokens that cannot be distinguished. + * IO routines changed from Java 1.0 to Java 1.1. + * Various cleanups. + + -- Markus Loeberbauer Tue, 06 Jun 2004 17:00:00 +0100 + +cocosourcesjava (2004.04.14-1) unstable; urgency=low + + * Method Tab.IgnoreCase added + * The frames directory is not specified by the environment variable CRFRAMES + any more but can be specified with the command line option -frames + * Bug fix in Coco.java (incorrect handling of command line arguments) + * Errors.errMsgFormat handled as in the C-Sharp version now (in Parser.java) + * Bug fix in Sets.PrintSet (in Tab.java) + * Fatal errors abort with System.exit(1) instead of System.exit(0) now + + -- Markus Loeberbauer Fri, 16 Apr 2004 12:35:00 +0100 + +cocosourcesjava (2004.04.06-2) unstable; urgency=low + + * changelog corrected + * directory names to lower case + + -- Markus Loeberbauer Tue, 13 Apr 2004 18:35:00 +0100 + +cocosourcesjava (2004.04.06-1) unstable; urgency=low + + * New upstream release + + -- Markus Loeberbauer Wed, 07 Apr 2004 18:35:00 +0100 + --- coco-java-20081106.orig/debian/copyright +++ coco-java-20081106/debian/copyright @@ -0,0 +1,35 @@ +This package was debianized by Markus Loeberbauer on +Mon, 10 Nov 2008 09:45:00 +0100. + +It was downloaded from http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/ + +License: + + Compiler Generator Coco/R, + Copyright (c) 1990, 2008 Hanspeter Moessenboeck, University of Linz + extended by M. Loeberbauer & A. Woess, Univ. of Linz + with improvements by Pat Terry, Rhodes University + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As an exception, it is allowed to write an extension of Coco/R that is + used as a plugin in non-free software. + + If not otherwise stated, any source code generated by Coco/R (other than + Coco/R itself) does not fall under the GNU General Public License. + +The Debian packaging is (C) 2008, Markus Loeberbauer and +is licensed under the GPL, see `/usr/share/common-licenses/GPL'. + --- coco-java-20081106.orig/debian/rules +++ coco-java-20081106/debian/rules @@ -0,0 +1,126 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/coco-java.sgml > coco-java.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + $(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/coco-java. + $(MAKE) install DESTDIR=$(CURDIR)/debian/coco-java + + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman debian/cocoj.1 + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + + +# Build architecture-dependent files here. +#binary-arch: build install +# dh_testdir +# dh_testroot +# dh_installchangelogs +# dh_installdocs +# dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo +# dh_installman debian/cocoj.1 +# dh_link +# dh_strip +# dh_compress +# dh_fixperms +# dh_perl +# dh_makeshlibs +# dh_installdeb +# dh_shlibdeps +# dh_gencontrol +# dh_md5sums +# dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure --- coco-java-20081106.orig/debian/control +++ coco-java-20081106/debian/control @@ -0,0 +1,20 @@ +Source: coco-java +Section: devel +Priority: optional +Maintainer: Markus Loeberbauer +Build-Depends: debhelper (>= 7), openjdk-6-jdk | java2-sdk, openjdk-6-jre | java2-runtime +Standards-Version: 3.8.0 +Homepage: http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/ + +Package: coco-java +Architecture: all +Depends: openjdk-6-jre | java2-runtime +Description: Coco/R Compiler Generator (Java Version) + Coco/R is a compiler generator, which takes an attributed grammar of a source + language and generates a scanner and a parser for this language. The scanner + works as a deterministic finite automaton. The parser uses recursive descent. + LL(1) conflicts can be resolved by a multi-symbol lookahead or by semantic + checks. Thus the class of accepted grammars is LL(k) for an arbitrary k. + . + To start Coco call cocoj, which is a shell script in /usr/bin. + --- coco-java-20081106.orig/debian/dirs +++ coco-java-20081106/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/share/coco-java + --- coco-java-20081106.orig/debian/cocoj.1 +++ coco-java-20081106/debian/cocoj.1 @@ -0,0 +1,16 @@ +.TH cocoj 1 "Nov 6, 2008" "Coco/R Compiler Generator (Java Version)" + +.SH NAME +cocoj \- Coco/R Compiler Generator (Java Version) + +.SH HINT + +By default cocoj expects the Parser.frame and Scanner.frame file to be +in the same directory as the grammar (atg-file) to translate. As the +frame files are architecture independent, the default frame files can be +found in /usr/share/coco-java/. + +.SH SEE ALSO + +See package coco-doc for documentation. +