Announcing Ox release 1.11 [resend with corrected subject line]

Tom Shields <thomas.evans.shields@gmail.com>
Tue, 20 Jun 2023 17:44:51 -0500

          From comp.compilers

Related articles
Announcing Ox release 1.11 [resend with corrected subject line] thomas.evans.shields@gmail.com (Tom Shields) (2023-06-20)
| List of all articles for this month |
From: Tom Shields <thomas.evans.shields@gmail.com>
Newsgroups: comp.compilers
Date: Tue, 20 Jun 2023 17:44:51 -0500
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="59856"; mail-complaints-to="abuse@iecc.com"
Keywords: tools, available, attribute, parse
Posted-Date: 20 Jun 2023 18:49:39 EDT

Ox version 1.11 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.11 (20 June 2023)


** Backward incompatible change from release 1.10.3


Ox now generates an error for multiple grammar terminal symbols
occurring in an L-file 'return' expression. Previously, this situation
generated a warning, and Ox generated code assuming symbol attributes
declared for the leftmost recognized symbol in the expression. This
was dangerous, because the generated evaluator will access attribute
instances via incorrect memory references if all of the symbols are
not of the same attribute 'sort' (that is, are not contained in the
same attribute declaration). In the next release, Ox will not issue an
error if all of the symbols are of the same attribute sort (or if none
have defined attributes).




** Internals


The responsibility for copying source text 'as-is' from Y-file/L-file
AG specifications into the corresponding parser/lexer specification
files was refactored to move that pass-through management from the Ox
lexers to the parsers. This consolidation of responsibility for output
file generation simplifies the synchronization of source text
pass-through with code generation. The Y-file/L-file source text
preceding each terminal symbol recognized by an Ox lexer is returned
to the invoking parser in the 'left_context' attribute associated with
the returned symbol token number (via 'yylval').




** Bug fixes


Grammar rules for MSTA EBNF syntax and for top level lexer actions and
code insertions were corrected.


A bug causing Bison literal string token aliases to be replaced by the
aliased token name in 'yyyStringTab[]' was corrected.




** Documentation


The User Reference Manual was revised to state that multiple tokens
occurring in an L-file rule return expression is an error.


The locations within an Ox Y-file or L-file where C preprocessor
directives are acceptable was documented in the User Reference Manual,
including a caveat on use of conditional directives (e.g., "#ifdef ...
#endif") within L-file attribute reference sections.




** Build System


The './configure' script now issues a warning if the C++ compiler
doesn't support at least the 2011 ISO C++ standard, required to
compile the Ox source.


Post a followup to this message

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