示例#1
0
        /// <summary>
        /// Поменять все токены на ключевые слова
        /// </summary>
        /// <param name="CodeText">Исходный код</param>
        /// <param name="TokensSet">Набор токенов</param>
        /// <returns>Код с замененными токенами</returns>
        protected string NormalizeCodeText(string CodeText, KeyTokensSet TokensSet)
        {
            CodeText = ReplaceToken(CodeText, TokensSet.Branch, " BR#T ");
            CodeText = ReplaceToken(CodeText, TokensSet.AdditionToken, " AD#T ");
            CodeText = ReplaceToken(CodeText, TokensSet.Condition, " CD#T ");
            CodeText = ReplaceToken(CodeText, TokensSet.Assignment, " AG#T ");

            return(CodeText);
        }
示例#2
0
 public MetricsLanguageC(KeyTokensSet TokenSet)
 {
     this.TokenSet = TokenSet;
 }
示例#3
0
 protected MetricsLanguageC()
 {
     TokenSet = new KeyTokensSetCPlus();
 }