示例#1
0
        EditorViewAdapterList _viewsCopy; //copy used in refresh loop; set to null when views are added/removed

        #endregion Fields

        #region Constructors

        public EditorAdapter(Compiler compiler)
        {
            _compiler = compiler;
              _context = new CompilerContext(_compiler);
              _scanner = compiler.Parser.Scanner;
              _scanner.BeginScan(_context);
              _parseTree = new ParseTree(String.Empty, "Source");
              _colorizerThread = new Thread(ColorizerLoop);
              _colorizerThread.IsBackground = true;
              _parserThread = new Thread(ParserLoop);
              _parserThread.IsBackground = true;
        }
示例#2
0
        public GraphQLQuery(sones.GraphDB.Plugin.DBPluginManager pluginManager)
        {
            //get grammar
            graphQL = new GraphQueryLanguage();

            graphQL.SetFunctions(pluginManager.Functions.Values);
            graphQL.SetAggregates(pluginManager.Aggregates.Values);
            graphQL.SetGraphDBImporter(pluginManager.GraphDBImporter.Values);
            graphQL.SetIndices(pluginManager.Indices.Values);

            //build compiler
            this._IronyCompiler = new Compiler(graphQL);

            //check language
            if (this._IronyCompiler.Language.ErrorLevel != GrammarErrorLevel.NoError)
            {
                throw new GraphDBException(new Error_IronyCompiler(this._IronyCompiler.Language.Errors));
            }
        }
示例#3
0
文件: Compiler.cs 项目: TheByte/sones
 //Used in unit tests
 public static Compiler CreateDummy()
 {
     Compiler compiler = new Compiler(new Grammar());
       return compiler;
 }
示例#4
0
 public ScriptEngine(Grammar grammar)
 {
     Compiler = new Compiler(grammar);
       Language = Compiler.Language;
 }
示例#5
0
 public ScriptEngine(LanguageData language)
 {
     Language = language;
       Compiler = new Compiler(Language);
 }
示例#6
0
 public ScriptEngine(Compiler compiler)
 {
     Compiler = compiler;
       Language = Compiler.Language;
 }