Statefulness of Spirit V2 and X3
问题 What is the intent of Spirit X3 being so much 'stateless'? Bad aspects of 'states' in Spirit V2 Looking back to Spirit V2, the "grammar" was, say, conceptually stateful - in many ways. This is because the grammar was a class instance. Basically, there are lots of bad aspects for making your grammar -- or even any single rule -- to be stateful: It might make your grammar non-re-entrant; It might add thread-unsafety to your grammar instance; Self-managed 'flag' is a disaster. Theoretically