Why is ordered choice in pyparsing failing for my use case?
问题 >>> g = MatchFirst( Literal("scoobydoo"), Literal("scooby") ) >>> g.parseString( "scooby" ) pyparsing.ParseException: Expected "scoobydoo" (at char 0), (line:1, col:1) Is the ParseException thrown because the scooby has already been consumed in the character stream & thus the parser cannot backtrack ? I'm looking for a detailed implementation explanation for this. At the moment, I consider this a bug because why would the parser short-circuit the matching since it has not search all the