Re: Are compiler developers light-years ahead of other software development?

Kaz Kylheku <480-992-1380@kylheku.com>
Sat, 22 Jan 2022 03:01:09 -0000 (UTC)

          From comp.compilers

Related articles
| List of all articles for this month |
From: Kaz Kylheku <480-992-1380@kylheku.com>
Newsgroups: comp.compilers
Date: Sat, 22 Jan 2022 03:01:09 -0000 (UTC)
Organization: A noiseless patient Spider
References: 22-01-059
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="14298"; mail-complaints-to="abuse@iecc.com"
Keywords: theory, comment
Posted-Date: 21 Jan 2022 22:26:48 EST

On 2022-01-16, Roger L Costello <costello@mitre.org> wrote:
> Are compiler developers light-years ahead of other software development?


I'd say it's pretty impressive how, say, the Google Assistant can speak
completely naturally (and in multiple languages). I mean, details like
intonation across entire sentences and such; nothing "robot-like".


Fantastic advances have been done in computer graphics in the last 30
years.


Compilers don't all use fancy algorithms, or not all of them. Fancy
algorithms are specialized, optimized (in particular ways) solutions to
problems that have other solutions that are pedestrian. Sometimes the
other solutions are actually faster on your input cases.


None of the buzzwords you mentioned related to parsing are needed in
building a compiler: grammars, LL, LR, first() function, following()
function, parsing tables, etc.


All that goes away if you write recursive descent parser. The grammar is
then in the documentation and code comments only, and somewhat expressed
in its code structure. There is no LR, first or follow, no tables.


The GNU C++ compiler, undeniably a production compiler and a
major/known/widely-used one, has a big recursive-descent parser
maintained by hand: over a megabyte of code.


In other words, a major compiler for probably the programming language
with the most complicated syntax ever, eschews pretty much all that we
have learned and accumulated about parsing between around 1968 and now.


--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
[In principle a r-d parser recognizes an LL(1) grammar, in practice people
often cheat a little. -John]


Post a followup to this message

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