> I've written a recursive-descent EBNF parser to read in language-> definitions, with the goal of generating parsers for these languages.> So as the recursive-descent parser is processing the definition, I> need to build up some appropriate internal-representation of it which> I can then process in order to create the parse-table for a> table-driven parser for that language. I know this should be pretty> straight- forward but the books I've got don't have information on> _generating the table for a table-driven EBNF parser_. I was

Niklaus Wirth uses the same approach in his books on compiler
construction. At least the german edition describes the data
structure for storing the EBNF spec and how traverse it in a
parser:

The advantage of Wirth's implementation usually is that he states
and solves the problem as short and simple as possible.
I am not quite sure if the english edition also presents this
general EBNF parser: