예제 #1
0
        public string ShowPeriodTokens(string arg)
        {
            StringBuilder sb = new StringBuilder();

            DateParserLexer lexer = new DateParserLexer(arg);

            sb.AppendLine("--- Period expression tokens ---");

            LexerToken token;

            do
            {
                token = lexer.NextToken();
                sb.Append(token.Dump());
                sb.AppendLine(": " + token.ToString());
            } while (token.Kind != LexerTokenKindEnum.END_REACHED);

            return(sb.ToString());
        }
예제 #2
0
 public DateParser(string arg)
 {
     Arg   = arg;
     Lexer = new DateParserLexer(arg);
 }