コード例 #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 ();
        }
コード例 #2
0
ファイル: Parser.cs プロジェクト: couchand/oracular-dot-net
 public ParserException(string message, Parser parser)
     : base(String.Format("Parse error: {0} at input {1}", message, parser.currentToken.GetRawValue()))
 {
 }