Interactive parser generator found :-)

Yoshiki.Ohshima at acm.org Yoshiki.Ohshima at acm.org
Wed Mar 19 12:56:54 UTC 2003


  Göran,

> Anyway, its a... japanese(?) site but clicking on those three manual
> pages and reading the small print below the icon at the top left
> suggests it's an "interactive parser generator" looking pretty cool.
> There are links for download but I haven't tested it.

  It *is* really cool.  In fact, guys like Alan, Kim, Andreas, and
Michael saw the demo in Kyoto and Alan's comment on the demo was
something like: "if you don't like this, you don't like computers."

  The idea itself is somewhat simple.  It reads a BNF description and
(if I remember correctly) generates LL(1) parser.  You can also
provide semantic actions to the terminal/non-terminal symbols and they
are executed when a rule is reduced.

  However, the real cool thing is that the way he has extended the
idea and applied it to the highly-interactive materials.  For example,
you can write syntax rules not only in text strings, but also in the
sequence of bitmaps.  And, the semantic rules can be arbitrary Squeak
code or even can be SqueakToys tiles so that you can control a morph
with this "language" (You drop a tile to a semantic rule slot and it
will be executed.)

  The artistic sense thoughout the demo was amazing.  The way it
notifies a syntax error in the input text, or the way it shows the
parse tree for an accepted text look really fun.

  In his system, the theoretical "marker," which represents the
postion in the text being parsed can be realized as a Morph.  (He uses
a cute mole paint for this and the mole really added the value to the
demo.)  He can put a script effectively says "read one token" to the
mole and "tick" the script.  The various effects shown on the parse
tree as the mole jump around the tree is fun to watch!

  The best part of the demo was when he used his MIDIMorph in the
semantic rule.  When a pitch name (do, re, mi or such) in the input
text was read, the mole makes a sound in the specified pitch.  He
wrote a sequence of pitch name and ticked a script attached the mole.
The mole plays a sequence of sound.  Then, he started moving several
moles at once, and now, there is a nice melody playing!  The pitch he
used was selected from the ones used in the Okinawan traditional
music.  The trick of this is that even a random chord and sequence of
Okinawan notes makes a distinctive Okinawan melody.  (He later told me
that in Indonesia, they hang hundreds of wind-bells that have slightly
different sounds at one place.  When a breeze rings those bells, the
resulting sound sounds like a nice melody, similar to his
demo... Amazing story...)

  Tansel was in Kyoto, but I believe Tansel missed the demo.  Everyone
who saw Tansel was telling him that "you should see it!"  I hope
Tansel wasn't too upset by the fact that he missed it.  Anyway, I know
Tansel was asking Yamamiya-san to write a SqueakNews article on this.
Hopefully, we will see an issue of SqueakNews with it!

  Alan was telling Yamamiya-san that one of Alan's early attempt to
make a language was similar to this.  In Alan's system, a method
selector is essentially a RHS pattern of a BNF rule and when the rule
matches a sentense in a program, the specified semantic rule gets
executed.  (I think Smalltalk-72's extensible syntax is along the line
of this idea.)

  Here is my short report on his demo.  Definitely my English is not
good enough to describe the artistic aspect, but.... Language Game is
cool.

-- Yoshiki



More information about the Squeak-dev mailing list