Activate cubical atoms. Still generating %cube.

This commit is contained in:
C. Guy Yarvin 2015-12-27 22:18:25 -05:00
parent 1d8e3fcee3
commit 86768d7e01
3 changed files with 67 additions and 13 deletions

View File

@ -61,10 +61,28 @@
else switch ( u3h(sut) ) {
default: return u3m_bail(c3__fail);
case c3__atom:
case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut);
{
if ( c3__atom == u3h(ref) ) {
return c3__void;
u3x_cell(u3t(ref), &p_ref, &q_ref);
if ( c3y == u3du(q_sut) ) {
if ( c3y == u3du(q_ref) ) {
if ( c3y == u3r_sing(q_sut, q_ref) ) {
return c3__void;
} else {
return u3k(sut);
}
} else {
return c3__void;
}
}
else {
if ( c3y == u3du(q_ref) ) {
return u3k(sut);
}
else return c3__void;
}
}
else if ( c3__cell == u3h(ref) ) {
return u3k(sut);
@ -106,6 +124,12 @@
{
return c3__void;
}
else if ( (c3__atom == u3h(ref)) &&
(c3y == u3du(u3t(u3t(ref)))) &&
(c3y == u3r_sing(p_sut, u3t(u3t(u3t(ref))))) )
{
return c3__void;
}
else if ( (c3__atom == u3h(ref)) ||
(c3__cell == u3h(ref)) ) {
u3_noun foz = _crop_dext(van, q_sut, ref, bix);

View File

@ -58,13 +58,35 @@
else switch ( u3h(sut) ) {
default: return u3m_bail(c3__fail);
case c3__atom:
case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut);
{
if ( c3y == u3du(ref) ) {
if ( c3__atom == u3h(ref) ) {
if ( c3y == u3qf_fitz(u3h(u3t(ref)), u3h(u3t(sut))) ) {
return u3k(sut);
} else return u3k(ref);
u3_noun p_ref, q_ref;
u3x_cell(u3t(ref), &p_ref, &q_ref);
{
u3_noun foc = (c3y == u3qf_fitz(p_ref, p_sut))
? u3k(p_sut)
: u3k(p_ref);
if ( c3y == u3du(q_sut) ) {
if ( c3y == u3du(q_ref) ) {
if ( c3y == u3r_sing(q_ref, q_sut) ) {
return u3nt(c3__atom, foc, u3k(q_sut));
}
else {
u3z(foc);
return c3__void;
}
}
else {
return u3nt(c3__atom, foc, u3k(q_sut));
}
} else {
return u3nt(c3__atom, foc, u3k(q_ref));
}
}
}
else if ( c3__cell == u3h(ref) ) {
return c3__void;

View File

@ -198,15 +198,23 @@
default: return u3m_bail(c3__fail);
case c3__atom: {
if ( (c3y == u3du(ref)) && (c3__atom == u3h(ref)) ) {
if ( c3n == u3qf_fitz(u3h(u3t(sut)), u3h(u3t(ref))) ) {
// u3_err("fitz: need", u3h(u3t(sut)));
// u3_err("fitz: have", u3h(u3t(ref)));
return c3n;
if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) {
return u3m_bail(c3__fail);
}
else {
if ( (c3y == u3du(ref)) && (c3__atom == u3h(ref)) ) {
if ( (c3n == u3qf_fitz(u3h(u3t(sut)), u3h(u3t(ref)))) ||
( (c3y == u3du(q_sut)) &&
(c3n == u3r_sing(q_sut, u3t(u3t(ref)))) ) )
{
// u3_err("fitz: need", u3h(u3t(sut)));
// u3_err("fitz: have", u3h(u3t(ref)));
return c3n;
}
return c3y;
}
return c3y;
else return _nest_sint(van, sut, tel, ref, gil);
}
else return _nest_sint(van, sut, tel, ref, gil);
}
case c3__cell: {
if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) {