The rules of C++ as encountered so far. LEXICAL RULES, spaces not allowed --------------------------------- number optional + or - then any number of digits, including none, A then optional . then any number of digits, including none, B, num digits in A and B must be > 0 then optional ( e or E then optional + or - then any number of digits, but at least one ) string " then any number of characters except ", zero chars is allowed then " char ' then one character but not ' then ' name letter or underline then any number of letters, digits, and underlines SYNTACTICAL RULES, spaces allowed --------------------------------- simple-expression number or string or true or false or char or name dyadic-op + or - or * or % or <= or ..... prefix-op + or - or ! or ..... postfix-op ++ or -- or .... type int or double or string or ... param-def optional const then type then name param-defs param-def then optional any number of ( , then param-def ) function-call name then ( then optional expression then any number including zero of , then expression then ) expression simple-expression or expression then dyadic-op then expression or prefix-op then expression or expression then postfix-op or expression then ? then expression then : then expression or function-call or ( then expression then ) if-statement if then ( then expression then ) then statement then optional else then statement return-statement return then optional expression then ; compound-statement { any number of, including none statement } statements expression then ; or if-statement or return-statement or compound-statement const-def const then type then name then = then expression then ; func-def type then name then ( then optional param-defs then ) compound-statement definition const-def or func-def directive #include then string or < then name then > program any number of, but at least one definition or directive