About Smacc

Andrew P. Black black at cs.pdx.edu
Fri May 26 00:58:24 UTC 2006

Let me try and re-ask this question.  (Maybe this is Sebastien's  
problem, maybe not).  It's certainly mine ;-)

I've downloaded SmaCC from Squeakmap. I've gone through the  
calculator tutorial (very nice) and generated a scanner and parser  
(two classes, CalculatorScanner and CalulatorParser).  There are also  
nice examples StScanner and StParser.  I can run them in the UI  
tool.  So far, so good.

I am completely at a loss to know how to use the Scanner and the  
Parser from other code.  I remember having the same problem with TGen  
years ago, and eventually giving up.  The generated code has no  
obvious entry point ...

I tried STParser parseMethod: sourceString and got an immediate  
walkback.  The answer is probably obvious when you know, but it is  
decidedly NON-obvious when you don't.  Can someone help?  Better  
still, can someone put this information in the documentation.


On 18 May 2006, at 07:18, Sebastien Aubry wrote:

> Hello,
> I want to use SmaccParser with my Expert System. I want to parse a  
> String of the form : (A&B)->C and/or A->C and/or ((A&B)|C)->D
> I created a suclass of SmaccParser and SmaccScanner but I don't  
> know to utilise SmaCC. If you could help me to understand and use  
> theses classes.
> Thanks for your request.
> Sébastien Aubry.

More information about the Squeak-dev mailing list