To content |
To menu |
- How to install the latest delicious addon on the »
By Alessio on Saturday 5 February 2011, 18:30 - HCB - Hyperlinked C++ BNF Grammar
Version 3.0 of my Hyperlinked C++ BNF
Grammar has been released.
This post is helpful. \nSee you soon
How come there's no ending ';' terminal for the class-specifier rule?
the reason why there's no ending ';' terminal for the class-specifier rule
of my Hyperlinked C++ BNF is that C++ does not put a semicolon in the
The reason for this, to be more precise, is that a class-specifier does not
include itself the semicolon terminal that you see in a declaration: that is
included in the declaration (a class-specifier is part of a declaration, and
the declaration includes the semicolon).
If you continue navigating to decl-specifier-seq, decl-specifier,
type-specifier, you will eventually get to class-specifier.
first up: Many thanks for the HCB! It's really useful for my work in
bringing c++0x support to KDevelop :)
I've spotted an error though:
In lambda-capture you have:
capture-default , capture-default C++0x
this should be:
capture-default , capture-list C++0x
Thanks again, take care!
Thank you, I've fixed that
either expression *or* braced-init-list - not both!
Thanks you for this.
The rule alignment-expression is missing (appear in alignment-specifier)
Nice work. Definitely useful. I am into parsing text (not only c/c++
specific). At the moment I am doing very basic stuff like writing my own
I will keep an eye on HCB. :)
Hi! Thanks for this nice contribution. I am trying to understand what the
role of the sections is. The string "while" is a terminal in both sections
"lex.key" and "stmt.iter". Are these independetly executed on the same source
file? Or one before the other, with the second consuming symbol of the
About the sections, suppose I create the following graph: for each section a
node, and a directed arrow from sections s1 - that use non-terminals from
section s2 - to s2. What should the result look like? a general graph? a
I see nothing in the BNF handling comments?
I am familiar with BNF, but not so familiar with compilation stages.
Do the sections perhaps correspond to lexical states for the tokenizer(looking
at the lex.string section makes me consider this)?
Or am I trying too hard to find a meaning behind the sections and the
nonterminals are simply arranged by topic?
Once again thank you for the BNF, I already see answers to some questions
about C++ I've always had...
Is it possible that "alignment-expression" should be "assignment-expression"
as the former is not well-defined?
alignas ( type-id ...opt ) C++0x
alignas ( alignment-expression ...opt ) C++0x
I started article on Wikipedia about the C++ grammar. Please, take a look:
I will be happy to receive some comment from you about this article. It is also
likely that you may have your own view on how this article should look like.
Your input is welcome.
enum is not appeared in c++0x.
Name or nickname :
Email address :
Website (optional) :
HTML code is displayed as text and web addresses are automatically converted.
Trackback URL : http://blog.alessio.marchetti.name/trackback/585138
This post's comments feed
Attribution-ShareAlike - poweredby - Informations légales