Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Saturday February 05, 2005
04:35 PM

Declarative Math

[ #23031 ]

Today I spent a fair amount of time trying to implement math in AI::Prolog. I had (tried) to snag some code to do it but misread the code and wound up barking up the wrong tree. Regrettably, XProlog's parser is created by JavaCC and is not designed to be human-readable. Thus, I wind up trying to decipher this:

switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case 19:
    case 21:
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case 21:
        jj_consume_token(21);
        tok = jj_consume_token(NUMBER);
        // and so on

This is less than helpful.

I may have to spend some time porting XProlog rather than just stealing the shiny bits. This is further complicated by the fact that XProlog does not compile with Java 1.4 and above because assert is now a keyword.

Update: Once again I am getting bit by subtleties in Java. t.bound and t.bound() are not the same thing. I was rather casual about that distinction in my Perl code. Damn.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.