home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / programm / 3156 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  2.0 KB

  1. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!matt.ksu.ksu.edu!news
  2. From: strat@matt.ksu.ksu.edu (Steve Davis)
  3. Newsgroups: comp.programming
  4. Subject: Re: Parsing mathematical functions.
  5. Date: 16 Nov 1992 02:17:51 -0600
  6. Organization: Kansas State University
  7. Lines: 35
  8. Message-ID: <1e7lffINNfhb@matt.ksu.ksu.edu>
  9. References: <1e25e1INN8sr@matt.ksu.ksu.edu> <1992Nov15.174725.13958@organpipe.uug.arizona.edu> <1992Nov16.052143.1124@ksvltd.fi>
  10. NNTP-Posting-Host: matt.ksu.ksu.edu
  11.  
  12. jarmo@ksvltd.fi (Jarmo Raiha) writes:
  13.  
  14. >dave@cs.arizona.edu (Dave Schaumann) writes:
  15.  
  16. >>IMHO, the first thing you should do is give up on standard expression format,
  17. >>unless knowledge of parsing techniques (like recursive descent) is common
  18. >>among your students.
  19.  
  20. >On the other hand, if you say that the function should be written in some
  21. >programming language syntax, the whole problem collapses to a trivial one.
  22. >The obvious solution then is to copy that line into a program template,
  23. >compile it, and finally execute it.
  24.  
  25. It would appear from the responses that I have gotten so far that the
  26. best bet would be to find an expression format that is easy to parse.
  27. This would be a format that does away with precedence and other such
  28. nonesense that is built into the human-to-human mathematical
  29. expression format.
  30.  
  31. I believe reducing the problem to a programming language syntax would
  32. be too easy.  But what I might do is have the contestants create a
  33. syntax with an implicit symbol tree format, and then have them
  34. traverse the symbol tree with each iteration of the loop that
  35. evaluates the integral.  As stated in my original post, *elegance* is
  36. as important as turning in a working solution.
  37.  
  38. Thanks for reminding me what kiddies are and are not capable of
  39. accomplishing!  :)
  40.  
  41. Stratocaster
  42. -- 
  43.        Steve Davis (I'm a student, not a spokesperson!)
  44.       strat@cis.ksu.edu - Kansas State University - Manhattan KS
  45.                    
  46. Those who know what's best for us must rise and save us form ourselves. - Rush
  47.