public boolean matchAnyString() { if (refType != null) assignType(StringType.theInstance); return true; }
public boolean matchAnyString() { if (refType != null) assignType(StringType.theInstance); return true; }
public boolean matchAnyString() { if (refType != null) assignType(StringType.theInstance); return true; }
public boolean matchAnyString() { if (refType != null) assignType(StringType.theInstance); return true; }
public boolean match(ValueExp exp) { Object thisValue = exp.dt.createValue(literal, context); if (!exp.dt.sameValue(thisValue, exp.value)) return false; // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
public boolean match(ValueExp exp) { Object thisValue = exp.dt.createValue(literal, context); if (!exp.dt.sameValue(thisValue, exp.value)) return false; // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
public boolean match(ValueExp exp) { Object thisValue = exp.dt.createValue(literal, context); if (!exp.dt.sameValue(thisValue, exp.value)) return false; // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
public boolean match(ValueExp exp) { Object thisValue = exp.dt.createValue(literal, context); if (!exp.dt.sameValue(thisValue, exp.value)) return false; // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
/** DataExp can consume this token if its datatype can accept this string */ public boolean match(DataExp exp) { if (!exp.dt.isValid(literal, context)) return false; // not accepted. if (exp.except != Expression.nullSet) { if (resCalc.calcResidual(exp.except, this) == Expression.epsilon) // due to the constraint imposed on the body of the 'except' clause, // comparing the residual with the epsilon is OK and cheap. // but it might be better to use the isEpsilonReducible method // for the robustness. return false; // this token is accepted by its 'except' clause } // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
/** DataExp can consume this token if its datatype can accept this string */ public boolean match(DataExp exp) { if (!exp.dt.isValid(literal, context)) return false; // not accepted. if (exp.except != Expression.nullSet) { if (resCalc.calcResidual(exp.except, this).isEpsilonReducible()) // handling whitespace correcly requires isEpsilonReducible() // with the following test case // <data type="string"><except><value/></except></data> // with "". return false; // this token is accepted by its 'except' clause } // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
/** DataExp can consume this token if its datatype can accept this string */ public boolean match(DataExp exp) { if (!exp.dt.isValid(literal, context)) return false; // not accepted. if (exp.except != Expression.nullSet) { if (resCalc.calcResidual(exp.except, this).isEpsilonReducible()) // handling whitespace correcly requires isEpsilonReducible() // with the following test case // <data type="string"><except><value/></except></data> // with "". return false; // this token is accepted by its 'except' clause } // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }
/** DataExp can consume this token if its datatype can accept this string */ public boolean match(DataExp exp) { if (!exp.dt.isValid(literal, context)) return false; // not accepted. if (exp.except != Expression.nullSet) { if (resCalc.calcResidual(exp.except, this).isEpsilonReducible()) // handling whitespace correcly requires isEpsilonReducible() // with the following test case // <data type="string"><except><value/></except></data> // with "". return false; // this token is accepted by its 'except' clause } // this type accepts me. if (refType != null) assignType(exp.dt); // if the type has ID semantics, report it. if (exp.dt.getIdType() != Datatype.ID_TYPE_NULL && context != null) // context can be legally null when this datatype is not context dependent. context.onID(exp.dt, this); return true; }