Boost.Spirit brings the EBNF grammar language into native C ++, albeit with slightly different syntax and lots of extras.
Reading the Wikipedia article on EBNF , more specifically the examples section , I noticed that the EBNF grammar itself can be written in EBNF. It caused something in my head.
Can Boost.Spirit be used to create an arbitrary Boost.Spirit grammar (minus the semantic actions I assume) from an EBNF text form? Could this be at run time or should this grammar converter work as a precompilation step? That would make sense that it makes the definition of the grammar more accessible than the raw code of Boost.Spirit, although it is indeed a transliteration of the grammar itself.
source
share