Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Metalanguage Description

Draft MDC Standard

5. Metalanguage Description

The primitives of the metalanguage are the ASCII characters. The metalanguage operators are defined as follows:

OperatorMeaning
::=definition
[ ]option
| |grouping
...optional indefinite repetition
Llist
Vvalue
OBopen bracket
CBclose bracket
SPspace
VBvertical bar

The following visible representations of ASCII characters required in the defined syntactic objects are used: SP (space), CR (carriage-return), LF (line-feed), FF (form-feed), and VB (vertical bar). Also, where necessary to avoid confusion with the “option” metalanguage operator, OB is used to represent the open bracket character ( [ ) and CB is used to represent the close bracket character ( ] ).

In general, defined syntactic objects will have designators which are underlined names spelled with lower case letters, e.g., name, expr, et cetera. Concatenation of syntactic objects is expressed by horizontal juxtaposition, choice is expressed by vertical juxtaposition. The ::= symbol denotes a syntactic definition. An optional element is enclosed in square brackets [ ], and three dots ... denote that the previous element is optionally repeated any number of times. The definition of name, for example, is written:

    name::=

%
ident




digit
ident


...

The vertical bars are used to group elements or to make a choice of elements more readable.

Special care is taken to avoid any danger of confusing the square brackets in the metalanguage with the ASCII graphics OB and CB. Normally, the square brackets will stand for the metalanguage symbols.

The unary metalanguage operator L denotes a list of one or more occurrences of the syntactic object immediately to its right, with one comma between each pair of occurrences. Thus,

L name
is equivalent to
name [ , name ] ...

The binary metalanguage operator V places the constraint on the syntactic object to its left that it must have a value which satisfies the syntax of the syntactic object to its right. For example, one might define the syntax of a hypothetical EXAMPLE command with its argument list by

    examplecommand::= EXAMPLE SP L exampleargument

where

    exampleargument::=

expr
@ expratom V L exampleargument


This example states: after evaluation of indirection, the command argument list consists of any number of exprs separated by commas. In the static syntax (i.e., prior to evaluation of indirection), occurrences of @ expratom, that evaluate to valid arguments for the command EXAMPLE, may stand in place of non-overlapping sublists of command arguments. Usually, the text accompanying a syntax description incorporating indirection will describe the syntax after all occurrences of indirection have been evaluated.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 16-Nov-2023, 17:52:46.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)