Exemplo n.º 1
0
        public OracularSpec(string name, string table, string spec)
        {
            if (name == null)
            {
                throw new OracularException ("spec config requires name");
            }
            this.Name = name;

            if (table == null)
            {
                throw new OracularException ("spec config requires table");
            }
            this.Table = table;

            if (spec == null)
            {
                throw new OracularException ("spec config requires spec expression");
            }
            this.Source = spec;

            var parser = new Parser (new StringLexer (spec));
            this.Spec = parser.Parse ();
        }
Exemplo n.º 2
0
 public ParserException(string message, Parser parser)
     : base(String.Format("Parse error: {0} at input {1}", message, parser.currentToken.GetRawValue()))
 {
 }