Beispiel #1
0
		///////////////////////////////////////////////////////////////////////////////

		public void SetMacroProcessorOutputInstance( MasterOutput output )
		{
			MacroProcessor.OutputInstance = output;
		}
Beispiel #2
0
		/////////////////////////////////////////////////////////////////////////////

		public void ClearMasterOutput()
		{
			_masterOutput = null;
		}
Beispiel #3
0
		/////////////////////////////////////////////////////////////////////////////
		
		public void ClearMultileEvalOutput()
		{
			multileEvalOutput = null;
		}
Beispiel #4
0
		/////////////////////////////////////////////////////////////////////////////

		MasterOutput GetMasterOutput( bool newOutput )
		{
			// ******
			if( null == _masterOutput || newOutput ) {
				_masterOutput = new MasterOutput( gc );
			}

			// ******
			return _masterOutput;
		}
Beispiel #5
0
		/////////////////////////////////////////////////////////////////////////////
		
		public void MultileEvaluate( IEvaluationContext evx )
		{
			// ******
			//
			// EvalLock() will throw an exception if this instance of NMP is already
			// evaluating something, it also calls Restore()/Save() for our thread
			// data
			//
			using( new EvalLock( this ) ) {
				try {
					using( var input = gc.GetMasterParseReader( new ParseStringReader( evx.Text, evx.FileName ) ) ) {
						
						if( null == multileEvalOutput ) {
							multileEvalOutput = new MasterOutput( gc );
						}
		
						// ******
						var mir = new MIR( null, input, "Root" );
						
						using( Get<InvocationContext>().Init( mir ) ) {
							SetMacroProcessorOutputInstance( multileEvalOutput );
							Scanner( input, multileEvalOutput );
							SetMacroProcessorOutputInstance( null );
						}
		
					}
				}
				finally {
				}
			}
		}