RE: C++ intermediate representation.

Quinn Tyler Jackson <quinn-j@shaw.ca>
15 May 2005 16:17:26 -0400

          From comp.compilers

Related articles
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-14)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-14)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-14)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-15)
Re: C++ intermediate representation. comeau@panix.com (2005-05-15)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-15)
RE: C++ intermediate representation. quinn-j@shaw.ca (Quinn Tyler Jackson) (2005-05-15)
Languages that are hard to parse steve@rh12.co.uk (Steve) (2005-05-16)
Re: Languages that are hard to parse DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-05-18)
Re: Languages that are hard to parse gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-18)
Re: Languages that are hard to parse Peter_Flass@Yahoo.com (Peter Flass) (2005-05-19)
Re: Languages that are hard to parse gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-20)
[2 later articles]
| List of all articles for this month |

From: Quinn Tyler Jackson <quinn-j@shaw.ca>
Newsgroups: comp.compilers
Date: 15 May 2005 16:17:26 -0400
Organization: Compilers Central
References: 05-05-119
Keywords: C++, parse
Posted-Date: 15 May 2005 16:17:26 EDT

I said:


> >As someone who has attempted to write a complete formal grammar
> >specification for C++ without jimmying and ad hockery -- I attest to
> >the fact that it's one nasty language to parse -- but a great test of
> >a grammar formalism!


Greg Comeau replied (in small part):


> If nothing else, a lot of fun :) After all, programming should be
> enjoyable, right?


Yes, certainly, and maybe even challenging. Hard to parse languages
(such as C++ and Perl) beat the heck out of a parsing engine. I'm glad
for languages like C++ and Perl when it comes to the challenges they
present to parsing technology. They push the envelope and convince me
that parsing is not the solved problem so many seem to assume it is.


Enhancements made specifically to deal with C++/Perl parsing issues
came in useful with parsing genetic pseudoknots in linear time, for
example. In 2000, a very small subset of C++, when parsed with an
adaptive engine, did so in exponential time, and now does it in linear
time, with a smaller constant than the LR(1) parser with hand
optimized lexical analyzer that someone sent me as a benchmark against
which to measure test runs. The optimizations made to the engine as a
result of that C++ parsing bench mark have had an overall effect
across the system.


It's either all a lot of fun -- or some of us are just quite
unimaginative in how we elect to pass our idle hours. ;-)


--
Chev. Quinn Tyler Jackson
http://members.shaw.ca/qjackson/


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.