| Commit | Date | |
|---|---|---|
|
[r13020]
by
mikeaubury
4glc: emit the last parser state's token group, and bounds check the lookup mk_states_c builds the per-state "which keyword tokens can the parser accept With the current grammar that is 4732 states (0-4731) described by 4731 The per-state flush is now a function called from both the state header and Also added a bounds check. An out of range state now returns 1 (treat the word The same two changes are made in mk_states_opt.c, which generates the bsearch No behaviour change, as expected for a state that was never consulted: the full |
2026-08-31 14:46:26 | Tree |
|
[r13019]
by
mikeaubury
P-code: fix the typedef rule reading its type through the wrong union member The TYPEDEF rule passed $<define_variables>2 for a dtype, but dtype yields A typedef name is only ever used as a pointer target or a sizeof operand, and Two things fell out of testing it: * dtype had no pointer form for a typedef name, so "_dynelem_aa *aa=0;" - which * add_default_struct_list() was static; it is now exported so the rule can build Also removed three leftover debug printfs that went to stdout on every typedef The p-code corpus run is now 28 passing with a single compile failure left - a Grammar and lexer only; the C code generator is untouched. Full build clean, |
2026-08-31 14:18:43 | Tree |
|
[r13018]
by
mikeaubury
P-code: clear the remaining C-generation syntax errors Nine tests in the aubit4gltest corpus failed to get through c2pcode with a Most of this is on the code generation side rather than the grammar, since we * _dtype_hint was declared just before its use in the PROMPT block, after * "a4gl_sqlca.sqlcode = a4gl_status = _fetcherr" is a chained assignment, and * The generated event list declared aclfgl_event_list _sio_evt[n+1] where n * The ERR_CHK_* names are macros, and p-code skips every '#' line, so it saw Two additions to the grammar itself, both of which leave the conflict count * "struct BINDING *reread" - dtype folds pointers into the type for CHAR, INT, * sizeof of a TYPE rather than an expression, as in * A trailing comma in a brace initialiser list, which C allows and every Still failing to compile: one module using a typedef (the grammar's TYPEDEF Verified: full aubit4gltest run unchanged against the r13015 baseline - the |
2026-08-31 14:09:15 | Tree |
|
[r13017]
by
mikeaubury
P-code: register struct s_field_name and s_field_name_list Same gap as sDependantTable - these are emitted into generated code for field Found by running the aubit4gltest corpus through the p-code pipeline using each |
2026-08-31 12:51:48 | Tree |
|
[r13016]
by
mikeaubury
Make the P-code compiler and runner work; restore panel/form to the TUI link P-code The runner would not build: compilers/pcode/fgl_calls.h registered Sizes and signs, all 64 bit issues: * a4gl_htonl/a4gl_ntohl returned htonl()'s uint32_t as a long, which zero * The p-code type model said a long and a pointer were 4 bytes while the runner * A string literal's address was cast through (int) in common_eval.c, which The p-code compiler skips every '#' line, so it never sees a #define. NULL, A4GL_push_long and A4GL_push_int were still keyword-bound to constants, but An unspecified array bound is held as -1, which was multiplied into a negative On the generator side, several things emitted only for the C backend are not Suppressing the MAIN prototype means an ordinary "MAIN ... END MAIN" program TUI link Testing r12988 1098 run, 59 skipped, 35 failed The two differences are tests 706 and 1413. Run individually, 706 passes on For reference, with the TUI driver broken these runs managed 283 tests with |
2026-08-31 12:19:27 | Tree |
|
[r13015]
by
mikeaubury
Build warning cleanup, object system fixes, embedded Python Three strands of work. Build warnings Mostly noise (sign-compare, unused-but-set, missing prototypes, dead Also added svn:keywords=Id to the modules that had lost it. 4GL object system * objData->base.objectid is not a 4GL variable, so the root-scanning * Destructors are registered as "<type>.~" but A4GL_destroy_object looked * Class methods pushed a call frame on entry but only popped it on an * castTo could not be reached from 4GL at all. The lookup is a plain * Polymorphic overloads resolved backwards. getSigForTopOfStack built the New samples in tools/test/OO exercising a three-level chain (shape <- Embedded Python define p object(python) Methods: new, import, addpath, available, run, eval, call, set, get, configure detects an embeddable Python (pkg-config python3-embed, then ./configure --with-python / --without-python / (auto by default) With no python3-dev the implementation compiles away, nothing links Documented in docs/README-Python.txt, example in Verified: full build clean in both configurations, tools/test builds, and |
2026-08-30 17:49:50 | Tree |
|
[r13014]
by
mikeaubury
Fix the real bugs behind the remaining compiler warnings These are the ones set aside earlier as "the interesting shortlist" - every Memory: - compilers/4glc/parsehelp.c: malloc(sizeof(expr_str)) followed by memcpy of Logic that never ran, or always ran: - compilers/4glc/lint.c: "whencode & 0x15 == WHEN_CALL" - 0x15 masks off bit 1 Format strings: - compilers/4glc/prototypes.c: three fprintf calls passing arguments to format Left alone deliberately: compile_c.c's "arr_subscripts_len >= 0" was always true |
2026-08-27 12:18:56 | Tree |
|
[r13013]
by
mikeaubury
Drop the Glade IDE from the default build glade/ide and glade/ide/sqleditor are no longer built by "make". They have not Only the ALL list changes. The "glade" target itself is untouched, so "make With this, a full clean build of the default target is free of every diagnostic |
2026-08-27 11:53:46 | Tree |
|
[r13012]
by
mikeaubury
Clear the GCC 14+ errors from the rest of corecompile: adbload2 and runforms Continues r13011. The .warn files that 4glpc writes - which never reach the tools/adbload2 (22 down to 0): - process.ec and jtypes.c call runtime entry points with no prototype in scope. tools/asql/runforms (3 down to 0): - A4GL_isnull, A4GL_read_columns and aclfgl_a4gl_get_info were declared only in Also in lib/libaubit4gl/ui.c: A4GL_open_gui_form declared its last parameter as Not done: glade/ide and glade/ide/sqleditor still have 32, mostly generated 4gl One thing tried and reverted: declaring compat.c's bare trim() in |
2026-08-27 11:38:50 | Tree |
|
[r13011]
by
mikeaubury
Fix the GCC 14+ errors in tools/asql, and a real sqgetdbs/long bug with them Reported building r13010: "Error compiling infx.ec" in tools/asql, with no Three things in there are warnings under GCC 13 and errors from GCC 14 on: - jtypes.c calls isxdigit, isspace, isalnum, isdigit, isalpha, ispunct and Declaring sqgetdbs then exposed a genuine bug at three of its four call sites. Verified by rebuilding tools/asql: infx.warn goes from 10 GCC-14-fatal Note for whoever picks this up next: a sweep of the .warn files this build |
2026-08-27 11:06:19 | Tree |