() Matt Wette <mwe...@alumni.caltech.edu>
() Sun, 28 Dec 2014 16:23:28 -0800

   Now in the code I will need to be going through the
   productions checking if symbols are terminals (i.e., declared
   with "token").  This could end up being inefficient.

Why could it end up being inefficient?

   In order to make the code more efficient I am considering
   using keywords (e.g., test for terminal with "keyword?").
   However, I wonder if using keywords instead of "token"
   declarations would be considered "bad form."  For example, in
   the above, replace

       (token integer float)
       ...
       (factor (integer) (float))
   with
       (factor (#:integer) (#:float))

   Comments?

I like keywords because they font-lock (in Emacs) nicely, but
that's merely aesthetics.  I find working w/ keywords as data
slightly balky, and of late, have been migrating keyword-ful
code to use symbols, instead.

-- 
Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

Attachment: signature.asc
Description: PGP signature

Reply via email to