home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / ada / 2510 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  1.3 KB

  1. Path: sparky!uunet!gatech!darwin.sura.net!dtix!mimsy!afterlife!relay!apssgi.nswc.navy.mil!doliver
  2. From: doliver@apssgi.nswc.navy.mil (Donna Oliver)
  3. Newsgroups: comp.lang.ada
  4. Subject: file parsing
  5. Message-ID: <1992Sep2.160803.4757@relay.nswc.navy.mil>
  6. Date: 2 Sep 92 16:08:03 GMT
  7. Sender: news@relay.nswc.navy.mil
  8. Organization: Naval Surface Warfare Center
  9. Lines: 21
  10.  
  11. I would like some ideas on what people have done in parsing an input
  12. file.  If I have the following data in a file:
  13.  
  14. Name = John Doe
  15. Address = 100 Main Street
  16. Zip = 12345
  17. Gender = MALE
  18.  
  19. where the string associated with "Name =" is of NAME_TYPE (John Doe), the 
  20. string "ssociated with Address =" is of ADDRESS_TYPE, the string associated
  21. with "Zip =" is of ZIP_TYPE (100 Main Street), and the string associated
  22. with "Gender =" is of GENDER_TYPE (MALE), then where/how should the parsing 
  23. be done?  This data stored in this file is not of a fixed format, that is,
  24. the number of fields (records) is variable.
  25.  
  26.  
  27. The parsing is part of our MMI subsystem.  I think that all the packages with 
  28. the type definitions should be with'd into the MMI package and the string 
  29. processed for validity in the MMI package rather than sending the string to 
  30. the package where the object is to be stored and having that package to 
  31. the parsing and then sending a parsing status back to the MMI package.
  32.