You can type or construct an environment directly in an Environment field in Lexicon Edit. It is added to the language project as if you inserted it Environments. However in this case, you should then return and Edit the environment, such as to add a name and description.
To insert an environment in Environments (Grammar), do the following steps.
In the Navigation Pane, click Grammar, and then click Environments.
Do one of the following:
On the Insert toolbar, click .
On the Insert menu, click Environment.
Press the shortcut key Ctrl+I.
A new environment is added. In the String Representation field, /_ appears for left-to-right writing system or _/ appears for right-to-left writing systems.
Enter a name and description for the environment.
Click the String Representation field, and then do one of the following:
Recommended for non-roman writing systems, especially those which are right-to-left:
Click the menu button that appears, and then click a command, such as Insert Natural Class, to insert a component of an environment. Repeat this step for each component. If you select Insert Natural Class, select a natural class from the dialog box, and then click OK. Otherwise, type a phoneme or other component as needed to complete the environment.
Enter the string representation by simply typing it with your keyboard.
Leave the String Representation field by clicking another field, such as the Name field.
If a red underline appears below the environment in the String Representation field, there is a problem with that environment. To determine the problem, right-click the environment and the select Describe Error in Environment. (Alternatively, go to Problems.) Then correct the problem.
Environments with a problem are not available for use, such as in the Choose Environments dialog box.
“/” (forward slash) must begin each environment.
“_” (underscore character) represents the location of the form (lexeme or allomorph) itself.
An environment may use a natural class or it may use any grapheme of any phoneme.
“[ ]” (square brackets) are required in environments that use a natural class, but are not used in environments that use a grapheme of a phoneme. Examples:
/_[V] must have a natural class with the abbreviation “V”.
/m_ uses the m grapheme of some phoneme.
“( )” (parenthesis) indicate optional phonemes or natural classes.
“#” (pound sign) is a predefined word boundary marker.
If the font associated with your vernacular writing system does not include the syntactic elements you need for the environment, specifically /, _, [, ], (, ), and #, they may appear as square boxes.
In this case, you can select each character that does not appear correctly and change the writing system to an analysis writing system that includes that syntactic element. Parsers accept environments with multiple writing systems.
Language Explorer does not allow the use of the “~” (tilde). Therefore, you cannot negate an environment, such as “/~_ [V]” (intended to mean “not before a vowel”).
Refer to Environment String Representations for string representation syntax examples.
In addition, you can point to Resources on the Help menu, and then click Introduction to Parsing for more information. See Allomorph Environments.