|
Extended Backus-Naur Form (EBNF)
EBNF is used to describe the formal grammar of a language. A rule has the form 'symbol ::=
expression'. If a symbol is defined by a regular expression then it has an initial capital letter, otherwise it has an initial lower case letter. Following table lists the EBNF definition.
#xN |
N is a hexadecimal integer. a character in ISO/IEC 10646 |
'string' |
matches a literal string that inside |
"string" |
the single and double quotes |
[a-z] |
matches any character from a to z |
[^a-z] |
matches any character outside the ranage a to z |
[^abc] |
matches any character not among the given character |
(expr) |
is a unit |
A? |
is optional A; matches A or nothing |
A* |
matches zero or more occurences of A |
A+ |
matches one or more occurences of A |
A B |
matches A followed by B |
A|B |
matches A or B but not both |
A-B |
matches A but does not match B |
|
Copyright© 2000-2002, Neatware. All Rights Reserved.
|
|