[Oberon] erroneous hiding procedures in programmer's text editor v2.1

Felix Friedrich felix.friedrich at inf.ethz.ch
Fri Dec 13 09:14:29 CET 2013


Dear Zdenek,

with one little exception ( var a: object; ), Active-Oberon can in 
principle be parsed without any semicolon, provided that the EBNF is 
adapted accordingly. There is no technical reason for the semicolons. I 
have tried it with an experimental version of the compiler with the 
whole release (which is quite a rich code base with all sorts of 
programming styles, meanwhile).
This implies that an Oberon compiler can be quite lax about semicolons. 
If or if not you want to support this is a question of taste.
The ModuleTree of PET does not support it, the Fox compiler does (here 
and there).

By the way, if you want to try the completely lax version (basically 
ignoring any semicolons) of the compiler, compile FoxParser.Mod setting 
the constant FoxParser.Lax = TRUE


Regards
Felix






> On 12/11/2013 04:30 PM, Jan Verhoeven wrote:
>> Zdenek wrote:
>>> Bug was detected in AOS revision 5406.
>> Not sure whether this is a bug.
>>
>>> My question: is it syntactically OK to omit semicolon before procedure's
>>> BEGIN ?
>> Not according to the language definition.
>>
>> It should be "VAR n : LONGINT; BEGIN" The semicolon is nt an end of line
>> statement. It is a Start-Of-Line statement. In this case it signals the
>> "BEGIN" coming up.
>>
>> In the case of the END statement, things are different in that the END
>> is known to come up; a LOOP is always concluded by an END. So the last
>> statement in a LOOP/END does not need a ';' since the END was expected.
>>
>> In your VAR case, the BEGIN cannot be predicted so the ';' is required.
>> -- Groetjes Jan Verhoeven
>>
>> --
>> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
>> https://lists.inf.ethz.ch/mailman/listinfo/oberon
> OK then if ";" is strictly required in this case text editor (or
> compiler) should report compiling error which it is not.
> It reports nothing so you have to find out yourself.
> Zdenek
>
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon




More information about the Oberon mailing list