Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1:/tmp/cvs-serv8283/F:/nice/src/bossa/parser
Modified Files:
Parser.jj
Log Message:
Implemented dispatch by integer comparision('>', '>=', '<', '<=').
Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.191
retrieving revision 1.192
diff -C2 -d -r1.191 -r1.192
*** Parser.jj 5 Jul 2003 15:47:34 -0000 1.191
--- Parser.jj 6 Jul 2003 18:12:17 -0000 1.192
***************
*** 1253,1256 ****
--- 1253,1257 ----
ConstantExp val = null;
boolean exactlyAt = false;
+ int kind = Pattern.NONE;
Location loc = null;
}
***************
*** 1263,1268 ****
|
"#" tc=typeIdent() { exactlyAt = true; loc = tc.location(); }
- |
- "=" val=patternLiteral() {loc = val.location(); }
)
|
--- 1264,1267 ----
***************
*** 1281,1284 ****
--- 1280,1295 ----
"#" tc=typeIdent() { exactlyAt = true; }
|
+ ( ">" {kind = Pattern.GT;}
+ | ">=" {kind = Pattern.GE;}
+ | "<" {kind = Pattern.LT;}
+ | "<=" {kind = Pattern.LE;}
+ )
+ ( "-" val=intConstantExp()
+ { val = ConstantExp.makeNumber(
+ new LocatedString("-"+val.toString(), val.location()));
+ }
+ | val=intConstantExp()
+ )
+ |
{} //name only
)
***************
*** 1287,1291 ****
[ "(" additional=typeIdent() ")" ]
{
! return new Pattern(name, tc, val, exactlyAt, additional, runtimeTC, loc);
}
}
--- 1298,1302 ----
[ "(" additional=typeIdent() ")" ]
{
! return new Pattern(name, tc, val, exactlyAt, kind, additional, runtimeTC, loc);
}
}
|