Recognizes a formatted Backus-Naur form rule-set and solves left-recursions, performs factoring, and finds first sets.