4

Is there an open source machine-readable grammar for HTTP/1.1 requests and responses? Specifically, i'm looking for a grammar that is accepted by one of the popular parser generators (e.g., ANTLR, CUP, BNFC, ...).

user278559
  • 121
  • 4

2 Answers2

1

You can try Mongrel's grammar that uses ragel. It's regular and therefore faster.

1

There's improved (i.e., more exact, less idiomatic, and "pure") ABNF in HTTPbis; see the drafts linked from http://tools.ietf.org/wg/httpbis/ or collected at http://greenbytes.de/tech/webdav/httpbis.abnf

Mark Nottingham
  • 5,546
  • 1
  • 25
  • 21