Пример #1
0
        private ParadoxParser.ParadoxContext GetPlanetParserTree(string planetId)
        {
            var planetText = planetsData[Convert.ToInt32(planetId)];

            ICharStream  cstream    = CharStreams.fromstring(planetText);
            ITokenSource lexer      = new ParadoxLexer(cstream);
            ITokenStream tokens     = new CommonTokenStream(lexer);
            var          parser     = new ParadoxParser(tokens);
            var          planetData = parser.paradox();

            return(planetData);
        }