Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Is this algorithm modification valid?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
avoid9...@gmail.com  
View profile  
 More options Sep 26 2012, 3:57 am
Newsgroups: comp.lang.oberon, comp.lang.pascal.misc
From: Avoid9...@gmail.com
Date: Wed, 26 Sep 2012 07:57:26 +0000 (UTC)
Local: Wed, Sep 26 2012 3:57 am
Subject: Is this algorithm modification valid?
This is a complex query.
The <software.eng> USEnet group seems not to handle such
general algorithm queries.

Editors commonly have Search&Replace facilities, but one's
that I know, handle only one or a few lines.   The application
that I need it for, should also handle a small subset of regular
expressions, eg. ignore whiteChars and "["%{%}"]" where
% is a decimal-digit. So these two lines should match:
"   description of `lynx-link` [43] spaces     may vary "
" description of `lynx-link` [961]      spaces may vary "

Typical the user will edit a 4'000 line text file, where,
when a block of RepeatedGarbage  of say 50 lines is
recognised; the GarbageBlock can be 'marked' and
`DeleteAllFurtherSuchBlocks` initiated
[with he above described match-relaxation].

The intention is to extend the existing ETHO 'slik editor'
which does only exact matches and where the
search/replace is too small.  

My initial approach to this task via GNU awk proposed
copying out the DeleteBlock to a separate file which is
usefull for awk, and removes the problem of the
too-small search/replace buffer.

One search/replace with full Regular-expression-matching
that I tested, gave out-of-memory-errors with moderately
large blocks.  And I suspect that Regular-expression-matching
is very expensive.

Would the following trick, likely work?
The heart of <search for matching block> MUST be a
<compare&stepChar>, where <compare> will be a simple:
IF InFile[i]=DeleteBlok[j]. {or '==' for curly languages}

Now if you factor-out this comparison-test with its matching
pre/post-increment, into a boolean-function:
     CompareStep(InFile[i], DeleteBlok[j]): boolean;
if that's OK, then simple extentions to this function to handle
the 2 matching-relaxations described above, avoids
use of a full/complex RegexMatcher. And more
comparison-relaxations can easily be added later,
as needed.

Would you expect this to work?

==TIA.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »