Monthly Archives: September 2010

A chemical formula parser for boost::spirit

Within boost, Spirit is the parser generator framework. As an exercise, a boost::spirit parser is presented for chemical formulas. The parser is compatible with boost version 1.40, hence Spirit classic is used. The BNF grammar is: lowercase_alphabetic character ::= ‘a’ … Continue reading

Posted in C, Howtos | Leave a comment

C++ reflection: extract type inheritance information with code postprocessing

NOTE 1: In the following reflection is meant in the rather narrow sense of the capability of a computer program to observe its own type structure (types, sizes, member layout, member function signatures, inheritance) at run-time. NOTE 2:The following code … Continue reading

Posted in C, Howtos | 2 Comments

Valid identifiers in FORTRAN 66, C, Java , C++ current and future

What’s in a name ? Identifiers are used in modern programming languages to refer to types, classes, variables and object instances. While the first programming languages were resource-constrained and ASCII-centered, modern languages are more flexible with regards to the possible … Continue reading

Posted in C | Leave a comment