"Intro to Pyparsing" Article at ONLamp
Peter Hansen
peter at engcorp.com
Mon Jan 30 18:12:04 EST 2006
Terry Reedy wrote:
> "Peter Hansen" <peter at engcorp.com> wrote:
>>Christopher Subich wrote:
>>>"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 ;-)
Ah, as in "the horse that was raced past the barn fell". Got it. :-)
-Peter
More information about the Python-list
mailing list