2 ms·
The main compilers for PHP, Ruby, and Go all do, although gcc uses a handwritten one now http://en.m.wikipedia.org/wiki/GNU_bison http://en.m.wikipedia.org/wiki
by patmcguire 13y ago
The main compilers for PHP, Ruby, and Go all do, although gcc uses a handwritten one now http://en.m.wikipedia.org/wiki/GNU_bison http://en.m.wikipedia.org/wiki/GNU_bison
Do those not count? What are the tradeoffs to doing it from scratch?
- seanmcdirmid 13y agoScala and C# are by hand. I imagine C++ is also since there is no other way to do it. Java uses JavaCC, Lua is by hand Using tools is often more complicated than just writing code, it isn't that hard to write a recursive descent parser, and you have the flexibility if loading it with all the error recovery you want. What tools give you is potentially better parser performance and more theoretic assurances (useful for tricky grammars).
- platz 13y agoAfter the comments I've seen from paulp, I'd hardly believe that way Scala did this was optimal, although I'm not sure there were any issues with lexing & parsing
- seanmcdirmid 13y agoIt's not optimal and it doesn't matter considering parsing overhead is just noise compared to type system computations.