private bool Accepts(CompiledAutomaton c, BytesRef b)
{
int state = c.RunAutomaton.InitialState;
for (int idx = 0; idx < b.Length; idx++)
{
Assert.IsTrue(state != -1);
state = c.RunAutomaton.Step(state, b.Bytes[b.Offset + idx] & 0xff);
}
return c.RunAutomaton.IsAccept(state);
}