[petsc-dev] Documentation comment support

Jed Brown jedbrown at mcs.anl.gov
Wed Jan 9 08:24:07 CST 2013


Same for good error messages, which is why clang keeps it around.
On Jan 9, 2013 8:20 AM, "Matthew Knepley" <knepley at gmail.com> wrote:

> On Wed, Jan 9, 2013 at 7:58 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
>> On Tue, Jan 8, 2013 at 10:35 PM, Matthew Knepley <knepley at gmail.com>wrote:
>>
>>> Look at the grammar from the back of K&R. It requires TYPE tokens when
>>> you have definitions. However,
>>> the lexer will produce an ID token unless you look it up in a table. So
>>> this is feedback from the 'typedef'
>>> to the lexer.
>>>
>>
>> You're referring to
>>
>> http://en.wikipedia.org/wiki/The_lexer_hack
>>
>>
>>> So we at least need feedback to the lexer from the parse. I know we need
>>> feedback from cpp
>>> to the lexer. I will think of it.
>>>
>>
>> No, CPP runs completely before anything else is done; there is no
>> "feedback". This is also a debugging feature, e.g., you send a preprocessed
>> source file when reporting a compiler bug so that the compiler devs don't
>> have to reproduce your environment.
>>
>
> But it makes it impossible to go back to the source that produced it,
> which someone we let compiler people
> get away with. If you really want to understand what is happening, you
> have to put the preprocessor info in
> your AST.
>
>    Matt
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130109/47dd42ef/attachment.html>


More information about the petsc-dev mailing list