Bill Roper (billroper) wrote,
Bill Roper
billroper

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
Subscribe

  • Some Old Doggerel

    I recall having mangled a CSN tune many years ago on the way to Contraption. Like that convention, the particular co-worker whose code I was digging…

  • Dropping Out of Confusion

    After further consideration and consulting with Gretchen and Sam, the latter of whom was going to go to Confusion with me to help with the table…

  • Black Friday, Cyber Monday, and Assorted Temptations

    There are a great many things being dangled in front of me by the various Black Friday, Cyber Monday, please spend money ads that are showing up in…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments