Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2382

Announcing Ox release 1.7

From Tom Shields <thomas.evans.shields@gmail.com>
Newsgroups comp.compilers
Subject Announcing Ox release 1.7
Date 2019-11-30 13:07 -0600
Organization Compilers Central
Message-ID <19-12-001@comp.compilers> (permalink)

Show all headers | View raw


Ox version 1.7 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 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.7 (29 November 2019)

** Backward incompatible changes from release 1.6.1

 Yacc declarations (`%union', `%token', `%left', `%right', `%type', etc.) must
 precede attribute declarations in the Y-file declarations section.  This
 restriction was documented but not enforced in prior releases.  In fact,
 previous implementations went to some trouble for intermixed declarations.

 An attribute evaluation part is now a single C statement (terminated by a
 semicolon), or a single C compound statement.  In prior releases, an attribute
 evaluation part could contain a sequence of C statements.  This is also now
 the case for a traversal action.


** Internals

 The parser now uses the `bison' GLR parsing algorithm.  This will enable
 elimination or simplification of existing lexer/parser contortions.

 The parser specification now uses a custom skeleton derived from the `glr.c'
 skeleton in `bison' 3.4.2 to customize the format of syntax error messages.

 The parser and the lexer for Y-file rule sections were restructured:
 - The check to determine if a Yacc action is the last element in a rule was
   moved out of the lexer and into the parser, taking advantage of the GLR
   parsing algorithm.  This also allowed the elimination of redundant lexer
   start conditions.
 - Much of the processing of the `btyacc'/`byacc' inherited attribute syntax
   was moved out of the lexer and into the parser.

 The execuation of L-file attribute evaluation after a call to `yyyabort()' is
 now inhibited, as for Y-file attribute evaluation.

 The `yyerror()' function now uses variable arguments, if present, with the
 message parameter considered as a printf-style format string.  Any '%'
 character in the message parameter must now be encoded as '%%'.

 The Ox parser will now only build from scratch with `bison' 3.4.2+.


** Bug fixes

 The "#line" directive generated prior to the closing '}' generated for an
 L-file attribute reference section is now correct.


** Test suite

 Test cases were updated to conform to (or to demonstrate) the backward
 incompatible changes in this release.

 Test cases were augmented or added to check error diagnosis of the backward
 incompatible changes in this release.

Back to comp.compilers | Previous | Next | Find similar


Thread

Announcing Ox release 1.7 Tom Shields <thomas.evans.shields@gmail.com> - 2019-11-30 13:07 -0600

csiph-web