title: Writting order of ABNF
body: <p>What order of writing is beneficial to the readability of ABNF?</p>
  <p>In fact, the process of writing ABNF is like traversing an <a href="https://en.wikipedia.org/wiki/Tree_traversal#Infinite_trees" rel="nofollow noreferrer">infinite tree</a>. So what <a href="https://en.wikipedia.org/wiki/Tree_traversal#Types" rel="nofollow noreferrer">tree traversal type</a> should we use? Both types of traversal have their own disadvantages. Breadth-first will separate adjacent rules, which is not conducive to reading. Depth-first will delay further interpretation of the rules, which is not conducive to understanding.</p>
  <p>There is an example in RFC 5234, <a href="https://www.rfc-editor.org/rfc/rfc5234#section-4" rel="nofollow noreferrer">ABNF Definition of ABNF</a>, which did not abide by breadth-first or depth-first. So we can't get inspiration from it.</p>