<div dir="ltr">On Wed, Jan 9, 2013 at 7:58 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="im">On Tue, Jan 8, 2013 at 10:35 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra">Look at the grammar from the back of K&R. It requires TYPE tokens when you have definitions. However,</div>
<div class="gmail_extra">the lexer will produce an ID token unless you look it up in a table. So this is feedback from the 'typedef'</div>
<div class="gmail_extra">to the lexer.</div></blockquote><div><br></div></div><div>You're referring to </div><div><br></div><div><a href="http://en.wikipedia.org/wiki/The_lexer_hack" target="_blank">http://en.wikipedia.org/wiki/The_lexer_hack</a><br>
</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_extra">
So we at least need feedback to the lexer from the parse. I know we need feedback from cpp</div>
<div class="gmail_extra">to the lexer. I will think of it.</div></blockquote></div></div><br></div><div class="gmail_extra">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.</div>
</div>
</blockquote></div><br>But it makes it impossible to go back to the source that produced it, which someone we let compiler people</div><div class="gmail_extra">get away with. If you really want to understand what is happening, you have to put the preprocessor info in</div>
<div class="gmail_extra">your AST.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> Matt<br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>