Menu

#2048 Error 25.925 and similar sometimes wrong

5.2.0
open
None
code+test
5
2026-02-27
2026-02-26
No
::Attribute A Get Get

produces

Error 25.925: Unknown keyword on ::ATTRIBUTE directive; found "GET".

But "GET" is not "unknown", but duplicate.

The same happens with 25.902 (e.g. with ::Method M Attribute Attribute), 25.901 (::Class C Public Public), 25.904 (:Requires R Library Library) and 25.903 (::Routine R Public Private).

When a subkeyword appears, all the related subkeyword disappear from the set of recognizable subkeywords. But this is too restrictive, as it makes it impossible to detect subkeywords that are wrongly duplicated, but perfectly known.

Discussion

  • Josep Maria Blasco

    These can be fixed by modifying interpreter/parser/DirectiveParser.cpp. At first look, it seems that new error messages will have to be created for "duplicate" errors.

     

    Last edit: Josep Maria Blasco 2026-02-27
    • jfaucher

      jfaucher - 2026-02-27

      +1

      Unless I am mistaken, the introduction of new error codes presents little risk to existing programs, since these are errors occurring during syntax analysis.

       
  • Josep Maria Blasco

    Tests are at oorexx/base/direcctives.

     
  • Josep Maria Blasco

    • assigned_to: Josep Maria Blasco
    • Pending work items: none --> code+test
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB