Open amaanq opened 1 year ago
I've had a stab at switching to this, and although it does make the grammar easier to read, it introduces some errors, mostly around disambiguating plain identifiers and Fortran's unreserved keywords. Unfortunately, these do crop up in the real world.
See my branch for implementation, and this test file for some regressions.
One issue I realised is that we can't simply replace, for example, whiteSpacedKeyword('else', 'if')
with just /end *if/i
because it's possible to put a continuation line in between the keywords, but this is an orthogonal issue.
Not a bug, but I've added functionality upstream to allow for the case-insensitive regex flag, so
/foo/i
would work now. Hope it might help here.