src/main/java/org/mvel2/compiler/AbstractParser.java
protected void expectEOS() {
    skipWhitespace();
    if (cursor != end && expr[cursor] != ';') {
      switch (expr[cursor]) {
        case '&':
          if (lookAhead() == '&') return;
          else break;
        case '|':
          if (lookAhead() == '|') return;
          else break;
        case '!':
          if (lookAhead() == '=') return;
          else break;

        case '<':
        case '>':
          return;

        case '=': {
          switch (lookAhead()) {
            case '=':
            case '+':
            case '-':
            case '*':
              return;
          }
          break;
        }

        case '+':
        case '-':
        case '/':
        case '*':
          if (lookAhead() == '=') return;
          else break;
      }

      throw new CompileException("expected end of statement but encountered: "
          + (cursor == end ? "<end of stream>" : expr[cursor]), expr, cursor);
    }
  }
/**
   * The parser should find a statement ending condition when this is called, otherwise everything should blow up.
   */
The parser should find a statement ending condition when this is called, otherwise everything should blow up.
The parser should find a statement ending condition when this is called otherwise everything should blow up .
protected void expectEOS() {
    skipWhitespace();
    if (cursor != end && expr[cursor] != ';') {
      switch (expr[cursor]) {
        case '&':
          if (lookAhead() == '&') return;
          else break;
        case '|':
          if (lookAhead() == '|') return;
          else break;
        case '!':
          if (lookAhead() == '=') return;
          else break;
        case '<':
        case '>':
          return;
        case '=': {
          switch (lookAhead()) {
            case '=':
            case '+':
            case '-':
            case '*':
              return;
          }
          break;
        }
        case '+':
        case '-':
        case '/':
        case '*':
          if (lookAhead() == '=') return;
          else break;
      }
      throw new CompileException("expected end of statement but encountered: "
          + (cursor == end ? "<end of stream>" : expr[cursor]), expr, cursor);
    }
  }
protected void expectEOS ( ) { skipWhitespace ( ) ; if ( cursor != end && expr [ cursor ] != ';' ) { switch ( expr [ cursor ] ) { case '&' : if ( lookAhead ( ) == '&' ) return ; else break ; case '|' : if ( lookAhead ( ) == '|' ) return ; else break ; case '!' : if ( lookAhead ( ) == '=' ) return ; else break ; case '<' : case '>' : return ; case '=' : { switch ( lookAhead ( ) ) { case '=' : case '+' : case '-' : case '*' : return ; } break ; } case '+' : case '-' : case '/' : case '*' : if ( lookAhead ( ) == '=' ) return ; else break ; } throw new CompileException ( "expected end of statement but encountered: " + ( cursor == end ? "<end of stream>" : expr [ cursor ] ) , expr , cursor ) ; } }
The parser should find a statement ending condition when this is called, otherwise everything should blow up.
The parser should find a statement ending condition when this is called otherwise everything should blow up .