comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Easiest way to use redular expressions?
Date: Tue, 5 Jan 2021 12:20:08 +0100	[thread overview]
Message-ID: <rt1i17$t24$1@gioia.aioe.org> (raw)
In-Reply-To: 87ft3facfz.fsf@nightsong.com

On 2021-01-05 11:46, Paul Rubin wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
>> If somebody is adamant to use patterns, then SNOBOL would be a better
>> choice. It is cleaner, intuitive and more powerful than regular
>> expressions.
> 
> OMG, SNOBOL was fun, but these days, look at Parsec-style parser
> combinators.

The question was about pattern matching vs parsing. Proper parsing is 
clearly preferable to pattern fly-over.

> Parsec is a Haskell library but there are similar things
> in other languages.

Huh, a table driven recursive descent parser with expression inserts is 
all anybody ever needed. I am using this approach for decades 
implementing dozens of crazy domain-specific languages and other 
idiotisms like JSON. Nothing is better, IMO.

And the *best*: recursive descent is not declarative, not FP, not 
juggling standing on the head, it is as imperative and procedural as it 
goes.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

      reply	other threads:[~2021-01-05 11:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-27  8:20 Easiest way to use redular expressions? reinert
2020-12-27  8:36 ` J-P. Rosen
2020-12-27 11:14   ` Emmanuel Briot
2020-12-27 20:31     ` oliverm...@gmail.com
2020-12-28  8:01       ` Per Sandberg
2020-12-28 13:58         ` Maxim Reznik
2020-12-28 21:07 ` Jeffrey R. Carter
2020-12-31 10:29   ` reinert
2021-01-05  1:31 ` Shark8
2021-01-05  9:27   ` Dmitry A. Kazakov
2021-01-05 10:46     ` Paul Rubin
2021-01-05 11:20       ` Dmitry A. Kazakov [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox