From the spirit introduction : Expression templates allow us to approximate the syntax of Extended Backus-Normal Form (EBNF) completely in C So you can almost write plain EBNF, no need for a translator I'm not so familiar with spirit to know how exactly the syntax is different, but if the differences of spirit C++ EBNF and real EBNF are minor a simple sed script may suffice If not you are right, you could write a spirit parser that understands EBNF and then use the AST to create C++ code that is a spirit representation of that AST.
From the spirit introduction: Expression templates allow us to approximate the syntax of Extended Backus-Normal Form (EBNF) completely in C++. So you can almost write plain EBNF, no need for a translator. I'm not so familiar with spirit to know how exactly the syntax is different, but if the differences of spirit C++ EBNF and real EBNF are minor a simple sed script may suffice.
If not you are right, you could write a spirit parser that understands EBNF and then use the AST to create C++ code that is a spirit representation of that AST.
For large EBNFs (grammatica.percederberg. Net/grammar/asn1/asn1. Grammar), even thou it's almost identical, it's still a pain.It's not necessary to have one, but it would be helpful.
– chila May 29 '09 at 1:01 If your Grammar is that large, you probably don't want to use Spirit for it ;) – Billy ONeal May 31 '09 at 4:05 @Bill: why not? – Diego Sevilla Apr 6 at 13:56 @Diego: Couple of things here -- Spirit has been almost completely rewritten since I posted this answer -- now the correct tool to use would be boost::spirit::qi and it's a lot better. But my biggest older complaints with Spirit are still there.
1. If your grammar has a syntax error, lord help the poor soul who has to decipher the template error messages it generates.2. Compile times are extremely long even for relatively simple grammars.
– Billy ONeal Apr 6 at 15:19.
Expression templates allow us to approximate the syntax of Extended Backus-Normal Form (EBNF) completely in C++. So you can almost write plain EBNF, no need for a translator. I'm not so familiar with spirit to know how exactly the syntax is different, but if the differences of spirit C++ EBNF and real EBNF are minor a simple sed script may suffice.
If not you are right, you could write a spirit parser that understands EBNF and then use the AST to create C++ code that is a spirit representation of that AST.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.