From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e0fa6eae2c537e3d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 24 Mar 2011 16:12:22 -0500 Newsgroups: comp.lang.ada Date: Thu, 24 Mar 2011 17:12:04 -0400 From: "Peter C. Chapin" Subject: Re: GNAT.Regpat problem. In-Reply-To: <5exbsdc3coio.1ke3vi3sk7ss4.dlg@40tude.net> Message-ID: References: <41cae3ac-97b6-4b01-ad73-9ff1ec2fdf86@q12g2000prb.googlegroups.com> <1thhy53rdlhrs.1tygcc01f6i11$.dlg@40tude.net> <5exbsdc3coio.1ke3vi3sk7ss4.dlg@40tude.net> User-Agent: Alpine 2.00 (WNT 1167 2008-08-23) X-X-Sender: pcc09070@vtc.vsc.edu@webmail.vtc.edu MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-shPVJ+eMUjzZuvA0RQuqzuypti1RGY5SuVz9GosjWHwRpmSxMypR/fcIUxMryfvFoE4qGLaJwy6nLW5!uU6BzFdDI9d5pDFjiQoAWGXMyT7dnjKZNl0YaxHozDeV1MKCCoMRmSTCkpt3aZORkYtx004i+g== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2292 Xref: g2news2.google.com comp.lang.ada:19405 Date: 2011-03-24T17:12:04-04:00 List-Id: 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