tech-invite   World Map     

3GPP     Specs     Glossaries     Architecture     IMS     UICC       IETF     RFCs     Groups     SIP     ABNFs       Search

Augmented Backus-Naur Form (ABNF) Notation and Rules
RFC 5234

 

Here        Top        Up        Prev        None
(3 of 3)

|   Core rules   |   Operators   |   Definition   |


rulelist   =
1*( rule  /  ( *c-wsp   c-nl ) )
Up

rule   =
rulename
defined-as
elements
c-nl
; continues if next line starts with white space
Up

rulename   =
ALPHA   *( ALPHA  /  DIGIT  /  "-" )
Up

defined-as   =
*c-wsp   ( "="  /  "=/" )   *c-wsp
; basic rules definition and incremental alternatives
Up

elements   =
c-wsp   =
WSP  /  ( c-nl   WSP )

c-nl   =
comment  /  CRLF
; comment or newline
Up

comment   =
";"   *( WSP  /  VCHAR)   CRLF
Up

alternation   =
concatenation   *( *c-wsp   "/"   *c-wsp   concatenation )
Up

concatenation   =
repetition   *( 1*c-wsp   repetition )
Up

repetition   =
repeat ]   element
Up

repeat   =
1*DIGIT  /  ( *DIGIT   "*"   *DIGIT )
Up

element   =
rulename  /  group  /  option  /  char-val  /  num-val  /  prose-val
Up

group   =
"("   *c-wsp   alternation   CRLF   *c-wsp   ")"
Up

option   =
"["   *c-wsp   alternation   CRLF   *c-wsp   "]"
Up

char-val   =
DQUOTE   *( %x20-21  /  %x23-7E )   DQUOTE

; quoted string of SP and VCHAR without DQUOTE
;
; NOTE: ABNF strings are case-insensitive.
;     Hence: rulename = "abc" and: rulename = "aBc"
;     will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and "ABC".
;     To specify a rule that IS case SENSITIVE, specify the characters individually.
;         For example:
;             rulename = %d97 %d98 %d99
;             or
;             rulename = %d97.98.99
;         will match only the string that comprises only the lowercased characters, abc.

Up

num-val   =
"%"   ( bin-val  /  dec-val  /  hex-val )
Up

bin-val   =
"b"   1*BIT   [ 1*( "."   1*BIT )  /  ("-"   1*BIT) ]
; series of concatenated bit values or single ONEOF range
Up

dec-val   =
"d"   1*DIGIT   [ 1*( "."   1*DIGIT   /  ("-"   1*DIGIT ) ]
Up

hex-val   =
"x"   1*HEXDIG   [ 1*( "."   1*HEXDIG )  /  ( "-"   1*HEXDIG ) ]
Up

prose-val   =
"<"   *( %x20-3D  /  %x3F-7E )   ">"

; bracketed string of SP and VCHAR without angles
; prose description, to be used as last resort

Up