>       find expression "hello" & [a] [minimal | maximal] string [<container>]\
>       in [<search_container>]

Anthony,

 sounds cool to me. Just one note: the "in <search_container>" part should
be an optional parameter to all veriants of "Find".

>"Find expression" so we don't have to implement infinite-lookahead parsers,

 that's what I thought.

>minimal vs. maximal allows a greedy (i.e., eat up all characters possible)
>vs. non-greedy match

 OK. But non-greedy should be the default. instead of "minimal" and
"maximal", I'd propose using "shortest" and "longest", though. See how
English it suddenly becomes :-)

>Also, if <container> is provided,
>the matched text is stored to <container>.

 Yes, that pretty much sums up what we came up with by now. So, here's my
formal syntax proposal:

 find expression <expr> [or expression <expr> [or ...]] [in <container>]
 Result is output to the foundChunk, foundText etc.

 an expr may be:
 <expr> & <expr>
 <expr> && <expr>
 [a] [{shortest|longest}] string [<destContainer>]
 [a] string [<destContainer>] [of length <integer>]
 [a] number [<destContainer>] [from <min> to <max>]
 [an] integer [<destContainer>] [from <min> to <max>]
 [a] boolean [<destContainer>]
 [a] character [destContainer] [in <string>]
 <string> -- may be integers, booleans, obj. descriptors that auto-convert
to string

 I guess I forgot some other possible expr values, so add them if you feel
like it.


Cheers,
-- M. Uli Kusterer

------------------------------------------------------------
             http://www.weblayout.com/witness
       'The Witnesses of TeachText are everywhere...'

--- HELP SAVE HYPERCARD: ---
Details at: http://www.hyperactivesw.com/SaveHC.html
Sign: http://www.giguere.uqam.ca/petition/hcpetition.html

Reply via email to