Its pretty obvious from this failed experiment that my original plan was the correct one.
By associating an exact description of the potential state, but then using transitions wrt. the group of states, I’ve created something that makes logical sense given the underlying invisible group context – but provides a visual distortion. Even though the dot notation .“sy*ntax” | “synth” signifes that we have just parsed the first two characters of syntax, a potental transition via ‘n’ to .“syntax” | “syn*th” is shown which flips the path to another lexeme being the current focus. It should really show something like “sy*ntax” | “sy*nth”
This group based view is much better and shows the above state as “sy*ntax” | “synth” and “syntax” | “sy*nth”
Now that I have a basic visualiser, its time to start using it as it was intended, to help develop and debug the rest of the parse table generator.
Looks like I’m creating an extra group at the end before the terminator. I really need to have a sentinel which is a terminator symbol (phi?).
Another good website on parsing theory.