Grammar Visualiser – Part III

Its pretty obvious from this failed experiment that my original plan was the correct one.

http://set-top.net/tests/dot/test7.png

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”

http://set-top.net/tests/dot/test8.png

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.

http://www.cs.chalmers.se/Cs/Grundutb/Kurser/komp/2004/lectures/ccc05.html

About James McParlane

CTO Massive Interactive. Ex Computer Whiz Kid - Now Grumpy Old Guru.
This entry was posted in Parsing Theory, XPath. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s