Re: The semicolon habit (was: Q: Definition

plong@perf.com (Paul Long)
Tue, 9 May 1995 17:38:11 GMT

          From comp.compilers

Related articles
Re: The semicolon habit (was: Q: Definition of a scripting lang.) schrod@iti.informatik.th-darmstadt.de (1995-04-28)
Re: The semicolon habit (was: Q: Definition lutz@KaPRE.COM (1995-04-28)
Re: The semicolon habit (was: Q: Definition lutz@KaPRE.COM (1995-05-09)
Re: The semicolon habit (was: Q: Definition lutz@KaPRE.COM (1995-05-11)
Re: The semicolon habit (was: Q: Definition sys3bga@doc.ntu.ac.uk (1995-05-05)
Re: The semicolon habit (was: Q: Definition stidev@gate.net (1995-05-09)
Re: The semicolon habit (was: Q: Definition plong@perf.com (1995-05-09)
Re: The semicolon habit (was: Q: Definition everettm@walters.East.Sun.COM (1995-05-11)
Re: The semicolon habit (was: Q: Definition schrod@iti.informatik.th-darmstadt.de (1995-05-12)
Re: The semicolon habit (was: Q: Definition anw@maths.nottingham.ac.uk (Dr A. N. Walker) (1995-05-16)
Re: The semicolon habit (was: Q: Definition cef@geodesic.com (Charles Fiterman) (1995-05-17)
Re: The semicolon habit (was: Q: Definition reid@HASKELL.SYSTEMSZ.CS.YALE.EDU (1995-05-16)
Re: The semicolon habit (was: Q: Definition jan@neuroinformatik.ruhr-uni-bochum.de (1995-06-24)
[7 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: plong@perf.com (Paul Long)
Keywords: syntax, design
Organization: Performance Computing Inc., Beaverton, OR
References: 95-04-193 95-05-027
Date: Tue, 9 May 1995 17:38:11 GMT

lutz@KaPRE.COM writes:
>schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) writes:
>> [indentation syntax makes it hard to generate programs]
>
>Could you provide some more details? I've heard this argument
>before, but it's not clear to me that it would be any harder to
>generate N tabs than to generate block delimeters correctly. How
>hard is it to keep a global tab counter?


I assume he means that generating proper indention is not as easy as
generating a basically unindented program but with proper syntax. I can
see his point, but I agree with you. I wrote an article for _The Journal
of C Language Translation_ (vol. 3, no. 1, June '91) called "Emitting
C Source" that presents an emitter that makes the generation of properly
indented code as easy as unindented code.


[snip]
>The point is that compilers should be able to use all the information
>communicated by the programmer (indentation, end-lines), rather than
>forcing extra, error-prone tokens.


When developing new languages, I've tinkered with indention-sensitive
grammars (ISGs?) but have always stopped short of implementing them. Maybe
it's just that they seem so foreign to me. Also, the problem of what
characters are used for indention has seemed messier than the benefit
of ISGs.


Paul Long
plong@perf.com
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.