Ejemplo n.º 1
0
        public Analizer()
        {
            symbols = new SymbolHelper();

            Delimiter             = symbols.GetDelimiter();
            AssigmentSymbols      = symbols.GetSymbolsByType(TokenType.assigment);
            OAgrouper             = symbols.GetSymbolsByType(TokenType.OpenGrouper);
            CAgrouper             = symbols.GetSymbolsByType(TokenType.CloseGrouper);
            SingleComment         = symbols.GetSymbolsByType(TokenType.SingleLineComment).FirstOrDefault();
            OpenMultilineComment  = symbols.GetSymbolsByType(TokenType.OpenMultiLineComment).FirstOrDefault();
            CloseMultilineComment = symbols.GetSymbolsByType(TokenType.ClosenMultiLineComment).FirstOrDefault();
            AdditionalWordSpliter = new List <string> {
                " ", Delimiter.Id
            };
            Scope = 0;


            AdditionalWordSpliter.AddRange(OAgrouper.Select(s => s.Id).ToList());
            AdditionalWordSpliter.AddRange(CAgrouper.Select(s => s.Id).ToList());
            AdditionalWordSpliter.AddRange(AssigmentSymbols.Select(s => s.Id).ToList());
        }