Questions tagged [abnf]

Augmented Backus–Naur Form (ABNF) is a metalanguage based on Backus–Naur Form (BNF)

In computer science, Augmented Backus–Naur Form (ABNF) is a metalanguage based on Backus–Naur Form (BNF), but consisting of its own syntax and derivation rules. The motive principle for ABNF is to describe a formal system of a language to be used as a bidirectional communications protocol.

via: Wikipedia

38 questions
0
votes
1 answer

Is there a metalanguage, similar to BNF that can concisely describe self-describing data?

Say for instance I had a data set that was self describing. The first few well-structured records define data type IDs, which include the name and length of records, followed by content records, which start with the data IDs and contain a variable…
Mike Godin
  • 3,727
  • 3
  • 27
  • 29
0
votes
0 answers

Expanding SPF macros

I'm trying to implement a check_host function based on the SPF RFC7208. It is almost ready and the thing that has left is the macro expansion detailed in section 7 (https://www.rfc-editor.org/rfc/rfc7208#section-7). I know there are readily…
0
votes
1 answer

Does the order of rules in ABNF matter?

Does the order of rules in Augmented Backus-Naur Form matter? In particular, are a = b b = c and b = c a = b the same? What about a = b a =/ c and a =/ c a = b ? Would it be possible to have a rule using =/ without a rule of the same name using…
Xandaros
  • 645
  • 1
  • 6
  • 17
0
votes
1 answer

Is it acceptable for the qvalue to be "1." or "0." based on RFC7231 (HTTP 1.1)?

Is it acceptable for the QVALUE to be "1." or "0." in, say, the Accept-Language header? e.g. Accept-Language: en;q=1. or Accept: text/plain;q=0. RFC7231 (and RFC2616) which specifies the ABNF for QVALUE as follows: weight = OWS ";" OWS "q="…
ioquatix
  • 1,411
  • 17
  • 32
0
votes
2 answers

Parse::ABNF perl usage

I need to parse the SIP headers (grammar in ABNF format) and verify if my Header strings are ok or not. (Example: check strings like "Accept: application/sdp,application/3gpp-imp+xml" to provide testcase pass/fail). Currently I am trying to use…
0
votes
1 answer

Optional sequence rule clarification

3.8. Optional Sequence: [RULE] Square brackets enclose an optional element sequence: [foo bar] is equivalent to *1(foo bar). The above section from RFC5234 seems not correct to me. I think this is because the optional…
canoe
  • 1,273
  • 13
  • 29
0
votes
1 answer

What is the proper way to encode an AMF0 StrictArray

After overviewing the AMF0 specification I find that I cannot understand the proper way to encode the StrictArray type. Here is the most immediate section of the specification: array-count = U32 strict-array-type = array-count *(value-type) which…
Emily Mabrey
  • 1,528
  • 1
  • 12
  • 29
-4
votes
1 answer

The complex ABNF rule converts to a regex

This is hard to me. How to convert below ABNF rule to a regex? *((*LF *CR *(\x0 / text) *CR *LF) / CRLF)
canoe
  • 1,273
  • 13
  • 29
1 2
3