algol-60-compiler icon indicating copy to clipboard operation
algol-60-compiler copied to clipboard

'true' vs true ?

Open gtoal opened this issue 1 year ago • 2 comments

This came up when trying to compile the x8algol compiler. Here's a minimal version of the problem:

'begin'
  'integer' fred, true;
  'Boolean' jim;
  true := 42;
  fred := true;
  jim := 'true';
'end';

This gives a compile error. Variable true seems to be clashing with keyword true.

gtoal avatar Aug 22 '23 06:08 gtoal

Addendum: It appears to happen only when using 'Boolean' rather than 'boolean'. It may be my fault from the change I made when you added the capitalised Boolean - I updated just the operator_e file rather than downloading the entire compiler again - if your update changed some other part of the compiler in addition, then I may not have updated everything necessary?

gtoal avatar Aug 22 '23 18:08 gtoal

Right now I am traveling, I'll handle this as soon as I am back

Op di 22 aug 2023 om 08:50 schreef Graham Toal @.***>:

This came up when trying to compile the x8algol compiler. Here's a minimal version of the problem:

'begin' 'integer' fred, true; 'Boolean' jim; true := 42; fred := true; jim := 'true'; 'end';

This gives a compile error. Variable true seems to be clashing with keyword true.

— Reply to this email directly, view it on GitHub https://github.com/JvanKatwijk/algol-60-compiler/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCPHQGTIYKJTX4ZLTEXYPLXWRJCZANCNFSM6AAAAAA3ZNLSRQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Jan van Katwijk

JvanKatwijk avatar Aug 23 '23 06:08 JvanKatwijk