carta
sdf2table(1)

sdf2table1

Generate parse tables from sdf2 language definitions

Usage

sdf2table [-bh] [-i file] [-l] [-m name] [-n] [-o file] [-tvVx] file0 ...

Overview

sdf2table parses SDF2 syntax definitions, normalizes them to Kernel SDF2, and constructs the corresponding parse table.

A number of options can be supplied; these are as follows:

-b

Write term output in BAF (Binary ATerm) format. This is the default.

-h

Displays concise usage information.

-i file

Read input from file; by default, input is either read from stdin, or from the named files supplied as arguments.

-l

Displays statistic information.

-m name

Use name as top module when generating a parse table.

-n

Generated only normalized grammar.

-o file

Write output to file. By default, output is written to file with a name derived from the name of the input file for named files, and to standard output on input from standard input.

-t

Write term output in plain text format.

-v

Operate in verbose mode.

-V

Returns the current version number.

Usage

Examples

    $ sdf2table test.sdf

Exit status

Known bugs

Notes

Expected input for sdf2table is a full, flattened SDF2 specification in a single file. In such a file, all modules for the language defined are present; each module is identified by "module <ModuleName>", and at the top the keyword "definition" identifies the consecutive list of modules as a full SDF2 specification.

The normalizer expects a top-level module to be present by the name of "Main". Failure to include such a module will yield the parse table for the empty grammar.

Author

Mark van den Brand <[email protected]>

From xt-sdf2 2.0.1-3 in Debian 3.1 (Sarge). Parsed by carta from the page's man source.