Re: [stack] Constant folding algorithm
John Cowan <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
Christopher Diggins scripsit: > That's what I did. I would take n consecutive terms (where n was > bounded by some constant to keep the algorithm linear) apply these > terms to the empty stack, and if it doesn't underflow the stack, use > the resulting stack as the new expression. What is more, when you see a non-primitive word whose definition you have, you can inline it (provided, of course, that you are not already inlining it!) -- A: "Spiro conjectures Ex-Lax." John Cowan Q: "What does Pat Nixon frost her cakes with?" [email protected] --"Jeopardy" for generative semanticists http://www.ccil.org/~cowan