Announcing Ox release 1.12.1
From
Tom Shields@thomas.evans.shields@gmail.com to
comp.compilers on Tue Dec 3 13:48:25 2024
From Newsgroup: comp.compilers
Ox version 1.12.1 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.1 (2 December 2024)
** Enhancements
A '--debug' command line option is added to enable compilation of the existing tracing code in the Ox skeletons.
** Internals
The skeleton implementation was split into C-specific and C++-specific versions of the M4 macros. The C++-specific skeleton macros were reimplemented to use C++
capabilities up through the C++ 2017 standard.
M4 macros were reimplemented to reduce argument quoting and the associated parameter unquoting, and to reduce macro nesting, in order to speed up macro expansion processing. Multiple macro signatures were simplified to enable cleaner implementation. Types, structure members, and local variables were renamed, and typedef(s) were added, to improve readability.
Ox now borrows the solution to the C++ restriction that a union member cannot be
a non-trivial class type (a class with a constructor, destructor or copy operator) from the Bison 3.8.2 GLRv2 C++ skeleton (glr2.cc). The Ox solution was
tailored assuming C++ compiler support for at least the C++ 2017 standard.
** Test suite
Add test case 'bison-2.3-calc++' to verify support for C++ evaluators using Bison version 2.3 (included in the Apple Xcode Command Line Tools package).
Add test cases to verify all combinations of traversal ordering (pre, post) and direction (left to right, right to left) for both C and C++.
** Bug fixes
In the Windows 11 (ARM64) Msys2 MinGW environment, the Graphviz cgraph library static data structure modified to replace the default edge ordering function isn't visible at link time, although the code compiles. The code was reimplemented to use the public API of the Graphviz cdt library to setup a custom edge ordering function.
The macOS Homebrew GNU C++ 13.0.1 exception handler crashes internally when throwing 'std::out_of_range' in the implementation of the 'at ()' accessor function in at least the 'std::vector' and 'std::unordered_map' containers if the element accessed doesn't exist. The workaround implemented is to check for element existence without using 'at ()'.
Correct a bug introduced in Ox 1.12 (found using GNU C++ version 12.3.0): The arguments to 'std::distance ()' in 'codeGen::translateAndOutput ()' were reversed, resulting in a segmentation fault from referencing a negative offset in a string.
** Documentation
The Ox man page was updated to highlight the Ox run-time dependency on the M4 macro processor, and to note that the 'OX_M4PATH' environment variable can be set to a colon-separated list of directories to search for the Ox-specific M4 macro library files prior to searching the installed location.
The Ox man page and User Reference Manual were updated to add the '--debug' command line option description.
** Build System
The './configure' script now issues a warning if the C++ compiler doesn't support at least the 2017 ISO C++ standard, required to compile the Ox source.
The test for whether Clang is the LLVM or Apple C compiler was corrected (likewise for Clang++). This was found during regression testing in the Linux environment, which obviously doesn't have the Apple version of Clang.
A bug in the Automake version 1.17 release file 'm4/prog-cc-c-o.m4' was corrected with a patched version of that file local to the Ox distribution. The command "rm -f core conftest*" was changed to "rm -rf core conftest*" to avoid the error message: "rm: conftest.dSYM: is a directory" if using an LLVM-based compiler.
--- Synchronet 3.21b-Linux NewsLink 1.2