comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <PChapin@vtc.vsc.edu>
Subject: Re: GNAT.Regpat problem.
Date: Thu, 24 Mar 2011 17:12:04 -0400
Date: 2011-03-24T17:12:04-04:00	[thread overview]
Message-ID: <alpine.WNT.2.00.1103241708520.7004@WHIRLWIND> (raw)
In-Reply-To: <5exbsdc3coio.1ke3vi3sk7ss4.dlg@40tude.net>

On Thu, 24 Mar 2011, Dmitry A. Kazakov wrote:

> So, yes, it is difficult to find a case where RE could find place. And in 
> general, any patterns are unusable for syntax analyzers for many reasons, 
> I don't want to go into. A manually written scanner is simpler and safer.

I did notice that it was harder, I thought, to get high quality error 
reporting when using packaged REs. I also had a case that used a hand 
written finite state machine. The code was longer but the error reporting 
was very specific. I'm not saying it would be impossible to get the same 
error reporting using REs but it seemed unnatural. Right now my code using 
REs just reports "Unrecognized input" (or something to that effect) and 
doesn't bother trying to figure out what's unrecognized and why. It was no 
big deal to get the hand written FSM to do that, however.

Peter



  parent reply	other threads:[~2011-03-24 21:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-22 18:35 GNAT.Regpat problem Peter C. Chapin
2011-03-22 19:01 ` Georg Bauhaus
2011-03-22 19:17 ` Florian Weimer
2011-03-22 19:21 ` Adam Beneschan
2011-03-22 20:31   ` Simon Wright
2011-03-24 10:23     ` Peter C. Chapin
2011-03-24 10:43       ` Dmitry A. Kazakov
2011-03-24 14:04         ` Peter C. Chapin
2011-03-24 14:34           ` Dmitry A. Kazakov
2011-03-24 16:20             ` Georg Bauhaus
2011-03-24 17:37               ` Dmitry A. Kazakov
2011-03-24 21:12             ` Peter C. Chapin [this message]
2011-03-25  9:02               ` Dmitry A. Kazakov
2011-03-24 16:41           ` Georg Bauhaus
replies disabled

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