This fixes support for COBOL symbols after the recent breakage of regex parsers, as well as introducing additional features and bug fixes.
Also import some of the tests.
https://github.com/universal-ctags/ctags/pull/2076
Part of #2119. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2128
-- Commit Summary --
* COBOL: Import new upstream candidate parser
-- File Changes --
M ctags/parsers/cobol.c (520) M src/symbols.c (2) M src/tagmanager/tm_parser.c (3) M tests/ctags/Makefile.am (8) A tests/ctags/cobol/helloworld.cbl (14) A tests/ctags/cobol/helloworld.cbl.tags (11) A tests/ctags/cobol/helloworld2.cbl (19) A tests/ctags/cobol/helloworld2.cbl.tags (11) A tests/ctags/cobol/levels.cbl (27) A tests/ctags/cobol/levels.cbl.tags (22) A tests/ctags/cobol/quoted-program-id.cbl (7) A tests/ctags/cobol/quoted-program-id.cbl.tags (5) R tests/ctags/cobol/simple.cbl (0) A tests/ctags/cobol/simple.cbl.tags (22) D tests/ctags/simple.cbl.tags (19)
-- Patch Links --
https://github.com/geany/geany/pull/2128.patch https://github.com/geany/geany/pull/2128.diff
@DansLeRuSH (and @swconnolly if still have interest in Geany COBOL support), could you give this a test? It should bring back COBOL symbols, and improve it a bit.
Note that if you'd like to help to get it even further with actual COBOL insight, please comment on https://github.com/universal-ctags/ctags/pull/2076.
WFM, compiles, runs, `make check`s, shows symbols for bits of cobol found in wikipedia.
elextr approved this pull request.
LGTM, didn't review the parser itself as the only Cobol I ever did was one assignment in Uni [mumble] years ago.
didn't review the parser itself as the only Cobol I ever did was one assignment in Uni [mumble] years ago.
Still better than me who wrote the parser, with zero COBOL experience :)
Still better than me who wrote the parser, with zero COBOL experience :)
Yesterday @b4n couldn't spell COBALL, now he am an expert :)
Still better than me who wrote the parser, with zero COBOL experience :)
Yesterday @b4n couldn't spell COBALL, now he am an expert :)
In fact probably _the_ expert in the Geany team I suspect.
Nice work @b4n.
techee approved this pull request.
So yeah, to properly review this pull request I'd have to learn cobol, which I'm not going to do (got scared enough by seeing some examples online). I've just skimmed through the code and didn't find anything obviously bad about it, noticed the author is @b4n, which is a guarantee of quality by itself, so I approve this commit.
@b4n See? This is how you do commit reviews. You should learn from me, it's trivial :-)
@b4n See? This is how you do commit reviews. You should learn from me, it's trivial :-)
Wow, why did I use to put so much effort and time if it's so easy! thanks :smile:
Merged #2128 into master.
Truly I work with this (and no, I do not only code in COBOL) and adjust it every time I could. @b4n told me interesting suggestions and I'll do upgrades later
@DansLeRuSH don't hesitate to mention any issue you find, I'm happy to try and fix them or review a patch. If you can, ideally you'd report it what can be against universal-ctags, but don't worry if it's against Geany I can forward what need be just fine as well.
Hello all. Sorry for arriving late, I was on vacation. Parsing sure looks different from previously. The new parser looks good, especially multi-level data items. Attached is a patch with a few tweaks . They deal with binary data items that do not have either a PIC or VALUE clause and special keywords showing up as procedures. At we work mostly with free format files. Is there a way to switch from FIXED to FREE? Otherwise I will code the change and recompile. [geany_cobol.patch.txt](https://github.com/geany/geany/files/3132890/geany_cobol.patch.txt)
github-comments@lists.geany.org