Cleaned up LRParser and finally figured out a working LR(1) grammar for WikiMedia format.