The Grammar Help window is a multi-functionality window; it can also provide signal dictionary capabilities. These functions are further described in "Signal Dictionary Window" on page 1250. What functionality is provided depends on the options defined on the Select menu.
Each SDL Editor window has its associated Grammar Help window. The window looks like this:
Figure 315 : The Grammar Help Window. ----- (fig) -----In the next sections, we will describe the components that comprise the Grammar Help Window:
Figure 316 : The Grammar Help File Menu. ----- (fig) -----The File menu contains menu choices that allow to access files that contain SDL Grammar Help templates. The available menu-choices are:
Following the command, a Standard File Selection Dialog is issued where the appropriate file can be located. See Figure 317.
Figure 317 : Load a Grammar Help File. ----- (fig) -----Grammar template files normally have the file extension .tpl. With SDT, a standard template file, sdt.tpl, is enclosed. The SDL Editor attempts to locate a .tpl file each time the Load command is invoked.
Any template definitions that are already loaded will be replaced by the contents of the selected grammar help definition file.
This feature issues a Standard File Selection Dialog, similar to the one issued after the Load command, for adding a set of custom templates to the basic set provided in SDT.
Any template definitions that are already loaded will be extended with the contents of the merged template definition file.
Figure 318 : The Grammar Help Edit Menu. ----- (fig) -----The Edit menu provides two utility functions that can be used when copying text from the Grammar window to the SDL Editor's text window. If it is decided that the copied text is not required, an Undo function is available.
The available menu choices are:
The Undo command allows to revert those changes.
--------------------------------------------------------------------- Note: double-clicking A shortcut for Insert is to double-click on the template name in the name field. ---------------------------------------------------------------------
Figure 319 : The Grammar Help Select Menu ----- (fig) -----The commands on the Select menu define what functionality the Grammar Help window should provide. The following options are supported:
Each of these functions can be enabled or disabled individually. In addition, an Options menu choice allows to enable and disable multiple options in one command only.
The options that are currently activated are indicated by an asterisk (`*') preceding the corresponding menu choice. When invoking the Grammar Help, the Grammar option is enabled, while the remaining options are disabled.
Figure 320 : The Grammar Help Tools Menu ----- (fig) -----The commands on the Tools menu provide various convenience functions:
Figure 321 : The Symbol Field. ----- (fig) -----The symbol label reads "No single symbol selected" in the following circumstances:
Figure 322 : The Name Field. ----- (fig) -----The list is updated automatically each time an object in the SDL Editor's drawing area is selected, to reflect the templates that are currently available for that object. By default, the first item in the list is selected.
The name field is empty in the following circumstances:
The grammar field is empty if no item is selected in the Name Field (or if the name field is empty)
Figure 323 : The Grammar Field. ----- (fig) -----In order to copy and paste text from the template definition field to the text window, the following options are available:
------------------------------------------------------------------- Note: The characters @ and $ are separator characters. They are reserved for that purpose. -------------------------------------------------------------------
@<editortype>@<symboltype>[@[<symbolcomment>]]editortype, symboltype and symbolcomment are to be replaced with the adequate text strings.
Comments in Grammar Help files is also permissible.
Example 29 : The Declaration of a Channel Template @SDL@CHANNEL@Channel symbolThe declaration is to be interpreted as:
--------------------------------------------------------------- Note: Grammar Help is currently not supported by the MSC Editor. The MSC keyword is reserved for future functionality extensions. ---------------------------------------------------------------
ADDITIONAL_HEADING_BLOCK ADDITIONAL_HEADING_BLOCK_TYPE ADDITIONAL_HEADING_PROCEDURE ADDITIONAL_HEADING_PROCESS ADDITIONAL_HEADING_PROCESS_TYPE ADDITIONAL_HEADING_P_AS_SERVICE ADDITIONAL_HEADING_SERVICE ADDITIONAL_HEADING_SERVICE_TYPE ADDITIONAL_HEADING_SYSTEM ADDITIONAL_HEADING_SYSTEM_TYPE BLOCKSUBSTRUCTURE BLOCK_REF BLOCK_TYPE_REF CALL CHANNEL CHANNELSUBSTRUCTURE CONNECTION_POINT CONNECTOR CONTINUOUS_SIGNAL CREATE DECISION ENABLING_CONDITION GATE INPUT KERNEL_HEADING KERNEL_HEADING_BLOCK KERNEL_HEADING_BLOCK_TYPE KERNEL_HEADING_PROCEDURE KERNEL_HEADING_PROCESS KERNEL_HEADING_PROCESS_TYPE KERNEL_HEADING_SERVICE KERNEL_HEADING_SERVICE_TYPE KERNEL_HEADING_SYSTEM KERNEL_HEADING_SYSTEM_TYPE MACROCALL OPERATOR_REF OUTPUT PACKAGE_REF PAGENUMBER PRIORITY_INPUT PRIORITY_OUTPUT PROCEDURE_REF PROCEDURE_START PROCESS_REF PROCESS_TYPE_REF RETURN SAVE SERVICE_REF SERVICE_TYPE_REF SIGNALROUTE START STATE STOP TASK TEXTSYMBOL_BLOCK_SUBSTR TEXTSYMBOL_MACRO TEXTSYMBOL_PROCEDURE TEXTSYMBOL_PROCESS TEXTSYMBOL_P_AS_SERVICE TEXTSYMBOL_SERVICE TEXTSYMBOL_SYSTEM TRANSITION_OPTION--------------------------------------------------------------------- Note: If the same section appears more than once, all template definitions under those sections will be available. ---------------------------------------------------------------------
@COMMENT@<commenttext>------------------------------------------------------------------ Note: Such a comment signals the end of the previous section and should only be used before another section. ------------------------------------------------------------------
A template definition is started with a line beginning with a $ sign and continues until either:
$<templatename>'Newline' <multiple lines constituting the template definition> Example 30 : The Definition of a Channel Example $GRAMMAR Z100: 2.5.1 (p.45) Z100: 2.5.5 (p.50) Signal list <ChannelName> ::= <Name> <SignalList> ::= ( <SignalName> / '(' <SignalListName> ')' )",' $SignalList SignalName, SignalName $SignalList2 SignalName, SignalName, (SignalListName)-------------------------------------------------------------------- Note: Neither leading nor trailing newlines will be added to the template definition. These can be added to the template simply by adding a leading empty line and/or a trailing empty line in the template defi nition. --------------------------------------------------------------------
----------------------------------------------------------------- Note: The signal dictionary function requires a file with grammar help templates (sdt.tpl) in order to function properly. See "The Gram mar Help File" on page 1244. -----------------------------------------------------------------Each SDL Editor window has its associated Signal Dictionary window. The window looks like this:
Figure 324 : The Signal Dictionary Window. ----- (fig) -----
--------------------------------------------------------------------- Note: In order to extract signal information from an diagram, SDT re quires the diagram to be syntactically correct in the sense that SDL- PR code can be generated from the SDL-GR diagram without en countering errors. ---------------------------------------------------------------------
The available menu choices are:
The Undo command allows to revert those changes.
--------------------------------------------------------------------- Note: double-clicking A shortcut for Insert is to double-click on the template name in the name field. ---------------------------------------------------------------------
Figure 325 : The Select Menu. ----- (fig) -----The Select menu provides functions that define the functionality that the Signal Dictionary should provide. These functions restrict or extend the scope of search for signals. Also, the Signal Dictionary functionality can be extended to provide access to MSC Messages and an external signal library. The available options are:
Each of these options can be individually turned on and off. The options that are currently turned on are indicated by an asterisk (`*') preceding the menu choice. Invoking a menu choice toggles the corresponding option.
An MSC is submitted as input to the Signal Dictionary if contained in the Organizer's Associated Documents area and if associated to an SDL diagram that is present in the Organizer's Diagram Structure.
The default options for the Signal Dictionary are Up and Down.
Figure 326 : The Select Options. ----- (fig) -----
Figure 327 : The Symbol Label. ----- (fig) -----The symbol label reads "No single symbol selected" in the following circumstances:
Figure 328 : The Signal List. ----- (fig) -----The signal list is empty when:
-------------------------------------------------- Object Usage -------------------------------------------------- channel line Reference to signal channel name signal list in channel connection point Reference to signal gate Reference to signal gate name signal list in gate input Reference to signal output Reference to signal priority input Reference to signal save Reference to signal signal route line Reference to signal signal route name signal list in signal route text Declaration of signal --------------------------------------------------
The notation that is adopted is an SDL-like graphical notation. It is also possible to select a textual notation if the font face used in the graphical notation is not supported by the computer.
Selecting the textual notation is done by setting the environment variable SDLENOGRAPHICS before SDT is started.
Each item in the signal list is one of the following:
Figure 329 : A Signal List Separator. ----- (fig) -----Each of these sections corresponds to an option that is enabled in the Select menu (see page 1241). Their meaning and order of appearance in the signal list is as follows:
Figure 330 : Diagram Type Symbols. ----- (fig) -----The textual notation reads <diagramtype diagramname>
All information that is listed after a diagram identifier is related to that diagram, until the next diagram identifier or separator.
Figure 331 : Gate Symbols. ----- (fig) -----The textual notation reads:
GA <Gatename>:<In>|<Out>|<In:Out>
Signals are listed according to the order of appearance in the respective signal lists.
Selecting a gate in the list displays one or two lines in the Signal Definition list; in the case of a bidirectional gate, the first line holds the signals sent to the diagram while the second line holds the signals sent from the diagram.
Figure 332 : Channel Symbols. ----- (fig) -----The textual notation of a channel is:
CH <Channelname>:<In>|<Out>|<In:Out>|<Int>|<Int:Int>Channels are present on package, system, block, block substructure and system type diagrams only.
The lines of information that follow a channel consist of the signals that are conveyed on it. The appearance is similar to listing signals on a gate. See "Signals on a Gate" on page 1259 for information about listing order.
Figure 333 : Signal Route Symbols. ----- (fig) -----The textual notation of a signal route looks like this:
SR <Signalroutename>:\ <In>|<Out]>|<In:Out>|<Int>|<Int:Int>Signal routes are present on block and block type diagrams only.
The lines of information that follow a signal route consist of the signals that are conveyed on it. The appearance is similar to listing signals on a gate. See "Signals on a Gate" on page 1259 for information about listing order.
The indentation is filled with blank space (see Figure 334).
Figure 334 : Signal Definitions. ----- (fig) -----
----------------------------------------------------------------------- Note: Each signal appears only once within a diagram. If a signal is refer enced at least once within the diagram, it is not listed in the signal definitions section for that diagram, only references are listed. -----------------------------------------------------------------------
Figure 335 : Signal References on a Line. ----- (fig) -----
Figure 336 : Signal Symbols. ----- (fig) -----The textual notation uses the characters:
[I][O][?]These characters appear at fixed positions. Where an attribute is not set, this is indicated with a hyphen (`-'). See Figure 337.
Figure 337 : An Undeclared Signal which is Input and Output. ----- (fig) -----
Figure 338 : Timer Symbol. ----- (fig) -----Timers can appear in the following contexts:
Figure 339 : Errors were Detected when Extracting Signals.Figure legend: SDT failedin extracting signal information from the process type diagrams Door, DoorLock andthe block type diagram Doors (one level down in the SDL hierarchy) ----- (fig) -----These error situations are either caused by:
In the textual notation, this is indicated by an error message following the diagram name:
<diagramtype diagramname> :GrPrErrorFigure 340 : Errors were Detected when Extracting Signals.Figure legend: The currentdiagram (This diagram) is process type Door. SDT could not convert this diagramto SDL-PR. ----- (fig) -----
Figure 341 : Selection of a Signal.Figure legend: The signal Display is selected.The signal definition shows the signal along with its parameters - one parameterof type Charstring in the example. ----- (fig) -----
Figure 342 : Selection of a Gate.Figure legend: The gate D, which is an in/out gateis selected. The signal definition shows one line with all in-signals (Door, Display)and one line with all out-signals (OpenDoor, DoorNo) in relation to the parent diagram(Controller) ----- (fig) -----
SignalListName = Signal1, Signal2,...,SignalN
---------------------------------------------------------------- Accelerator Command / functionality ---------------------------------------------------------------- g Select the Grammar section if the option is enabled and bring the separator into view u Similar to g but applies on Up. t Similar to g but applies on This. d Similar to g but applies on Down. a Similar to g but applies on All. m Similar to g but applies on MSC. e Similar to g but applies on External. ctrl-g Toggles the Grammar option on / off (see page 1241). When the option is enabled, brings the Grammar separator into view and selects it. ctrl-u Same as ctrl-g, but applies on the Up option (see page 1253). ctrl-t Same as ctrl-g, but applies on the This option (see page 1253). ctrl-d Same as ctrl-g, but applies on the Down option (see page 1253). ctrl-a Same as ctrl-g, but applies on the All option (see page 1253). ctrl-m Same as ctrl-g, but applies on the MSC option (see page 1253). ctrl-e Same as ctrl-g, but applies on the External option (see page 1254). ctrl-f Finds the last occurrence of the first word in the currently select object in the SDL Editor draw ing area and selects it in the This section. The first word is defined as the text string from the start of the object's text and until either: · a ` ` (space) · a `,' (comma) · a `(` (left parenthesis) · a <TAB> · a `\n' (newline). ----------------------------------------------------------------
Table of Contents Next Chapter