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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,45d3652405dab08f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-03 01:25:59 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!nnrp6.proxad.net.POSTED!not-for-mail Sender: briot@berlin.int.act-europe.fr Newsgroups: comp.lang.ada Subject: Re: Regular expressions??? References: From: Emmanuel Briot Message-ID: X-Newsreader: Gnus v5.7/Emacs 20.4 Date: Tue, 03 Jul 2001 08:25:58 GMT NNTP-Posting-Host: 213.228.58.169 X-Complaints-To: abuse@proxad.net X-Trace: nnrp6.proxad.net 994148758 213.228.58.169 (Tue, 03 Jul 2001 10:25:58 CEST) NNTP-Posting-Date: Tue, 03 Jul 2001 10:25:58 CEST Organization: Guest of ProXad - France Xref: archiver1.google.com comp.lang.ada:9362 Date: 2001-07-03T08:25:58+00:00 List-Id: "M. A. Alves" writes: > > If you are going to hunt around for a RE package in Ada, you can also hunt > > around for an XML package. You could have a look at http://libre.act-europe.fr. We have made one public release of a beta XML parser, that accepts all constructions in XML. It has support for SAX and DOM as well (ie you can either use callbacks to parse the XML stream or build a tree and then manipulate it). It was noted earlier than an XML parser is much easier to program than a RE parser. Obviously, this is true. However, writing a parser from scratch is actually not so simple, since the XML standard is pretty extensive. Support for entities (&name;), DTDs, ... was kind of a time-consuming task :-) Feel free to contribute to this package if you think there are some things missing. I will release a new version hopefully soon, with a much improved parser (twice as fast) and better support for DTDs (as well as conditional sections in DTDs, that were not supporting in that first release). > Also note that GNAT comes with an 'alternative' pattern matching facility > that is more powerfull then REs: GNAT.Spitbol . There are three regular expression (or similar) packages in GNAT: GNAT.Regexp: simple regular expressions (you can't get the string matched by a parenthesis pair), on a whole string (not part of a string). GNAT.Regpat: PERL-like regular expressions (basically, we were really inspired by the C code from Perl. There are a few known issues in 3.13, that are fixed in 3.14 GNAT.Spitbol: even more powerful syntax. I have never used it personnaly, so can't comment on it. Have a look at the files g-regexp.ads, g-regpat.ads and g-spitbol.ads for a full and extensive documentation on these three packages. Emmanuel