Except A.1.2 clause you can also look at rejected CR120 from CR archive. I
have carefully checked the use of semicolons through the whole BNF and there
are some exceptions, i.e. some semicolons are completely unnecessary in BNF.
CR status is "no technical defect; optional semicolon shall be kept for
style uniqueness" and that is OK, we do no need more complications in
analysing language behaviour and that's why implementation may be simple, in
full accordance with A.1.2:
[ ; ]
I hope may be always implemented as :
if TokenId = ptT3SemiColon then
NextToken
else
if TokenId <> ptT3BraceClose then
if LastTokenId <> ptT3BraceClose then
T3SyntaxError(ParserErrorMessage, [ ptT3SemiColon ]);
Best Regards,
Mariusz Kupiec
Original Message
From: "Carl Cerecke" <
This email address is being protected from spambots. You need JavaScript enabled to view it.>
To: <
This email address is being protected from spambots. You need JavaScript enabled to view it.>
Sent: Sunday, September 22, 2002 11:42 PM
Subject: Not-quite-optional semicolons
> Seeking clarification regarding the "optional" semicolon in a number of
> lists in the TTCN-3 BNF.
>
> The non-terminals which have such a rule are listed below, alongside the
> actual repeated non-terminal that has the "optional" semicolon.
>
> ModuleDefinitionsList ModuleDefinition
> FunctionStatementOrDefList FunctionStatementOrDef
> MessageAttribs MessageList
> ProcedureAttribs ProcedureList
> MixedAttribs MixedList
> ComponentDefList ComponentElementDef
> AltStepLocalDefList AltstepLocalDef
> ExceptSpec ExceptElement
> ImportSpec ImportElement
> ControlStatementOrDefList ControlStatementOrDef
> CallBodyStatementList CallBodyStatement
> MultiWithAttrib SingleWithAttrib
> AltGuardList GuardStatement
> InterleavedGuardList InterleavedGuardElement
>
> Is it true that the semicolon is optional if the preceeding statement
> ends in a "}" or the statement is the last in the list (followed by a
> "}") and mandatory otherwise?
>
> Cheers,
> --
>
> Carl Cerecke - Software Designer
> Da Vinci Communications Ltd
> Christchurch - New Zealand
>
> TEL : +64 3 3838311
> FAX : +64 3 3838310
> e-mail:
This email address is being protected from spambots. You need JavaScript enabled to view it.
> www :
www.davinci-communications.com
>
>
>
> Wykorzystaj mnie... >>>
link.interia.pl/f1654
>
>
>
Wydarzenia minuta po minucie... >>>
link.interia.pl/f1656