The Grammar Window


This window displays the often-fascinating, always-lengthy output of AXE's grammar generator, and allows you to annotate the document based on the grammar.


This window is used to display the grammars that are generated from the grammar settings dialog.

AXE can construct a grammar from any raw data. This is discussed in mildly more detail here.

Summary Info:

The top part of the grammar dialog contains some general information about the grammar:

Text Output

Press the 'grammar' button to view the generated grammar as a text description. This may not be particularly useful for large grammars. The grammar can be cut and pasted out of the window for analysis elsewhere. The format of each line is <rulename> : <symbol>* [ // <comments>] Comments will be generated if 'Include Extra Rule Info' was checked in the Grammar Settings Dialog. Symbols are either a literal (character or hex number) or the name of a rule.

Tree

Press the 'tree' button to view the grammar as a tree. This tree contains a full expansion of the grammar in which each node corresponds to an offset in the document. The 'leaves' of the tree are symbols occurring in the document. The 'branches' are rules. In either case, you can right click on a node to bring up a context menu: In this way you may be able to get a feel for the structure of the document.