예제 #1
0
        private void Construct_Common()
        {
            mSentenceOpenBracedPatterns.ScanPatternsChanged +=
                new delScanPatternsChanged(SentenceOpenBracedPatterns_ScanPatternsChanged);

            if (ExpressionPatterns.IsEmpty())
            {
                ExpressionPatterns.Add(
                    new char[] { '<', '>', '&', '|', '+', '-', '/', '*', '!', '=' },
                    DelimClassification.ExpressionSymbol);
            }

            if (EndStmtPatterns.IsEmpty( ))
            {
                this.EndStmtPatterns.Add(";", DelimClassification.EndStmt);
            }

            if (NewLinePatterns.IsEmpty())
            {
                NewLinePatterns.Add(Environment.NewLine, DelimClassification.NewLine);
            }

            // default sentence delim chars are whitespace and the ":".
            // ( the ":" delimits sentence parts. the whitespace delimits sentence words. )
        }
예제 #2
0
        private void Construct_Common()
        {
#if skip
            mSentenceOpenBracedPatterns.ScanPatternsChanged +=
                new delScanPatternsChanged(SentenceOpenBracedPatterns_ScanPatternsChanged);
#endif

            if (ExpressionPatterns.IsEmpty())
            {
                ExpressionPatterns.Add(
                    new char[] { '<', '>', '&', '|', '+', '-', '*', '!' },
                    DelimClassification.ExpressionSymbol,
                    DelimClassification.Assignment);
            }
            ExpressionPatterns.Add(
                "/", DelimClassification.ExpressionSymbol, DelimClassification.CommentToEnd);
            ExpressionPatterns.Add(
                "==", DelimClassification.ExpressionSymbol, DelimClassification.Assignment);
            ExpressionPatterns.Add(
                "!=", DelimClassification.ExpressionSymbol, DelimClassification.Assignment);
            ExpressionPatterns.Add(
                "<=", DelimClassification.ExpressionSymbol, DelimClassification.Assignment);
            ExpressionPatterns.Add(
                ">=", DelimClassification.ExpressionSymbol, DelimClassification.Assignment);
            ExpressionPatterns.Add(
                "&&", DelimClassification.ExpressionSymbol, DelimClassification.Assignment);
            ExpressionPatterns.Add(
                "||", DelimClassification.ExpressionSymbol, DelimClassification.Assignment);

            // lambda
            ExpressionPatterns.Add(
                "=>", DelimClassification.ExpressionSymbol, DelimClassification.Assignment);

            ExpressionPatterns.Add(
                "=", DelimClassification.Assignment, DelimClassification.Assignment, 3);
            ExpressionPatterns.Add(
                "+=", DelimClassification.Assignment, DelimClassification.Assignment, 3);
            ExpressionPatterns.Add(
                "-=", DelimClassification.Assignment, DelimClassification.Assignment, 3);
            ExpressionPatterns.Add(
                "*=", DelimClassification.Assignment, DelimClassification.Assignment, 3);
            ExpressionPatterns.Add(
                "/=", DelimClassification.Assignment, DelimClassification.Assignment, 3);

            if (EndStmtPatterns.IsEmpty( ))
            {
                this.EndStmtPatterns.Add(";", DelimClassification.EndStmt);
            }

            if (NewLinePatterns.IsEmpty())
            {
                NewLinePatterns.Add(Environment.NewLine, DelimClassification.NewLine);
            }

            // default sentence delim chars are whitespace and the ":".
            // ( the ":" delimits sentence parts. the whitespace delimits sentence words. )
        }
예제 #3
0
 public bool IsEndStmtDelim(string InDelim)
 {
     if (EndStmtPatterns.IsEmpty( ))
     {
         return(false);
     }
     else if (EndStmtPatterns.Contains(InDelim) == true)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }