public static OrdinalOfCharacterLiteral ( string source, int offset ) : int | ||
source | string | the string representation |
offset | int | start index of character |
return | int |
internal static bool BumpsMax(string str) { string num = CharacterUtilities.CanonicalizeCharacterLiteral(str, 1); int ord = CharacterUtilities.OrdinalOfCharacterLiteral(str, 1); return(ord > Terminal.max); }
/// <summary> /// If name is an escaped char-lit, it must already be /// canonicalized according to some convention. In this /// application CharUtils.Canonicalize(). /// </summary> /// <param name="symbolic">Means "is an ident"</param> /// <param name="name">string representation of symbol</param> internal Terminal(bool symbolic, string name) : base(name) { this.symbolic = symbolic; if (symbolic) { this.n = ++count; } else { this.n = CharacterUtilities.OrdinalOfCharacterLiteral(name, 1); if (n > max) { max = n; } } }