Please take this question with a grain of salt. I'm trying to write a very simple layout engine and wanted to formally create a grammar to parse the input. I stayed up all night researching LL(k) parsers - mostly from papers from different colleges. They tend to use the same examples and I've never been a fan of abstracting through notation, so I'm almost positive I have the syntax incorrect.
The input is very trivial:
header>rows>h-row>a|b
main>rows>m-row>qs|d
qs>qs-row>qa|qu
footer>rows>f-row>a|b
And this is the grammar definition:
S -> aBC
B -> op
C -> a
First:
S: [a]
B: [>, |, /]
C: [a]
Follow:
S: $
C: $
B: C | S