guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: style Q: use keywords for my LALR parser generator?


From: Matt Wette
Subject: Re: style Q: use keywords for my LALR parser generator?
Date: Mon, 29 Dec 2014 06:05:35 -0800


On Dec 29, 2014, at 3:23 AM, Thien-Thi Nguyen <address@hidden> wrote:

() Matt Wette <address@hidden>
() 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?


(define (non-terminal? term tokl)
  (and (symbol? term) (not (memq term tokl))))

versus

(define (non-terminal? term)
  (symbol? term))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]