3 ms·
They might, although no production quality C or C++ compiler uses anything other than a hand-rolled recursive descent parser, afaik. The lex, parse and AST dir
by nly 11y ago
They might, although no production quality C or C++ compiler uses anything other than a hand-rolled recursive descent parser, afaik.
The lex, parse and AST directories in Clangs source tree are ~100,000 LOC combined, and all hand-written.
- nickpsecurity 11y agoSemantic Designs toolkit uses GLR to handle about everything one could think of: http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html
- marktangotango 11y agoAmbiguous use of 'handle' here. For an ambiguous parse, GLR gives a forest of possible alternatives that still has to be disambiguated. Interesting to see a reference to Semantic Designs here, Ira Baxter used to pimp DMS on stack overflow quite a lot, I have not seen anything from them in years, are they still in business?
- nickpsecurity 11y agoHaving tried to write similar stuff, I was quite impressed with the claimed capabilities of the tool and how they went about it. He summarizes some of the issues here: http://www.semanticdesigns.com/Products/DMS/LifeAfterParsing.html http://www.semanticdesigns.com/Products/DMS/LifeAfterParsing... The stuff they support was also significant. Personally, I always thought they should open-source that then make their money on good front-ends, transformation heuristics, and services. Like LLVM, academic community would make core tool much better over time. Far as in business, site is still up with more content than before and a current copyright. Last news release was 2012. Not sure if that's a bad sign or just a business that focuses less on PR. There's a paper or two in ResearchGate in 2015 promoting it with him still on StackOverflow but with less DMS references because of moderator pressure (explained in his profile). So, probably still in business. My quick, top-of-head assessment of their situation, at least. Might be way off. :)
- alricb 11y agoNot now, no, but back in the 4.0 days (2005) GCC still used a yacc/bison parser for C; it had switched to a hand written parser for C++. The C++ yacc parser was still in use as of GCC 3.3 (2003).