[ZPT] Mini proposal: repeat-define and repeat-condition
Fernando Martins
fmartins@hetnet.nl
Fri, 24 Jan 2003 23:19:41 +0100
Richard Jones wrote:
> I believe this grammar is no good due to ambiguity of using the semicolon.
>
That was also the explanation given by Evans Simpson, but semicolons can
only appear in string expressions. In Python [1], semicolons are used to
separate statements, not expressions, in the command prompt.
Unless I'm missing something, not allowing a semicolon as a delimiter would
be akin to say that in Python you cannot have semicolons in strings because
they are used to delimit (same-line) statements.
Regards,
Fernando
[1]
statement ::=
stmt_list NEWLINE | compound_stmt
stmt_list ::=
simple_stmt (";" simple_stmt)* [";"]