2 Responses to Parsing LOGO

  1. Thomas Peri says:

    This is exciting! I’m writing a Logo interpreter in JavaScript to run in web browsers, and I’m running into the same problem. Or I was before I got sidetracked addressing the separate problem of long scripts hanging the browser. My Logo project was my reason for writing this:
    http://www.tumuski.com/code/clumpy/overview/

    I too had tried the LALR route using JSCC (http://jscc.jmksf.com/), but quickly realized the same thing you did. My next thought, since there are so many flavors of Logo out there, was to try to invent a new context-free Logo syntax.

    One idea I had was to limit all functions to one argument, but let that argument be a list where necessary. So you’d write:

    SUM (SIN 90 3)

    SUM takes one argument: a list with two elements: SIN 90 and 3. I thought about also adding some syntactic sugar to allow user functions to treat the list elements as separate arguments.

    E-mail me if you’d like to collaborate on this. I plan to either license my interpreter under the MIT license, if that makes a difference.

  2. Pingback: Logo in JavaScript — Tumuski