updated BNFStateDefinitionFactory to BNFSequenceFactory