Parser Step
representation: make ParserK and ParserD consistent
#2433
Labels
Milestone
Step
representation: make ParserK and ParserD consistent
#2433
In
ParserD
theInt
in step indicates the amount of elements to backtrack.Partial 3 a
means go back by 3 elements before running the driver again.Partial 0 a
run the driver without going back.In
ParserK
theInt
in step indicates the relative stream position to be in.Partial (+3) a
means go forward by 3 elements and run the driver. (Unimplemented)Partial 1 a
means go forward by 3 elements and run the driver.Partial 0 a
means run the driver over the current element again.Partial (-3) a
means go back by 3 elements and run the driver.We need to unify the representation.
The question is which representation makes more sense.
ParserK
representation is much better as it represents even the forward seek as well.Even if not for forward seek, it's more expressive in the sense that there is no implicit meaning of driver going forward. We explicitly control it by saying
Partial 1
.The text was updated successfully, but these errors were encountered: