Example #1
0
        public Node Parse(IrontalkParser parser)
        {
            string str = Input.ReadToEnd();
            str = str.Trim('\n', ' ', '\t');

            if (str == string.Empty)
                return null;

            parser.Reset(new StringReader (str + " \n."));

            try {
                return parser.Parse();
            } catch (ParserLogException e) {
                var error = e.GetError(0);
                throw new ParseException(new InputSource("input", null), error.Line, error.Message);
            }
        }
Example #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="assembly">The <see cref="Assembly"/> to install compiled classes into.</param>
 public Compiler(Assembly assembly)
 {
     Assembly = assembly;
     Parser = new IrontalkParser(new StringReader(""));
     SmalltalkImage.Initialize();
 }