[Nice-commit] Nice/src/bossa/parser Parser.jj,1.241,1.242
Brought to you by:
bonniot
From: <bo...@us...> - 2004-03-02 16:14:53
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25647/src/bossa/parser Modified Files: Parser.jj Log Message: Allow explicit method overrides. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.241 retrieving revision 1.242 diff -C2 -d -r1.241 -r1.242 *** Parser.jj 24 Feb 2004 15:20:16 -0000 1.241 --- Parser.jj 2 Mar 2004 16:02:44 -0000 1.242 *************** *** 901,906 **** --- 901,908 ---- Contract contract; List statements = new LinkedList(); + boolean isOverride = false; } { + [ "override" { isOverride = true; } ] cst=constraint() returnType=monotype() *************** *** 911,915 **** { return NiceMethod.create(c, name, cst, returnType, parameters, ! body!=null?new Block(statements):null , contract); } } --- 913,918 ---- { return NiceMethod.create(c, name, cst, returnType, parameters, ! body != null ? new Block(statements) : null, ! contract, isOverride); } } *************** *** 1366,1370 **** } ! Definition methodDeclaration(Constraint cst): { LocatedString name; --- 1369,1373 ---- } ! Definition methodDeclaration(Constraint cst, boolean isOverride): { LocatedString name; *************** *** 1402,1411 **** (name, cst, returnType, parameters, body != null ? new Block(statements) : null, ! contract); } | // Nice method ";" ! { res = new NiceMethod(name,cst,returnType,parameters,contract); } ) ) --- 1405,1415 ---- (name, cst, returnType, parameters, body != null ? new Block(statements) : null, ! contract, isOverride); } | // Nice method ";" ! { res = new NiceMethod ! (name, cst, returnType, parameters, contract, isOverride); } ) ) *************** *** 1548,1552 **** res=globalVariable() | res=enumDefinition(definitions) ! | { Constraint cst; } cst = constraint() ( res=customConstructor(cst) --- 1552,1558 ---- res=globalVariable() | res=enumDefinition(definitions) ! | "override" { Constraint cst; } cst = constraint() ! res=methodDeclaration(cst, true) ! | cst = constraint() ( res=customConstructor(cst) *************** *** 1554,1558 **** res=interfaceDefinition(cst) | res=classDefinition(cst, definitions, storeDocString) ! | res=methodDeclaration(cst) ) ) --- 1560,1564 ---- res=interfaceDefinition(cst) | res=classDefinition(cst, definitions, storeDocString) ! | res=methodDeclaration(cst, false) ) ) |