home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!dtix!mimsy!afterlife!relay!apssgi.nswc.navy.mil!doliver
- From: doliver@apssgi.nswc.navy.mil (Donna Oliver)
- Newsgroups: comp.lang.ada
- Subject: file parsing
- Message-ID: <1992Sep2.160803.4757@relay.nswc.navy.mil>
- Date: 2 Sep 92 16:08:03 GMT
- Sender: news@relay.nswc.navy.mil
- Organization: Naval Surface Warfare Center
- Lines: 21
-
- I would like some ideas on what people have done in parsing an input
- file. If I have the following data in a file:
-
- Name = John Doe
- Address = 100 Main Street
- Zip = 12345
- Gender = MALE
-
- where the string associated with "Name =" is of NAME_TYPE (John Doe), the
- string "ssociated with Address =" is of ADDRESS_TYPE, the string associated
- with "Zip =" is of ZIP_TYPE (100 Main Street), and the string associated
- with "Gender =" is of GENDER_TYPE (MALE), then where/how should the parsing
- be done? This data stored in this file is not of a fixed format, that is,
- the number of fields (records) is variable.
-
-
- The parsing is part of our MMI subsystem. I think that all the packages with
- the type definitions should be with'd into the MMI package and the string
- processed for validity in the MMI package rather than sending the string to
- the package where the object is to be stored and having that package to
- the parsing and then sending a parsing status back to the MMI package.
-