[Oberon] Re (2): LONGINT, RETURN & etc.

peter at easthope.ca peter at easthope.ca
Sat Jun 17 17:32:06 CEST 2017


From:	Chris Burrows <chris at cfbsoftware.com>
Date:	Sat, 17 Jun 2017 13:55:16 +0930
> http://www.astrobe.com/OberonSyntax/html/OberonSyntax.htm

Date:	Sat, 17 Jun 2017 13:40:15 +0930
> What you can't have is just RETURN without an expression.

According to your diagrams an expression can be factor and a factor 
can be NIL or " ". So "RETURN END" is OK.  Interesting edge case!

From:	=?utf-8?B?SsO2cmc=?= <joerg.straube at iaeth.ch>
Date:	Sat, 17 Jun 2017 07:08:41 +0200
  statement = ... | "RETURN" [ expression] ].
  
Square brackets permit zero or one occurance.  So the diagram and 
Joerg's EBNF are almost equivalent.  For strict equivalence add an 
arrow bypassing the expression after RETURN in the diagram.  Or 
remove the square brackets around expression.  The 2nd possibility is 
the simplest and an empty expession is OK.
  statement = ... | "RETURN" expression ].

Regards,                                   ... Lyall E. 
-- 

123456789 123456789 123456789 123456789 123456789 123456789 123456789
Tel: +1 360 639 0202                      Pender Is.: +1 250 629 3757
http://easthope.ca/Peter.html              Bcc: peter at easthope. ca



More information about the Oberon mailing list