if(comp==XSModelGroup.CHOICE) {
// empty choice is not epsilon, but empty set,
// so this initial value is incorrect. But this
// kinda works.
// properly handling empty set requires more work.
Expression e = Expression.EPSILON;
for (XSParticle p : group.getChildren()) {
if(e==null) e = particle(p);
else e = new Choice(e,particle(p));
}
return e;
} else {
Expression e = Expression.EPSILON;
for (XSParticle p : group.getChildren()) {
if(e==null) e = particle(p);
else e = new Sequence(e,particle(p));
}
return e;