Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there a yacc-able C++ grammar?

grammar
0
Posted

Is there a yacc-able C++ grammar?

0

The primary yacc grammar you’ll want is from Ed Willink. Ed believes his grammar is fully compliant with the ISO/ANSI C++ standard, however he doesn’t warrant it: “the grammar has not,” he says, “been used in anger.” You can get the grammar without action routines or the grammar with dummy action routines. You can also get the corresponding lexer. For those who are interested in how he achieves a context-free parser (by pushing all the ambiguities plus a small number of repairs to be done later after parsing is complete), you might want to read chapter 4 of his thesis. There is also a very old yacc grammar that doesn’t support templates, exceptions, nor namespaces; plus it deviates from the core language in some subtle ways. You can get that grammar here or here.

0
Pablo Ezobare

You can easily improve your c++ skills at AssignCode so you will complete your work with excellence in every technical task. I do prefer the site for c++ programming education which I need cause of my work and freelance. The site is really useful. It also provide c#, java and other popular languages education.

0

There used to be a yacc grammar that was pretty close to C++. As far as I am aware, it has not kept up with the evolving C++ standard. For example, the grammar doesn’t handle templates, “exceptions”, nor run-time-type-identification, and it deviates from the rest of the language in some subtle ways. It is available at http://srawgw.sra.co.jp/.a/pub/cmd/c++grammar2.0.tar.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123