MXP –
EBNF – Version 1.0
Updated: 8/6-2003
Author:
Varmel
This
is a small MXP
reference. This is a EBNF so it is a bit different than an usual BNF.
Things between [] means that they are optional, and things between {}
can be repeated zero or more times. The syntax (A|B|C) means that one
may be chosen, either A, B, or C. The strings in bold are the
terminals, and the other strings are nonterminals. Some of the
nonterminals I have not declared in this BNF as their name should
show what they are. A few of the terminals have parts of them
underlined. Like the VAR one looks like <VAR
name....> which means that you can also use
<V name...>.
How do I read the EBNF?
To read a BNF isn't
very difficult, once you begin to get used to it =). A BNF is built
up of something called productions. A production has a
nonterminal on its left side, and nonterminals/terminals on its right
side. Usually the terminals are written in bold characters, but the
nonterminals aren't. A nonterminal on the right side of a production
refers to a production that contains that nonterminal on its left
side. I'll show an example:
a
::= c d
d ::= e
| f
The
above rules can generate strings that begin with a 'c' and ends with
either a 'e' or a 'f'. The '|' symbol should be read as 'or'. The 'a'
is the start symbol. That is where we begin to “read” the
BNF. An EBNF works like this BNF but with the additional rules above.
To sum this up:
1. “a ::= c d” is a
production with the nonterminal 'a' on its left side, and the
terminal 'c' and nonterminal 'd' on its right side.
2.
Nonterminals on the right side of a production can be substituted by
one of the definitions of that nonterminal. (Like we replaced 'd' in
'a' with 'e' but could also have chosen to use 'f').
Please note that there probably are errors in this EBNF. Use it at your own risk :-)
|
EBNF Some
notes: stream ::= {[character] [line_tag] [tag]} line_tag::=
<ESC> [ tagnum z tag ::=
formatting <--- Open tags formatting::=
<BOLD>stream</BOLD> command
::=<!ELEMENT
element-name [definition] [ATT=attribute_list] [TAG=tag]
[FLAG=flags] line_spacing ::=
<NOBR> |
<P> | <BR>
| <SBR> |
version_control
::= <VERSION> optional_tags ::=
<H1>stream</H1> msp ::=
<SOUND (filename|off) V=volume L=repeats
P=priority T=type U=url> custom_element
::= <element_name {ATT=attribute}> stream
</element_name> caption
::= “real_text”
Regular
expressions |
1The list of colornames can be found in the zMUD helpfile called colorname.