// // hope is remote that we can find required attributes.
//
// // TODO: reduce strength by converting concur to choice?
// return null;
Expression e = expression.visit(docDecl.attPicker);
if( e.isEpsilonReducible() ) throw new Error(); // assertion
// if attribute expression is epsilon reducible, then
// AttributePruner must return Expression other than nullSet.
// In that case, there should have been no error.
final Set s = new java.util.HashSet();
boolean more = false;
while( e instanceof ChoiceExp ) {
ChoiceExp ch = (ChoiceExp)e;
NameClass nc = ((AttributeExp)ch.exp2).nameClass;
if( nc instanceof SimpleNameClass )
s.add( nc.toString() );
else
more = true;
e = ch.exp1;
}
if( e==Expression.nullSet )
// we are in the full panic mode.
// abandon diagnosis.
return null;
if(!(e instanceof AttributeExp )) throw new Error(e.toString()); //assertion
NameClass nc = ((AttributeExp)e).nameClass;
if( nc instanceof SimpleNameClass )
s.add( nc.toString() );
else