My regex-fu is fairly weak, but I've been using these changes for the OpenCOBOL FAQ for a few years now. There are bugs, (ATTRIBUTE is mysteriously red boxed, the free form source multi-line string syntax is busted, and a few others) but I live with them. It highlights the source code in http://opencobol.add1tocobol.com/ well enough for a volunteer document writer. I lazed out and use two forms of lexer, fixed-form and a new duplicate for free-form source formats.
Thanks for a very nice and handy tool Georg.
Georg Brandlrepo owner
Thanks for the contribution. Could you add a file to tests/examplefiles that exercises the syntax as much as possible?
Thanks for noticing. I'll try and get something suitable posted up.
But if I can bug you for a second. I have a worry. COBOL allows - in identifiers, so boundary \b doesn't cut it.
As stated, I'll admit to a low level of regex expertise and I'm not sure if there are infinite backtracking issues with the trickery used to replicate word boundary tests.