DC-WG: Syntax of DCDL

David Barton (dlb@wash.inmet.com)
Mon, 25 Jan 1999 10:42:45 -0500

I enclose below my first crack at the DCDL syntax. Comments and
questions are, of course, welcome.

Dave Barton <*>
dlb@averstar.com )0(
http://www.averstar.com/~dlb
----------------------------------------------------------------
This is a definition of the DCDL syntax, with the following
conventions:

<*> stands for BNF sequencing.

<|> stands for BNF alternation.

pList stands for a list of the given parser.

"key <string>" stands for a keyword, where the string is a keyword or
symbol.

I have prefixed each real BNF line with a "> ", to identify them
uniquely. (Note: this also lets me run a language processor on them,
to make sure they are right).

> constraint = function_id <*> pList parameter

> parameter = named_parameter <|> positional_parameter

> named_parameter = key "-" <*> parameter_id <*> positional_parameter

> positional_parameter = argument_name <|> number

> argument_name = iden

> parameter_id = iden

> function_id = iden

> number = num <*> key "." <*> num

In the above, "num" and "iden" agree with the following (Emacs)
regular expressions:

> iden = [a-zA-Z][a-zA-Z_]*

> num = [0-9]*

I have followed the normal convention of using a prefix
("function_"id) to point out identifiers of a particular type. In the
above, all of these are set equal to iden.

Comments and corrections are, of course, welcome; this is nothing more
than a formalization of Mark Hahn's examples of about four weeks ago.