Re: Ignore break line sometimes

Gene Wirchenko <genew@ocis.net>
Sun, 19 Feb 2012 20:57:51 -0800

          From comp.compilers

Related articles
Ignore break line sometimes geovanisouza92@gmail.com (Geovani de Souza) (2012-02-11)
Re: Ignore break line sometimes DrDiettrich1@aol.com (Hans-Peter Diettrich) (2012-02-11)
Re: Ignore break line sometimes gneuner2@comcast.net (George Neuner) (2012-02-11)
Re: Ignore break line sometimes monnier@iro.umontreal.ca (Stefan Monnier) (2012-02-12)
Re: Ignore break line sometimes Pidgeot18@verizon.invalid (Joshua Cranmer) (2012-02-12)
Re: Ignore break line sometimes kaz@kylheku.com (Kaz Kylheku) (2012-02-13)
Re: Ignore break line sometimes bc@freeuk.com (BartC) (2012-02-14)
Re: Ignore break line sometimes genew@ocis.net (Gene Wirchenko) (2012-02-19)
Re: Ignore break line sometimes gah@ugcs.caltech.edu (glen herrmannsfeldt) (2012-02-20)
Re: Ignore break line sometimes arnold@skeeve.com (2012-02-23)
Re: Ignore break line sometimes jthorn@astro.indiana.edu (Jonathan Thornburg) (2012-02-27)
| List of all articles for this month |

From: Gene Wirchenko <genew@ocis.net>
Newsgroups: comp.compilers
Date: Sun, 19 Feb 2012 20:57:51 -0800
Organization: A noiseless patient Spider
References: 12-02-010 12-02-017
Keywords: parse
Posted-Date: 20 Feb 2012 01:52:55 EST

On Sun, 12 Feb 2012 12:03:13 -0600, Joshua Cranmer
<Pidgeot18@verizon.invalid> wrote:


[snip]


>It sounds like you want something like ECMAScript's magic
>you-don't-always-need-a-semicolon feature.


          But please do not go there.


><http://bclary.com/2004/11/07/#a-7.9> describes how it works in detail.
>The thrust of it is that "if you see an invalid token, but you saw a
>newline before, automatically insert a semicolon to fix things."
>
>There are more than a few people who believe that this feature should
>not have been implemented.


          There is a bit more to this. As a result of this kludge, it is
illegal to have newlines at certain points in some statements. For
example:
                    return
                      <expression which I decided to put all on its own line>;
is not legal. It is not permitted to have a newline immediately after
"return".


Sincerely,


Gene Wirchenko


Post a followup to this message

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