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()); }
public DateParser(string arg) { Arg = arg; Lexer = new DateParserLexer(arg); }