TutorialObjects and Syntactic Categories




Prev | Up | Next | Back | Forward | Online Documentation Home Page

Objects and Syntactic Categories

The things or entities manipulated in Ada-ASSURED are known as objects. Because the editor has detailed knowledge of the linguistic structure of objects, it is called a language-sensitive editor.

Objects are not merely sequences of characters or text lines; objects are structured according to the grammatical rules of some particular language. In general, the editor contains grammatical rules for several different languages. One such language is the language of hypertext cards; each such card can be thought of as a sentence in that language. A second language is defined as one or more lines of arbitrary text; when an an object is treated as a sentence in that language, the editor behaves much like an ordinary text editor. Other languages may be programming languages, specification languages, etc.

We use the term ``syntactic category'', or just ``category'' to describe the linguistic context an object is associated with. Thus, we say that each object has an associated syntactic category.

Typical languages have complicated hierarchical structures. Well-formed sentences in such languages are composed of parts, each of which must be well-formed with respect to some particular sub-language. Thus, in general, an object is composed of several smaller constituent sub-objects. Each sub-object may, in turn, consist of sub-sub-objects, etc. Ultimately, the decomposition stops when we reach atomic objects. The grammatical rules of a language describe the decomposition of objects into sub-objects. A typical rule states that an object of category-0 may consist of n parts, sub-objects of category-1, ..., category-n respectively.

Objects are browsed and edited in buffers, each associated with a particular syntactic category. The editor enforces the grammatical rules that describe permissible compositions of objects—a buffer of syntactic category p is permitted to contain only an object of syntactic category p.

One particular syntactic category is distinguished as the root syntactic category of the editor. For convenience, commands expecting category names as parameters default to the root category.

commands


Forward