Warning: session_start(): open(/var/lib/php/sessions/sess_1e2jdsdkqh2831asocijmfseo9, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static class Symbol implements CharSequence, Comparable {
S text;
MasterSymbol master;
*() {}
*(S *text, bool dummy) {} // weird signature to prevent accidental calling
*(S *text, MasterSymbol *master) {}
bool isMaster() { ret master == this; }
public int hashCode() { ret main.hashCode(lowerCase()); }
toString { ret text; }
S text() { ret text; }
S lowerCase() { ret master.lowerCase; }
public bool equals(O o) {
if (!(o instanceof Symbol)) false;
bool result = o instanceof Symbol && master == o/Symbol.master;
ifdef symbol_debug
print("Symbol.equals: " + this + " vs " + o + " => " + result);
endifdef
ret result;
}
public int length() { ret text.length(); }
public char charAt(int index) { ret text.charAt(index); }
public CharSequence subSequence(int start, int end) {
ret text.substring(start, end);
}
// This really has to be correct for TreeMap
// equals() <=> compareTo() == 0 or at least
// equals() => compareTo() == 0.
public int compareTo(Symbol s) {
ret lowerCase().compareTo(s.lowerCase());
}
}
static class MasterSymbol extends Symbol {
S lowerCase;
bool dollarVar;
*() {}
*(S *text, bool dummy) {
master = this;
lowerCase = lower(text);
dollarVar = isDollarVar(lowerCase);
}
}