From: jjenista Date: Wed, 11 Feb 2009 22:36:16 +0000 (+0000) Subject: Parse the final keyword but don't enforce its meaning X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c175f145a5fe51cff7bfc40bd51e3ca52e212353;p=IRC.git Parse the final keyword but don't enforce its meaning --- diff --git a/Robust/src/Parse/java14.cup b/Robust/src/Parse/java14.cup index 99d03684..a1d07a81 100644 --- a/Robust/src/Parse/java14.cup +++ b/Robust/src/Parse/java14.cup @@ -939,7 +939,12 @@ formal_parameter ::= pn.addChild(name); RESULT=pn; :} -// | FINAL type variable_declarator_id + | FINAL type:type variable_declarator_id:name {: + ParseNode pn=new ParseNode("formal_parameter"); + pn.addChild(type); + pn.addChild(name); + RESULT=pn; + :} ; //throws_opt ::= // | throws @@ -1130,8 +1135,13 @@ local_variable_declaration ::= pn.addChild(type); pn.addChild(var); RESULT=pn; -:} -// | FINAL type variable_declarators + :} + | FINAL type:type variable_declarators:var {: + ParseNode pn=new ParseNode("local_variable_declaration"); + pn.addChild(type); + pn.addChild(var); + RESULT=pn; + :} ; statement ::= statement_without_trailing_substatement:st {: RESULT=st;