Im trying the define a grammar that can be used to describe the following type of table:
**co1.......**col2.....**col3......
value.......value.......value
value.......value.......value
value.......value.......value
value.......value.......value
.....
with **col1 and **col2 being column names. The format can optionally have additional, predefined columns (eg. let's assume **col4 and **col5 can also be included). I want to write a parser that outputs this format. Can this type of table be described using BNF or EBNF?
From what I have read so far, this is a context-sensitive grammar and thereby cannot be described by BNF or EBNF (I assume this is because row x will only include **col4 if x-1 did so as well). Is this correct? Are there any alternatives to describe the table format above?