Ken Domino

Results 839 comments of Ken Domino

It looks like the last draft spec that is available prior to the published 2018 version is https://j3-fortran.org/doc/year/18/18-007r1.pdf. That doc contains section and line numbering in the left margin, which...

Attached here is the rule extraction for Fortran 2018 from the last available draft at https://j3-fortran.org/doc/year/18/18-007r1.pdf using the tritext (latest not available yet) and the above program. [18-007r1.txt](https://github.com/user-attachments/files/15819803/18-007r1.txt) This text...

> I have developed the Fortran 2023 Grammar based on the latest Fortran specification: [ISO/IEC 1539-1 Fifth edition 2023-11](https://www.iso.org/standard/82170.html). You can access the grammar in my Github: [Fortran2023Grammar](https://github.com/AkhilAkkapelli/Fortran2023Grammar). Please let...

[On the issue of statement labels](https://stackoverflow.com/q/78641498/4779853), I would adjust any parser rules to recognize the label. This is because it will be easier to write an XPath expression for both...

Status: I haven't forgotten this; I have been working on scraping. There is quite a bit to do still. https://github.com/kaby76/fortran

> Can you please add this grammer in grammers-v4 Sorry, but I am not ready. [The script that I wrote for scraping](https://github.com/kaby76/fortran/blob/main/extract.sh) is producing some different rules than what you...

I was noticing a couple of Antlr tool problems with the generated grammar (e.g., there is a rule `O: 'O';`, but it is not declared in the generated .tokens file,...

I've fixed the script to replace the rules with indirect left recursion, added steps to remove useless parentheses and reformat. The [generated grammar](https://github.com/kaby76/fortran/blob/6c6581e9e04b6dd9a0c3dc747e5e960bcc49edad/FortranParser.g4) works surprisingly well, parsing all the fortran90...

Unfortunately, upon further examination, the [auto-scraped grammar](https://github.com/kaby76/fortran) is not only very, very slow, but fails to parse quite a few files in the [examples/ directory](https://github.com/antlr/grammars-v4/tree/master/fortran/fortran90/examples). The situation is similar for...

I wrote the [grammar compare script](https://github.com/kaby76/fortran/blob/main/comp/compare.sh). It wasn't hard to do. The script uses Trash. ``` #!/bin/sh # Sort parser rules and reformat. Assumes useless parentheses already # removed. cp...