comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Easiest way to use redular expressions?
Date: Mon, 4 Jan 2021 17:31:03 -0800 (PST)	[thread overview]
Message-ID: <ef28d54d-b506-4f6b-8efa-69e661ef4b7an@googlegroups.com> (raw)
In-Reply-To: <c61b760c-7f56-4e22-9b40-b863a5544764n@googlegroups.com>

> OK, I assume it somehow breaks the philosophy on Ada and security/reliability. Could someone therefore show a better and more simple way to do this? gnat.expect? 
> 
> reinert
In my career, about 90% of the paid programming has been maintenance.
As such, any time RegEx comes up, I am almost filled with dread: RegEx is terrible, overly limited, often part of a system that easily evolves beyond the constraints that are implied with RegEx (that of being a "regular language"). -- I would go so far as to even advise things like "compiler recognizers" *not* use RegEx.

I've found that an actual parsing system is far preferable to RegEx. In Byron, parsing is trivial:
  I : Integer renames Integer'Wide_Wide_Value( This_Value );
Where "This_Value" is the string in question.
Is it cheating to use the 'Value Attribute? Possibly, but this also provides for consistency between 'Value and the associated integer-value.

  parent reply	other threads:[~2021-01-05  1:31 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 [this message]
2021-01-05  9:27   ` Dmitry A. Kazakov
2021-01-05 10:46     ` Paul Rubin
2021-01-05 11:20       ` Dmitry A. Kazakov
replies disabled

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