[bitc-dev] Quick haskell question
Ben Karel
eschew at gmail.com
Thu Aug 12 06:06:29 PDT 2010
On Thu, Aug 12, 2010 at 1:07 AM, Jonathan S. Shapiro <shap at eros-os.org>wrote:
> On Wed, Aug 11, 2010 at 5:19 PM, Ben Karel <eschew at gmail.com> wrote:
>
>> ...you implement the shunting yard algorithm (or whatever) as a
>> post-processing pass, like Mark P. Jones described.
>
>
> This is a great example of a place where "lore" got in my way. The
> "shunting yard algorithm" is apparently a well-known technique, but I
> haven't found mention of it in anything that I have tried to read on the
> subject of mixfix parsing.
>
I agree, it's a shame that it's not taught or talked about much, and instead
we're taught to mangle our grammars, ending up with e.g. Python's 14
productions dedicated to encoding precedence. I first saw operator
precedence parsing presented in Chris Lattner's Kaleidoscope tutorial for
LLVM. It took me a while to appreciate just how useful the idea was, but
kudos to Chris for including it in the tutorial.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20100812/22db355c/attachment.html
More information about the bitc-dev
mailing list