> What still bothers me about this is that the grammar is still
> irregular. I wish I could require the quote in certain places - i.e.,
> (assert '(foo bar)) - but I can't change the basic syntax of the
> language - can I?
I suppose you could so long as existing code could still pass through the
parser unscathed.
>
> I think the way (some?) LISPs deal with grammar irregularities like
> (assert (foo (bar baz))) (the irregularity is that the reader would by
> default evaluate (bar baz) and (foo (bar baz)) as function calls) is
> via "defmacro". The arguments to a macro aren't evaluated before being
> passed in - it's up to the macro to do the evaluation itself. Maybe
> defining a formal defmacro system, then using it to define the various
> constructs, would restore the simplicity of the reader.
In a previous post, I suggested a RHS parser extensibility mechanism where
upon reaching an extensible set of tokens, the parsing/input stream could be
passed along to an associated parser. My original post was motivated by
wanting to do:
(defrule myRule
(a ?count)
(b ?datum)
=>
(myParser {some; other; language(); here!}
)
)
where the token/parser myParser could be registered with Jess.
At parse time, it would be given the input stream and would return a funcall
object to the top level parser. This parser would be responsible for eating
up as much of the input stream as it could starting with the space following
the "myParser" token up to the ending "}".
At runtime, the funcall object would be given the bindings and/or the
execution context.
CLIPS had a feature (I think?) where you could validate your "user function"
input parameters. I don't think it let you parse the input however. I has
been quite a while.
Obviously, trying to do this kind of thing on the LHS is more complicated
since updating the rete graph is not something you want to hand over to
arbitrary parsers. Since it doesn't solve all the problems listed in this
thread I'm not sure it would be worth doing.
>
> I always enjoy discussions like this one the most.
I took this as an invitation to respond however narrow my interests may seem
to others...
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------