🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5478

Re: Block Closure

#5478
From: Karl Heuer
Date: Thu, 21 Apr 1988 17:44
20 lines
1444 bytes
In article <5200003@uiucdcsm> wsmith@uiucdcsm.cs.uiuc.edu writes:
>The problem with the idea mentioned in other postings about using indentation
>to represent the control structure is that it does not have a clean formalism
>to describe the parser.

It could be described in terms of a first pass that converts leading
whitespace into the appropriate number of begin/end tokens.  (C already needs
such a description, because the syntax of "#" lines is so different from the
rest of the language.)

>Problems include: handling of multi line expressions and defining default
>tab stops.

One possible solution: multi-line expressions are only valid in the presence
of a continuation indicator (backslash-newline in C); `tab' is an undefined
(or implementation-defined) character in a source file.  (Alternately, it
could be illegal to mix blanks and tabs in such a way as to make the result
dependent on the tab-stop settings.)

Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint
Technical Details
Message-ID: <3564@haddock.ISC.COM>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-tis!ames!pasteur!ucbvax!hplabs!sdcrdcf!ism780c!haddock!karl
References: <18@<Apr> <5200003@uiucdcsm>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-lcc!lll-tis!ames!pasteur!ucbvax!hplabs!sdcrdcf!ism780c!haddock!karl
From: karl@haddock.ISC.COM (Karl Heuer)
Newsgroups: comp.lang.misc
Subject: Re: Block Closure
Message-ID: <3564@haddock.ISC.COM>
Date: 21 Apr 88 17:44:20 GMT
References: <18@<Apr> <5200003@uiucdcsm>
Reply-To: karl@haddock.ima.isc.com (Karl Heuer)
Organization: Interactive Systems, Boston
Lines: 19