Created
December 14, 2009 09:31
-
-
Save gian/255934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(s1.type == SYM_ANY) { | |
if(s1.kind == KIND_NODE) { | |
if(s2.type == SYM_ANY) { | |
if(s2.kind == KIND_NODE) { | |
return TRUE; | |
} else { | |
return s1.kind == s2.kind; | |
} | |
} else { | |
return TRUE; | |
} | |
} else { | |
if(s2.type == SYM_ANY) { | |
return s1.kind == s2.kind; | |
} else { | |
return is_kind(s2.type,s1.kind); | |
} | |
} | |
} else { | |
if(s1.kind == KIND_NODE) { | |
if(s2.type == SYM_ANY) { | |
if(s2.kind == KIND_NODE) { | |
return TRUE; | |
} else { | |
return is_kind(s1.type,s2.kind); | |
} | |
} else { | |
if(s2.kind == KIND_NODE) { | |
return s1.type == s2.type; | |
} else { | |
return s1.type == s2.type && is_kind(s1.type,s2.kind); | |
} | |
} | |
} else { | |
if(s2.type == SYM_ANY) { | |
if(s2.kind == KIND_NODE) { | |
return TRUE; | |
} else { | |
return is_kind(s1.type,s2.kind); | |
} | |
} else { | |
if(s2.kind == KIND_NODE) { | |
return s1.type == s2.type && is_kind(s2.type,s1.kind); | |
} else { | |
return s1.type == s2.type && | |
is_kind(s1.type,s2.kind) && | |
is_kind(s2.type,s1.kind); | |
} | |
} | |
} | |
} | |
return FALSE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment