Path: csiph.com!weretis.net!feeder9.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Tom Shields Newsgroups: comp.compilers Subject: Announcing Ox release 1.12.3 Date: Wed, 18 Mar 2026 20:29:50 -0500 Organization: Compilers Central Sender: johnl%iecc.com Approved: comp.compilers@iecc.com Message-ID: <26-03-002@comp.compilers> References: <5c5a16c8e3960115020c33e3.discussion@ox-attribute-grammar-compiler.p.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="41856"; mail-complaints-to="abuse@iecc.com" Keywords: tools, available, yacc Posted-Date: 19 Mar 2026 11:18:26 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <5c5a16c8e3960115020c33e3.discussion@ox-attribute-grammar-compiler.p.sourceforge.net> Xref: csiph.com comp.compilers:3724 Ox version 1.12.3 is now available on SourceForge (sourceforge.net/projects/ox-attribute-grammar-compiler/). Ox generalizes the function of Yacc in the way that an attribute grammar generalizes a context-free grammar. Ordinary Yacc and Lex specifications may be augmented with definitions of synthesized and inherited attributes written in C/C++ syntax. Ox checks these specifications for consistency and completeness, and generates from them a program that builds and decorates attributed parse trees. The user may specify post-decoration traversals for easy ordering of side effects, such as code generation. Ox handles the tedious and error-prone details of writing code for parse-tree management, so its use eases problems of security and maintainability associated with that aspect of translator development. Ox NEWS * Noteworthy changes in release 1.12.3 (17 March 2026) ** Enhancements Ox now identifies (disjoint) attribute dependency cycles within the local dependency graph constructed from a single attribute reference section. If any are found, Ox skips further processing of that attribute reference section and reports an error with a message listing the cycle(s). The local dependency graph is relatively small for a single attribute reference section, so the time/space cost is low. The generated attribute grammar evaluator checks for longer cycles at run-time, as in past releases. The ambiguity with multiple returned terminal symbols in an L-file return statement (an L-file rule) is now resolved (with a warning message) if the set of returned terminal symbols all have either the same set of defined attributes, or no defined attributes. Otherwise, Ox issues an error message. Multiple definitions for a dependent attribute now generates a warning rather than an error. This is not good practice if each definition has different dependees, as the order of evaluation of the dependees can influence the final value of the dependent attribute, although this may be the intended behavior. The Ox run-time support function 'yyinit ()', formerly required to initialize tree visualization, if configured, is no longer needed (or available). ** Internals Optimizations implemented in the generated evaluator code: - A RHS symbol attribute is now accessed via the Yacc parser stack reference for the RHS symbol, rather than via indirection through the child list of the Yacc parser stack reference for the LHS symbol in a generated Yacc parser attribute reference section evaluation. - The loop previously used to initialize attribute dependee counts in a generated Yacc parser attribute reference section evaluation is unrolled, eliminating the need for a variable argument list passed to a run-time support function; non-zero dependee counts are assigned inline, rather than from table entries. - The local dependency graph data structure is now implemented as a ragged array. ** Bug fixes A nonterminal symbol erroneously returned in an L-file rule generated the diagnostic "warning: return object is not a terminal symbol; assuming no attributes.” the correction generates the diagnostic "error: to return nonterminal as token.” This bug was introduced in Ox version 1.11.1. Ox incorrectly complained of an error if an explicit mode attribute definition contained both inherited and synthesized attribute occurrences within the set of dependent attributes specified. The intended problem is a single attribute having both inherited and synthesized occurrences (at the grammar level). This is a holdover from the Ox G1.04 1994 distribution. Code with undefined behavior that only failed when compiled with the macOS Homebrew GNU C++ compiler version 15.2.0 with the command-line flags '-O0 -fprofile-arcs -ftest-coverage' was corrected. The Yacc ‘%start' and ‘%union' directives were erroneously included in the check that all Yacc symbol declaration directives must precede any ‘@attributes' declaration. ** Documentation Updates to the Ox User Reference Manual: - Section 5.3.3: Ox issues an error if multiple terminal symbols returned in an L-file rule do not have the same set of defined attributes; a warning is issued if all symbols returned have the same set of defined attributes, or no defined attributes. - Section 5.4: At evaluator generation time, Ox checks for cycles within each attribute reference section. The generated evaluator checks for longer cycles at run-time. - Section 7.5 and Appendix F.3: The need to call 'yyyinit ()' to initialize tree visualization, if configured, was removed. ** Build System Source code coverage instrumentation can be configured with the command-line option '—enable-code-coverage' for GNU and Apple/LLVM compilers.