Package org.elegant.aash.comparator.parsing.tools

Examples of org.elegant.aash.comparator.parsing.tools.ParsingException


  private static DottedExpression parseDottedExpression(ParsingTools stream) throws IOException {
    stream.ignoreBlanks();
    String sVarName = stream.readIdentifier();
    if (sVarName == null) {
      throw new ParsingException(stream, stream.syntaxError("dotted expression expected"));
    }
    DottedExpression expr = new DottedExpression(sVarName);
    stream.ignoreBlanks();
    if (stream.isEqualTo('[')) {
      Expression indexExpr = parseExpression(stream);
      stream.ignoreBlanks();
      if (!stream.isEqualTo(']')) {
        throw new ParsingException(stream, stream.syntaxError("']' expected"));
      }
      expr.setIndex(indexExpr);
    }
    stream.ignoreBlanks();
    if (stream.isEqualTo('.')) {
View Full Code Here


    stream.ignoreBlanks();
    if (stream.isEqualTo('(')) {
      Expression expr = parseExpression(stream);
      stream.ignoreBlanks();
      if (!stream.isEqualTo(')')) {
        throw new ParsingException(stream, stream.syntaxError("')' expected"));
      }
      return expr;
    } else if (stream.isEqualTo('!')) {
      Expression expr = parseLiteralExpression(stream);
      return new NotExpression(expr);
    } else if (stream.isEqualTo('*')) {
      return new StarLiteral();
    } else if (stream.isEqualTo('[')) {
      ArrayExpression expr = new ArrayExpression();
      stream.ignoreBlanks();
      if (!stream.isEqualTo(']')) {
        Expression item = parseExpression(stream);
        expr.addItem(item);
        stream.ignoreBlanks();
        while (stream.isEqualTo(',')) {
          item = parseExpression(stream);
          expr.addItem(item);
          stream.ignoreBlanks();
        }
        if (!stream.isEqualTo(']')) {
          throw new ParsingException(stream, stream.syntaxError("']' expected"));
        }
      }
      return expr;
    } else {
      String sText = stream.readString();
View Full Code Here

        param = parseExpression(stream);
        expr.addParameter(param);
        stream.ignoreBlanks();
      }
      if (!stream.isEqualTo(')')) {
        throw new ParsingException(stream, stream.syntaxError("')' expected"));
      }
    }
    return expr;
  }
View Full Code Here

TOP

Related Classes of org.elegant.aash.comparator.parsing.tools.ParsingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.