home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / linux / 6418 < prev    next >
Encoding:
Text File  |  1992-07-22  |  1.6 KB  |  36 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!darwin.sura.net!mips!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!cherokee!copper!mcain
  3. From: mcain@copper (Michael Cain)
  4. Subject: Re: yacc and lex
  5. Message-ID: <1992Jul22.135605.12853@advtech.uswest.com>
  6. Sender: news@advtech.uswest.com (Radio Free Boulder)
  7. Nntp-Posting-Host: copper.advtech.uswest.com
  8. Organization: U S WEST Advanced Technologies
  9. References: <1992Jul21.164738.1@mcclb0.med.nyu.edu> <WEILER.92Jul21213719@crabapple.cis.ohio-state.edu>
  10. Date: Wed, 22 Jul 1992 13:56:05 GMT
  11. Lines: 23
  12.  
  13. In article <WEILER.92Jul21213719@crabapple.cis.ohio-state.edu> weiler@crabapple.cis.ohio-state.edu (Jerry Weiler) writes:
  14. >In article <1992Jul21.164738.1@mcclb0.med.nyu.edu> ramirez@mcclb0.med.nyu.edu writes:
  15. >
  16. >> I would like to know if anybody has ported yacc and lex
  17. >> over to linux. If yes, please let me know where I can find it.
  18. >
  19. >You should use bison and flex. bison is the GNU replacement for yacc
  20. >and flex is the GNU replacement for lex. They're faster, more flexible
  21. >and all around better. Bison and flex should be able to handle any
  22. >grammer yacc and lex do (any well written one, that is)
  23.  
  24. Flex does have one significant handicap when compared to lex: in lex,
  25. the default i/o functions are actually macros, which can be #undef'ed
  26. and replaced with real functions of the same name that can get input
  27. from anywhere; flex has real functions that insist on reading from
  28. files, and trying to replace these is semi-major surgery...
  29.  
  30. I regularly seem to want to parse stuff and don't want to let the
  31. analyzer built by flex handle my low-level file i/o...
  32.  
  33. Mike Cain
  34. U S WEST Advanced Technologies
  35. mcain@advtech.uswest.com
  36.