2006-11-18

Frustration, defeat ... starting over... again

I've spent the last two weeks trying to rewrite the RuleCompiler. Unfortunately, I've not had that much time to spend on it. I've tried, three times, to finish a rewrite but none of the things I've tried works very well. I just restored to the latest revision from the subversion repository and I'll start over again tomorrow.

3 kommentarer:

woolfel sa...

You could try using ANTLR to write the parse tree for CLIPS. It can generate python code

http://www.antlr.org/doc/python-runtime.html

Since the clips manual has the BNF grammar for CLIPS, it "should" be straight forward.

then again, it's still hard. Since michael and mark of jboss rules started to do that, but haven't had enough time to finish it :)

another option is to look at the javacc and jjtree for javaCC in sumatra and use that as a basis for a parser.

Johan Lindberg sa...

Yes, but that's going at least one step ahead at the moment. I've got the lexing and parsing bits working already (for a limited Python syntax). The problem is generating the optimized Rete Network from the AST.

I will, once I get all of this working, try to implement Clips language as an optional front-end. And I'll probably use ANTLR since I've used it before and feel quite comfy with it.

then again, it's still hard. Since michael and mark of jboss rules started to do that, but haven't had enough time to finish it :)

It's interesting to hear that JBoss Rules have started on this. Do you know if that part of the code is available somewhere in the CVS?

At the moment we're using Drools 2.1 at work, but we're looking to upgrade sometime soon. I'm also going to propose that we start using Clips on our iSeries machines and it would be very helpful if we could use the same rule language in both environments.

woolfel sa...

I think some of it is in SVN, but mark and michael would know better. they are doing it with ANTLR.