nice-commit Mailing List for The Nice Programming Language (Page 94)
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: <ar...@us...> - 2003-07-24 21:26:23
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv3392/F:/nice/src/bossa/syntax Modified Files: CallExp.java JavaFieldAccess.java Log Message: Fixed a bug: printing calls to retyped static java methods/fields in package.nicei files. Index: CallExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/CallExp.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** CallExp.java 17 Jun 2003 12:03:05 -0000 1.80 --- CallExp.java 24 Jul 2003 21:26:19 -0000 1.81 *************** *** 361,375 **** public String toString() { ! if(infix) ! if (declaringClass != null) ! return declaringClass.getName() + ! "." + function + arguments; ! else ! return ! arguments.getExp(0) + ! "." + function + ! arguments.toStringInfix(); ! else return function.toString() + arguments; } --- 361,385 ---- public String toString() { ! if (!infix) return function.toString() + arguments; + + if (declaringClass == null) + return arguments.getExp(0) + "." + function + arguments.toStringInfix(); + + if (function instanceof SymbolExp && + ((SymbolExp)function).getSymbol() instanceof MethodDeclaration.Symbol) + { + MethodDeclaration md = ((MethodDeclaration.Symbol) + ((SymbolExp)function).getSymbol()).getDefinition(); + + if (md instanceof RetypedJavaMethod) + return function.toString() + arguments; + + if (md instanceof JavaFieldAccess) + return declaringClass.getName() + "." + + ((JavaFieldAccess)md).fieldName + arguments; + } + + return declaringClass.getName() + "." + function + arguments; } Index: JavaFieldAccess.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/JavaFieldAccess.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** JavaFieldAccess.java 24 Jan 2003 12:23:32 -0000 1.13 --- JavaFieldAccess.java 24 Jul 2003 21:26:20 -0000 1.14 *************** *** 152,156 **** LocatedString className; ! private String fieldName; /**************************************************************** --- 152,156 ---- LocatedString className; ! String fieldName; /**************************************************************** |
From: <ar...@us...> - 2003-07-24 21:26:23
|
Update of /cvsroot/nice/Nice/testsuite/compiler/packages In directory sc8-pr-cvs1:/tmp/cvs-serv3392/F:/nice/testsuite/compiler/packages Modified Files: nicei.testsuite Log Message: Fixed a bug: printing calls to retyped static java methods/fields in package.nicei files. Index: nicei.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/packages/nicei.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nicei.testsuite 24 Jul 2003 12:47:53 -0000 1.2 --- nicei.testsuite 24 Jul 2003 21:26:19 -0000 1.3 *************** *** 47,55 **** ; ! /// PASS bug /// package a /// toplevel class X { int i = Integer.MAX_VALUE; } /// package b import a --- 47,85 ---- ; ! /// PASS /// package a /// toplevel class X { int i = Integer.MAX_VALUE; + } + /// package b import a + ; + + /// PASS + /// package a + /// toplevel + class X { + // Long.MAX_VALUE isn't retyped yet + long l = Long.MAX_VALUE; + } + /// package b import a + ; + + /// PASS + /// package a + /// toplevel + double _rint_(double) = native double Math.rint(double); + class X { + double d = Math.rint(1.01); + } + /// package b import a + ; + + /// PASS + /// package a + /// toplevel + double _rint_(double) = native double Math.rint(double); + class X { + double d = _rint_(1.01); } /// package b import a |
From: <ar...@us...> - 2003-07-24 17:52:13
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv23228/F:/nice/src/bossa/syntax Modified Files: Pattern.java StringConstantExp.java Log Message: Fixed a bug in escaping string literal patterns and some little improvements in pattern.java. Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** Pattern.java 23 Jul 2003 18:41:15 -0000 1.65 --- Pattern.java 24 Jul 2003 17:52:08 -0000 1.66 *************** *** 563,566 **** --- 563,576 ---- /** * Returns a string used to recognize this pattern in the bytecode. + * for the different patterns the following signatures are used: + * any : `@_` + * null : `@NULL` + * type : `@` + type where `.` in type are replaced by `$` + * exactly at type : `#` + type idem + * integer literal : `@-` / `@+` + int_literal + * char literal : `@'c'` where c is an unescaped char + * string literal : `@"string"` where string is an escaped string + * reference : `@` + globalconstantname + * int comparison : `@>` / `@>=` / `@<` / `@<=` + int_literal * * This is usefull to distinguish alternatives of a method. *************** *** 593,596 **** --- 603,609 ---- return "@=" + name; + if (atString()) + return "@\"" + ((StringConstantExp)atValue).escapedValue + "\""; + return "@" + atValue; } *************** *** 623,634 **** if (rep.charAt(pos[0]) == '\'') ! { //we need to skip possible '@' or '#' content of the char literal pos[0] += 3; - while(pos[0] < len && - rep.charAt(pos[0]) != '@' && rep.charAt(pos[0]) != '#') - pos[0]++; } else if (rep.charAt(pos[0]) == '\"') ! { //idem for string literal pos[0] += 2; while(pos[0] < len && --- 636,644 ---- if (rep.charAt(pos[0]) == '\'') ! { //char literal patterns are 3 chars pos[0] += 3; } else if (rep.charAt(pos[0]) == '\"') ! { //we need to skip possible '@' or '#' content of the string literal pos[0] += 2; while(pos[0] < len && Index: StringConstantExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/StringConstantExp.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** StringConstantExp.java 28 May 2003 12:57:26 -0000 1.7 --- StringConstantExp.java 24 Jul 2003 17:52:09 -0000 1.8 *************** *** 26,29 **** --- 26,30 ---- { className = stringName; + this.escapedValue = value; this.value=unescape(value); } *************** *** 91,93 **** --- 92,96 ---- return "\""+value+"\""; } + + String escapedValue; } |
From: <ar...@us...> - 2003-07-24 17:52:13
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1:/tmp/cvs-serv23228/F:/nice/testsuite/compiler/methods Modified Files: string.testsuite Log Message: Fixed a bug in escaping string literal patterns and some little improvements in pattern.java. Index: string.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/string.testsuite,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** string.testsuite 23 Jul 2003 18:41:20 -0000 1.3 --- string.testsuite 24 Jul 2003 17:52:10 -0000 1.4 *************** *** 59,63 **** assert foo("@"); ! /// PASS bug /// package a /// Toplevel --- 59,63 ---- assert foo("@"); ! /// PASS /// package a /// Toplevel |
From: <bo...@us...> - 2003-07-24 15:05:57
|
Update of /cvsroot/nice/Nice/src/bossa/util In directory sc8-pr-cvs1:/tmp/cvs-serv26376/src/bossa/util Modified Files: Debug.java Log Message: Allow to easily disable polytype simplification for debuging purposes. Index: Debug.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/util/Debug.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Debug.java 30 Oct 2001 15:38:24 -0000 1.16 --- Debug.java 24 Jul 2003 15:05:54 -0000 1.17 *************** *** 97,100 **** --- 97,101 ---- mlsub.typing.Typing.dbg = Debug.typing; mlsub.typing.Enumeration.linkDbg = Debug.linkTests; + mlsub.typing.Polytype.noSimplify = getBoolean("debug.noSimplify", false); } |
From: <bo...@us...> - 2003-07-24 15:05:57
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1:/tmp/cvs-serv26376/src/mlsub/typing Modified Files: Polytype.java Log Message: Allow to easily disable polytype simplification for debuging purposes. Index: Polytype.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Polytype.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Polytype.java 1 Mar 2003 00:58:28 -0000 1.16 --- Polytype.java 24 Jul 2003 15:05:54 -0000 1.17 *************** *** 113,117 **** { // Optimization ! if(!Constraint.hasBinders(constraint)) return; --- 113,117 ---- { // Optimization ! if (isMonomorphic()) return; *************** *** 257,261 **** public void simplify() { ! if (!Constraint.hasBinders(constraint) || simplified) return; --- 257,261 ---- public void simplify() { ! if (isMonomorphic() || simplified || Polytype.noSimplify) return; *************** *** 331,334 **** private Constraint constraint; ! private Monotype monotype; } --- 331,336 ---- private Constraint constraint; ! private Monotype monotype; ! ! public static boolean noSimplify; } |
From: <ar...@us...> - 2003-07-24 12:47:56
|
Update of /cvsroot/nice/Nice/testsuite/compiler/packages In directory sc8-pr-cvs1:/tmp/cvs-serv3183/F:/nice/testsuite/compiler/packages Modified Files: nicei.testsuite Log Message: Added testcase for bug in writing incorrectly the default value of a field to package.nicei when the value is a retyped static field. Index: nicei.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/packages/nicei.testsuite,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nicei.testsuite 21 Feb 2003 15:53:10 -0000 1.1 --- nicei.testsuite 24 Jul 2003 12:47:53 -0000 1.2 *************** *** 46,47 **** --- 46,56 ---- /// package b import a ; + + /// PASS bug + /// package a + /// toplevel + class X { + int i = Integer.MAX_VALUE; + } + /// package b import a + ; |
From: <ar...@us...> - 2003-07-23 18:41:28
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv19453/F:/nice/src/bossa/syntax Modified Files: Pattern.java Log Message: Fix bug that caused failure of reading of char/string literal patterns containing a '@' or '#'. And added a testcase for a new bug with escaping string. Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** Pattern.java 15 Jul 2003 11:11:22 -0000 1.64 --- Pattern.java 23 Jul 2003 18:41:15 -0000 1.65 *************** *** 622,628 **** int len = rep.length(); ! while(pos[0] < len && ! rep.charAt(pos[0]) != '@' && rep.charAt(pos[0]) != '#') ! pos[0]++; String name = rep.substring(start, pos[0]); --- 622,648 ---- int len = rep.length(); ! if (rep.charAt(pos[0]) == '\'') ! { //we need to skip possible '@' or '#' content of the char literal ! pos[0] += 3; ! while(pos[0] < len && ! rep.charAt(pos[0]) != '@' && rep.charAt(pos[0]) != '#') ! pos[0]++; ! } ! else if (rep.charAt(pos[0]) == '\"') ! { //idem for string literal ! pos[0] += 2; ! while(pos[0] < len && ! ( ( rep.charAt(pos[0]) != '@' && rep.charAt(pos[0]) != '#') || ! ( rep.charAt(pos[0]-1) == '\"' && ! rep.charAt(pos[0]-2) != '\\' ) ) ) ! pos[0]++; ! ! } ! else ! { ! while(pos[0] < len && ! rep.charAt(pos[0]) != '@' && rep.charAt(pos[0]) != '#') ! pos[0]++; ! } String name = rep.substring(start, pos[0]); |
From: <ar...@us...> - 2003-07-23 18:41:25
|
Update of /cvsroot/nice/Nice/testsuite/compiler/methods In directory sc8-pr-cvs1:/tmp/cvs-serv19453/F:/nice/testsuite/compiler/methods Modified Files: integer.testsuite string.testsuite Log Message: Fix bug that caused failure of reading of char/string literal patterns containing a '@' or '#'. And added a testcase for a new bug with escaping string. Index: integer.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/integer.testsuite,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** integer.testsuite 12 Jul 2003 23:13:12 -0000 1.10 --- integer.testsuite 23 Jul 2003 18:41:20 -0000 1.11 *************** *** 191,192 **** --- 191,202 ---- foo(4) = 0; foo(5) = 1; + + /// PASS + /// package a + /// Toplevel + boolean foo(char c); + foo(c) = false; + foo('#') = true; + foo('(') = false; + /// package b import a + assert foo('#'); Index: string.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/methods/string.testsuite,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** string.testsuite 6 Jun 2003 10:16:04 -0000 1.2 --- string.testsuite 23 Jul 2003 18:41:20 -0000 1.3 *************** *** 48,49 **** --- 48,70 ---- foos(x) {} foos("abc") {} + + /// PASS + /// package a + /// Toplevel + boolean foo(String s); + foo(s) = false; + foo("@") = true; + foo("(") = false; + /// package b import a + assert foo("@"); + + /// PASS bug + /// package a + /// Toplevel + boolean foo(String s); + foo(s) = false; + foo("x") = false; + foo("\"x") = true; + foo("\\\"x") = false; + /// package b import a + assert foo("\"x"); |
From: <ar...@us...> - 2003-07-23 16:17:56
|
Update of /cvsroot/nice/Nice/testsuite/compiler/classes In directory sc8-pr-cvs1:/tmp/cvs-serv25240/F:/nice/testsuite/compiler/classes Modified Files: typeParameters.testsuite Log Message: Testcase of bug mentioned on #nice today. Index: typeParameters.testsuite =================================================================== RCS file: /cvsroot/nice/Nice/testsuite/compiler/classes/typeParameters.testsuite,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** typeParameters.testsuite 15 Jul 2003 10:36:18 -0000 1.10 --- typeParameters.testsuite 23 Jul 2003 16:17:53 -0000 1.11 *************** *** 214,215 **** --- 214,225 ---- } } + + + /// PASS bug + /// Toplevel + class Impl<T> { + T ?-> int bar = T t1 => 0; + } + class Foo<T> { + Impl<int> w = new Impl(); + } |
From: <bo...@us...> - 2003-07-22 16:56:31
|
Update of /cvsroot/nice/Nice/src/bossa/modules In directory sc8-pr-cvs1:/tmp/cvs-serv28267/src/bossa/modules Modified Files: Content.java Log Message: Do not stop at the first paring error, but continue with the next file in the package. Index: Content.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/modules/Content.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Content.java 24 Jun 2003 15:28:19 -0000 1.10 --- Content.java 22 Jul 2003 16:56:28 -0000 1.11 *************** *** 81,85 **** for(int i = 0; i<readers.length; i++) ! read(readers[i], definitions); return expand(definitions); --- 81,92 ---- for(int i = 0; i<readers.length; i++) ! try{ ! read(readers[i], definitions); ! } ! catch(UserError ex){ ! pkg.compilation.error(ex); ! } ! ! pkg.compilation.exitIfErrors(); return expand(definitions); |
From: <bo...@us...> - 2003-07-22 16:55:35
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv28078/src/bossa/syntax Modified Files: Node.java AST.java Log Message: Do not stop at the first typechecking error. Index: Node.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Node.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Node.java 28 May 2003 12:57:26 -0000 1.56 --- Node.java 22 Jul 2003 16:55:31 -0000 1.57 *************** *** 355,359 **** if (children != null) for(Iterator i = children.iterator();i.hasNext();) ! ((Node)i.next()).doTypecheck(); } --- 355,364 ---- if (children != null) for(Iterator i = children.iterator();i.hasNext();) ! try{ ! ((Node)i.next()).doTypecheck(); ! } ! catch(UserError ex){ ! globalTypeScope.module.compilation().error(ex); ! } } Index: AST.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/AST.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** AST.java 24 Jun 2003 15:28:19 -0000 1.47 --- AST.java 22 Jul 2003 16:55:31 -0000 1.48 *************** *** 154,157 **** --- 154,159 ---- doTypecheck(); + + module.compilation().exitIfErrors(); } |
From: <ar...@us...> - 2003-07-22 16:03:09
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv17371/F:/nice/src/bossa/parser Modified Files: Parser.jj Log Message: Some minor simplifications of the parser. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.198 retrieving revision 1.199 diff -C2 -d -r1.198 -r1.199 *** Parser.jj 19 Jul 2003 00:54:05 -0000 1.198 --- Parser.jj 22 Jul 2003 16:03:04 -0000 1.199 *************** *** 1744,1748 **** ( LOOKAHEAD(funExpLookahead()) e1=funExp() ! | e1=ClassicExpression() ) { --- 1744,1760 ---- ( LOOKAHEAD(funExpLookahead()) e1=funExp() ! | ! e1=ConditionalExpression() ! [ ! { e1.setLocation(Location.make(first, getToken(0))); } ! op=AssignmentOperator() ! e2=Expression() ! { ! if(op.image.length()!=1) ! e2=CallExp.create(symb(op.image.substring(0, 1),op),e1,e2); ! ! e1=AssignExp.create(e1,e2); ! } ! ] ) { *************** *** 1753,1774 **** } - Expression ClassicExpression() : - { Expression e1,e2; Token op, start = getToken(1); } - { - e1=ConditionalExpression() - [ - { e1.setLocation(Location.make(start, getToken(0))); } - op=AssignmentOperator() - e2=Expression() - { - if(op.image.length()!=1) - e2=CallExp.create(symb(op.image.substring(0, 1),op),e1,e2); - - e1=AssignExp.create(e1,e2); - } - ] - { return e1; } - } - Expression SideEffectFreeExpression() : { Expression e; } --- 1765,1768 ---- *************** *** 1880,1904 **** Expression RelationalExpression() : ! { Expression e1, e2, e3; Token t; e3 = null; } { e1=RangeExpression() ! [ ( ! ( (t=">"|t=">=") e2=RangeExpression() ! { ! if(e3 == null) e1=CallExp.create(symb(t),e1,e2); ! else e1=CallExp.create(symb("&&",t),e1,CallExp.create(symb(t),e3,e2)); ! e3 = e2; ! } ! )+ ! | ! ( (t="<"|t="<=") e2=RangeExpression() ! { ! if(e3 == null) e1=CallExp.create(symb(t),e1,e2); ! else e1=CallExp.create(symb("&&",t),e1,CallExp.create(symb(t),e3,e2)); ! e3 = e2; ! } ! )+ ! ) ! ] { return e1; } } --- 1874,1893 ---- Expression RelationalExpression() : ! { Expression e1, e2, e3; Token t, t_prev = null; e3 = null; } { e1=RangeExpression() ! ( (t=">"|t=">="|t="<"|t="<=") e2=RangeExpression() ! { ! if(e3 == null) e1=CallExp.create(symb(t),e1,e2); ! else ! { ! e1=CallExp.create(symb("&&",t),e1,CallExp.create(symb(t),e3,e2)); ! if (t.image.charAt(0) != t_prev.image.charAt(0)) ! User.error(Location.make(t), "All chained comparisons should be in the same direction"); ! } ! e3 = e2; ! t_prev = t; ! } ! )* { return e1; } } *************** *** 1971,2008 **** { ( ! ( t="+" | t="-" ) res=PrimaryExpression() { res=CallExp.create(symb(t),res); } | ! res=PreIncrementExpression() ! | ! res=PreDecrementExpression() | ! res=UnaryExpressionNotPlusMinus() ) { return res; } } ! Expression PreIncrementExpression() : ! { Expression res; Token t; } ! { ! t="++" res=PrimaryExpression() ! { return new IncrementExp(res, true, true); } ! } ! ! Expression PreDecrementExpression() : ! { Expression res; Token t; } ! { ! t="--" res=PrimaryExpression() ! { return new IncrementExp(res, true, false); } ! } ! ! Expression UnaryExpressionNotPlusMinus() : ! { Expression res; Token t; } { ! ( t="~" | t="!" ) res=PrimaryExpression() ! { return CallExp.create(symb(t),res); } ! | ! res=PostfixExpression() ! { return res; } } --- 1960,1978 ---- { ( ! ( t="+" | t="-" | t="~" | t="!" ) res=PrimaryExpression() { res=CallExp.create(symb(t),res); } | ! res=Pre_crementExpression() | ! res=PostfixExpression() ) { return res; } } ! Expression Pre_crementExpression() : ! { Expression res; Token t; boolean inc = false; } { ! ( t="++" {inc = true;} | t="--" ) res=PrimaryExpression() ! { return new IncrementExp(res, true, inc); } } *************** *** 2371,2377 **** { first = getToken(1); } ( ! e1=PreIncrementExpression() ! | ! e1=PreDecrementExpression() | e1=PrimaryExpression() --- 2341,2345 ---- { first = getToken(1); } ( ! e1=Pre_crementExpression() | e1=PrimaryExpression() |
From: <ar...@us...> - 2003-07-22 14:10:00
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang/inline In directory sc8-pr-cvs1:/tmp/cvs-serv28300/F:/nice/stdlib/nice/lang/inline Modified Files: ReferenceOp.java Log Message: Change error message. Index: ReferenceOp.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/inline/ReferenceOp.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ReferenceOp.java 22 Jul 2003 12:09:05 -0000 1.3 --- ReferenceOp.java 22 Jul 2003 14:09:55 -0000 1.4 *************** *** 184,188 **** if (exp != null && nice.tools.code.Types.isSure(exp.getType().getMonotype())) ! bossa.util.User.warning(exp, "Warning: comparing a non-null value with null"); } --- 184,188 ---- if (exp != null && nice.tools.code.Types.isSure(exp.getType().getMonotype())) ! bossa.util.User.warning(exp, "Comparing a non-null value with null"); } |
From: <ar...@us...> - 2003-07-22 12:09:08
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang/inline In directory sc8-pr-cvs1:/tmp/cvs-serv7572/F:/nice/stdlib/nice/lang/inline Modified Files: ReferenceOp.java Log Message: Give a warning when comparing something of a non-null type with null. Index: ReferenceOp.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/inline/ReferenceOp.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReferenceOp.java 24 Mar 2003 23:40:09 -0000 1.2 --- ReferenceOp.java 22 Jul 2003 12:09:05 -0000 1.3 *************** *** 20,24 **** Inlining of native reference operators. */ ! public class ReferenceOp extends Procedure2 implements Inlineable, Branchable { private final static int --- 20,24 ---- Inlining of native reference operators. */ ! public class ReferenceOp extends Procedure2 implements Branchable, bossa.syntax.Macro { private final static int *************** *** 172,175 **** --- 172,188 ---- { return retType; + } + + public void checkSpecialRequirements(bossa.syntax.Expression[] arguments) + { + bossa.syntax.Expression exp = null; + if (arguments[0] instanceof bossa.syntax.NullExp) + exp = arguments[1]; + else if (arguments[1] instanceof bossa.syntax.NullExp) + exp = arguments[0]; + + + if (exp != null && nice.tools.code.Types.isSure(exp.getType().getMonotype())) + bossa.util.User.warning(exp, "Warning: comparing a non-null value with null"); } |
From: <ar...@us...> - 2003-07-22 12:09:08
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv7572/F:/nice/src/bossa/syntax Modified Files: Expression.java NullExp.java Log Message: Give a warning when comparing something of a non-null type with null. Index: Expression.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Expression.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** Expression.java 17 Jun 2003 12:03:05 -0000 1.51 --- Expression.java 22 Jul 2003 12:09:05 -0000 1.52 *************** *** 149,153 **** abstract void computeType(); ! Polytype getType() { if(type==null) --- 149,153 ---- abstract void computeType(); ! public Polytype getType() { if(type==null) Index: NullExp.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NullExp.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NullExp.java 5 Jun 2003 16:06:03 -0000 1.7 --- NullExp.java 22 Jul 2003 12:09:05 -0000 1.8 *************** *** 41,45 **** } ! Polytype getType() { MonotypeVar alpha = new MonotypeVar("any"); --- 41,45 ---- } ! public Polytype getType() { MonotypeVar alpha = new MonotypeVar("any"); |
From: <bo...@us...> - 2003-07-21 23:20:22
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1:/tmp/cvs-serv31463/src/gnu/expr Modified Files: ModuleBody.java Log Message: Resynchronized with kawa, to remove most differences, which by the license allows redistribution without being subject to the GPL. This is important since those files are needed at runtime. Index: ModuleBody.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/ModuleBody.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ModuleBody.java 8 Oct 2002 13:30:51 -0000 1.7 --- ModuleBody.java 21 Jul 2003 23:20:14 -0000 1.8 *************** *** 11,15 **** */ ! // NICE: Avoid being dependant of gnu.mapping.MethodProc. // NICE: This is bad because this class is needed at runtime. public class ModuleBody extends ProcedureN// implements Runnable --- 11,15 ---- */ ! // NICE: Avoid being dependent of gnu.mapping.MethodProc. // NICE: This is bad because this class is needed at runtime. public class ModuleBody extends ProcedureN// implements Runnable *************** *** 20,23 **** --- 20,32 ---- } + /** For backwards compatibily. + * Earlier versions of Kawa used this to initialize a module. + * Allows run(Consumer) to call those methods. */ + /* + public Object run (Environment env) + { + return Values.empty; + } + public void run () { *************** *** 27,40 **** public void run(Consumer out) { ! CallContext ctx = new CallContext(); ! ctx.consumer = out; ! ctx.values = Values.noArgs; ! ctx.proc = this; ! ctx.run(); } public Object apply0 () throws Throwable { ! CallContext ctx = new CallContext(); ctx.values = Values.noArgs; ctx.proc = this; --- 36,59 ---- public void run(Consumer out) { ! CallContext ctx = CallContext.getInstance(); ! // For backwards compatibility - see run(Environment). ! run(ctx.getEnvironment()); ! Consumer save = ctx.consumer; ! try ! { ! ctx.consumer = out; ! ctx.values = Values.noArgs; ! ctx.proc = this; ! ctx.run(); ! } ! finally ! { ! ctx.consumer = save; ! } } public Object apply0 () throws Throwable { ! CallContext ctx = CallContext.getInstance(); ctx.values = Values.noArgs; ctx.proc = this; *************** *** 61,76 **** public final void runAsMain (String[] args) { ! //NICE: removes spurious dependancy ! //kawa.repl.setArgs(args, 0); gnu.text.WriterManager.instance.registerShutdownHook(); try { ! CallContext ctx = new CallContext(); ctx.values = Values.noArgs; ctx.proc = this; if (getMainPrintValues()) { OutPort out = OutPort.outDefault(); ! ctx.consumer = Interpreter.getInterpreter().getOutputConsumer(out); ctx.runUntilDone(); out.freshLine(); --- 80,95 ---- public final void runAsMain (String[] args) { ! kawa.repl.setArgs(args, 0); gnu.text.WriterManager.instance.registerShutdownHook(); try { ! CallContext ctx = CallContext.getInstance(); ctx.values = Values.noArgs; ctx.proc = this; + ClassMemberConstraint.defineAll(this, ctx.getEnvironment()); if (getMainPrintValues()) { OutPort out = OutPort.outDefault(); ! ctx.consumer = kawa.Shell.getOutputConsumer(out); ctx.runUntilDone(); out.freshLine(); *************** *** 83,86 **** --- 102,106 ---- // Redundant if registerShutdownHook succeeded (e.g on JDK 1.3). gnu.mapping.OutPort.runCleanups(); + kawa.repl.exitDecrement(); } catch (Throwable ex) *************** *** 110,114 **** public Object apply0(ModuleMethod method) { ! return applyN(method, new Object[0]); } --- 130,134 ---- public Object apply0(ModuleMethod method) { ! return applyN(method, Values.noArgs); } |
From: <bo...@us...> - 2003-07-21 23:20:22
|
Update of /cvsroot/nice/Nice/src/gnu/mapping In directory sc8-pr-cvs1:/tmp/cvs-serv31463/src/gnu/mapping Modified Files: Procedure.java Log Message: Resynchronized with kawa, to remove most differences, which by the license allows redistribution without being subject to the GPL. This is important since those files are needed at runtime. Index: Procedure.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/mapping/Procedure.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Procedure.java 21 Jul 2003 19:08:50 -0000 1.7 --- Procedure.java 21 Jul 2003 23:20:14 -0000 1.8 *************** *** 43,51 **** public abstract Object apply0 () throws Throwable; - public final void apply() throws Throwable - { - apply0(); - } - public abstract Object apply1 (Object arg1) throws Throwable; --- 43,46 ---- *************** *** 157,161 **** return new Setter(this); } - */ public void setSetter (Procedure setter) --- 152,155 ---- |
From: <bo...@us...> - 2003-07-21 19:08:53
|
Update of /cvsroot/nice/Nice/src/gnu/mapping In directory sc8-pr-cvs1:/tmp/cvs-serv14868/src/gnu/mapping Modified Files: WrongType.java WrongArguments.java WrappedException.java ProcedureN.java Procedure.java Log Message: Resynchronized with kawa, to remove most differences, which by the license allows redistribution without being subject to the GPL. This is important since those files are needed at runtime. Index: WrongType.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/mapping/WrongType.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WrongType.java 26 Nov 2001 11:09:50 -0000 1.3 --- WrongType.java 21 Jul 2003 19:08:50 -0000 1.4 *************** *** 86,92 **** if (ex != null) { ! sbuf.append(" ("); ! sbuf.append(ex.getMessage()); ! sbuf.append(')'); } return sbuf.toString(); --- 86,96 ---- if (ex != null) { ! String msg = ex.getMessage(); ! if (msg != null) ! { ! sbuf.append(" ("); ! sbuf.append(msg); ! sbuf.append(')'); ! } } return sbuf.toString(); Index: WrongArguments.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/mapping/WrongArguments.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WrongArguments.java 26 Nov 2001 11:09:50 -0000 1.3 --- WrongArguments.java 21 Jul 2003 19:08:50 -0000 1.4 *************** *** 22,25 **** --- 22,33 ---- int min = num & 0xfff; int max = num >> 12; + String pname = proc.getName(); + if (pname == null) + pname = proc.getClass().getName(); + return checkArgCount(pname, min, max, argCount); + } + + public static String checkArgCount (String pname, int min, int max, int argCount) + { boolean tooMany; if (argCount < min) *************** *** 31,36 **** StringBuffer buf = new StringBuffer(100); buf.append("call to '"); ! String pname = proc.getName(); ! buf.append(pname != null ? pname : proc.getClass().getName()); buf.append("' has too "); buf.append(tooMany ? "many" : "few"); --- 39,43 ---- StringBuffer buf = new StringBuffer(100); buf.append("call to '"); ! buf.append(pname); buf.append("' has too "); buf.append(tooMany ? "many" : "few"); Index: WrappedException.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/mapping/WrappedException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WrappedException.java 30 Oct 2001 15:16:53 -0000 1.2 --- WrappedException.java 21 Jul 2003 19:08:50 -0000 1.3 *************** *** 1,3 **** ! // Copyright (c) 1999 Per M.A. Bothner. // This is free software; for terms and warranty disclaimer see ./COPYING. --- 1,3 ---- ! // Copyright (c) 1999, 2003 Per M.A. Bothner. // This is free software; for terms and warranty disclaimer see ./COPYING. *************** *** 18,22 **** { this.message = message; - this.exception = null; } --- 18,21 ---- *************** *** 34,38 **** super(); this.message = null; ! this.exception = e; } --- 33,37 ---- super(); this.message = null; ! initCause(e); } *************** *** 50,54 **** super(); this.message = message; ! this.exception = e; } --- 49,53 ---- super(); this.message = message; ! initCause(e); } *************** *** 64,69 **** public String getMessage () { ! if (message == null && exception != null) ! return exception.getMessage(); else return this.message; --- 63,69 ---- public String getMessage () { ! Throwable cause; ! if (message == null && (cause = getCause()) != null) ! return cause.getMessage(); else return this.message; *************** *** 77,81 **** public Throwable getException () { ! return exception; } --- 77,81 ---- public Throwable getException () { ! return getCause(); } *************** *** 90,93 **** --- 90,103 ---- } + /* The initCause/getCause functionality was added in JDK 1.4. + It is available in gcj 3.3, so we could perhaps put it in a JAVA1 block, + but I'm not quite ready for that yet. + Future: BEGIN a JAVA1 section */ + public Throwable initCause(Throwable cause) + { + exception = cause; + return this; + } + public Throwable getCause() { *************** *** 95,99 **** } - private String message; private Throwable exception; } --- 105,110 ---- } private Throwable exception; + /* Future: END a JAVA1 section. */ + private String message; } Index: ProcedureN.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/mapping/ProcedureN.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ProcedureN.java 20 Nov 2001 16:55:55 -0000 1.3 --- ProcedureN.java 21 Jul 2003 19:08:50 -0000 1.4 *************** *** 20,24 **** public Object apply0 () throws Throwable { ! return applyN(new Object[0]); } --- 20,24 ---- public Object apply0 () throws Throwable { ! return applyN(Values.noArgs); } Index: Procedure.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/mapping/Procedure.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Procedure.java 26 Nov 2001 11:09:50 -0000 1.6 --- Procedure.java 21 Jul 2003 19:08:50 -0000 1.7 *************** *** 6,10 **** */ ! public abstract class Procedure implements Named, Printable { /** If non-null, a sequence of (key, value)-pairs. */ --- 6,10 ---- */ ! public abstract class Procedure implements Named { /** If non-null, a sequence of (key, value)-pairs. */ *************** *** 120,135 **** break; case 1: ! result = apply1(ctx.getArgAsObject(0)); break; case 2: ! result = apply2(ctx.getArgAsObject(0), ctx.getArgAsObject(1)); break; case 3: ! result = apply3(ctx.getArgAsObject(0), ctx.getArgAsObject(1), ! ctx.getArgAsObject(2)); break; case 4: ! result = apply4(ctx.getArgAsObject(0), ctx.getArgAsObject(1), ! ctx.getArgAsObject(2), ctx.getArgAsObject(3)); break; default: --- 120,135 ---- break; case 1: ! result = apply1(ctx.getNextArg()); break; case 2: ! result = apply2(ctx.getNextArg(), ctx.getNextArg()); break; case 3: ! result = apply3(ctx.getNextArg(), ctx.getNextArg(), ! ctx.getNextArg()); break; case 4: ! result = apply4(ctx.getNextArg(), ctx.getNextArg(), ! ctx.getNextArg(), ctx.getNextArg()); break; default: *************** *** 159,162 **** --- 159,170 ---- */ + public void setSetter (Procedure setter) + { + if (this instanceof HasSetter) + throw new RuntimeException("procedure '"+getName()+ + "' has builtin setter - cannot be modified"); + setProperty(Procedure.setterKey, setter); + } + /** If HasSetter, the Procedure is called in the LHS of an assignment. */ /* *************** *** 177,188 **** */ ! public void print(java.io.PrintWriter ps) { ! ps.print ("#<procedure "); String n = getName(); if (n == null) n = getClass().getName(); ! ps.print (n); ! ps.print ('>'); } --- 185,198 ---- */ ! public String toString () { ! StringBuffer sbuf = new StringBuffer(); ! sbuf.append ("#<procedure "); String n = getName(); if (n == null) n = getClass().getName(); ! sbuf.append(n); ! sbuf.append('>'); ! return sbuf.toString(); } |
From: <bo...@us...> - 2003-07-21 19:08:53
|
Update of /cvsroot/nice/Nice/src/gnu/expr In directory sc8-pr-cvs1:/tmp/cvs-serv14868/src/gnu/expr Modified Files: ModuleMethod.java Log Message: Resynchronized with kawa, to remove most differences, which by the license allows redistribution without being subject to the GPL. This is important since those files are needed at runtime. Index: ModuleMethod.java =================================================================== RCS file: /cvsroot/nice/Nice/src/gnu/expr/ModuleMethod.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ModuleMethod.java 14 Jan 2003 16:57:46 -0000 1.6 --- ModuleMethod.java 21 Jul 2003 19:08:51 -0000 1.7 *************** *** 126,130 **** for (int i = 0; i < args.length; i++) { ! if (! getParameterType(i).isInstance(args[i])) return NO_MATCH_BAD_TYPE|i; } --- 126,131 ---- for (int i = 0; i < args.length; i++) { ! Object argi = args[i]; ! if (argi != null && ! getParameterType(i).isInstance(argi)) return NO_MATCH_BAD_TYPE|i; } |
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv25609/stdlib/nice/lang Modified Files: threads.nice strings.nice prelude.nice numeric.nice null.nice native.nice java.nice graph.nice enum.nice comparable.nice collections.nice booleans.nice bigint.nice assertions.nice array.nice ForInIters.nice BooleanAlgebra.nice Log Message: Specified that the license for nice.lang is the GNU Lesser GPL, so that Nice programs can have whatever license their authors choose. Index: threads.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/threads.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** threads.nice 29 Oct 2002 10:52:08 -0000 1.1 --- threads.nice 21 Jul 2003 17:24:14 -0000 1.2 *************** *** 1,2 **** --- 1,14 ---- + /**************************************************************************/ + /* N I C E */ + /* A high-level object-oriented research language */ + /* (c) Daniel Bonniot 2003 */ + /* */ + /* This package is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU Lesser 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.lang; Index: strings.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/strings.nice,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** strings.nice 17 Jul 2003 19:13:17 -0000 1.12 --- strings.nice 21 Jul 2003 17:24:14 -0000 1.13 *************** *** 2,11 **** /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2001 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ --- 2,11 ---- /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ Index: prelude.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/prelude.nice,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** prelude.nice 11 Jun 2003 12:21:26 -0000 1.31 --- prelude.nice 21 Jul 2003 17:24:14 -0000 1.32 *************** *** 2,16 **** /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2001 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ - - // File : prelude.nice - // Created : Thu Dec 02 11:42:48 1999 by bonniot /** --- 2,13 ---- /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ /** Index: numeric.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/numeric.nice,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** numeric.nice 17 Jun 2003 12:16:17 -0000 1.30 --- numeric.nice 21 Jul 2003 17:24:14 -0000 1.31 *************** *** 2,11 **** /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2000 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ --- 2,11 ---- /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ Index: null.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/null.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** null.nice 7 Oct 2002 10:57:33 -0000 1.3 --- null.nice 21 Jul 2003 17:24:14 -0000 1.4 *************** *** 2,11 **** /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2002 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ --- 2,11 ---- /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ Index: native.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/native.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** native.nice 6 Jul 2002 10:42:31 -0000 1.4 --- native.nice 21 Jul 2003 17:24:14 -0000 1.5 *************** *** 2,11 **** /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2002 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ --- 2,11 ---- /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ Index: java.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java.nice,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** java.nice 21 Jun 2003 09:05:28 -0000 1.24 --- java.nice 21 Jul 2003 17:24:14 -0000 1.25 *************** *** 2,11 **** /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2002 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ --- 2,11 ---- /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ Index: graph.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/graph.nice,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** graph.nice 29 Apr 2003 08:38:08 -0000 1.18 --- graph.nice 21 Jul 2003 17:24:14 -0000 1.19 *************** *** 1,2 **** --- 1,14 ---- + /**************************************************************************/ + /* N I C E */ + /* A high-level object-oriented research language */ + /* (c) Daniel Bonniot 2003 */ + /* */ + /* This package is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU Lesser 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.lang; Index: enum.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/enum.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** enum.nice 6 Jul 2003 23:25:38 -0000 1.1 --- enum.nice 21 Jul 2003 17:24:14 -0000 1.2 *************** *** 4,11 **** /* (c) Daniel Bonniot 2003 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ --- 4,11 ---- /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ Index: comparable.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/comparable.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comparable.nice 30 Oct 2001 20:53:48 -0000 1.2 --- comparable.nice 21 Jul 2003 17:24:14 -0000 1.3 *************** *** 2,11 **** /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2001 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ --- 2,11 ---- /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ Index: collections.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** collections.nice 17 Jul 2003 19:37:32 -0000 1.50 --- collections.nice 21 Jul 2003 17:24:14 -0000 1.51 *************** *** 1,2 **** --- 1,13 ---- + /**************************************************************************/ + /* N I C E */ + /* A high-level object-oriented research language */ + /* (c) Daniel Bonniot 2003 */ + /* */ + /* This package is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU Lesser 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.lang; Index: booleans.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/booleans.nice,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** booleans.nice 17 Jul 2003 23:14:37 -0000 1.13 --- booleans.nice 21 Jul 2003 17:24:14 -0000 1.14 *************** *** 1,2 **** --- 1,14 ---- + /**************************************************************************/ + /* N I C E */ + /* A high-level object-oriented research language */ + /* (c) Daniel Bonniot 2003 */ + /* */ + /* This package is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU Lesser 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.lang; Index: bigint.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/bigint.nice,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bigint.nice 3 Jun 2003 19:43:57 -0000 1.2 --- bigint.nice 21 Jul 2003 17:24:14 -0000 1.3 *************** *** 1,2 **** --- 1,14 ---- + /**************************************************************************/ + /* N I C E */ + /* A high-level object-oriented research language */ + /* (c) Daniel Bonniot 2003 */ + /* */ + /* This package is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU Lesser 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.lang; Index: assertions.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/assertions.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** assertions.nice 19 Mar 2003 13:48:56 -0000 1.4 --- assertions.nice 21 Jul 2003 17:24:14 -0000 1.5 *************** *** 1,2 **** --- 1,14 ---- + /**************************************************************************/ + /* N I C E */ + /* A high-level object-oriented research language */ + /* (c) Daniel Bonniot 2003 */ + /* */ + /* This package is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU Lesser 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.lang; Index: array.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/array.nice,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** array.nice 18 Jul 2003 21:26:50 -0000 1.24 --- array.nice 21 Jul 2003 17:24:14 -0000 1.25 *************** *** 2,11 **** /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2001 */ /* */ ! /* 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. */ /* */ /**************************************************************************/ --- 2,11 ---- /* N I C E */ /* A high-level object-oriented research language */ ! /* (c) Daniel Bonniot 2003 */ /* */ ! /* This package is free software; you can redistribute it and/or modify */ ! /* it under the terms of the GNU Lesser General Public License as */ ! /* published by the Free Software Foundation; either version 2 of the */ ! /* License, or (at your option) any later version. */ /* */ /**************************************************************************/ Index: ForInIters.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/ForInIters.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ForInIters.nice 12 Jun 2003 13:17:12 -0000 1.3 --- ForInIters.nice 21 Jul 2003 17:24:14 -0000 1.4 *************** *** 1,2 **** --- 1,14 ---- + /**************************************************************************/ + /* N I C E */ + /* A high-level object-oriented research language */ + /* (c) Daniel Bonniot 2003 */ + /* */ + /* This package is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU Lesser 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.lang; Index: BooleanAlgebra.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/BooleanAlgebra.nice,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BooleanAlgebra.nice 1 Apr 2003 20:51:40 -0000 1.3 --- BooleanAlgebra.nice 21 Jul 2003 17:24:14 -0000 1.4 *************** *** 1,2 **** --- 1,13 ---- + /**************************************************************************/ + /* N I C E */ + /* A high-level object-oriented research language */ + /* (c) Daniel Bonniot 2003 */ + /* */ + /* This package is free software; you can redistribute it and/or modify */ + /* it under the terms of the GNU Lesser 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.lang; |
From: <bo...@us...> - 2003-07-20 23:25:23
|
Update of /cvsroot/nice/Nice/src In directory sc8-pr-cvs1:/tmp/cvs-serv27040/src Removed Files: mainClass Log Message: Set more attribute in the jar file of the compiler --- mainClass DELETED --- |
From: <bo...@us...> - 2003-07-20 23:23:48
|
Update of /cvsroot/nice/Nice/src/nice/tools/compiler In directory sc8-pr-cvs1:/tmp/cvs-serv26814/src/nice/tools/compiler Modified Files: setBuildDate Log Message: Set more attribute in the jar file of the compiler Index: setBuildDate =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/compiler/setBuildDate,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** setBuildDate 11 Jun 2003 22:38:14 -0000 1.8 --- setBuildDate 20 Jul 2003 23:23:46 -0000 1.9 *************** *** 7,12 **** fi echo > dateBuild.nice echo "package nice.tools.compiler;" >> dateBuild.nice echo "let String versionNumber = \"$version\";" >> dateBuild.nice ! echo "let String buildDate = \""`date -u +"%Y.%m.%d, %T %Z"`"\";" >> dateBuild.nice --- 7,22 ---- fi + date="`date -u +'%Y.%m.%d, %T %Z'`" + echo > dateBuild.nice echo "package nice.tools.compiler;" >> dateBuild.nice echo "let String versionNumber = \"$version\";" >> dateBuild.nice ! echo "let String buildDate = \"$date\";" >> dateBuild.nice ! ! echo "Main-Class: nice.tools.compiler.console.fun ! Implementation-Title: Nice Compiler ! Implementation-Version: $version ! Implementation-Vendor: Daniel Bonniot ! Implementation-URL: http://nice.sourceforge.net ! Build-Id: Nice compiler version $version (build $date) ! " > ./Manifest |
From: <bo...@us...> - 2003-07-20 23:23:48
|
Update of /cvsroot/nice/Nice In directory sc8-pr-cvs1:/tmp/cvs-serv26814 Modified Files: Makefile Log Message: Set more attribute in the jar file of the compiler Index: Makefile =================================================================== RCS file: /cvsroot/nice/Nice/Makefile,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** Makefile 19 Jun 2003 13:07:50 -0000 1.122 --- Makefile 20 Jul 2003 23:23:45 -0000 1.123 *************** *** 50,54 **** mkdir -p share/java cp src/nice/tools/compiler/console.jar share/java/nice.jar ! jar umf src/mainClass share/java/nice.jar -C classes java -C classes nice -C classes mlsub -C classes bossa -C classes gnu -C classes.old bossa -C classes.old mlsub -C classes.old nice if [ -r classes/lang/package.nicei ]; then cd classes; jar uf ../share/java/nice.jar nice/*/package.nicei; fi --- 50,54 ---- mkdir -p share/java cp src/nice/tools/compiler/console.jar share/java/nice.jar ! jar umf src/nice/tools/compiler/Manifest share/java/nice.jar -C classes java -C classes nice -C classes mlsub -C classes bossa -C classes gnu -C classes.old bossa -C classes.old mlsub -C classes.old nice if [ -r classes/lang/package.nicei ]; then cd classes; jar uf ../share/java/nice.jar nice/*/package.nicei; fi *************** *** 56,60 **** mkdir -p share/java cp src/nice/tools/compiler/console.jar share/java/nice.jar ! jar umf src/mainClass share/java/nice.jar -C classes java -C classes nice -C classes mlsub -C classes bossa -C classes gnu if [ -r classes/lang/package.nicei ]; then cd classes; jar uf ../share/java/nice.jar nice/*/package.nicei; fi --- 56,60 ---- mkdir -p share/java cp src/nice/tools/compiler/console.jar share/java/nice.jar ! jar umf src/nice/tools/compiler/Manifest share/java/nice.jar -C classes java -C classes nice -C classes mlsub -C classes bossa -C classes gnu if [ -r classes/lang/package.nicei ]; then cd classes; jar uf ../share/java/nice.jar nice/*/package.nicei; fi |
From: <ar...@us...> - 2003-07-19 00:54:08
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv32228/F:/nice/src/bossa/syntax Modified Files: Block.java GlobalVarDeclaration.java Log Message: Moved a few things out of the parser, it improves some error messages as side-effect. Index: Block.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Block.java,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** Block.java 24 Jun 2003 15:28:19 -0000 1.60 --- Block.java 19 Jul 2003 00:54:05 -0000 1.61 *************** *** 163,166 **** --- 163,169 ---- public void addNext(LocatedString name, Expression value) { + if (left.syntacticType == null && value == null) + User.error(name,"A local variable requires a type or a default value"); + last.next = new LocalVariable(name, left.syntacticType, ! left.isAssignable(), value); *************** *** 196,199 **** --- 199,205 ---- public void addNext(LocatedString name, Expression value) { + if (value == null) + User.error(name,"A local constant requires a type or a default value"); + last.next = new LocalConstant(name, value); last = last.next; *************** *** 241,244 **** --- 247,262 ---- FunSymbol left; FormalParameters parameters; + } + + public static LocalValue createLocalVariable(LocatedString name, + Monotype type, boolean constant, Expression value) + { + if (type == null && value == null) + User.error(name,"A local variable requires a type or a default value"); + + if (constant && type == null) + return new Block.LocalConstant(name,value); + + return new Block.LocalVariable(name, type, constant, value); } Index: GlobalVarDeclaration.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/GlobalVarDeclaration.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** GlobalVarDeclaration.java 12 Jun 2003 21:04:40 -0000 1.17 --- GlobalVarDeclaration.java 19 Jul 2003 00:54:05 -0000 1.18 *************** *** 33,36 **** --- 33,38 ---- { super(name, Node.global); + if (constant && value == null) + User.error(name,"A global constant needs a default value"); this.left = new GlobalVarSymbol(name,type,constant); *************** *** 39,44 **** addChild(left); ! if (value != null) ! this.value = value; } --- 41,45 ---- addChild(left); ! this.value = value; } |