Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1:/tmp/cvs-serv7738/F:/nice/src/bossa/parser
Modified Files:
Parser.jj
Log Message:
implemented the `->` (implies) operator.
Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.194
retrieving revision 1.195
diff -C2 -d -r1.194 -r1.195
*** Parser.jj 14 Jul 2003 10:57:22 -0000 1.194
--- Parser.jj 15 Jul 2003 15:03:10 -0000 1.195
***************
*** 1798,1802 ****
{ Expression res,e1,e2; Token start; }
{
! res=ConditionalOrExpression()
[
"?" e1=Expression() start=":" e2=ConditionalExpression()
--- 1798,1802 ----
{ Expression res,e1,e2; Token start; }
{
! res=ImpliesExpression()
[
"?" e1=Expression() start=":" e2=ConditionalExpression()
***************
*** 1805,1808 ****
--- 1805,1817 ----
]
{ return res; }
+ }
+
+ Expression ImpliesExpression() :
+ { Expression e1,e2; Token t; }
+ {
+ e1=ConditionalOrExpression()
+ ( t="->" e2=ConditionalOrExpression()
+ { e1=CallExp.create(symb(t), e1, e2); } )?
+ { return e1; }
}
|