Re: Best language for implementing compilers?

Kaz Kylheku <157-073-9834@kylheku.com>
Sun, 10 Mar 2019 05:40:11 +0000 (UTC)

          From comp.compilers

Related articles
[12 earlier articles]
Re: Best language for implementing compilers? arnold@skeeve.com (2019-02-20)
Re: Best language for implementing compilers? mertesthomas@gmail.com (2019-03-09)
Re: Best language for implementing compilers? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-03-09)
Re: Best language for implementing compilers? bc@freeuk.com (Bart) (2019-03-09)
Re: Best language for implementing compilers? gneuner2@comcast.net (George Neuner) (2019-03-09)
Re: Best language for implementing compilers? gneuner2@comcast.net (George Neuner) (2019-03-09)
Re: Best language for implementing compilers? 157-073-9834@kylheku.com (Kaz Kylheku) (2019-03-10)
Re: Best language for implementing compilers? 157-073-9834@kylheku.com (Kaz Kylheku) (2019-03-10)
Re: Best language for implementing compilers? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2019-03-10)
Re: Best language for implementing compilers? bc@freeuk.com (Bart) (2019-03-10)
Re: Best language for implementing compilers? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-03-10)
Re: Best language for implementing compilers? gneuner2@comcast.net (George Neuner) (2019-03-10)
Re: Best language for implementing compilers? gneuner2@comcast.net (George Neuner) (2019-03-10)
[5 later articles]
| List of all articles for this month |

From: Kaz Kylheku <157-073-9834@kylheku.com>
Newsgroups: comp.compilers
Date: Sun, 10 Mar 2019 05:40:11 +0000 (UTC)
Organization: Aioe.org NNTP Server
References: 19-02-002 19-02-004 19-02-006 19-03-002 19-03-003
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="47916"; mail-complaints-to="abuse@iecc.com"
Keywords: parse
Posted-Date: 10 Mar 2019 01:02:04 EST

On 2019-03-09, Hans-Peter Diettrich <DrDiettrich1@netscape.net> wrote:
> Am 09.03.2019 um 07:47 schrieb mertesthomas@gmail.com:
>
>> For parsing I don't think that pattern matching leads to correct
>> results in all cases. I have seen too much buggy attempts to do
>> parsing with pattern matching. Even for such simple things as
>> lines with key=value I saw "solutions" with pattern matching, that
>> triggered bugs when the line was not simple. A good approach for
>> parsing is LL(1), which has nothing to do with pattern matching.
>
> IMO bottom-up parsers (LR) do pattern matching, in contrast to top-down
> parsers (LL). Where bottom-up parsers can suffer from shift/reduce
> conflicts.


Top-down is still pattern matching!


Match this, then match that, then peek at the next symbol, and choose
among five different functions, each of which match this, match that ...


There is no unravelling of nested syntax without pattern matching
in some shape or form.


LL(1) matching is still a combination of matching a regular language,
with a push-down automaton.


Just because you hand-translate that into recursive-descent code doesn't
mean it ceases to be a regex recognizer with push-down


--
TXR Programming Lanuage: http://nongnu.org/txr
Music DIY Mailing List: http://www.kylheku.com/diy
ADA MP-1 Mailing List: http://www.kylheku.com/mp1


Post a followup to this message

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