[Oberon] Re (3): Search in Text, was "Detecting whether a Text is a module source."

peter at easthope.ca peter at easthope.ca
Mon Jan 30 20:02:56 CET 2017


Thanks for all the replies. Summarized here.
/usr/aos/source/Oberon.Edit.Mod  Edit.Search
/usr/aos/source/Oberon.Find.Mod  Find.All
/usr/aos/source/Oberon.Strings.Mod  Strings.Search
https://www.inf.ethz.ch/personal/wirth/ProjectOberon/Sources/ORS.Mod.txt  ORS.Identifier
Any omission is not deliberate.
 
From:	Douglas G Danforth <danforth at greenwoodfarm.com>
Date:	Sun, 29 Jan 2017 15:59:12 -0800
> Yes, but the little known X-Search algorithm is slightly more 
> efficient.

This might be related.  
https://en.wikipedia.org/wiki/Knuth's_Algorithm_X

Interesting to learn that the Boyer-Moore algorithm was published so 
recently as 1977.

Oberon discussion has always emphasized code reusability.  Therefore 
disappointing that each of the prcedures in quesstion is implemented 
for use within the parent module or is a command rather than a 
parameterized proceedure.

From:	Andreas Pirklbauer <andreas_pirklbauer at yahoo.com>
Date:	Sun, 29 Jan 2017 20:54:53 +0100
> Procedure Search in module Edit.Mod ... Boyer-Moore 
> search algorithm.

I might succeed to revise Edit.Search with result such as this.
PROCEDURE Search*(T: Texts.Text; VAR pos: LONGINT; pattern: ARRAY OF CHAR);

Thanks again to everyone,              ... Lyall E.



-- 

123456789 123456789 123456789 123456789 123456789 123456789 123456789
Tel: +1 360 639 0202                      Pender Is.: +1 250 629 3757
http://easthope.ca/Peter.html              Bcc: peter at easthope. ca



More information about the Oberon mailing list