public override void Init(sones.Lib.Frameworks.CLIrony.Compiler.Grammar grammar) { base.Init(grammar); string workPattern = @"\G(" + Pattern + ")"; RegexOptions options = (grammar.CaseSensitive ? RegexOptions.None : RegexOptions.IgnoreCase); _expression = new Regex(workPattern, options); if (this.EditorInfo == null) this.EditorInfo = new TokenEditorInfo(TokenType.Unknown, TokenColor.Text, TokenTriggers.None); }
public ServiceQueryResult(sones.GraphQL.Result.QueryResult myQueryResult) { this.Duration = myQueryResult.Duration; if (myQueryResult.Error != null) this.Error = myQueryResult.Error.Message; else this.Error = null; this.NameOfQueryLanguage = myQueryResult.NameOfQuerylanguage; this.NumberOfAffectedVertices = myQueryResult.NumberOfAffectedVertices; this.Query = myQueryResult.Query; if (myQueryResult.TypeOfResult == ResultType.Successful) this.TypeOfResult = ServiceResultType.Successful; else if (myQueryResult.TypeOfResult == ResultType.Failed) this.TypeOfResult = ServiceResultType.Failed; this.Vertices = myQueryResult.Vertices.Select(x => new ServiceVertexView(x)).ToList(); }
protected override void DoEvaluate(sones.Lib.Frameworks.CLIrony.Runtime.EvaluationContext context) { foreach(AstNode node in ChildNodes) { node.Evaluate(context); /* switch (context.Jump) { case JumpType.Goto: //TODO: implement GOTO break; case JumpType.Break: case JumpType.Continue: case JumpType.Return: return; case JumpType.None: continue; //nothing to do, just continue }//switch */ }//foreach }
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)); } }
public void Execute(sones.GraphDBBenchmark.Converter.WriteLineToConsole MyWriteLine, IGraphDS myGraphDS) { SocialNetwork(myGraphDS); }
public override bool ValidateWorkingBase(IObject myWorkingBase, sones.GraphDB.TypeManagement.DBTypeManager myTypeManager) { return (myWorkingBase is DBTypeAttribute); }