Core implementation making progress

7 views
Skip to first unread message

Nick Harvey

unread,
May 2, 2011, 2:22:58 PM5/2/11
to functionalcf-discuss
I reached a pretty significant point in my development of FunctionalCF
so I wanted to post it. I’ve completely re-written the parser to now
build a nested object hierarchy at function definition time, so that’s
made subsequent running of the function much more elegant. The parser
is rather sweet, with zero look ahead, it starts with a list object
and then feeds that object character by character. The list object, is
itself aware of how to interpret the incoming stream and as it sees
characters such as (. [ and single quotes, it instantiates child
objects to handle the stream. If there is a child object, the parent
simply passes the data stream on and just takes note of the returned
value. If the child object encounters the end of its own data stream,
it will return a value to the parent to indicate such and the parent
will then store the child internally and await the next character. One
minor complication of this was that the final character, used to
determine the termination of an object, was in some cases required by
the parent and in others not. The child now passes back different
return values depending on whether the parent should consume the
character itself or ignore it.

The second big improvement is that the core now binds vars, specified
during the function definition stage, with the values passed in during
execution. This is done by creating a bindMap structure in pure CFML
and then passing this through all objects in the hierarchy. This data
structure is also now defined in the IRunnable interface.
Reply all
Reply to author
Forward
0 new messages