comp.lang.ada
 help / color / mirror / Atom feed
From: gautier_niouzes@hotmail.com
Subject: Re: disambiguating 'begin'
Date: Tue, 2 Oct 2012 04:33:15 -0700 (PDT)
Date: 2012-10-02T04:33:15-07:00	[thread overview]
Message-ID: <05043e5a-fe68-41c3-ae9b-29de5c485e7f@googlegroups.com> (raw)
In-Reply-To: <85obkl2lq1.fsf@stephe-leake.org>

Le mardi 2 octobre 2012 12:48:41 UTC+2, Stephen Leake a écrit :

> The problem is that "begin" is used in two ways: as the _start_ of a
> block, and as the _divider_ between declarations and statements in a
> block

I'm afraid you are seeing things more complicated than they are - or is SMIE perhaps forcing you to do so ?
"begin" is always the start of a block's statements, and sometimes the start of the block itself.
At level 0 it should appear at the same indentation column as "function"; at level 1 or more, at the same indentation column as other sibling statements.
And don't forget the more general "declare..begin..exception..end;" form!...
Is there kind of a grammar with SMIE ?
______________________________________________________________________________
Gautier's Ada programming -- http://gautiersblog.blogspot.com/search/label/Ada 
NB: follow the above link for a valid e-mail address



  reply	other threads:[~2012-10-02 11:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 10:48 disambiguating 'begin' Stephen Leake
2012-10-02 11:33 ` gautier_niouzes [this message]
     [not found] ` <5b0a709d-1abc-4b86-a9fe-320c228c1d18@googlegroups.com>
2012-10-04  8:23   ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox