Opened 14 years ago

Closed 14 years ago

#192 closed defect (fixed)

Only the last clause in COND may be an ELSE clause

Reported by: Jim Ursetto Owned by:
Priority: minor Milestone: 4.5.0
Component: compiler Version:
Keywords: Cc:
Estimated difficulty:

Description

And patch 0001 will throw a syntax error if additional clauses are found.

Patch 0002 removes an extraneous character in wiki2html.scm, which is now illegal after patch 0001.

Attachments (2)

0001-Only-the-last-clause-in-COND-may-be-an-ELSE-clause.patch (915 bytes) - added by Jim Ursetto 14 years ago.
0002-Remove-extraneous-char-in-scripts-wiki2html.scm.patch (741 bytes) - added by Jim Ursetto 14 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 14 years ago by felix winkelmann

Thanks for the patches. The latter will be committed in a short while, the former... I'm not sure. It can be convenient for macros to have the option to provide a default else clause, without having to worry about previous occurrences.

comment:2 Changed 14 years ago by felix winkelmann

I think multiple else clauses should be allowed which makes it easier to provide default clauses in macros that expand to cond or case. But I have added checks in cond, case, and select that will issue a warning when a non-else clause follows an else-clause and all clauses are checked for being syntactically correct (formerly the clauses after the first else were just dropped). Perhaps that is an acceptable compromise. If yes, please close the ticket.

See commit b9d091df90f6092573eaf36c22436daa7ef2085f (experimental)

comment:3 Changed 14 years ago by Jim Ursetto

Resolution: fixed
Status: newclosed

This sounds like a great solution.

Note: See TracTickets for help on using tickets.