Please take this question with a grain of salt. I'm trying to write a very simple design engine and I wanted to formally create a grammar to analyze the input. I stayed up all night investigating LL (k) analyzers, mainly documents from different universities. They tend to use the same examples and I've never liked to abstract through the notation, so I'm pretty sure I have the wrong syntax.
The entry is very trivial:
header> rows> h-row> a | b main> rows> row-m> qs | d qs> qs-row> qa | what footer> rows> row-f> a | b
And this is the grammatical definition:
S -> aBC B -> op C -> a
S: [a] SECOND: [>, |, /] DO: [a]
S: $ C: $ B: C | S