up

A priority search queue and LRU cache.
git clone git://git.jtobin.io/up.git
Log | Files | Refs

up_lex.c (475B)


      1 #include "all.h"
      2 
      3 c3_o
      4 u3qdu_lex(u3_atom p, u3_noun k, u3_atom q, u3_noun l)
      5 {
      6   return ( c3y == u3r_sing(p, q) ) ? u3qc_gor(k, l) : u3qa_lth(p, q);
      7 }
      8 
      9 u3_noun
     10 u3wdu_lex(u3_noun cor)
     11 {
     12   u3_noun p, k, q, l;
     13 
     14   if ( (c3n == u3r_mean(cor, u3x_sam_2, &p, u3x_sam_6, &k, u3x_sam_14, &q,
     15                              u3x_sam_15, &l, 0)) ||
     16        (c3n == u3ud(p)) ||
     17        (c3n == u3ud(q)) )
     18   {
     19     return u3m_bail(c3__exit);
     20   } else {
     21     return u3qdu_lex(p, k, q, l);
     22   }
     23 }
     24