Exemple #1
0
        /// <summary> returns the lexer that's gonna parse a hex integer number (valid patterns are: 0x1, 0Xff, 0xFe1 jfun.yan.etc.),
        /// and convert the string to a Long token.
        /// an hex number has to start with either 0x or 0X.
        /// </summary>
        /// <returns> the lexer.
        /// </returns>
        public static Lexer LexHexLong()
        {
            string name = "hex integer literal";

            return(Lex(Scanners.Delimited(Scanners.IsPattern(name, Patterns.IsHexInteger(), "hexInteger")),
                       Tokenizers.ForHexLong).Rename(name));
        }