home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / text / frame / 3395 < prev    next >
Encoding:
Text File  |  1992-11-17  |  1.7 KB  |  56 lines

  1. Newsgroups: comp.text.frame
  2. Path: sparky!uunet!ukma!rsg1.er.usgs.gov!darwin.sura.net!convex!convex!connolly
  3. From: connolly@convex.com (Dan Connolly)
  4. Subject: Re: lex&yacc definition of MIF format
  5. Sender: usenet@news.eng.convex.com (news access account)
  6. Message-ID: <1992Nov17.001525.28344@news.eng.convex.com>
  7. Date: Tue, 17 Nov 1992 00:15:25 GMT
  8. References: <92318.142107SLYNENSK@ESOC.BITNET>
  9. Nntp-Posting-Host: pixel.convex.com
  10. Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
  11. X-Disclaimer: This message was written by a user at CONVEX Computer
  12.               Corp. The opinions expressed are those of the user and
  13.               not necessarily those of CONVEX.
  14. Lines: 40
  15.  
  16. In article <92318.142107SLYNENSK@ESOC.BITNET> <SLYNENSK@ESOC.BITNET> writes:
  17. >Does anyone have such a thing?
  18.  
  19. I was looking for such a beast a while ago, and never found one.
  20. But I found that a LISP interpreter that implements a Common Lisp
  21. style readtable (such as XLISP) is a pretty convenient way to 
  22. process MIF files.
  23.  
  24. After you install the appropriate read table, executing this:
  25. (setq S (read))
  26. given this MIF statement:
  27.  
  28. <BookComponent 
  29.  <FileName `<c\>misc<c\>Commands_List<U\>/doc/cetrone/Commands_List'>
  30.  <StartPageSide ReadFromFile >
  31.  <PageNumbering Continue >
  32.  <PgfNumbering Continue >
  33.  <PageNumPrefix `'>
  34.  <PageNumSuffix `'>
  35.  <DefaultPrint Yes >
  36.  <DefaultApply Yes >
  37. > # end of BookComponent
  38.  
  39. returns this lisp expression:
  40.  
  41. (BOOKCOMPONENT
  42.  (FILENAME "<c>misc<c>Commands_List<U>/doc/cetrone/Commands_List")
  43.  (STARTPAGESIDE READFROMFILE)
  44.  (PAGENUMBERING CONTINUE)
  45.  (PGFNUMBERING CONTINUE)
  46.  (PAGENUMPREFIX "")
  47.  (PAGENUMSUFFIX "")
  48.  (DEFAULTPRINT YES)
  49.  (DEFAULTAPPLY YES))
  50.  
  51. so you can easily decompose it with (first S) ==> BOOKCOMPONENT
  52. etc.
  53.  
  54. Dan
  55.  
  56.