예제 #1
0
파일: Lexers.cs 프로젝트: leontius/Ragnarok
        /// <summary> returns the lexer that's gonna parse a decimal integer number (valid patterns are: 1, 10, 123),
        /// and convert the string to a Long token.
        /// The difference between integer() and decInteger() is that decInteger does not allow a number starting with 0.
        /// </summary>
        /// <returns> the lexer.
        /// </returns>
        public static Lexer LexDecimalLong()
        {
            string name = "decimal integer literal";

            return(Lex(Scanners.Delimited(Scanners.IsPattern(name, Patterns.IsDecInteger(), "decInteger")),
                       Tokenizers.ForLong));
        }