Glossary » grammar analysis
grammar analysis
an approach to analyzing interaction sequences by writing grammar-style rules to describe them and then checking those rules for consistency and simplicity. For instance, a simple set of grammar rules for text editing might include:
- Modify-Text –> Select-Text + Choose-Operation
- Select-Text –> Select-Insertion-Point or Select-Text-Range
- Select-Insertion-Point –> mouse-down + mouse-up
- Select-Text-Range –> Click-and-Drag or Double-Click
- Click-and-Drag –> mouse-down + move-mouse + mouse-up
- Double-Click –> mouse-down + mouse-up + mouse-down + mouse-up (must be within a specified time interval)
- Choose-Operation –> choose-menu or Enter-Text
- Enter-Text –> enter-alphanumeric-text or hit-delete-key or keyboard-shortcut
The assumption is that fewer and more regular rules represent a system that is easier to learn and use. The grammar rules may be specified at various levels of detail. Here enter-alphanumeric-text was treated as an input primitive, but it could also be broken down to the next level of detail, e.g.:
enter-alphanumeric-text –> [0..9] or [a..z] or [A..Z]
The grammar rules may also specify actions that the computer performs or constraints on the applicability of the rule by adding annotations.