Accepted EBNF Forms

 

EBNF

ISO EBNF

ABNF

XBNF

XML EBNF

Assignment

Name::=E…

Name=E…

Name:SpaceE…

Name->E…

Name=E…

Name=E…

Name::=E…

Name::=E…

Terminal

“…”

‘…’

%bB…

%dD…

%hH…

%xH…

D…

0xH…

“…”

‘…’

“…”

%bB…

%dD…

%hH…

“…”

 

“…”

‘…’

Non-terminal

W…

<…>

W…

 

W…

<…>

W…

<…>

W…

 

Concatenation

(And Then)

Space

,3

W…-W…

,

Space

Space

&

W…-W…

Disjunctive

 

|

/

|

/

|

|

Conjunctive

(And Also)

&

 

 

&

 

Negation

(But Not)

Space-W…

Space-(E…)

 

 

~

 

Optional

[E…]

W…?

(E…)?

[E…]

[E…]

*1…

O(E…)

W…?

(E…)?

Repeat

(zero or more)

{E…}*

{E…}

W…*

{E…}

*W…

*(E…)

#(E…)

W…*

(E…)*

Repeat

(one or more)

{E…}+

{E…}-

 W…+

{E…}-

1*W…

1*(E…)

N(E…)

W…+

(E…)+

Grouping

(E…)

(E…)

(E…)

(E…)

(E…)

Rule termination

;

.

LF

;

LF

.

LF

Range5

Selection5

[E…- E…]*

[E… E… E…]+

 

 

 

[^A-B]

[ABC]

Comment2

(*…*)

/*…*/

;…EOL

…EOL

%%...EOL

(*…*)

;… <EOL>

 

/*…*/

Special

Expressions

?...?

~…

?...?

n*…

n*n

n*m

 

 [WFC: E…]

[VC: E…]

Legend: E… = Expression, W… = Word, D… = Decimal, H… = Hexadecimal, B… = Binary, … = Literal, Space = One or more whitespaces.

Notes on EBNF Forms:

1.    The column titled EBNF indicates the expressions that are recognized by the editor. The first entry in each group represents the default EBNF output form.

2.    Comment fields will show up as inline green text, including if placed within the rule, excluding …EOL, which is not passed through. (Their presents within rules have no effect on any of the operations.)

3.    Any undefined character can be used as a concatenation token.  Terminal values may not even require concatenation symbol, as long as there is a unique character to differentiate adjacent non-terminal values.

4.    Care should be used when terminal values contain quotes within quotes to make the outside quotes different than the inside ones; i.e. double and single. However, ‘’’ and “”” are recognized properly.

5.    Not available in this version.

 

 

EBNF

Comments

Non-terminals

may begin with

Any letter

Including <

If non-terminal starts with < it must end with >
and the second character must be a letter.
The <> will subsequently be stripped from the expression when generating the syntax diagram.

Non-terminals

may contain

Any letter
Any number
Including _ and spaces if inside <…>.  May contain spaces if concatenation uses comma.

For Non-EBNF Uses:
May contain any character except for > if inside <…>.  May not contain “:” followed by a space or end in “.”

Non-terminals

may end with

Any letter

Any number

Including _ >

 

Terminal

“…”

May contain any character except double quote.

Terminal

‘…’

May contain any character except single quote.

Terminal

May start with a number or percent symbol.

Specifically: %bB… %dD… %hH… %xH… D… 0xH…
See legend above.

Concatenation

,

If a comma is detected within a rule but outside a terminal or comment field, the entire file is assumed to use commas for concatenation.