Server.CLI - TypeCobolTeam/TypeCobol GitHub Wiki

The TypeCobol parser can be accessed through a command line interface (CLI).

USAGE

TypeCobol.Server.exe [OPTIONS]... [PIPENAME]

Options

Run the TypeCobol parser server.

-1, --once

Parse one set of files and exit. If present, this option does NOT launch the server.

-i, --input=PATH

PATH to an input file to parse. This option can be specified more than once.

-o, --output=PATH

PATH to an ouput file where to generate code. This option can be specified more than once.

-g, --generate

If present, this option generates code corresponding to each input file parsed.

-d, --diagnostics=PATH

PATH to the error diagnostics file.

-e, --encoding=ENCODING

ENCODING of the file(s) to parse. It can be one of rdz(this is the default), zos, or utf8. If this option is not present, the parser will attempt to guess the ENCODING automagically.

-y, --copy=PATH

PATH to a copy to load. This option can be specified more than once.

-h, --help

Output a usage message and exit.

-V, --version

Output the version number of TypeCobol.Server.exe and exit.

Comments

This interface allows two run modes.

One-time parsing

First, one can run a parsing operation on one given set of TypeCobol files. The parser will output errors if any. After the parsing phase, COBOL85 code corresponding to the parsed TypeCobol code can optionally be output.

Parsing server

Second, the parser can be run as a stateful parsing server. When run like this, the parser will wait for input on a named pipe (the pipe name is given as an argument), then parse whatever comes through the pipe. If something has already been parsed, the server will only parse the diff between the current state and what is already known.