TIP: Click on subject to list as thread! ANSI
echo: 4dos
to: JASEN BETTS
from: TED MENKS
date: 1998-05-17 12:17:00
subject: parsing

Hi Jasen,
(Thursday May 14 1998 16:25) Jasen Betts to TED MENKS about: parsing
 TM>> What is GREP? What is it part of, and where does one find it?
 JB> Like find only better and more powerful, it uses regular expressions 
which
 JB> are a bit like it's a bit like 4dos wildcards.
 JB> It's a unix thing There's a bunch of shareware/freeware versions around.
Ah, and I was already feeling surrounded by FIND ;-)
 TM>> I'm afraid you missed the point of what part is giving trouble. It's
 TM>> *not* finding or reading the correct line that kills me, it's
 TM>> *processing* the data. A line may contain more than one parameter, and
 TM>> some of the parameters may consist of several "words". Assigning these
 TM>> parameters to a number of variables correctly is the issue.
 JB> Hmm, you could maybe use %@word with a apropriate separator character.
 JB> or have fixed width fields.
You're not the first to mention fixed width fields, so I guess you know my 
answer already by now ;-) It may be a reasonable option sometimes, but I'm a 
bit reluctant to use it.
But you *are* the first to suggest using %@word, althought that may have been 
lead by my reference to "words" ;-) I've been thinking about that too, and I 
guess that might help. The question that should follow, is:
How do we make a routine that is compact and fast, but allows us to parse 
*any* line? It should check for the existence even pairs of ``, "" and '' 
*before* considering them as possible separators, and should use them smartly 
in that it won't combine the wrong pairs of separators. I believe I can think 
of a way to do it... Now I want to see what others in here can come up 
with... ;-)))
Greetinx,
  Ted Menks  2:2449/236.51 / 2:284/412.51  PGPkey: 2048/1B2ACCED (by RRQ)
... If at first you don't succeed, have somebody else do it for you!
--- 4Dos v6.01a ---
(2:2449/236.51)
---------------
* Origin: It's the 4Dos way! (Teddy's Land +49-5971-14966

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.