Announcing Ox release 1.10.3

Tom Shields <thomas.evans.shields@gmail.com>
Wed, 21 Dec 2022 13:08:38 -0600

          From comp.compilers

Related articles
Announcing Ox release 1.10.3 thomas.evans.shields@gmail.com (Tom Shields) (2022-12-21)
| List of all articles for this month |
From: Tom Shields <thomas.evans.shields@gmail.com>
Newsgroups: comp.compilers
Date: Wed, 21 Dec 2022 13:08:38 -0600
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="14971"; mail-complaints-to="abuse@iecc.com"
Keywords: tools, available, attribute
Posted-Date: 21 Dec 2022 14:13:11 EST

Ox version 1.10.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.10.3 (18 December 2022)


** Enhancements


RE/flex (https://github.com/Genivia/RE-flex) is now supported as a lexer
generator for rebuilding Ox, as well as for building the demonstration
applications, and (most of) the test suite applications.


The memory management replacement library is repackaged as the Libnew
standalone package; separately configured, built and installed.




** Internals


The Ox lexer C++ source generated by RE/flex is included in the distribution,
along with previously included C++ source generated by Flex. Ox can be
rebuilt from the distributed lexer specification files, provided the required
version (or later) of Flex or RE/flex is installed.


The grammar symbol attribute data structures and code is restructured.


Source modules are restructured:
- I/O file initialization/finalization is now in the 'main' module
- Ox construct 'strip' functionality is now in the new 'strip' module
- the 'fileMgr' class is now in the new 'fileMgr' module
- the 'memMgr' class and sub-classes are now in the new 'memMgr' module


The Libnew package includes implementations of the standard C++ 'std::new()'
and 'std::delete()' operators, as well as of the standard C library functions
that allocate and free memory. The package builds libraries containing the
C++ replacement operators: 'libnew_bdwgc', using the Boehm-Demers-Weiser
Garbage Collector (BDWGC), and 'libnew_dmalloc', using the Debug Malloc
Library (DMALLOC). The C replacement functions are provided as examples,
since most of them are included in the BDWGC and DMALLOC packages.




** Bug fixes


An error introduced in Ox release 1.6.1 that escaped notice is corrected as a
side effect of the restructuring of the grammar symbol attribute data
structures and code. A duplicated attribute name was correctly diagnosed, but
then incorrectly added to the symbol attribute data structure, resulting in
irrelevant diagnostics.


A faulty C++ implementation of the Windows end-of-line (CRLF) handling for the
Ox Flex lexers is corrected.


The size of the buffer used during macro expansion is increased. The buffer
was allocated with insufficient space, causing memory faults in some cases.


The inference that the Flex and RE/flex '%option' arguments 'bison-bridge',
'bison-locations' or 'reentrant' imply that the lexer target language is C is
incorrect, and is removed.




** Test suite


The compiler option configuration for building the demonstration and test
suite applications under a Windows MinGW-based host environment is corrected.


The GPPL demonstration application implementation is modified so that GPPL
programs are able to run without memory faults, if configured using the
'--with-dmalloc' option.




** Build system


The '--with-lexgen=[flex|reflex]' configure option selects which lexer source
to use when compiling/linking Ox; the default is 'flex' if not specified.


The '--enable-lex=[flex|reflex|lex]' configure option selects which lexer
generator to use for building the demonstration and test suite applications,
defaulting to the first program found in the list {'flex', 'reflex', 'lex'} if
not specified.


By default, the Libnew package is configured to install both currently
implemented libraries. The configure option '--enable-libnew' can be used to
modify this behavior.


If Ox is configured '--with-libnew=[bdwgc|dmalloc]', the specified Libnew
library is expected to already be installed, and is linked into the Ox
binary.


The configure script now generates warnings, rather than terminates with an
error, if the version of the lexer generator (Flex or RE/flex) and/or the
version of Bison is less than the minimum needed to build Ox from the
distributed specification files.


AT&T Lint and Splint are not useful for statically checking C++ source. The
configure script, by default, now sets the 'LINT' Make variable to the C++
compiler used to compile Ox. The Ox Makefile currently checks that the value
of 'LINT' is one of the Apple Xcode, LLVM or GNU C++ compilers.


The 2011 ISO C++ standard is no longer set as the default when compiling Ox
and the demonstration and test suite applications. The most recent standard
supported by the C++ compiler from the list {c++20, c++17, c++14, c++11} is
used.


If Ox is configured '--enable-target=dynamic' in macOS, the '-no_fixup_chains'
linker option (if supported) is used to avoid the warning "-undefined
dynamic_lookup may not work with chained fixups".



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.