Reed, On Oct 20, 2011, at 9:47 AM, Reed Kotler wrote:> I would like to see the many adhoc parsers in LLVM get replaced by ones > generated from grammars.FYI, this is very unlikely to happen. The parsers in LLVM were historically generated from grammars (bison, as I recall), and those implementations were removed in favor of hand-written implementations both because the latter were significantly easier to maintain, and because they were much better suited to offer reasonable diagnostics. Any plan to reverse that decisions is likely to meet a lot of resistance. --Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111021/7f11d0c9/attachment.html>
On 10/21/2011 09:28 AM, Owen Anderson wrote:> Reed, > > On Oct 20, 2011, at 9:47 AM, Reed Kotler wrote: >> I would like to see the many adhoc parsers in LLVM get replaced by ones >> generated from grammars. > > FYI, this is very unlikely to happen. The parsers in LLVM /were/ > historically generated from grammars (bison, as I recall), and those > implementations were removed in favor of hand-written implementations > both because the latter were significantly easier to maintain, and > because they were much better suited to offer reasonable diagnostics. > Any plan to reverse that decisions is likely to meet a lot of resistance. > > --OwenI'm not planing to use Bison or YACC or Antlr. I stated that in my email. Don't assume that I'm an idiot although it's a possibility. I've been doing compilers off and on for 35 years now. Ideas in computer science are like fashion in clothes; if you wait around long enough then everything comes back into fashion. All the web and flow of how people do things in compilers has already come and gone many times. Right now it's pretty easy to crash tablegen if you have table errors, for example. That is not exactly giving reasonable diagnostics. It's very hard to write hand written parsers even for simple languages and not have lots of problems. This is compounded over time as things change. Hopefully what I do will meet with acceptance. I'll take that chance. Reed -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111021/5fa2fee3/attachment.html>
On Oct 21, 2011, at 1:14 PM, reed kotler wrote:> On 10/21/2011 09:28 AM, Owen Anderson wrote: >> >> Reed, >> >> On Oct 20, 2011, at 9:47 AM, Reed Kotler wrote: >>> I would like to see the many adhoc parsers in LLVM get replaced by ones >>> generated from grammars. >> >> >> FYI, this is very unlikely to happen. The parsers in LLVM were historically generated from grammars (bison, as I recall), and those implementations were removed in favor of hand-written implementations both because the latter were significantly easier to maintain, and because they were much better suited to offer reasonable diagnostics. Any plan to reverse that decisions is likely to meet a lot of resistance. >> >> --Owen > I'm not planing to use Bison or YACC or Antlr. I stated that in my email. > > Don't assume that I'm an idiot although it's a possibility. I've been doing compilers off and on for 35 years now. Ideas in computer science are like fashion in clothes; if you wait around long enough then everything comes back into fashion. All the web and flow of how people do things in compilers has already come and gone many times.I don't mean to imply about your skillset, or about the implementation of your grammar (which I know nothing about) or generator. I just thought it was important to make sure you're aware that you may be trying to sell the concept to an audience that has rejected similar things in the past. --Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111021/ff58ec73/attachment.html>
On Oct 21, 2011, at 1:14 PM, reed kotler wrote:> On 10/21/2011 09:28 AM, Owen Anderson wrote: >> >> Reed, >> >> On Oct 20, 2011, at 9:47 AM, Reed Kotler wrote: >>> I would like to see the many adhoc parsers in LLVM get replaced by ones >>> generated from grammars. >> >> >> FYI, this is very unlikely to happen. The parsers in LLVM were historically generated from grammars (bison, as I recall), and those implementations were removed in favor of hand-written implementations both because the latter were significantly easier to maintain, and because they were much better suited to offer reasonable diagnostics. Any plan to reverse that decisions is likely to meet a lot of resistance. >> >> --Owen> Right now it's pretty easy to crash tablegen if you have table errors, for example. That is not exactly giving reasonable diagnostics.Reed, as I'm sure you know and can appreciateā¦ the cause of most of these problems is not the parser itself, it's the semantic analysis and other actions that are fired by the parser. I don't see how a machine generated parser helps solve the important problems here. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111021/75c5a23d/attachment.html>