[Nice-commit] Nice/src/bossa/syntax FormalParameters.java,1.40,1.41 CustomConstructor.java,1.14,1.15
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-06-30 14:12:46
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1421/src/bossa/syntax Modified Files: FormalParameters.java CustomConstructor.java Log Message: Defined a parser interface, and made the core independent of the implementation of the parser. This makes bootstrap and future modifications simpler. Index: FormalParameters.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/FormalParameters.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** FormalParameters.java 24 Jun 2004 08:11:10 -0000 1.40 --- FormalParameters.java 30 Jun 2004 14:12:37 -0000 1.41 *************** *** 560,564 **** } ! static FormalParameters readBytecodeAttribute(gnu.bytecode.MiscAttr attr) { String value = new String(attr.data); --- 560,565 ---- } ! static FormalParameters readBytecodeAttribute(gnu.bytecode.MiscAttr attr, ! bossa.modules.Parser parser) { String value = new String(attr.data); *************** *** 568,581 **** "\" from " + attr.getContainer()); ! try { ! return ! bossa.parser.Loader.getParser(value).formalParameters(false, null); ! } ! catch (bossa.parser.ParseException ex) { throw Internal.error ("Could not parse '" + attr.getName() + "' bytecode attribute:\n" + "In method: " + attr.getContainer() + "\n" + "Value : " + value); ! } } --- 569,581 ---- "\" from " + attr.getContainer()); ! FormalParameters res = parser.formalParameters(value); ! ! if (res == null) throw Internal.error ("Could not parse '" + attr.getName() + "' bytecode attribute:\n" + "In method: " + attr.getContainer() + "\n" + "Value : " + value); ! ! return res; } Index: CustomConstructor.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/CustomConstructor.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CustomConstructor.java 28 Feb 2004 14:23:43 -0000 1.14 --- CustomConstructor.java 30 Jun 2004 14:12:37 -0000 1.15 *************** *** 268,272 **** ImportedCustomConstructor(NiceClass def, Method method, MiscAttr attr) { ! super(def, FormalParameters.readBytecodeAttribute(attr)); this.method = method; TypeConstructors.addConstructor(classe.definition.tc, this); --- 268,273 ---- ImportedCustomConstructor(NiceClass def, Method method, MiscAttr attr) { ! super(def, FormalParameters.readBytecodeAttribute ! (attr, JavaClasses.compilation.parser)); this.method = method; TypeConstructors.addConstructor(classe.definition.tc, this); |