예제 #1
0
        protected override string TokenToText(TokenWithCount token)
        {
            switch (token.Token)
            {
            case Token.LCW:
            case Token.UCW:
            case Token.V:
                return(string.Concat(Enumerable.Repeat(_PatternTokenToText[token.Token], token.Count)));

            case Token.EOS:
            case Token.None:
            default:
                return(string.Empty);
            }
        }
예제 #2
0
        protected override string TokenToText(TokenWithCount token)
        {
            switch (token.Token)
            {
            case Token.LCW:
                return(string.Concat(Enumerable.Repeat(_Keyword, token.Count)));

            case Token.UCW:
                return(" " + string.Concat(Enumerable.Repeat(_Keyword, token.Count)) + " ");

            case Token.V:
                return(Environment.NewLine);

            case Token.EOS:
            case Token.None:
            default:
                return(string.Empty);
            }
        }
예제 #3
0
 protected abstract string TokenToText(TokenWithCount token);
예제 #4
0
 public TokenWithCountWithIndex(TokenWithCount token, int index)
 {
     TokenWithCount = token;
     Index          = index;
 }