home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13685 < prev    next >
Encoding:
Text File  |  1992-09-15  |  1.1 KB  |  27 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!laphroaig!cflatter
  3. From: cflatter@nrao.edu (Chris Flatters)
  4. Subject: Re: Exponentiation operator proposal
  5. Message-ID: <1992Sep15.155654.17054@nrao.edu>
  6. Sender: news@nrao.edu
  7. Reply-To: cflatter@nrao.edu
  8. Organization: NRAO
  9. References: <1992Sep15.054226.4126@cc.tut.fi>
  10. Date: Tue, 15 Sep 1992 15:56:54 GMT
  11. Lines: 14
  12.  
  13. In article 4126@cc.tut.fi, jk87377@cc.tut.fi (Juhana Kouhia) writes:
  14. >Instead of making exponential operator; I would like to get
  15. >a new basic operation which allows programmer to define new
  16. >operations like 'a ** b'; that is, the '**' is defined.
  17. >('a pow b' is also good.)
  18.  
  19. Allowing the introduction of new operators on the fly is a nasty problem.
  20. Firstly, adding an operator means introducing a new lexeme which requires
  21. changing the lexical analyser on the fly.  Secondly, the syntax analyser
  22. needs to be modified on the fly to be able to parse expressions involving
  23. the new operator.  Neither of these are particularly easy to do.
  24.  
  25.     Chris Flatters
  26.     cflatter@nrao.edu
  27.