develooper Front page | perl.perl6.internals.api.parser | Postings from December 2000

A parser that can handle partial programs (was Re: Now, to try again...)

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
December 19, 2000 02:02
Subject:
A parser that can handle partial programs (was Re: Now, to try again...)
Message ID:
200012191002.KAA14937@mikado.tiuk.ti.com
Bradley M . Kuhn <bkuhn@ebb.org> writes:
>Nicholas Clark <nick@ccl4.org> wrote:
>
>> Something I though of:
>> If you're trying to write an interactive perl inputer - either a perl shell
>> or just the command prompt on the debugger it would be useful if you
>> could tell the parser that the chunk of source you're giving it may be
>> incomplete.
>
>I really like this idea, although I am unsure of how we might implement it.
>I don't recall any of the compiler texts I have read over the years talking
>about formal methods for writing such a "partial programs are acceptable"
>parser.
>
>
>Lisp-like languages handle this, but s-expressions are so trivial to parse
>that it's no help to simply "follow" their example.

So does Tcl - but it is also trivial to "parse" - all its complexity 
is in the semantics of interpolation. 

-- 
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About