The NoCeM BNF

Many thanks to David Formosa for BNF-ifying the NoCeM standard.

Last Updated 2/1/97


NoCeM = Comment Headers Body End Comment

0.1 Comment = { {String} {Newline} }

1 Header = HeaderDelimiter Version {HeaderLine}

1.1 HeaderDelimiter = "@@BEGIN NCM HEADERS" LineTerminator

1.2 Version = "Version: " Number LineTerminator

1.3 HeaderLine = (Issuer| Type | Action | Newsgroup | Count | NoticeId | OtherHeader) LineTerminator

1.3.1 Issuer = "Issuer: " String

1.3.2 Type = "Type: " ( "Spam" | "Spew" | "MMF" | "Content-Based" | "Binary" | "Test" | OtherType)

1.3.2.1 OtherType = String

1.3.3 Action = "Action: " ( "Hide" | "Show" | "None" | OtherAction )

1.3.3.1 OtherAction = String

1.3.4 Newsgroup = "Newsgroup: " NewsgroupName

1.3.4.1 NewsgroupName = NameString { "." NameString }
	;The Same as RFC1036 Newsgroup

1.3.5 Count = "Count: " Number

1.3.6 NoticeId = "NoticeID: " String

1.3.7 OtherHeader = HeadName ": " HeadValue

1.3.7.1 HeadName = String

1.3.7.2 HeadValue = String

2 Body = BodyDelimiter { BodyBlock }

2.1 BodyDelimiter = "@@BEGIN NCM BODY" LineTerminator

2.2 BodyBlock = Message-ID Groupline { Groupline }

2.2.1 Message-ID = "<" String "@" String ">"

2.2.2 Groupline = Tabs Groups LineTerminator

2.2.2.1 Tabs = <TAB> { <TAB> } 

2.2.2.2 Groups = NewsgroupName { " " NewsgroupName }

3 End = "@@END NCM BODY" LineTerminator

EmbeddedComment	= "#" [String] LineTerminator

String = <CHAR>{<CHAR>}

NameString = <ALFA> { <ALFA> | <NUMERIC> | "+" | "-" }

LineTerminator = <CR>
Comments on syntax

" " Represents literals

{ } Represents 0 or more repetitions

( ) Elements enclosed in parentheses are treated as single elements

| Elements separated by a bar are alliteratives

Whitespace outside of literals is ignored and simply there for clarity.


Email: moose@cm.org