Engineering Notebook


Acquired Data Solutions


ADS was upgrading their Auto Pilot test set for the T-BERD line of communications analyzers. One of the upgrade requirements was to add a scriptable test command language that could support customizable tests.


The open-source lexical analyzer "flex" and the open-source parser-generator "bison" were chosen to generate a table-driven interpreter for the test command language, rather than hard-code an ad-hoc parser.

The textual specification for the test command language was analyzed and re-expressed in a formal Backus-Naur Form (BNF) notation, with small modifications to insure that it was a context-free grammar.

This BNF grammar was used to configure flex and bison to generate the table-driven interpreter. Action routines and flex/bison coding were done in the C language. This flexible approach allowed for easy changes to the language as the initial specification evolved.

Because portable, open-source tools were used, it was possible to perform the development and initial testing in a Linux environment, and later move to the target MS Windows platform for integration with no code changes.