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