nice-commit Mailing List for The Nice Programming Language (Page 58)
Brought to you by:
bonniot
You can subscribe to this list here.
2003 |
Jan
|
Feb
(60) |
Mar
(125) |
Apr
(183) |
May
(140) |
Jun
(227) |
Jul
(141) |
Aug
(181) |
Sep
(75) |
Oct
(89) |
Nov
(187) |
Dec
(162) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(69) |
Feb
(197) |
Mar
(98) |
Apr
(26) |
May
(10) |
Jun
(85) |
Jul
(88) |
Aug
(79) |
Sep
(80) |
Oct
(81) |
Nov
(53) |
Dec
(109) |
2005 |
Jan
(68) |
Feb
(77) |
Mar
(232) |
Apr
(79) |
May
(37) |
Jun
(37) |
Jul
(3) |
Aug
(18) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
(10) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(9) |
2007 |
Jan
(2) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(17) |
Dec
(6) |
2008 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bo...@us...> - 2004-02-16 14:02:14
|
Update of /cvsroot/nice/Nice/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8900/bin Added Files: nicedoc.bat Log Message: Added script to start nicedoc on windows (arjan). --- NEW FILE: nicedoc.bat --- @echo off rem --------------------------------------------------------------------------- rem nicedoc.bat - script to start the Nice documentation generator rem rem Environment Variariable Prerequisites: rem rem NICE - the root directory where nice is installed rem --------------------------------------------------------------------------- call niceclasspath for %%x in (%NICEPATH%) do goto gotNice goto end :gotNice java -classpath %NICEPATH%\nice.jar;%CLASSPATH% nice.tools.doc.fun %1 %2 %3 %4 %5 %6 %7 %8 %9 :end rem -- clean up a bit set NICEPATH= |
From: <bo...@us...> - 2004-02-16 14:01:03
|
Update of /cvsroot/nice/Nice/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8613/bin Modified Files: nicec.bat Added Files: niceclasspath.bat Log Message: Factored out the search for nice.jar on windows (arjan). --- NEW FILE: niceclasspath.bat --- rem -- This is a utility to determine the location of the nice.jar file rem -- which is needed by several Nice utilities (nicec, nicedoc, ...). rem -- do we have a nice environment variable? for %%x in (%NICE%) do goto gotNiceEnvVar rem -- try some standard places set NICEPATH=c:\nice if exist %NICEPATH%\nice.jar goto end set NICEPATH="c:\Program Files\nice" if exist %NICEPATH%\nice.jar goto end set NICEPATH=c:\programs\nice if exist %NICEPATH%\nice.jar goto end set NICEPATH=d:\nice if exist %NICEPATH%\nice.jar goto end set NICEPATH="d:\Program Files\nice" if exist %NICEPATH%\nice.jar goto end set NICEPATH=d:\programs\nice if exist %NICEPATH%\nice.jar goto end goto error :envError echo Could not find the file: %NICE%\nice.jar echo The NICE environment variable is not pointing to the right directory! :error echo You must set the NICE environment variable to point to the directory you've installed nice in e.g. echo set NICE=C:\programs\nice echo (note: do not add a ';' at the end) echo You can do it by modifying Autoexec.bat or in the system settings. set NICEPATH= goto end :gotNiceEnvVar if not exist %NICE%\nice.jar goto envError set NICEPATH=%NICE% :end Index: nicec.bat =================================================================== RCS file: /cvsroot/nice/Nice/bin/nicec.bat,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** nicec.bat 9 Feb 2004 13:05:34 -0000 1.14 --- nicec.bat 16 Feb 2004 13:52:57 -0000 1.15 *************** *** 8,51 **** rem --------------------------------------------------------------------------- ! rem -- do we have a nice environment variable? ! for %%x in (%NICE%) do goto gotNiceEnvVar ! ! rem -- try some standard places ! ! set NICEPATH=c:\nice ! if exist %NICEPATH%\nice.jar goto gotNice ! ! set NICEPATH="c:\Program Files\nice" ! if exist %NICEPATH%\nice.jar goto gotNice ! ! set NICEPATH=c:\programs\nice ! if exist %NICEPATH%\nice.jar goto gotNice ! ! set NICEPATH=d:\nice ! if exist %NICEPATH%\nice.jar goto gotNice ! ! set NICEPATH="d:\Program Files\nice" ! if exist %NICEPATH%\nice.jar goto gotNice ! ! set NICEPATH=d:\programs\nice ! if exist %NICEPATH%\nice.jar goto gotNice ! ! goto error ! ! :envError ! echo Could not find the file: %NICE%\nice.jar ! echo The NICE environment variable is not pointing to the right directory! - :error - echo You must set the NICE environment variable to point to the directory you've installed nice in e.g. - echo set NICE=C:\programs\nice echo (note: do not add a ';' at the end) - echo You can do it by modifying Autoexec.bat or in the system settings. goto end - :gotNiceEnvVar - if not exist %NICE%\nice.jar goto envError - set NICEPATH=%NICE% - :gotNice java -classpath %NICEPATH%\nice.jar;%CLASSPATH% nice.tools.compiler.console.fun --runtime=%NICEPATH%\nice.jar %1 %2 %3 %4 %5 %6 %7 %8 %9 --- 8,17 ---- rem --------------------------------------------------------------------------- + call niceclasspath ! for %%x in (%NICEPATH%) do goto gotNice goto end :gotNice java -classpath %NICEPATH%\nice.jar;%CLASSPATH% nice.tools.compiler.console.fun --runtime=%NICEPATH%\nice.jar %1 %2 %3 %4 %5 %6 %7 %8 %9 *************** *** 53,61 **** :end rem -- clean up a bit ! set NICEPATH= ! ! rem Setting for Emacs so that it will treat the file as a DOS file whatever ! rem OS it is running on. Please keep this. ! rem Local variables: ! rem coding:dos ! rem End: --- 19,21 ---- :end rem -- clean up a bit ! set NICEPATH= \ No newline at end of file |
From: <bo...@us...> - 2004-02-16 12:55:17
|
Update of /cvsroot/nice/Nice/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27375/bin Modified Files: .cvsignore Log Message: Clean up. Index: .cvsignore =================================================================== RCS file: /cvsroot/nice/Nice/bin/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 19 Apr 2002 14:12:40 -0000 1.1 --- .cvsignore 16 Feb 2004 12:47:14 -0000 1.2 *************** *** 1,25 **** - - - - - - @author Daniel Bonniot (bo...@us...) - @version $Date$ - */ - /* */ - /* */ - /* N I C E */ - /* (c) Daniel Bonniot 2002 */ - /* A high-level object-oriented research language */ - /* (at your option) any later version. */ - /* 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 of the License, or */ - /** - /**************************************************************************/ - /**************************************************************************/ - class nicec.bin - package ; - { - } --- 1 ---- |
From: <bo...@us...> - 2004-02-16 12:49:49
|
Update of /cvsroot/nice/Nice/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26423/bin Modified Files: nicec Log Message: Handle nicedoc and niceunit. Index: nicec =================================================================== RCS file: /cvsroot/nice/Nice/bin/nicec,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** nicec 12 Jun 2003 21:29:55 -0000 1.36 --- nicec 16 Feb 2004 12:41:45 -0000 1.37 *************** *** 37,40 **** --- 37,41 ---- java=${JAVA-java} scriptName="$0" + progname=`basename $scriptName` experimental=false *************** *** 69,81 **** export CLASSPATH ! system_args="--runtime=${NICEC_JAR}" ! gcj="`which gcj 2>/dev/null`" ! # Check the string found is really a file ! # This is a work-around for a bug in OS X: ! # which gcj returns 0 (success) and prints "no gcj in $PATH" ! if [ -f "$gcj" ]; then ! system_args="${system_args} --native-compiler=${gcj}" ! fi ! exec ${java} nice.tools.compiler.console.fun ${system_args} "$@" --- 70,89 ---- export CLASSPATH ! case $progname in ! nicedoc) class=nice.tools.doc.fun ;; ! niceunit) class=nice.tools.unit.console.fun ;; ! nicec) class=nice.tools.compiler.console.fun ! system_args="--runtime=${NICEC_JAR}" ! gcj="`which gcj 2>/dev/null`" ! # Check the string found is really a file ! # This is a work-around for a bug in OS X: ! # `which gcj` returns 0 (success) and prints "no gcj in $PATH" ! if [ -f "$gcj" ]; then ! system_args="${system_args} --native-compiler=${gcj}" ! fi ! ! esac ! ! exec ${java} $class ${system_args} "$@" |
From: <bo...@us...> - 2004-02-15 19:29:53
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3221/src/bossa/modules Modified Files: Package.java Log Message: Put some valid (if misleading) value as SourceFile of generated classes to make some tools happy. The real info is in SourceDebugExtension anyway. Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** Package.java 11 Feb 2004 13:30:20 -0000 1.110 --- Package.java 15 Feb 2004 19:22:10 -0000 1.111 *************** *** 681,685 **** res.setSimple(true); res.body = QuoteExp.voidExp; ! res.setFile(source.getName()); res.needsConstructor = true; return res; --- 681,687 ---- res.setSimple(true); res.body = QuoteExp.voidExp; ! // This is not true, but useful to make some Java-centric tools happy. ! // The real file info in the the SourceDebugExtension attribute. ! res.setFile(name.substring(name.lastIndexOf('.') + 1) + ".nice"); res.needsConstructor = true; return res; |
From: <bo...@us...> - 2004-02-15 17:04:18
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4234/src/gnu/expr Modified Files: LambdaExp.java Log Message: An anonymous function comes from the same source file as its container. Index: LambdaExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/LambdaExp.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** LambdaExp.java 15 Dec 2003 19:06:30 -0000 1.23 --- LambdaExp.java 15 Feb 2004 16:56:53 -0000 1.24 *************** *** 991,995 **** name = "lambda"; // At least for constructors ("<init>") we need to make sure ! // the name is valid. name = Compilation.mangleName(name); // Use the outer class as a prefix name. --- 991,995 ---- name = "lambda"; // At least for constructors ("<init>") we need to make sure ! // that the name is valid. name = Compilation.mangleName(name); // Use the outer class as a prefix name. *************** *** 998,1001 **** --- 998,1002 ---- name = comp.generateUniqueName(name); frameType = new ClassType(name); + frameType.setSourceFile(outerClass.getFile()); } else |
From: <bo...@us...> - 2004-02-14 21:13:55
|
Update of /cvsroot/nice/Nice/src/nice/tools/maven In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv319/src/nice/tools/maven Added Files: project.xml project.properties plugin.jelly Log Message: Initial implementation of the Nice plugin for Maven. --- NEW FILE: project.xml --- <?xml version="1.0" encoding="latin1"?> <project> <pomVersion>3</pomVersion> <groupId>nice</groupId> <id>maven-nice-plugin</id> <name>Maven Nice Plug-in</name> <organization> <name>The Nice project</name> <url>http://nice.sf.net/</url> </organization> <inceptionYear>2004</inceptionYear> <currentVersion>SNAPSHOT</currentVersion> <shortDescription>Manage Nice source code</shortDescription> <description><![CDATA[ <p> This is a plugin for <a href="http://maven.apache.org">Maven</a> that allows to compile and generate documentation for <a href="http://nice.sourceforge.net">Nice</a> programs. </p><p> An <a href="http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/MavenGuide"> introduction</a> to the usage of this plugin is available. </p> ]]> </description> <url>http://nice.sf.net</url> <siteAddress>nice.sf.net</siteAddress> <siteDirectory> /home/groups/n/ni/nice/htdocs/tools/maven-plugin </siteDirectory> <repository> <connection> scm:cvs:pserver:ano...@cv...:/cvsroot/nice:Nice/src/nice/tools/doc/ </connection> <url>http://cvs.sourceforge.net/viewcvs.py/nice/Nice/src/nice/tools/doc/ </url> </repository> <developers> <developer> <name>Daniel Bonniot</name> <id>bonniot</id> <email>bo...@us...</email> <timezone>+1</timezone> </developer> </developers> <dependencies> <dependency> <groupId>nice</groupId> <artifactId>nice</artifactId> <version>SNAPSHOT</version> <url>http://nice.sf.net/maven</url> <properties> <classloader>root</classloader> </properties> </dependency> </dependencies> <build> <resources> <resource> <directory>src/plugin-resources</directory> <targetPath>plugin-resources</targetPath> </resource> <resource> <directory>.</directory> <includes> <include>plugin.jelly</include> <include>plugin.properties</include> <include>project.properties</include> <include>project.xml</include> </includes> </resource> </resources> </build> </project> --- NEW FILE: project.properties --- # ------------------------------------------------------------------- # P R O J E C T P R O P E R T I E S # ------------------------------------------------------------------- maven.repo.central=nice.sf.net maven.repo.central.directory=/home/groups/n/ni/nice/htdocs/maven maven.repository.group=nice maven.remote.group=nice maven.xdoc.date=left ## maven.xdoc.version=${pom.currentVersion} maven.license.licenseFile=${basedir}/../../../../LICENSE --- NEW FILE: plugin.jelly --- <?xml version="1.0"?> <project xmlns:j="jelly:core" xmlns:ant="jelly:ant" xmlns:define="jelly:define" xmlns:maven="jelly:maven" xmlns:util="jelly:util" xmlns:nice="http://nice.sf.net" xmlns:doc="doc" > <goal name="nice" description="Build a Nice project" prereqs="nice:compile"> <!-- Give a warning if sources were not found, to let the user know what's (not) happening. --> <nice:ifNotNeeded> <ant:echo>No Nice source files found in ${mainPkgDir}</ant:echo> </nice:ifNotNeeded> </goal> <!-- ================================================================== --> <!-- P R E P A R E F I L E S Y S T E M --> <!-- ================================================================== --> <goal name="nice:prepare-filesystem"> <ant:mkdir dir="${maven.build.dest}"/> </goal> <!-- ================================================================== --> <!-- C O M P I L E --> <!-- ================================================================== --> <goal name="nice:compile" description="Compile the project" prereqs="nice:prepare-filesystem"> <nice:ifNotNeeded> <ant:echo level="debug">No Nice source files found in ${mainPkgDir} </ant:echo> </nice:ifNotNeeded> <nice:ifNeeded> <ant:echo level="verbose">Compiling to ${maven.build.dest}</ant:echo> <ant:taskdef name="nicec" classname="nice.tools.ant.Nicec"> <ant:classpath> <ant:pathelement path="${plugin.getDependencyPath('nice:tools')}"/> </ant:classpath> </ant:taskdef> <ant:nicec package="${pom.package}" sourcepath="${pom.build.sourceDirectory}" destination="${maven.build.dest}" jar="${maven.build.dir}/${maven.final.name}.jar" > <ant:sourcepath> <ant:path refid="maven.compile.src.set"/> </ant:sourcepath> <ant:classpath> <ant:path refid="maven.dependency.classpath"/> <ant:pathelement path="${maven.build.dest}"/> </ant:classpath> <j:if test="${context.getVariable('maven.compile.compilerargs') != null}"> <ant:compilerarg line="${maven.compile.compilerargs}" /> </j:if> <j:if test="${context.getVariable('maven.compile.encoding') != null}"> <ant:setProperty name="encoding" value="${maven.compile.encoding}" /> </j:if> <j:if test="${context.getVariable('maven.compile.executable') != null}"> <ant:setProperty name="executable" value="${maven.compile.executable}" /> </j:if> <j:if test="${context.getVariable('maven.compile.fork') != null}"> <ant:setProperty name="fork" value="${maven.compile.fork}" /> </j:if> <j:if test="${context.getVariable('maven.compile.source') != null}"> <ant:setProperty name="source" value="${maven.compile.source}" /> </j:if> <j:if test="${context.getVariable('maven.compile.verbose') != null}"> <ant:setProperty name="verbose" value="${maven.compile.verbose}" /> </j:if> </ant:nicec> </nice:ifNeeded> </goal> <!-- ================================================================== --> <!-- N I C E D O C --> <!-- ================================================================== --> <goal name="nice:doc"> <ant:taskdef name="nicedoc" classname="nice.tools.ant.NiceDoc"> <ant:classpath> <ant:pathelement path="${plugin.getDependencyPath('nice:tools')}"/> </ant:classpath> </ant:taskdef> <ant:nicedoc sourcepath="${pom.build.sourceDirectory}" destination="${maven.docs.dest}/apidocs" package="${pom.package}" /> </goal> <!-- Registration --> <goal name="maven-nice-plugin:register"> <nice:ifNeeded> <doc:registerReport name="NiceDocs" pluginName="maven-nice-plugin" link="apidocs/index" description="NiceDoc API documentation."/> </nice:ifNeeded> </goal> <goal name="maven-nice-plugin:deregister"> <doc:deregisterReport name="NiceDocs"/> <doc:deregisterReport name="NiceDoc Report"/> </goal> <goal name="maven-nice-plugin:report" prereqs="nice:doc" /> <!-- Force nicedoc to be registered --> <postGoal name="xdoc:register-reports"> <attainGoal name="maven-nice-plugin:register" /> </postGoal> <!-- ================================================================== --> <!-- J A R R E S O U R C E S --> <!-- ================================================================== --> <goal name="nice:jar-resources" description="Copy any resources that must be present in the deployed JAR file"> <j:if test="${!pom.build.resources.isEmpty()}"> <maven:copy-resources resources="${pom.build.resources}" todir="${maven.build.dest}"/> </j:if> </goal> <define:taglib uri="nice"> <define:tag name="dependency-handle"> <!-- XXX Use this tag to allow this plugin to be loaded into another --> </define:tag> </define:taglib> <!-- ================================================================== --> <!-- I N T E G R A T I O N W I T H O T H E R P L U G I N S --> <!-- ================================================================== --> <preGoal name="jar:jar"> <nice:ifNeeded> <attainGoal name="nice:compile"/> <!-- We store the generated jar for later use. --> <ant:move file="${maven.build.dir}/${maven.final.name}.jar" tofile="${maven.build.dir}/${maven.final.name}.jar.tmp" /> <!-- Make the jar plugin write the correct Main-Class. This should not be needed, but filesetmanifest is only working in ant 1.6 and later. --> ${pom.getPluginContext('maven-java-plugin').setVariable('maven.jar.mainclass', pom.package.concat(".fun"))} </nice:ifNeeded> </preGoal> <postGoal name="jar:jar"> <nice:ifNeeded> <!-- Update the jar with the files nicec generated. --> <ant:jar jarfile="${maven.build.dir}/${maven.final.name}.jar" update="true" filesetmanifest="merge"> <zipfileset src="${maven.build.dir}/${maven.final.name}.jar.tmp" /> </ant:jar> </nice:ifNeeded> </postGoal> <preGoal name="maven-jdepend-plugin:report"> <attainGoal name="nice:compile" /> </preGoal> <!-- ================================================================== --> <!-- T E S T I N G I F N I C E I S N E E D E D --> <!-- ================================================================== --> <!-- This is executed at startup, and will set the variable 'needed' to true if there are Nice sources present. --> <j:set var="mainPkgDir" value="${pom.build.sourceDirectory}/${pom.package.replaceAll('\.', '/')}"/> <util:available file="${mainPkgDir}"> <ant:fileset id="niceSourceSet" dir="${mainPkgDir}"> <ant:include name="*.nice"/> </ant:fileset> <ant:fileScanner var="sources"> <ant:fileset refid="niceSourceSet" /> </ant:fileScanner> <j:if test="${sources.iterator().hasNext()}"> <j:set var="needed" value="true" /> </j:if> </util:available> <define:taglib uri="http://nice.sf.net"> <define:tag name="ifNeeded"> <j:if test="${needed}"> <define:invokeBody/> </j:if> </define:tag> <define:tag name="ifNotNeeded"> <j:if test="${!needed}"> <define:invokeBody/> </j:if> </define:tag> </define:taglib> </project> |
From: <bo...@us...> - 2004-02-14 20:49:07
|
Update of /cvsroot/nice/Nice/src/nice/tools/maven In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26850/src/nice/tools/maven Log Message: Directory /cvsroot/nice/Nice/src/nice/tools/maven added to the repository |
From: <bo...@us...> - 2004-02-14 12:47:27
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2837/src/nice/tools/doc Modified Files: api.nice Log Message: Only generate documentation for packages that are available in source form. Index: api.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/api.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** api.nice 14 Feb 2004 01:37:36 -0000 1.1 --- api.nice 14 Feb 2004 12:40:57 -0000 1.2 *************** *** 34,40 **** --- 34,47 ---- } + // We want to "recompile" that is, load from source, all available + // packages, so that we can geenrate documentation for them. + compilation.recompileAll = true; + try { List<bossa.modules.Package> packages = load(compilation, mainPackage); + // Only keep packages that we have the source of. + packages = packages.filter(bossa.modules.Package p => ! p.interfaceFile()); + // Here the real work begins Documenter d = new Documenter(); |
From: <bo...@us...> - 2004-02-14 02:05:15
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31870 Modified Files: Makefile Log Message: Build nicedoc and the nicedoc Ant task. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/Makefile,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -d -r1.135 -r1.136 *** Makefile 11 Feb 2004 14:53:55 -0000 1.135 --- Makefile 14 Feb 2004 01:59:05 -0000 1.136 *************** *** 44,49 **** all: src/nice/tools/compiler/console.jar compiler2 archive2 ! stable: clean bootstrap compiler1 ant testengine archiveOld ! complete: stable compiler2 archive2 fixpoint: complete compiler3 archive3 world: fixpoint check test --- 44,49 ---- all: src/nice/tools/compiler/console.jar compiler2 archive2 ! stable: clean bootstrap compiler1 testengine archiveOld ! complete: stable compiler2 nicedoc ant archive2 fixpoint: complete compiler3 archive3 world: fixpoint check test *************** *** 191,197 **** ant: @echo "Building the Ant task definition..." ! @${javac} -sourcepath src -classpath "${ANT_CLASSPATH}:./classes:./classes.old" -d classes src/nice/tools/ant/Nicec.java ||\ echo -e "Compilation of the Ant task definition failed.\n NICE_ANTJAR or ANT_HOME should be set, Ant should be in the CLASSPATH or at least linked to by ./external/ant.jar" testengine: @echo "Building the testsuite engine..." --- 191,201 ---- ant: @echo "Building the Ant task definition..." ! @${javac} -sourcepath src -classpath "${ANT_CLASSPATH}:./classes:./classes.old" -d classes src/nice/tools/ant/*.java ||\ echo -e "Compilation of the Ant task definition failed.\n NICE_ANTJAR or ANT_HOME should be set, Ant should be in the CLASSPATH or at least linked to by ./external/ant.jar" + nicedoc: + @echo "Building nicedoc..." + $(NICEC1) nice.tools.doc + testengine: @echo "Building the testsuite engine..." |
From: <bo...@us...> - 2004-02-14 01:43:45
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28279/src/nice/tools/doc Modified Files: main.nice Added Files: api.nice Log Message: Isolated an API for starting nicedoc, and use it in the command-line version. --- NEW FILE: api.nice --- /**************************************************************************/ /* N I C E */ /* A high-level object-oriented research language */ /* (c) Daniel Bonniot 2004 */ /* */ /* 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 of the License, or */ /* (at your option) any later version. */ /* */ /**************************************************************************/ package nice.tools.doc; /** Interface to call nicedoc from Nice/Java programs. @author Daniel Bonniot (bo...@us...) */ //A global variable specifying the output directory var File outdir = new File("."); void generate(Compilation compilation, String mainPackage, ?File outDirectory) { if (outDirectory != null) outdir = outDirectory; // Make sure the meaning of outdir is fixed. outdir = outdir.getAbsoluteFile(); if (! outdir.exists() && ! outdir.mkdirs()) { throw new Error("Could not create the output directory " + outdir); } try { List<bossa.modules.Package> packages = load(compilation, mainPackage); // Here the real work begins Documenter d = new Documenter(); d.document(packages); packages.foreach(bossa.modules.Package p => d.document(p)); } catch (bossa.modules.Exit e) { // There was an error. Stop working. } } Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/main.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.nice 13 Feb 2004 16:15:44 -0000 1.2 --- main.nice 14 Feb 2004 01:37:36 -0000 1.3 *************** *** 12,22 **** import bossa.modules.*; - //A global variable specifying the output directory - var File outdir = new File("."); - void main(String[] args) { String mainPackage; ?String classpath = null; ConsoleOutput consOutput = new ConsoleOutput(); --- 12,20 ---- import bossa.modules.*; void main(String[] args) { String mainPackage; ?String classpath = null; + File outdir = new File("."); ConsoleOutput consOutput = new ConsoleOutput(); *************** *** 70,80 **** mainPackage = rest[0]; - // Make sure the meaning of outdir is fixed. - outdir = outdir.getAbsoluteFile(); - - if (! outdir.exists() && ! outdir.mkdirs()) { - throw new Error("Could not create the output directory " + outdir); - } - /* For convenience of command-line tools (shells) with completions, --- 68,71 ---- *************** *** 84,98 **** mainPackage = mainPackage.deleteAtEnd("/").replace('/', "."); ! try { ! List<bossa.modules.Package> packages = load(compilation, mainPackage); ! ! // Here the real work begins ! //packages.foreach(bossa.modules.Package p => document(p.getDefinitions)); ! Documenter d = new Documenter(); ! d.document(packages); ! packages.foreach(bossa.modules.Package p => d.document(p)); ! } ! catch (bossa.modules.Exit e) { ! // There was an error. Stop working. ! } } --- 75,78 ---- mainPackage = mainPackage.deleteAtEnd("/").replace('/', "."); ! generate(compilation, mainPackage, outdir); } |
From: <bo...@us...> - 2004-02-14 01:03:39
|
Update of /cvsroot/nice/Nice/src/nice/tools/ant In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21326/src/nice/tools/ant Added Files: NiceDoc.java Log Message: Initial Ant nicedoc task. --- NEW FILE: NiceDoc.java --- package nice.tools.ant; import org.apache.tools.ant.*; import org.apache.tools.ant.types.*; import java.io.File; import java.util.Vector; import bossa.modules.Compilation; /** <h2><a name="java">NiceDoc</a></h2> <h3>Description</h3> <p>Runs the Nice documentation generator.</p> All arguments to the NiceDoc task have to be placed as attributes in the nicedoc xml-element. <h3>Parameters</h3> <table border="1" cellpadding="2" cellspacing="0"> <tr> <td valign="top"><b>Attribute</b></td> <td valign="top"><b>Description</b></td> <td align="center" valign="top"><b>Required</b></td> </tr> <tr> <td valign="top">package</td> <td valign="top">The Nice package to compile.</td> <td align="center" valign="top">Yes</td> </tr> <tr> <td valign="top">sourcepath</td> <td valign="top">Search path for source packages. Is a list of directories and .jar archives.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">destination</td> <td valign="top">Destination directory for compiled packages.</td> <td align="center" valign="top">No</td> </tr> <tr> <td valign="top">classpath</td> <td valign="top">Search path for compiled packages and libraries.</td> <td align="center" valign="top">No</td> </tr> </table> <h4>classpath</h4> <p><code>Nicec</code>'s <i>classpath</i> attribute is a PATH like structure and can also be set via a nested <i>classpath</i> element. This is very reasonable if you want to make your build script's pathes platform independent. </p> <h5>Example</h5> <pre> <nicedoc package="test" > <classpath> <pathelement location="\test.jar"/> <pathelement path="${java.class.path}"/> </classpath> </nicedoc> </pre> <p>It is possible to use the <i>classpath</i> attribute together with the <i>classpath<i> nested tag. In this case the result is a concatenated path.</p> <p>It is highly recommended to use the nested version!<p> <h3>Examples</h3> <pre> <taskdef name="nicedoc" classname="nice.tools.ant.NiceDoc"/> <target name="nice-documentation"> <nicedoc package="test" /> </target> </pre> * @author Daniel Bonniot */ public class NiceDoc extends Task { private static final String ERROR_MSG = "Generation failed with errors."; private static final String BUG_MSG = "Generation failed because of a bug."; private static final String WARNING_MSG = "Generation successful despite warnings."; private static final String OK_MSG = "Generation successful."; /** Search path for source packages PATH is a list of directories and .jar archives */ private String sourcepath; public void setSourcepath(String sourcepath) { this.sourcepath = sourcepath; } /** Destination directory for compiled packages */ private File destination; public void setDestination(File destdir) { this.destination = destdir; } /** Search path for compiled packages and libraries */ private String classpath = ""; public void setClasspath(String classpath) { this.classpath = classpath; } /** Location of nice.jar */ private String runtime = null; public void setRuntime(String runtime) { this.runtime = runtime; } /** The root package to document. */ private String pack; public void setPackage(String pack) { this.pack = pack; } private Path nestedClasspath = null; /** * Creates a nested classpath element */ public Path createClasspath() { nestedClasspath = new Path(project); return nestedClasspath.createPath(); } /** Executes nicedoc. */ public void execute() throws BuildException { String oldUserDir = System.getProperty("user.dir"); try { System.setProperty("user.dir", project.getBaseDir().getAbsolutePath()); nice.tools.compiler.console.ConsoleOutput console = nice.tools.compiler.console.fun.consoleOutput(); Compilation compilation = bossa.modules.fun.createCompilation(console); if (sourcepath != null) compilation.sourcePath = sourcepath; compilation.packagePath = classpath + (nestedClasspath != null ? File.pathSeparator+nestedClasspath : ""); nice.tools.doc.fun.generate(compilation, pack, destination); int retval = console.statusCode; switch (retval) { case nice.tools.compiler.console.fun.ERROR: throw new BuildException(ERROR_MSG, location); case nice.tools.compiler.console.fun.BUG: throw new BuildException(BUG_MSG, location); case nice.tools.compiler.console.fun.WARNING: log(WARNING_MSG, Project.MSG_WARN); break; case nice.tools.compiler.console.fun.OK: log(OK_MSG, Project.MSG_INFO); break; } } finally { System.setProperty("user.dir", oldUserDir); } } } // Setting for Emacs // Local variables: // tab-width:2 // indent-tabs-mode:t // End: |
From: <ar...@us...> - 2004-02-13 21:20:05
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9028/F:/nice/stdlib/nice/lang Modified Files: rawBooleanArray.java Log Message: Reverting back because Boolean.valueOf(boolean) exists since 1.4 Index: rawBooleanArray.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/rawBooleanArray.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rawBooleanArray.java 13 Feb 2004 17:43:36 -0000 1.2 --- rawBooleanArray.java 13 Feb 2004 21:14:03 -0000 1.3 *************** *** 43,47 **** public final Object get (int index) { ! return Boolean.valueOf(arr[index]); } --- 43,47 ---- public final Object get (int index) { ! return new Boolean(arr[index]); } *************** *** 50,55 **** boolean old = arr[index]; arr[index] = ((Boolean)element).booleanValue(); ! return Boolean.valueOf(old); } ! } \ No newline at end of file --- 50,55 ---- boolean old = arr[index]; arr[index] = ((Boolean)element).booleanValue(); ! return new Boolean(old); } ! } |
From: <ar...@us...> - 2004-02-13 17:49:30
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29008/F:/nice/stdlib/nice/lang Modified Files: rawBooleanArray.java Log Message: Fixed minor oddities in code. Index: rawBooleanArray.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/rawBooleanArray.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rawBooleanArray.java 17 Jan 2004 16:32:45 -0000 1.1 --- rawBooleanArray.java 13 Feb 2004 17:43:36 -0000 1.2 *************** *** 43,47 **** public final Object get (int index) { ! return new Boolean(arr[index]); } --- 43,47 ---- public final Object get (int index) { ! return Boolean.valueOf(arr[index]); } *************** *** 50,54 **** boolean old = arr[index]; arr[index] = ((Boolean)element).booleanValue(); ! return new Boolean(old); } --- 50,54 ---- boolean old = arr[index]; arr[index] = ((Boolean)element).booleanValue(); ! return Boolean.valueOf(old); } |
From: <ar...@us...> - 2004-02-13 17:49:29
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29008/F:/nice/src/bossa/modules Modified Files: DirectoryCompiledContent.java Log Message: Fixed minor oddities in code. Index: DirectoryCompiledContent.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/DirectoryCompiledContent.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DirectoryCompiledContent.java 24 Jun 2003 15:28:19 -0000 1.8 --- DirectoryCompiledContent.java 13 Feb 2004 17:43:36 -0000 1.9 *************** *** 154,162 **** File f = new File(directory, name); ! if (f != null) ! try{ ! return new FileInputStream(f); ! } ! catch(FileNotFoundException e){} return null; --- 154,161 ---- File f = new File(directory, name); ! try{ ! return new FileInputStream(f); ! } ! catch(FileNotFoundException e){} return null; |
From: <ar...@us...> - 2004-02-13 17:49:29
|
Update of /cvsroot/nice/Nice/src/mlsub/typing/lowlevel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29008/F:/nice/src/mlsub/typing/lowlevel Modified Files: Separator.java Log Message: Fixed minor oddities in code. Index: Separator.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/lowlevel/Separator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Separator.java 14 Jun 2000 13:32:56 -0000 1.1 --- Separator.java 13 Feb 2004 17:43:36 -0000 1.2 *************** *** 20,24 **** public void setContent(String content) { ! this.content2 = content2; } --- 20,24 ---- public void setContent(String content) { ! this.content2 = content; } |
From: <bo...@us...> - 2004-02-13 16:21:35
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13605/src/nice/tools/doc Modified Files: main.nice htmlwriter.nice Log Message: Make sure the destination directory exists. Use File instead of a String to represent the destination directory. Index: main.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/main.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.nice 13 Feb 2004 15:14:08 -0000 1.1 --- main.nice 13 Feb 2004 16:15:44 -0000 1.2 *************** *** 13,17 **** //A global variable specifying the output directory ! var String outdir = ""; void main(String[] args) --- 13,17 ---- //A global variable specifying the output directory ! var File outdir = new File("."); void main(String[] args) *************** *** 46,50 **** "Output files to this directory", "path", ! String path => {outdir = path; }), option("man", "Print man page to stdout", --- 46,50 ---- "Output files to this directory", "path", ! String path => {outdir = new File(path); }), option("man", "Print man page to stdout", *************** *** 70,76 **** mainPackage = rest[0]; ! //check that outdir is either empty string or ends with a '/' ! if(!outdir.equals("") && !outdir.endsWith("/")) { ! outdir = outdir + "/"; } --- 70,78 ---- mainPackage = rest[0]; ! // Make sure the meaning of outdir is fixed. ! outdir = outdir.getAbsoluteFile(); ! ! if (! outdir.exists() && ! outdir.mkdirs()) { ! throw new Error("Could not create the output directory " + outdir); } *************** *** 94,96 **** // There was an error. Stop working. } ! } \ No newline at end of file --- 96,98 ---- // There was an error. Stop working. } ! } Index: htmlwriter.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/doc/htmlwriter.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** htmlwriter.nice 13 Feb 2004 15:14:08 -0000 1.1 --- htmlwriter.nice 13 Feb 2004 16:15:44 -0000 1.2 *************** *** 22,27 **** //Initialise a FileWriter ! String path = outdir + packageName.replace('.','/') + "/"; //this generates the output directory ! File dir = new File(path); if(!dir.exists()) { if(!dir.mkdirs()) { --- 22,27 ---- //Initialise a FileWriter ! // Output directory for this class ! File dir = new File(outdir, packageName.replace('.','/')); if(!dir.exists()) { if(!dir.mkdirs()) { *************** *** 33,37 **** //that is, nice.lang.Maybe -> Maybe fileName = fileName.substring(fileName.lastIndexOf(".") + 1); ! BufferedWriter writer = new BufferedWriter(new FileWriter(path + fileName + ".html")); writer.write(getHeader(c.getName().toString())); --- 33,38 ---- //that is, nice.lang.Maybe -> Maybe fileName = fileName.substring(fileName.lastIndexOf(".") + 1); ! BufferedWriter writer = new BufferedWriter ! (new FileWriter(new File(dir, fileName + ".html"))); writer.write(getHeader(c.getName().toString())); *************** *** 82,87 **** //Initialise a FileWriter ! String path = outdir + packageName.replace('.','/') + "/"; //this generates the output directory ! File dir = new File(path); if(!dir.exists()) { if(!dir.mkdirs()) { --- 83,87 ---- //Initialise a FileWriter ! File dir = new File(outdir, packageName.replace('.','/')); if(!dir.exists()) { if(!dir.mkdirs()) { *************** *** 95,101 **** fileName = fileName.replace('/', "@slash"); fileName = fileName.replace('.', "@dot"); - //println(path + fileName); ! BufferedWriter writer = new BufferedWriter(new FileWriter(path + fileName + ".html")); writer.write(getHeader(m.getName().toString())); --- 95,101 ---- fileName = fileName.replace('/', "@slash"); fileName = fileName.replace('.', "@dot"); ! BufferedWriter writer = new BufferedWriter ! (new FileWriter(new File(dir, fileName + ".html"))); writer.write(getHeader(m.getName().toString())); *************** *** 127,132 **** void write(bossa.modules.Package p) { try { ! String path = outdir + p.getName().replace('.','/') + "/"; //this generates the output directory ! File dir = new File(path); if(!dir.exists()) { if(!dir.mkdirs()) { --- 127,131 ---- void write(bossa.modules.Package p) { try { ! File dir = new File(outdir, p.getName().replace('.','/')); if(!dir.exists()) { if(!dir.mkdirs()) { *************** *** 134,138 **** } } ! BufferedWriter writer = new BufferedWriter(new FileWriter(path + "index.html")); writer.write(getHeader("Package " + p.getName())); --- 133,138 ---- } } ! BufferedWriter writer = new BufferedWriter ! (new FileWriter(new File(dir, "index.html"))); writer.write(getHeader("Package " + p.getName())); *************** *** 185,189 **** void write(List<bossa.modules.Package> packages) { try { ! BufferedWriter writer = new BufferedWriter(new FileWriter(outdir + "index.html")); writer.write(getHeader("Packages")); writer.write("<b>Packages:</b>\n"); --- 185,190 ---- void write(List<bossa.modules.Package> packages) { try { ! BufferedWriter writer = new BufferedWriter ! (new FileWriter(new File(outdir, "index.html"))); writer.write(getHeader("Packages")); writer.write("<b>Packages:</b>\n"); *************** *** 232,234 **** "</body>\n" + "</html>\n"; ! } \ No newline at end of file --- 233,235 ---- "</body>\n" + "</html>\n"; ! } |
From: <bo...@us...> - 2004-02-13 15:19:57
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20156/src/nice/tools/doc Added Files: main.nice htmlwriter.nice document.nice Log Message: Initial implementation of nicedoc by Francis Barber. --- NEW FILE: main.nice --- package nice.tools.doc; /** API documentation generator for Nice. @author ? */ import nice.doc; import nice.tools.compiler; import nice.tools.compiler.console; import bossa.modules.*; //A global variable specifying the output directory var String outdir = ""; void main(String[] args) { String mainPackage; ?String classpath = null; ConsoleOutput consOutput = new ConsoleOutput(); Compilation compilation = new Compilation(listener: consOutput); Program prg = new Program (name: "nicedoc", longName: "The Nice Documentation Generator", shortDescription: "Documentation Generator for the Nice programming language", author: "Daniel Bonniot <bo...@us...>", seeAlso: "http://nice.sourceforge.net the Nice Home Page\n" + "http://nice.sf.net/compilation.html compilation instructions\n", manualSection: "1", arguments: "package", options: cast(null)); prg.options = [ option("sourcepath", "Search path for source packages\nPATH is a list of directories and .jar archives", "path", String path => { compilation.sourcePath = path; }), option("classpath", "Search path for compiled packages and libraries\nPATH is a list of directories and .jar archives", "path", String path => { compilation.packagePath = path; }), option("outdir", "Output files to this directory", "path", String path => {outdir = path; }), option("man", "Print man page to stdout", () => man(prg)), option("version", "Print version info and exit", () => version()), option("usage", "Print usage information and exit", () => usage(prg)) ]; List<String> rest = parse(prg, args); if (rest.size() != 1 || rest[0].length() == 0) { if (rest.size() > 1) println("Supply only one package on the command line.\n" + "nicec will automatically find dependancies."); usage(prg, ERROR); } mainPackage = rest[0]; //check that outdir is either empty string or ends with a '/' if(!outdir.equals("") && !outdir.endsWith("/")) { outdir = outdir + "/"; } /* For convenience of command-line tools (shells) with completions, we treat a directory name as the corresponding package name. That is, we replace '/' (which is illegal in package names) by '.'. */ mainPackage = mainPackage.deleteAtEnd("/").replace('/', "."); try { List<bossa.modules.Package> packages = load(compilation, mainPackage); // Here the real work begins //packages.foreach(bossa.modules.Package p => document(p.getDefinitions)); Documenter d = new Documenter(); d.document(packages); packages.foreach(bossa.modules.Package p => d.document(p)); } catch (bossa.modules.Exit e) { // There was an error. Stop working. } } --- NEW FILE: htmlwriter.nice --- package nice.tools.doc; /** @author Francis Barber */ import bossa.syntax.*; import java.util.*; import java.text.*; import java.io.*; class HTMLWriter { //mainPackage = mainPackage.deleteAtEnd("/").replace('/', "."); void write(Definition d, String packageName) { } write(c...@Cl...ass, packageName) { // Here we handle classes //Initialise a FileWriter String path = outdir + packageName.replace('.','/') + "/"; //this generates the output directory File dir = new File(path); if(!dir.exists()) { if(!dir.mkdirs()) { System.err.println("Error creating directory structure"); } } String fileName = c.getName().toString(); //we only want information after the last . //that is, nice.lang.Maybe -> Maybe fileName = fileName.substring(fileName.lastIndexOf(".") + 1); BufferedWriter writer = new BufferedWriter(new FileWriter(path + fileName + ".html")); writer.write(getHeader(c.getName().toString())); writer.write("<h1>Class " + c.getName() + "</h1>"); //Print hierarchy ArrayList<ClassDefinition.Class> list = new ArrayList(); ClassDefinition.Class superClass = c.getSuperClassDefinition(); while(superClass != null) { list.add(superClass); superClass = superClass.getSuperClassDefinition(); } /*This creates a nice-looking String as follows: *Super-Super-Class * | * +--Super-Class * | * +--Class */ String hierarchy = c.getName().toString(); for(int i = 0; i < list.size(); i++) { String spaces = ""; for(int j = 0; j < (list.size()-i)*6-3; j++) spaces = spaces + ' '; hierarchy = list.get(i).getName() + "\n" + spaces + "|\n" + spaces + "+--" + hierarchy; } writer.write("<pre>"); writer.write(hierarchy); writer.write("</pre>"); //Implemented interfaces ClassDefinition.Interface[?] interfaces = c.getImplementedInterfaces(); if (interfaces != null) { writer.write("<b>Implemented interfaces:</b>"); writer.write("<ul>"); interfaces.foreach(ClassDefinition.Interface i => writer.write("<li>" + i.getName() + "</li>")); writer.write("</ul>"); } writer.write(getFooter()); writer.close(); } write(m@MethodDeclaration, packageName) { //Handle methods //Initialise a FileWriter String path = outdir + packageName.replace('.','/') + "/"; //this generates the output directory File dir = new File(path); if(!dir.exists()) { if(!dir.mkdirs()) { System.err.println("Error creating directory structure"); } } String fileName = m.getName().toString(); //we only want information after the last . //that is, nice.lang.Maybe -> Maybe //System.out.println("Raw filename: " + fileName); fileName = fileName.replace('/', "@slash"); fileName = fileName.replace('.', "@dot"); //println(path + fileName); BufferedWriter writer = new BufferedWriter(new FileWriter(path + fileName + ".html")); writer.write(getHeader(m.getName().toString())); writer.write("<h1>Method " + m.getName() + "</h1>"); writer.write(htmlSafe(m.toString())); writer.write("<p>"); writer.write("nicedoc comments would go here..."); writer.write("</p>"); /*Below is various info that could be used in the *construction of the method entry */ //The compiler doesn't like this: println("Syntactic return type: " + m.getSyntacticReturnType()); //println("Return type: " + m.getReturnType()); //println("Arity: " + m.getArity()); //println("Type: " + m.getType()); //println("Formal Parameters: " + m.formalParameters()); writer.write(getFooter()); writer.close(); } write(m@DefaultMethodImplementation, packageName) { this.write(m.getDeclaration(), packageName); } void write(bossa.modules.Package p) { try { String path = outdir + p.getName().replace('.','/') + "/"; //this generates the output directory File dir = new File(path); if(!dir.exists()) { if(!dir.mkdirs()) { System.err.println("Error creating directory structure"); } } BufferedWriter writer = new BufferedWriter(new FileWriter(path + "index.html")); writer.write(getHeader("Package " + p.getName())); //we need to separate class and methods ArrayList<ClassDefinition.Class> classes = new ArrayList(); ArrayList<MethodDeclaration> methods = new ArrayList(); for(Definition d : p.getDefinitions().definitions()) { if(d instanceof ClassDefinition.Class) { classes.add(d); } else if(d instanceof MethodDeclaration) { methods.add(d); } else if(d instanceof DefaultMethodImplementation) { methods.add(d.getDeclaration()); } else { System.err.println("Ignoring " + d); } } //Write classes writer.write("<b>Classes:</b>\n"); writer.write("<ul>\n"); for(ClassDefinition.Class c : classes) { String s = c.getName().toString(); int index = s.lastIndexOf('.'); if(index != s.length()-1) s = s.substring(index+1); writer.write("<li><a href='" + s + ".html'>" + s + "</a></li>\n"); } writer.write("</ul>\n"); //Write methods writer.write("<b>Methods:</b>\n"); writer.write("<ul>\n"); for(MethodDeclaration m : methods) { writer.write("<li><a href='" + m.getName() + ".html'>" + m.getName() + "</a></li>\n"); } writer.write("</ul>\n"); writer.write(getFooter()); writer.close(); } catch(IOException ioe) { ioe.printStackTrace(); } } void write(List<bossa.modules.Package> packages) { try { BufferedWriter writer = new BufferedWriter(new FileWriter(outdir + "index.html")); writer.write(getHeader("Packages")); writer.write("<b>Packages:</b>\n"); writer.write("<ul>\n"); for(bossa.modules.Package p : packages) { writer.write("<li><a href='" + p.getName().replace('.', "/") + "/index.html'>" + p.getName() + "</a></li>\n"); } writer.write("</ul>\n"); writer.write(getFooter()); writer.close(); } catch(IOException ioe) { ioe.printStackTrace(); } } } /** Converts a String that may contain characters such as '<' to one that will display * properly in html */ String htmlSafe(String s) { return s.replaceAll("<", "<").replaceAll(">", ">"); } /** Returns a string containing everything required up to and including the <body> tag */ String getHeader(String title) { //we could also include some kind of visible header as well //Create a DateFormatter and set the time zone DateFormat df = new SimpleDateFormat("dd/MM/yyyy 'at' HH:mm:ss z"); df.setTimeZone(TimeZone.getTimeZone("GMT")); return "<html>\n" + "<head>\n" + "<!-- Generated by nicedoc on " + df.format(new Date()) + " -->\n" + "\t<title>" + title + "</title>\n" + "</head>\n" + "<body>\n"; } /** Returns a string containing everything after and including the </body> tag */ String getFooter() { //we could also include other information here return "</body>\n" + "</html>\n"; } --- NEW FILE: document.nice --- package nice.tools.doc; /** This entire class is very messy and a complete waste of time @author Francis Barber */ import bossa.syntax.*; class Documenter { HTMLWriter htmlwriter = new HTMLWriter(); void document(List<bossa.modules.Package> packages) { htmlwriter.write(packages); } void document(bossa.modules.Package p) { System.err.println("Package: " + p.getName()); htmlwriter.write(p); document(this, p.getDefinitions(), p.getName()); } void document(AST ast, String packageName) { //ast.definitions().foreach(Definition d => document(d)); ast.definitions().foreach(Definition d => htmlwriter.write(d, packageName)); } void document(Definition d) { // Default implementation. // Just to see what we are not handling yet... System.err.println("Ignoring " + d.getName() + " (class: " + d.getClass().getName() + ")"); } document(c...@Cl...ass) { // Here we handle classes // Example code that accesses some properties of classes: println("Class " + c.getName); ClassDefinition superClass = c.getSuperClassDefinition(); if (superClass != null) println(" extends " + superClass.getName()); ClassDefinition.Interface[?] interfaces = c.getImplementedInterfaces(); if (interfaces != null) interfaces.foreach(ClassDefinition.Interface i => println(" implements " + i.getName())); } document(m@MethodDeclaration) { println("Method " + m.getName); // Here we handle methods... } document(m@MethodImplementation) { // Method implementations can probably be ignored, as they do not // belong to the API. } document(m@DefaultMethodImplementation) { // However, for a default implementation, we want to handle the corresponding // declaration. document(this, m.getDeclaration()); } } |
From: <bo...@us...> - 2004-02-13 15:14:00
|
Update of /cvsroot/nice/Nice/src/nice/tools/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18153/src/nice/tools/doc Log Message: Directory /cvsroot/nice/Nice/src/nice/tools/doc added to the repository |
From: <bo...@us...> - 2004-02-12 23:59:40
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13220/bossa/syntax Modified Files: analyse.nice Log Message: Fix misleading message: there might be a method with that name but a different number of arguments. Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** analyse.nice 5 Feb 2004 22:59:52 -0000 1.99 --- analyse.nice 12 Feb 2004 23:54:22 -0000 1.100 *************** *** 406,410 **** (arity == 0 ? " has no static method or static field named " : arity == 1 ? " has no method or field named " : ! " has no method named ") + funName); --- 406,410 ---- (arity == 0 ? " has no static method or static field named " : arity == 1 ? " has no method or field named " : ! " has no method with "arity" arguments and named ") + funName); |
From: <bo...@us...> - 2004-02-11 22:27:21
|
Update of /cvsroot/nice/swing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15121 Modified Files: project.xml Log Message: Added dependency on the maven-nice plugin. Index: project.xml =================================================================== RCS file: /cvsroot/nice/swing/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** project.xml 6 Feb 2004 19:05:35 -0000 1.3 --- project.xml 11 Feb 2004 22:22:53 -0000 1.4 *************** *** 113,116 **** --- 113,126 ---- </developers> + <dependencies> + <dependency> + <groupId>nice</groupId> + <artifactId>maven-nice-plugin</artifactId> + <type>plugin</type> + <version>SNAPSHOT</version> + <url>http://nice.sf.net/</url> + </dependency> + </dependencies> + <build> |
From: <bo...@us...> - 2004-02-11 16:10:21
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/src/bossa/syntax Modified Files: LiteralArrayExp.java Log Message: Minor: more precise typing of the SpecialTypes.array(_) method. Index: LiteralArrayExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/LiteralArrayExp.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** LiteralArrayExp.java 11 Feb 2004 12:46:39 -0000 1.17 --- LiteralArrayExp.java 11 Feb 2004 16:06:05 -0000 1.18 *************** *** 115,119 **** { gnu.expr.Expression[] args = Expression.compile(elements); ! ArrayType t = (ArrayType) nice.tools.code.SpecialTypes.array(Types.lowestUpperBound(args)); return new gnu.expr.ApplyExp --- 115,119 ---- { gnu.expr.Expression[] args = Expression.compile(elements); ! ArrayType t = nice.tools.code.SpecialTypes.array(Types.lowestUpperBound(args)); return new gnu.expr.ApplyExp |
From: <bo...@us...> - 2004-02-11 16:10:21
|
Update of /cvsroot/nice/Nice/src/nice/tools/code In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/src/nice/tools/code Modified Files: SpecialTypes.java SpecialArray.java Log Message: Minor: more precise typing of the SpecialTypes.array(_) method. Index: SpecialTypes.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/SpecialTypes.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SpecialTypes.java 8 Oct 2003 13:34:50 -0000 1.5 --- SpecialTypes.java 11 Feb 2004 16:06:05 -0000 1.6 *************** *** 59,63 **** if elements is null. */ ! static public Type array(Type elements) { if (elements == null) --- 59,63 ---- if elements is null. */ ! static public ArrayType array(Type elements) { if (elements == null) Index: SpecialArray.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/SpecialArray.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** SpecialArray.java 11 Feb 2004 12:46:39 -0000 1.17 --- SpecialArray.java 11 Feb 2004 16:06:05 -0000 1.18 *************** *** 16,20 **** Return a SpecialArray holding elements of type <tt>elements</tt>. */ ! public static Type create(Type elements) { String prefix; --- 16,20 ---- Return a SpecialArray holding elements of type <tt>elements</tt>. */ ! public static SpecialArray create(Type elements) { String prefix; *************** *** 25,29 **** Type res = Type.lookupType("[" + elements.getSignature()); if(res != null && res instanceof SpecialArray) ! return res; return new SpecialArray(elements, prefix, false, true); --- 25,29 ---- Type res = Type.lookupType("[" + elements.getSignature()); if(res != null && res instanceof SpecialArray) ! return (SpecialArray) res; return new SpecialArray(elements, prefix, false, true); |
From: <bo...@us...> - 2004-02-11 14:58:08
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1499 Modified Files: Makefile Log Message: Make the bootstrap work when inlined methods use modified code from the nice.tools.code package. Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/Makefile,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** Makefile 25 Jan 2004 02:49:23 -0000 1.134 --- Makefile 11 Feb 2004 14:53:55 -0000 1.135 *************** *** 174,177 **** --- 174,182 ---- $(JAVAC_GENERIC) -d classes-inline stdlib/nice/lang/inline/*.java cp -a classes-inline/* classes + # We put code used by inline methods inside classes-inline so that it is + # used when running the inline methods, not the versions in the running + # compiler, which might be outdated. + mkdir -p classes-inline/nice/tools/code + cp classes/nice/tools/code/*.class classes-inline/nice/tools/code ${NICEC} -R bossa.modules ${NICEC} -r nice.tools.ast |
From: <bo...@us...> - 2004-02-11 13:34:36
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14911/src/bossa/modules Modified Files: Package.java Log Message: Let the wrapped exception propagate, instead of rewrapping it differently. Index: Package.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Package.java,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** Package.java 18 Jan 2004 01:14:31 -0000 1.109 --- Package.java 11 Feb 2004 13:30:20 -0000 1.110 *************** *** 55,66 **** return res; ! try{ ! return new Package(lname, compilation, isRoot); ! } ! catch(ExceptionInInitializerError e){ ! e.getException().printStackTrace(); ! Internal.error("Exception in initializer: "+e.getException()); ! return null; ! } } --- 55,59 ---- return res; ! return new Package(lname, compilation, isRoot); } |