fix rule typo, added a way to track the productions in the parser