Given the well-defined grammar a -> b+; b -> "x" ":" "x"+ ";"?, the parser will match valid input x:x;x:x but won't match also-valid input x:xx:x. This is because "x"+ greedily slurps up all the xs and the parser doesn't have any look-ahead to see whether an x has a : after it and should therefore be left to the next b to pick up.
This requires an LL(2) grammar, so we will probably have to bite the LL(k) or LL(*) bullet soon.
Given the well-defined grammar
a -> b+; b -> "x" ":" "x"+ ";"?
, the parser will match valid inputx:x;x:x
but won't match also-valid inputx:xx:x
. This is because"x"+
greedily slurps up all thex
s and the parser doesn't have any look-ahead to see whether anx
has a:
after it and should therefore be left to the nextb
to pick up.This requires an LL(2) grammar, so we will probably have to bite the LL(k) or LL(*) bullet soon.