OCamlPro / superbol-studio-oss

Open-Source part of SuperBOL Studio, including the Visual Studio Code extension and its LSP server
https://superbol.eu
Other
24 stars 13 forks source link

Relax order of paragraphs in `CONFIGURATION SECTION` #331

Closed NeoKaios closed 3 months ago

NeoKaios commented 4 months ago

Closes #269

NeoKaios commented 4 months ago

Not sure this is the correct way of doing it....

nberth commented 4 months ago

Not sure this is the correct way of doing it....

Thankfully the combinatorics would be on your side with this approach. However, I'd rather keep the order of declarations consistent between the input and the parse-tree. So relaxing the order should be done by altering the parse-tree types, using a list of paragraphs (and relying on an additional check for duplicates, maybe left for later). We do something similar for the sections in the DATA DIVISION.

GitMensch commented 3 months ago

Note: this is only part of the issue, MF (and likely others) also allow INPUT-OUTPUT and CONFIGURATION sections being in wrong order, which we just recently added to GnuCOBOL - you likely want to relax the order there in this PR as well