Commits

Anonymous committed 4c9b49e

Slightly optimize defparser macro
Keywords: defparser

* generator/fg-macro.lisp (fucc:defparser):
Use first-nterminal-id instead of calculating list length.

  • Participants
  • Parent commits 7a57cc1

Comments (0)

Files changed (1)

generator/fg-macro.lisp

                          (,new-state-var
                           (cdr (assoc ,state-var
                                       (aref ,goto-table-var
-                                            (- ,nterminal-var ,(length (grammar-terminals grammar))))))))
+                                            (- ,nterminal-var ,(first-nterminal-id grammar)))))))
                     (assert ,new-state-var)
                     ,new-state-var))
               (first ,%/value/-var)