6.3 Visual Grammar Notation

Visual language description: The Visual Grammar Notation itself is of course also a formal visual language. All of the visual grammars used in this paper are described by the grammar presented in Figure 9. Reading informally, an expression in Visual Grammar Notation is a piece of text with the visual literal ``::='' on its right, and a list of rules below it. A list of rules is either a rule on top of a list of rules, or just a rule by itself. And a rule is a piece of text with a straight arrow to the right, and any visual object (drawn line, piece of text or group of objects)* to the right of that. On the left of Figure 9 is a region containing notation for a visual grammar (using the Visual Grammar Notation to describe itself) and on the right is the proper parse tree for the expression in that region.

Action taken based on the parse: Once a parse tree has been produced for an expression in Visual Grammar Notation, the grammar compiler can then take the tree and convert the grammar to the internal form which is used by the parser. The compiler returns the piece of text at the lower right of Figure 9, showing the name of the grammar and the rules it in. All of the parsing presented in this paper was done using grammars compiled in the above fashion by the function compile-grammar-in-region .




Figure 9. Grammar, parse and interpretation for a visually notated grammar.



*Any non-atomic visual objects which serve as right hand sides for rules must be grouped manually by the linguist user when inputing a visual grammar (thus in Figure 9 the right hand sides in the input region to the parser already have spiderwebs). Machine grouping of these objects is very difficult because the tree structure of the right hand side is how the linguist specifies both the spatial search sequence for recognition of that kind of expression, and the tree structure to be returned in case of a successful parse.