Skip to content

Integration of EXEC preprocessor beyond baseline.#294

Draft
utam-1 wants to merge 10 commits into
OCamlPro:gitside-gnucobol-3.xfrom
utam-1:exec-preprocessor-beyond-baseline
Draft

Integration of EXEC preprocessor beyond baseline.#294
utam-1 wants to merge 10 commits into
OCamlPro:gitside-gnucobol-3.xfrom
utam-1:exec-preprocessor-beyond-baseline

Conversation

@utam-1

@utam-1 utam-1 commented Jun 14, 2026

Copy link
Copy Markdown

Description of PR

This is a follow - up to #279.

Approach and basic idea

cb_preparser_entry is added to cobc.c, which handles the associated pre-parser metadata. cb_preparser_list and cb_active_preparser are created, one being a list to registered preparsers, and other is a pointer for pplex.l to identify the tag.

cb_load_preparser_conf() and cb_find_preparser() are created based on similar mechanism of cb_config_entry().
In ppparse.y the following macro is defined #define pperror(x) do { if (!cb_active_preparser) cb_error_always ("%s", x); } while(0) the idea is to identify the abort of pre-parser in pplex.l which is artificially generated.

So far only general tests have been performed by using a test.conf file and setting up a pseudo - preprocessor via bash, which shows the replacement works and flag-injection is performed via gcc.

@utam-1 utam-1 marked this pull request as draft June 14, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants