Announcing Ox release 1.9.1

Tom Shields <thomas.evans.shields@gmail.com>
Mon, 18 Jan 2021 11:48:14 -0600

          From comp.compilers

Related articles
Announcing Ox release 1.9.1 thomas.evans.shields@gmail.com (Tom Shields) (2021-01-18)
| List of all articles for this month |
From: Tom Shields <thomas.evans.shields@gmail.com>
Newsgroups: comp.compilers
Date: Mon, 18 Jan 2021 11:48:14 -0600
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="43789"; mail-complaints-to="abuse@iecc.com"
Keywords: tools, available, yacc
Posted-Date: 22 Jan 2021 21:52:31 EST

Ox version 1.9.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 postdecoration 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.9.1 (15 January 2021)


** Backward incompatible changes from release 1.9


The ';' at the end of a Y-file rule is no longer optional.




** Enhancements


The prefix specified by the "--name-prefix" command-line option is now used
for all globally visible names. Previously, only linker-visible names were
prefixed. This enables including multiple AG header files in the same
compilation unit.


The following directives are recognized and tailor the C++ code generated for
a `bison' target parser specification:
    - "%define api.namespace {NAMESPACE}", "%define namespace {NAMESPACE}"
    - "%define api.parser.class {NAME}", "%define parser_class_name {NAME}"


The following extensions to the Yacc rule syntax are supported for a `bison'
target parser specification:
    - named references for a symbol semantic value and location pseudo-variable
    - typed midrule actions
    - midrule action named references
    - "%expect N" and "%expect-rr N" rule-level directives




** Internals


The Y-file definition & rules section lexers, and the associated subset of
the
parser, were restructured for clarity. In several cases, `bison' unique
constructs previously processed via Lex patterns are now recognized as
sequences of tokens in the lexers, and recognized via Yacc rules.


The use of 'yyy' and 'yox' prefixes for local variables, and structure /
union
component names in the Ox skeleton were eliminated; other local variables
were
renamed for clarity.




** Bug fixes


The Ox grammar rules for a set of AG rules using '|' for a common left-hand
side symbol was corrected.


When stripping L-files (Ox "-s" command-line option), newlines within
multi-line comments in the L-file definition section were incorrectly placed
at
the end of the stripped output file.


Using `bison' with the "%define api.value.type union" directive, a Yacc type
tag containing an instantiated template type incorrectly interpreted the
template argument(s).


The `bison' "%skeleton" directive value was incorrectly interpreted.


A syntactically invalid Yacc rule was generated if a rule-level directive,
e.g., "%prec", followed the last Yacc action in the right-hand side.
    Note: AT&T Yacc doesn't accept a rule directive following a final Yacc
    action, but this is accepted by other Yacc-compatible parser generators.


A syntactically invalid Yacc rule was generated for an AG rule of the form:


    lhs_symbol : { ... } single_rhs_symbol @{ ... @};




** Build system


By default, Ox now builds both static and shared versions of GNUlib and the
C++ replacement std::new()/std::delete() library, using the Automake/Libtool
support. The `./configure' option "--enable-shared=no" (alternatively,
"--disable-shared") will skip the shared library. Static versions of GNUlib
and the C++ replacement std::new()/std::delete() library are required for the
Ox build and test process.


[demime 1.01d removed an attachment of type application/pgp-signature which had a name of signature.asc]



Post a followup to this message

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