private void InitContext() { var rootContext = cursor.RootContext; if (rootContext != null) { ServicesInitializer.SetServiceProperties( rootContext.GetType(), rootContext, typeof(IScanning), this); } }
public IProducer<Msg> CreateActionProducer(object context) { var result = new ActionProducer(runtimeGrammar, context, grammarAction, this.merge); if (context != null) { ServicesInitializer.SetServiceProperties( context.GetType(), context, typeof(IParsing), result); } return result; }
public IScanner CreateScanner(object context, TextReader input, string document, ILogging logging) { if (logging == null) { logging = ExceptionLogging.Instance; } if (context != null) { ServicesInitializer.SetServiceProperties( context.GetType(), context, typeof(ILanguageRuntime), this); ServicesInitializer.SetServiceProperties( context.GetType(), context, typeof(ILogging), logging); } return new Scanner(scan1, input, document, context, scanAction, maxActionCount, logging); }