multi-language GUI / shells in Smalltalk

Yoshiki Ohshima yoshiki at squeakland.org
Fri May 4 19:58:33 UTC 2007


  Hi Stef,

> did you publish it on squeaksource or place like that :)

  Ah, making changesets that bootstrap META properly requires some
work (I did once but merging subsequent patches and do it again sounds
a bit tedious).  If I get around to do it, I'd do, but I'm equally
happy if somebody pull that off.

  BTW, until yesterday I wasn't aware of that "not-not" is "yes", or I
can synthesize the and-predicate (in parsing expression grammar sense)
by using not-predicate twice.  So, I can say that META can express the
popular example of context-sensitive grammar:

	a^{n} b^{n} c^{n} : n > 0

with something like:

--------------------
MTokenizer subclass: #MABC
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Meta-Examples'!

!MABC methodsFor: 'productions' stamp: 'yo 5/4/2007 11:15'!
a ::= $a <a> $b | `true`! !

!MABC methodsFor: 'productions' stamp: 'yo 5/4/2007 11:23'!
aa ::= <a>:a ?`a ~= true`! !

!MABC methodsFor: 'productions' stamp: 'yo 5/4/2007 11:24'!
b ::= $b <b> $c | `true`! !

!MABC methodsFor: 'productions' stamp: 'yo 5/4/2007 11:26'!
bb ::= <b>:b ?`b ~= true`! !

!MABC methodsFor: 'productions' stamp: 'yo 5/4/2007 11:28'!
s ::= ~(~(<aa> ~$b)) $a+ <bb> ~$c! !
--------------------

and I can test that with a do-it:

--------------------
MABC match: 'aaabbbccc' with: #s
--------------------

-- Yoshiki



More information about the Squeak-dev mailing list