[plt-scheme] Natural Language parsing in CS1

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Tue Jun 2 11:45:42 EDT 2009

On Jun 2, 2009, at 10:52 AM, Eli Barzilay wrote:

> I think that a similar problem exists if someone reads the dragon book
> (at least in the edition that I used) in an attempt to learn about
> programming languages.

Well, I already knew something about programming languages, but I  
read the dragon book the summer between high school and college to  
learn about compilers.  It was pretty heavy going, and the Greek  
letters contributed to that, I have to admit :-)  Two months later,  
in my first term in college, I was assigned to write a Roman-numeral- 
reading program.  I wrote down a regular expression for Roman  
numerals, converted it by hand to a DFA, coded it in Pascal, and  
(since the dragon book hadn't said anything about attaching semantics  
to a DFA) made up a seat-of-the-pants way to add actions to compute  
the value of the Roman numeral.  It was utterly incomprehensible,  
because all the states had integer names.  The teaching assistant  
wrote on my printout "I'll assume this works...."

Stephen Bloch
sbloch at adelphi.edu

Posted on the users mailing list.