Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Rejected : Re: [cdt-patch] K&R C patch


Almost perfect ... except for the following few points:

1.  GNUCSourceParser#declarator() you should defer your call/handling of countKnRCParms() until you are at the point where you see that you are ready to consume function parameters (i.e. right before the label "parameterDeclarationLoop".

2.  Inside GNUCSourceParser#countKnRCParms() you need to make sure that if you are optionally consuming a token that it is represented somehow in the physical AST.  

3.  I would avoid returning early from GNUCSourceParser#declarator() as the current strategy allows for things to be added in only one place.  If I provided another additional language variant construct that I needed represented in the IASTFunctionDeclarator I would have to add it in two places.  

Andrew can perhaps give you some feedback on the CVisitor changes.
Thanks again!

JohnC
www.eclipse.org/cdt


cdt-patch-admin@xxxxxxxxxxx wrote on 01/19/2005 01:27:30 PM:

>
> This patch adds basic K&R C support to the GNUCSourceParser.
> - added support for K&R C syntax
> - added support for ASTProblemDeclaration with faulty K&R C syntax
> - added simple tests
>
> Although K&R C still isn't fully supported and the patch needs the
> following (and will be submitted as a separate patch):
> - getDeclarations(IBinding) support for K&R C
> - check types for K&R C with pointers, etc
> - add test code from GCC Torture tests (mainly the
> snavigator/demo/monop project)
> - support semantic problems such as K&R C parameter declaration that
> has a different type than the prototype
>
> Devin Steffler
> IBM's Eclipse CDT
> Ottawa (Palladium), Ontario, Canada
> [attachment "cdt_core_tests_patch.txt" deleted by John
> Camelon/Ottawa/IBM] [attachment "cdt_core_patch.txt" deleted by John
> Camelon/Ottawa/IBM]

Back to the top