コード例 #1
0
        public SqlDefaultParser(SqlGrammarBase grammar)
        {
            languageData = new LanguageData(grammar);
            parser       = new Irony.Parsing.Parser(languageData);

            if (!languageData.CanParse())
            {
                throw new InvalidOperationException();
            }
        }
コード例 #2
0
        public List <ArchitectureDescription> Build(string input)
        {
            LanguageData language = new LanguageData(new ArchitectureGrammar());

            language.CanParse();

            Parser    parser     = new Parser(language);
            ParseTree syntaxTree = parser.Parse(input);

            return(ParseTree(syntaxTree));
        }