示例#1
0
        public EvaluateExpressionPart(string Source)
        {
            this.RawSource = Source;

            if (Source.StartsWith("{") && Source.EndsWith("}"))
                Source = Source.Substring(1, Source.Length - 2);

            if (Source[0] == '~')
            {
                this.ErrorsAllowed = true;
                this.Source = Source.Substring(1);
            }
            else
            {
                this.ErrorsAllowed = false;
                this.Source = Source;
            }
            try
            {
                this._Expression = Spring.Expressions.Expression.Parse(this.Source);

            }
            catch (RecognitionException ex)
            {
                this._ExpressionParseException = ex;
            }
        }
 internal static EvaluateExpressionParseException FromRecognitionException(RecognitionException e, string Expression)
 {
     return new EvaluateExpressionParseException()
     {
         Expression = Expression,
         Message = e.Message,
         PositionRow = e.getLine(),
         PositionColumn = e.getColumn()
     };
 }
示例#3
0
		public virtual void recover(RecognitionException ex, BitSet tokenSet)
		{
			consume();
			consumeUntil(tokenSet);
		}
示例#4
0
		/*Parser error-reporting function can be overridden in subclass */
		public virtual void reportError(RecognitionException ex)
		{
			Console.Error.WriteLine(ex);
		}
		public TokenStreamRecognitionException(RecognitionException re) :
				base(re.Message)
		{
			this.recog = re;
		}
示例#6
0
 public virtual void recover(RecognitionException ex, BitSet tokenSet)
 {
     consume();
     consumeUntil(tokenSet);
 }
示例#7
0
 /*Parser error-reporting function can be overridden in subclass */
 public virtual void reportError(RecognitionException ex)
 {
     Console.Error.WriteLine(ex);
 }
示例#8
0
    // CLOVER:OFF
    
    public override void reportError(RecognitionException ex)
    {
		//base.reportError(ex);
        throw new antlr.TokenStreamRecognitionException(ex);
    }