BNF questions and comments
    BCS 
    ao at pathlink.com
       
    Thu Sep  6 23:15:27 PDT 2007
    
    
  
under LinkageType what (from a lexical standpoint) are C, C++, D, etc?
===
under  Conditional Compilation:
ConditionalDeclaration:
    Condition : Declarations
Condition:
    StaticIfCondition
StaticIfCondition:
    static if ( AssignExpression )
allowing this:
static if(0==0) : int i;
Is this supposed to work? If so what for?
===
BaseClassList under NewExpression uses a lowercase for the L in list where 
an upper case is used where it is defined.
===
What about with:
ClassTemplateDeclaration:
    class Identifier ( TemplateParameterList ) [SuperClass {, InterfaceClass 
}] ClassBody
why isn't BaseClassList used?
this as far as I can tell BaseClassList doesn't require a comma (but dmd 
doesn't let you drop it) and the above grammar requires a base class before 
interfaces (and DMD doesn't require this)
===
CatchParameter 
ExpressionList
FunctionParameterList
ModuleAliasIdentifier
TemplateIdentifier
Tuple
IntegerExpression (in iasm.html)
===
are not defined
ClassTemplateDeclaration
FunctionTemplateDeclaration
ConditionalDeclaration
TemplateMixin
TemplateDeclaration
StaticAssert
are never used
===
LabelledStatement is misspelled in it's definition
===
The format of the bnf section is not consistent. Off hand:
-many productions are missing the :
-in most cases operators are unquote but in a few they are
-opt is used in a few cases but general omitted in favor of other choices
-grouping is used in 1 or 2 cases but again is generally not used.
-in two(?) places the "empty" production is used.
this all comes from extracting the grammar from the docs. I would like to 
be able to automate this but having these discrepancies requires that I do 
it by hand.
    
    
More information about the Digitalmars-d-learn
mailing list