[Oberon] Re (2): Detecting whether a Text is a module source.
Bob Walkden
bob at web-options.com
Sun Jan 29 19:04:48 CET 2017
OK, I believe the Boyer-Moore algorithm is the most efficient. There is an
implementation in Wirth's Algorithm's and Data Structures, section 1.9.6.
http://www.ethoberon.ethz.ch/WirthPubl/AD.pdf
https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm
B
> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> peter at easthope.ca
> Sent: Sunday, 29 January, 2017 4:11 PM
> To: oberon at lists.inf.ethz.ch
> Subject: [Oberon] Re (2): Detecting whether a Text is a module source.
>
> > According to the EBNF for O7, the smallest legal module ...
>
> OK, thanks. Will keep in mind for later. For now I'm concerned only with
> detecting the presence of a word in a text; not with conformity to a
syntax.
>
> What is efficient code to find whether the word "Jaguar" is present in a
text
> for example? There are many ways of varying efficiency. A compiler must
> have a solution but I'm unlikely to recognize it. Can anyone give a code
> example or direct me to one?
>
> Thanks, ... 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
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
More information about the Oberon
mailing list