🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Michael Thu, 12 Nov 1992 06:24
RE: Matching multi-character delimiters?
#84
Author: Michael
Date: Thu, 12 Nov 1992 06:24
41 lines
2228 bytes
In a message of Wed, 11 Nov 1992 21:44:00 GMT
Received on 12 Nov 1992, 00:17 GMT

fairfield@slacvx.slac.stanford.edu wrote
to: Text Processing Utility (TPU) Language Discussion List <INFO-TPU@SHSU.edu>

>    All this discussion about matching up delimiters brought to mind a
>case I don't think is handled by any of the procedures posted: has
>anyone thought about the problem of, for example, matching opening and
>closing comment delimitors in C?
>
>	/* Hi! I'm a comment, what are you? */
>
>I've thought of two possiblities:
>
>    1) Create an _array_ of left-delimitors and an array of
>       right-delimitors with each array entry being a string
>       of arbitrary length.  You might need to order the array
>       elements so as to check the multi-character delimiters
>       before the single character ones if the multi's included
>       characters in the single-character set...
>
>    2) Use SELECT to highlight a string of characters, then do
>       a "MATCH SELECTED".  Eve_Match_Selected would extract the
>       selected string of characters and reverse them to form the
>       match delimiter string.  Problem here is you don't know
>       whether to search FORWARD or REVERSE sine there is no
>       intrinsic left- or rightness to the strings.
>
>Comments?

Well, yes.  The idea with an array sounds good and could be extended to
look for \begin{array} \end{array} etc.  But then the SELECT stuff
wouldn't work.  Would make an interesting LaTeX mode.



--
Michael Lemke
Astronomy, UT Austin, Texas
(michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads