public string VisitChar(CharDatum d) { if (NamedCharacters.ContainsKey(d.Value)) { return("#\\" + NamedCharacters[d.Value]); } else if (char.IsLetter(d.Value) || char.IsNumber(d.Value) || char.IsPunctuation(d.Value) || char.IsSymbol(d.Value)) { return("#\\" + d.Value); } else if (Regex.IsMatch("" + d.Value, "\\p{M}")) { return("#\\" + d.Value); } else { int i = (int)d.Value; return($"#\\x{i:X4}"); } }
public bool VisitChar(CharDatum d) { bw.Write(B_CHAR); bw.Write(d.Value); return(true); }
public State VisitChar(State state, CharDatum d) => state;
public SetDatum VisitChar(CharDatum d) => SetDatum.Empty;
public string VisitChar(CharDatum d) { return("c" + d.Value); }
private bool EqualChar(CharDatum x, CharDatum y) { return(x.Value == y.Value); }
private int CompareChar(CharDatum x, CharDatum y) { return((x.Value < y.Value) ? -1 : (x.Value > y.Value) ? 1 : 0); }