///////////////////////////////////////////////////////////////////////////// public NMP( INmpHost host ) { // ****** if( null == host ) { throw new ArgumentNullException( "host" ); } // ****** AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler( ResolveEventHandler ); // ****** // // need to make current BEFORE INotification has been created; need to // set it up so we can use INotification at this point - maybe new it and // set bind it later, or - do we need to bind it ?? // threadContext = ThreadContext.CreateThreadStorage(); // // make sure we're the current context // using( new NmpMakeCurrent(this) ) { gc = new GrandCentral( this, host ); SetDefaults(); NmpScannerInitialize( gc.Get<IMacroProcessorBase>(), null ); } // ****** // // see ThreadContext.CreateThreadStorage() above // ThreadContext.Notifications = Get<INotifications>(); }
public DefaultRecognizer( GrandCentral gc ) : base(gc) { }
public ParseReader( GrandCentral gc, NmpStack<string> dirStack, string text, string sourceFile, string context ) : this( gc, dirStack, new ParseStringReader(text, sourceFile), context ) { }
/////////////////////////////////////////////////////////////////////////// //public void SetSearchPath( string path ) //{ // // ****** // // // // clear current path set, split path at ';' and put // // the non emtpy results into SearchPath // // // NmpStringList searchPaths = ThreadContext.SearchPaths; // searchPaths.Clear(); // string [] a = path.Split( new char[] {';'} ); // // foreach( string s in a ) { // if( s.Length > 0 ) { // searchPaths.Add( s ); // } // } //} /////////////////////////////////////////////////////////////////////////// public MasterParseReader( GrandCentral gc, NmpStack<string> dirStack, IBaseReader reader ) : base( gc, dirStack, reader, "Root source" ) { this.BaseFileName = current.SourceName; }
public ParseReader( GrandCentral gc, NmpStack<string> dirStack, IBaseReader reader, string context ) { this.gc = gc; this.dirStack = dirStack; Initialize( reader, string.IsNullOrEmpty(context) ? "no context" : context ); }
public ParseReader( GrandCentral gc, NmpStack<string> dirStack, string text ) { this.gc = gc; this.dirStack = dirStack; Initialize( new ParseStringReader( text ), "no context" ); }
public ParseReader( GrandCentral gc, NmpStack<string> dirStack ) { this.gc = gc; this.dirStack = dirStack; Initialize( new ParseStringReader( string.Empty ), "empty reader" ); }
public NonEscapingParseReader( GrandCentral gc, NmpStack<string> dirStack, string text ) : base(gc, dirStack, text) { CheckEscapesAndSpecialChars = false; }
///////////////////////////////////////////////////////////////////////////// public BaseRecognizer( GrandCentral gc ) { this.gc = gc; }