-
Notifications
You must be signed in to change notification settings - Fork 42
Added initial EXEC preprocessor handling logic in pplex and ppparse. #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
utam-1
wants to merge
4
commits into
OCamlPro:gitside-gnucobol-3.x
Choose a base branch
from
utam-1:exec-preprocessor-patch
base: gitside-gnucobol-3.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
9a895d7
Added initial EXEC preprocessor handling logic in pplex and ppparse
utam-1 119e265
Modified approach based on review comments
utam-1 e492b07
Deleted unreleated files, and fixed inconsistencies
utam-1 31c0601
Refined the test cases based on feedback
utam-1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,205 @@ | ||
| /* Generated by cobc 3.3-dev.0 */ | ||
| /* Generated from /tmp/test84.cob */ | ||
| /* Generated at Mar 16 2026 17:05:35 */ | ||
| /* GnuCOBOL build date Mar 16 2026 06:59:39 */ | ||
| /* GnuCOBOL package date Mar 16 2026 01:29:28 UTC */ | ||
| /* Compile command /home/utam1/gnucobol/cobc/.libs/cobc -C -Wno-error=unsupported /tmp/test84.cob */ | ||
|
|
||
| #include <string.h> /* for memcpy, memcmp and friends */ | ||
| #define COB_KEYWORD_INLINE inline | ||
| #include <libcob.h> | ||
|
|
||
| #define COB_SOURCE_FILE "/tmp/test84.cob" | ||
| #define COB_PACKAGE_VERSION "3.3-dev" | ||
| #define COB_PATCH_LEVEL 0 | ||
| #define COB_MODULE_FORMATTED_DATE "Mar 16 2026 17:05:35" | ||
| #define COB_MODULE_DATE 20260316 | ||
| #define COB_MODULE_TIME 170535 | ||
|
|
||
| /* Global variables */ | ||
| #include "test84.c.h" | ||
|
|
||
| /* Function prototypes */ | ||
|
|
||
| COB_EXT_EXPORT int prog (void); | ||
| static int prog_ (const int); | ||
| static void prog_module_init (cob_module *module); | ||
|
|
||
| /* Functions */ | ||
|
|
||
| static void gc_module_so_init () __attribute__ ((constructor)); | ||
| static void gc_module_so_init () | ||
| { | ||
| cob_check_version (COB_SOURCE_FILE, COB_PACKAGE_VERSION, COB_PATCH_LEVEL); | ||
| } | ||
|
|
||
| /* PROGRAM-ID 'prog' */ | ||
|
|
||
| /* ENTRY 'prog' */ | ||
|
|
||
| int | ||
| prog () | ||
| { | ||
| return prog_ (0); | ||
| } | ||
|
|
||
| static int | ||
| prog_ (const int entry) | ||
| { | ||
| /* Program local variables */ | ||
| #include "test84.c.l.h" | ||
|
|
||
| /* Start of function code */ | ||
|
|
||
| /* CANCEL callback */ | ||
| if (unlikely(entry < 0)) { | ||
| if (entry == -10) | ||
| goto P_dump; | ||
| if (entry == -20) | ||
| goto P_clear_decimal; | ||
| goto P_cancel; | ||
| } | ||
|
|
||
| /* Check initialized, check module allocated, */ | ||
| /* set global pointer, */ | ||
| /* push module stack, save call parameter count */ | ||
| if (cob_module_global_enter (&module, &cob_glob_ptr, 0, entry, 0)) | ||
| return -1; | ||
|
|
||
| /* Set address of module parameter list */ | ||
| module->cob_procedure_params = cob_procedure_params; | ||
|
|
||
| /* Set frame stack pointer */ | ||
| frame_ptr = frame_stack; | ||
| frame_ptr->perform_through = 0; | ||
| frame_ptr->return_address_ptr = &&P_cgerror; | ||
|
|
||
| /* Initialize rest of program */ | ||
| if (unlikely(initialized == 0)) { | ||
| goto P_initialize; | ||
| } | ||
| P_ret_initialize: | ||
|
|
||
| /* Increment module active */ | ||
| module->module_active++; | ||
|
|
||
| /* Entry dispatch */ | ||
| goto l_2; | ||
|
|
||
| /* PROCEDURE DIVISION */ | ||
|
|
||
| /* Line: 5 : Entry prog : /tmp/test84.cob */ | ||
| l_2:; | ||
|
|
||
| /* Line: 5 : STOP RUN : /tmp/test84.cob */ | ||
| cob_stop_run (b_2); | ||
|
|
||
| /* Program exit */ | ||
|
|
||
| /* Decrement module active count */ | ||
| if (module->module_active) { | ||
| module->module_active--; | ||
| } | ||
|
|
||
| /* Pop module stack */ | ||
| cob_module_leave (module); | ||
|
|
||
| /* Program return */ | ||
| return b_2; | ||
| P_cgerror: | ||
| cob_fatal_error (COB_FERROR_CODEGEN); | ||
|
|
||
|
|
||
| /* Program initialization */ | ||
| P_initialize: | ||
|
|
||
| prog_module_init (module); | ||
|
|
||
| module->collating_sequence = NULL; | ||
| module->crt_status = NULL; | ||
| module->cursor_pos = NULL; | ||
| module->xml_code = NULL; | ||
| module->xml_event = NULL; | ||
| module->xml_information = NULL; | ||
| module->xml_namespace = NULL; | ||
| module->xml_namespace_prefix = NULL; | ||
| module->xml_nnamespace = NULL; | ||
| module->xml_nnamespace_prefix = NULL; | ||
| module->xml_ntext = NULL; | ||
| module->xml_text = NULL; | ||
| module->json_code = NULL; | ||
| module->json_status = NULL; | ||
|
|
||
| /* Initialize cancel callback */ | ||
| cob_set_cancel (module); | ||
|
|
||
| /* Initialize WORKING-STORAGE */ | ||
| /* initialize field RETURN-CODE */ | ||
| b_2 = 0; | ||
|
|
||
|
|
||
| if (0 == 1) goto P_cgerror; | ||
| initialized = 1; | ||
| goto P_ret_initialize; | ||
|
|
||
| P_dump: | ||
| return 0; | ||
|
|
||
|
|
||
| /* CANCEL callback handling */ | ||
| P_cancel: | ||
|
|
||
| if (!initialized) | ||
| return 0; | ||
| if (module && module->module_active) | ||
| cob_fatal_error (COB_FERROR_CANCEL); | ||
|
|
||
| b_2 = 0; | ||
| cob_module_free (&module); | ||
|
|
||
| initialized = 0; | ||
|
|
||
| P_clear_decimal: | ||
| return 0; | ||
|
|
||
| } | ||
|
|
||
| /* End PROGRAM-ID 'prog' */ | ||
|
|
||
| /* Initialize module structure for prog */ | ||
| static void prog_module_init (cob_module *module__) | ||
| { | ||
| module__->module_name = "prog"; | ||
| module__->module_formatted_date = COB_MODULE_FORMATTED_DATE; | ||
| module__->module_source = COB_SOURCE_FILE; | ||
| module__->gc_version = COB_PACKAGE_VERSION; | ||
| module__->module_entry.funcptr = (void *(*)())prog; | ||
| module__->module_cancel.funcptr = (void *(*)())prog_; | ||
| module__->module_ref_count = NULL; | ||
| module__->module_path = &cob_module_path; | ||
| module__->module_active = 0; | ||
| module__->module_date = COB_MODULE_DATE; | ||
| module__->module_time = COB_MODULE_TIME; | ||
| module__->module_type = 0; | ||
| module__->module_param_cnt = 0; | ||
| module__->ebcdic_sign = 0; | ||
| module__->decimal_point = '.'; | ||
| module__->currency_symbol = '$'; | ||
| module__->numeric_separator = ','; | ||
| module__->flag_filename_mapping = 1; | ||
| module__->flag_binary_truncate = 1; | ||
| module__->flag_pretty_display = 1; | ||
| module__->flag_host_sign = 0; | ||
| module__->flag_no_phys_canc = 0; | ||
| module__->flag_main = 0; | ||
| module__->flag_fold_call = 0; | ||
| module__->flag_exit_program = 0; | ||
| module__->flag_debug_trace = 0; | ||
| module__->flag_dump_ready = 0; | ||
| module__->xml_mode = 1; | ||
| module__->module_stmt = 0; | ||
| module__->module_sources = NULL; | ||
| } | ||
|
|
||
| /* End functions */ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /* Generated by cobc 3.3-dev.0 */ | ||
| /* Generated from /tmp/test84.cob */ | ||
| /* Generated at Mar 16 2026 17:05:35 */ | ||
| /* GnuCOBOL build date Mar 16 2026 06:59:39 */ | ||
| /* GnuCOBOL package date Mar 16 2026 01:29:28 UTC */ | ||
| /* Compile command /home/utam1/gnucobol/cobc/.libs/cobc -C -Wno-error=unsupported /tmp/test84.cob */ | ||
|
|
||
|
|
||
| /* Module path */ | ||
| static const char *cob_module_path = NULL; | ||
|
|
||
| /* Number of call parameters */ | ||
| static int cob_call_params = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* Generated by cobc 3.3-dev.0 */ | ||
| /* Generated from /tmp/test84.cob */ | ||
| /* Generated at Mar 16 2026 17:05:35 */ | ||
| /* GnuCOBOL build date Mar 16 2026 06:59:39 */ | ||
| /* GnuCOBOL package date Mar 16 2026 01:29:28 UTC */ | ||
| /* Compile command /home/utam1/gnucobol/cobc/.libs/cobc -C -Wno-error=unsupported /tmp/test84.cob */ | ||
|
|
||
| /* Program local variables for 'prog' */ | ||
|
|
||
| /* Module initialization indicator */ | ||
| static unsigned int initialized = 0; | ||
|
|
||
| /* Module structure pointer */ | ||
| static cob_module *module = NULL; | ||
|
|
||
| /* Global variable pointer */ | ||
| cob_global *cob_glob_ptr; | ||
|
|
||
|
|
||
| /* LINKAGE SECTION (Items not referenced by USING clause) */ | ||
| static unsigned char *b_9 = NULL; /* XML-NAMESPACE */ | ||
| static unsigned char *b_10 = NULL; /* XML-NAMESPACE-PREFIX */ | ||
| static unsigned char *b_11 = NULL; /* XML-NNAMESPACE */ | ||
| static unsigned char *b_12 = NULL; /* XML-NNAMESPACE-PREFIX */ | ||
| static unsigned char *b_13 = NULL; /* XML-NTEXT */ | ||
| static unsigned char *b_14 = NULL; /* XML-TEXT */ | ||
|
|
||
|
|
||
| /* Call parameters */ | ||
| cob_field *cob_procedure_params[1]; | ||
|
|
||
| /* Perform frame stack */ | ||
| struct cob_frame *frame_ptr; | ||
| struct cob_frame frame_stack[255]; | ||
|
|
||
|
|
||
| /* Data storage */ | ||
| static int b_2; /* RETURN-CODE */ | ||
|
|
||
| /* End of local data storage */ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please drop the cobc/ prefix here - as that is the place where that Changelog is