/** * Reads the content between parenthesis. Its is expected that the current token is of kind * {@link TokenKind#OPENPAREN} because it MUST be check in the calling method ( when read the method name and the '(' * is read). * @return An expression which reflects the content within the parenthesis * @throws ExpressionParserException * While reading the elements in the parenthesis an error occurred * @throws TokenizerMessage * The next token did not match the expected token */ protected CommonExpression readParenthesis() throws ExpressionParserException, ExpressionParserInternalError { // The existing of a '(' is verified BEFORE this method is called --> so it's a internal error Token openParenthesis = tokenList.expectToken(TokenKind.OPENPAREN, true); CommonExpression firstExpression = readElement(null); CommonExpression parenthesisExpression = readElements(firstExpression, 0); // check for ')' try { tokenList.expectToken(TokenKind.CLOSEPAREN); // TokenizerMessage } catch (TokenizerExpectError e) { // Internal parsing error, even if there are no more token (then there should be a different exception). // Tested with TestParserExceptions.TestPMreadParenthesis throw FilterParserExceptionImpl.createMISSING_CLOSING_PARENTHESIS(openParenthesis.getPosition(), curExpression, e); } return parenthesisExpression; }
/** * Reads the content between parenthesis. Its is expected that the current token is of kind * {@link TokenKind#OPENPAREN} because it MUST be check in the calling method ( when read the method name and the '(' * is read). * @return An expression which reflects the content within the parenthesis * @throws ExpressionParserException * While reading the elements in the parenthesis an error occurred * @throws TokenizerMessage * The next token did not match the expected token */ protected CommonExpression readParenthesis() throws ExpressionParserException, ExpressionParserInternalError { // The existing of a '(' is verified BEFORE this method is called --> so it's a internal error Token openParenthesis = tokenList.expectToken(TokenKind.OPENPAREN, true); CommonExpression firstExpression = readElement(null); CommonExpression parenthesisExpression = readElements(firstExpression, 0); // check for ')' try { tokenList.expectToken(TokenKind.CLOSEPAREN); // TokenizerMessage } catch (TokenizerExpectError e) { // Internal parsing error, even if there are no more token (then there should be a different exception). // Tested with TestParserExceptions.TestPMreadParenthesis throw FilterParserExceptionImpl.createMISSING_CLOSING_PHARENTHESIS(openParenthesis.getPosition(), curExpression, e); } return parenthesisExpression; }
/** * Reads the content between parenthesis. Its is expected that the current token is of kind * {@link TokenKind#OPENPAREN} because it MUST be check in the calling method ( when read the method name and the '(' * is read). * @return An expression which reflects the content within the parenthesis * @throws ExpressionParserException * While reading the elements in the parenthesis an error occurred * @throws TokenizerMessage * The next token did not match the expected token */ protected CommonExpression readParenthesis() throws ExpressionParserException, ExpressionParserInternalError { // The existing of a '(' is verified BEFORE this method is called --> so it's a internal error Token openParenthesis = tokenList.expectToken(TokenKind.OPENPAREN, true); CommonExpression firstExpression = readElement(null); CommonExpression parenthesisExpression = readElements(firstExpression, 0); // check for ')' try { tokenList.expectToken(TokenKind.CLOSEPAREN); // TokenizerMessage } catch (TokenizerExpectError e) { // Internal parsing error, even if there are no more token (then there should be a different exception). // Tested with TestParserExceptions.TestPMreadParenthesis throw FilterParserExceptionImpl.createMISSING_CLOSING_PARENTHESIS(openParenthesis.getPosition(), curExpression, e); } return parenthesisExpression; }
node = readElements(nodeLeft, 0); } catch (ExpressionParserException filterParserException) {
node = readElements(nodeLeft, 0); } catch (ExpressionParserException filterParserException) {
node = readElements(nodeLeft, 0); } catch (ExpressionParserException filterParserException) {
expression = readElements(expression, 0);
expression = readElements(expression, 0);
expression = readElements(expression, 0);
rightNode = readElements(rightNode, nextOperator.getOP().getPriority()); nextOperator = readBinaryOperator();
rightNode = readElements(rightNode, nextOperator.getOP().getPriority()); nextOperator = readBinaryOperator();
rightNode = readElements(rightNode, nextOperator.getOP().getPriority()); nextOperator = readBinaryOperator();