Fixed syntax errors and undeclared non terminals