Re: "Intro to Pyparsing" Article at ONLamp
- From: "Terry Reedy" <tjreedy@xxxxxxxx>
- Date: Mon, 30 Jan 2006 17:24:10 -0500
"Peter Hansen" <peter@xxxxxxxxxxx> wrote in message
news:drm13f$13q$2@xxxxxxxxxxxxxxxx
> 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
.
- References:
- "Intro to Pyparsing" Article at ONLamp
- From: Paul McGuire
- Re: "Intro to Pyparsing" Article at ONLamp
- From: Anton Vredegoor
- Re: "Intro to Pyparsing" Article at ONLamp
- From: Paul McGuire
- Re: "Intro to Pyparsing" Article at ONLamp
- From: Anton Vredegoor
- Re: "Intro to Pyparsing" Article at ONLamp
- From: Christopher Subich
- "Intro to Pyparsing" Article at ONLamp
- Prev by Date: Re: dynamic class instantiation
- Next by Date: Re: Newbie question: Unicode hiccup on reading file i just wrote
- Previous by thread: Re: "Intro to Pyparsing" Article at ONLamp
- Next by thread: Re: "Intro to Pyparsing" Article at ONLamp
- Index(es):