Bill Roper (billroper) wrote,
Bill Roper

Nearly Functional

I added another new helper class to the parser -- actually to the Parseable helper class. This will fetch a function call and any / all of its arguments and store them in the class, which allows the code to be much simpler and more consistent. So you call the getFunction() method on a Parseable object and, if the Parseable object is a function call, it passes back a FunctionInfo object with the correct Function enum member and an array of arguments to the function as Argument objects (which extend Parseable, so any of them can be parsed themselves).

Then I just pick off the Function enum and route the FunctionInfo object to the specific parser method that generates the correct byte codes for the function and its arguments.

Patching all of this in is a bit tedious, but I suspect it will greatly improve my debugging and testing later. :)
Tags: java, musings, work

  • Swept

    The weather was relatively cool today, so Gretchen and I went out and spent some time trying to get the garage into a state where it could be cleaned…

  • Everybody's Got a Recipe For Dumplings

    These things happen in our household. Gretchen and I were driving home from lunch and listening to Radio Margaritaville when our discussion turned…

  • Taking a Break

    I am taking a break. Not immediately, but I have scheduled some time off from work, because I have not taken more than a day or so off of work since…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded