TblDisp

This module is invaluable for debugging, testing and optimising state tables. It presents the entries in each state table in a compact and readable format. This output is used in the "grey" box tests in the test rig to check that the state tables generated for various expressions are correct. These tests are valuable as they help detect potential bugs that might slip into the state tables, as it's impossible to test every possible character in every possible RE.

The module has been written to be (fairly) reusable. While some details are specific to the RE application (such as the table flags), it's easy (though a tad tedious) to modify the code to report a different set of actions for another application.

Use the -D switch of GGrep to display the state tables using TblDisp (and also use -C and -O to help see what's happening).

Public routines:

Init -- Prepare module for operation

Start -- Begin managing what has to be managed

PrepareLabels -- Set up labels used for table display

Describe -- Report state tables in coherent fashion

Private routines:

DispFlag -- Report table summary described by flag variable

ActionSummary -- Display summary of entries matching action

DescribeTable -- Generate readable description of a table