Exemple #1
0
 public void predicateFunc(IList list, Token identifier)
 {
     Token varname = null;
     String func = null;
     IList params_Renamed = new ArrayList();
     Token bind = null;
     Token val = null;
     varname = jj_consume_token(CLIPSParserConstants_Fields.BIND2);
     jj_consume_token(CLIPSParserConstants_Fields.LBRACE);
     func = functionName();
     bind = jj_consume_token(CLIPSParserConstants_Fields.BIND);
     actionParams(params_Renamed);
     jj_consume_token(CLIPSParserConstants_Fields.RBRACE);
     PredicateConstraint predc = new PredicateConstraint();
     predc.Name = identifier.image;
     predc.VariableName = varname.image.Substring(1, (varname.image.Length - 2) - (1));
     predc.FunctionName = func;
     BoundParam bp = new BoundParam();
     bp.VariableName = bind.image;
     predc.addParameter(bp);
     predc.addParameters(params_Renamed);
     list.Add(predc);
 }
Exemple #2
0
 public void predicateFunc(ArrayList list, Token identifier)
 {
     Token varname = null;
     String func = null;
     ArrayList parms = new ArrayList();
     Token bind = null;
     Token val = null;
     varname = mcc_consume_token(BIND2);
     mcc_consume_token(LBRACE);
     func = functionName();
     bind = mcc_consume_token(BIND);
     actionParams(parms);
     mcc_consume_token(RBRACE);
     PredicateConstraint predc = new PredicateConstraint();
     predc.Name = identifier.image;
     predc.VariableName = varname.image.Substring(1, varname.image.Length - 2);
     predc.FunctionName = func;
     BoundParam bp = new BoundParam();
     bp.VariableName = bind.image;
     predc.addParameter(bp);
     predc.addParameters(parms);
     list.Add(predc);
 }