Announcing Ox release 1.7

Tom Shields <>
Sat, 30 Nov 2019 13:07:04 -0600

          From comp.compilers

Related articles
Announcing Ox release 1.7 (Tom Shields) (2019-11-30)
| List of all articles for this month |

From: Tom Shields <>
Newsgroups: comp.compilers
Date: Sat, 30 Nov 2019 13:07:04 -0600
Organization: Compilers Central
Injection-Info:; posting-host=""; logging-data="76668"; mail-complaints-to=""
Keywords: parse, tools, attribute, available
Posted-Date: 02 Dec 2019 15:41:16 EST

Ox version 1.7 is now available on SourceForge

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.


* 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.

Post a followup to this message

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