Exemple #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;
        }
Exemple #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));
            }
        }
Exemple #3
0
 //Used in unit tests
 public static Compiler CreateDummy()
 {
     Compiler compiler = new Compiler(new Grammar());
       return compiler;
 }
Exemple #4
0
 public ScriptEngine(Grammar grammar)
 {
     Compiler = new Compiler(grammar);
       Language = Compiler.Language;
 }
Exemple #5
0
 public ScriptEngine(LanguageData language)
 {
     Language = language;
       Compiler = new Compiler(Language);
 }
Exemple #6
0
 public ScriptEngine(Compiler compiler)
 {
     Compiler = compiler;
       Language = Compiler.Language;
 }