Slight mistake in the documentation

Benedikt Huber benedikt.huber at gmail.com
Thu Feb 12 07:58:24 EST 2009


> 2009/2/10 Gregory Crosswhite <gcrosswhite at gmail.com>:
>> Hey everyone,
>>
>> First, thank you so much for creating this library!  I looked around
>> at a number of parsers and this was the obvious one to choose because
>> of the very nice documentation that make it very easy to see how the
>> internal representation of the AST is structured.
I'm glad you find the documentation useful.

>> I apologize if this is not the correct venue for this posting, but
>> there is a slight mistake in the documentation.  One of your examples
>> for an initialization list using array designators (just under "type
>> CInitList = ...") is:
>>
>>        -- { [0], [3] = 4, [2] = 5, 8 }
>>
>> However, this does not actually parse.  The correct example should be
>>
>>        -- { [0] [3] = 4, [2] = 5, 8 }
>>
>> i.e., with the comma removed between [0] and [3].
Thanks for pointing this out.
Actually, I think there was another mistake in the examples, so I  
improved the documentation a little, also showing the type of the C  
variable initialized.
I hope it is correct now, and helps to clarify the semantics of  
initializer list.

http://code.haskell.org/~bhuber/docs/language-c-latest/Language-C-Syntax-AST.html#v%3ACInitList

--
benedikt





More information about the Language-c mailing list