[comp.lang.smalltalk] Language Processing Applications

rh@linus.UUCP (Richard F. Hilliard) (07/14/88)

I am interested in hearing about work on language processing
applications developed in Smalltalk (or other object oriented
languages). I am aware of those classes that come with Smalltalk-80
(ParseNode, Compiler, etc.), but am wondering about the
appropriateness of the "object oriented paradigm" for efficient
language analysis.  I'd be interested in *any* information, including
the following, about such applications:

	What are the specifics of the application (e.g., natural
	language, term rewriting system, formal specification
	language, ..) and the language being processed?

	What types of grammars (context free, ..) are supported?

	What are the object classes in the application (e.g.,
	tokens, terminals, non-terminals, rules, actions, parse trees,
	..)? And how are they structured?

	How is the application structured?

	What is the control strategy for rule application?

	

Rich Hilliard
The MITRE Corporation  - Mail Stop A155
Bedford, MA  01730

(617) 271-7760

ARPA:  rh@mitre-bedford.arpa
UUCP:  ...{cbosgd,decvax,genrad,ll-xn,philabs,security,utzoo}!linus!rh

johnson@p.cs.uiuc.edu (07/15/88)

Smalltalk is great for writing recursive descent parsers.  A parser
is a class, and each rule of the grammar becomes a method.  You can
derive a new parser from an old one by inheritance.  We use this to
good effect in our Typed Smalltalk compiler, and have about six
different parsers within a common framework.  The original Smalltalk
compiler was broken into two, one that compiled methods and the other
that compiled and evaluated expressions.  They had virtually the same
grammars, but the second one had a different environment for looking
up a name.

I had a student write an LR parser generator for a class project.
Except for speed problems, it seemed very suitable.  There were classes
for grammars, rules, and parsers, where a parser was given a grammar
when it was created and built the appropriate tables for itself.  

rmf@actnyc.UUCP (Robert M. Fuhrer) (07/19/88)

In article <36094@linus.UUCP> rh@linus.UUCP (Richard F. Hilliard) writes:
>
> I am aware of those classes that come with Smalltalk-80
>(ParseNode, Compiler, etc.),

Which brings up two related questions:

I endeavor to develop a small "system simulation" capability, which requires
the ability to interpret strings as Smalltalk code.  Sounds just like what
the doIt menu selection in the blue (red? yellow? I can never remember since
I'm using Apple Smalltalk 0.4 on the Mac II) button menu in the Workspace
does, doesn't it?  So, I looked through the system for the method that
implements this.  I finally found it in the class StringHolderController (or
StringHolder, I can't recall).  The method sends a message to the 'model'
instance variable to get its class, and then sends the class a message to
retrieve an evaluator for it.  I then found the implementor of
evaluatorClass (as well as compilerClass(?), and a few others) in Object (if
my memory serves correctly).

So, the two questions are:

	1) What (briefly, if possible) is the purpose in life and function of
	   the 'model' instance variable in a StringHolderController?
	2) What are the the evaluatorClass and similar messages used for?
-- 
The Foundation for Unmitigated Sillyness		uunet!actnyc!rmf
Department of Redundancy Department
City of Kansas City, Kansas