static void Main(string[] args) { Console.Write("> "); string s = Console.ReadLine( ); SimpleParser p = new SimpleParser( ); StringReader r = new StringReader(s); Console.Write("{0} = ", s); try { Console.WriteLine(p.Parse(r)); } catch (ParserException e) { Console.WriteLine(e.Message); } Console.ReadKey( ); }
static void Main( string[ ] args ) { Console.Write( "> " ); string s = Console.ReadLine( ); SimpleParser p = new SimpleParser( ); StringReader r = new StringReader( s ); Console.Write( "{0} = ", s ); try { Console.WriteLine( p.Parse( r ) ); } catch ( ParserException e ) { Console.WriteLine( e.Message ); } Console.ReadKey( ); }