var line = System.Console.In.ReadLine().TrimToNull();
while ( !System.String.IsNullOrEmpty( line ) ) {
foreach ( var word in ReadWord( line ) ) {
var operator = FindWord( word );
if ( null == operator ) {
var wordNotFound = new System.InvalidOperationException( "word not found: " + word );
wordNotFound.Data.Add( "word", word );
throw wordNotFound;
}
stack = operator.Execute( stack );
}
line = System.Console.In.ReadLine().TrimToNull();
}
Comments