"Intro to Pyparsing" Article at ONLamp

Terry Reedy tjreedy at udel.edu
Mon Jan 30 23:24:10 CET 2006

"Peter Hansen" <peter at engcorp.com> wrote in message 
news:drm13f$13q$2 at sea.gmane.org...
> Christopher Subich wrote:
>> Using English, because that's the only language I'm fluent in, consider
>> the sentence:
>> "The horse raced past the barn fell."
>> It's just one of many "garden path sentences," where something that
>> occurs late in the sentence needs to trigger a reparse of the entire
>> sentence.
> I can't parse that at all.

Upon seeing 'fell' as the main verb, you have to reparse 'raced past the 
barn' as not the predicate but as a past participle adjectival phrase, like 
'bought last year' or 'expected to win'.

The phrase parsed as a predicate reparses as a modifier, as in this 
sentence ;-)

Terry Jan Reedy

More information about the Python-list mailing list