Tool/Application to calculate first and follow sets

I found my mistake by comparing my first/follow-sets with the one generated by this web-app


Most parser generators that I've encountered don't have obvious means to dump this information, let alone dump it in a readable way. (I built one that does, for the reason you are suggesting, but it isn't available by itself and I doubt you want the rest of the baggage).

If your parser definition doesn't work, you mostly don't need to know these things to debug it. Staring at the rules amazingly enough helps; it also helps to build the two smallest grammar instances you can think of, one being something you expect to be accepted, and the other being a slight variant that should be rejected.

In spite of having a parser generator that will dump this information, I rarely resort to using it to debug grammars, and I've built 20-30 pretty big grammars with it.


Take a look at http://hackingoff.com/compilers/predict-first-follow-set

It's an awesome tool to compute first and follow sets in a grammar. also, you can check your answer with this visualization tools:

http://smlweb.cpsc.ucalgary.ca/start.html