Kast 19juli

Fra The_art_of_programmers
Hopp til: navigasjon, søk

As an example the program text in Parser that sets up predicates looks like this:

 if (t1.isType('(')) {
     Term term = expr(Prolog.OP_HIGH, false);
     if (tokenizer.readToken().isType(')'))
         return term;
     throw new InvalidTermException("Missing right parenthesis: ("+term + " -> here <-");
 }