{
JSPELParser elParser = JSPELParser.createParser(_elText);
// =
try {
//final long startParsing = System.currentTimeMillis();
final ASTExpression expr = elParser.Expression();
//final long endParsing = System.currentTimeMillis();
//final long startSemantics = System.currentTimeMillis();
validateSemantics(expr, _context);
//final long endSemantics = System.currentTimeMillis();
//System.out.println("Time to parse '"+elText+"' = "+(endParsing-startParsing));
//System.out.println("Time to semantic checking '"+elText+"' = "+(endSemantics-startSemantics));
// if the parser bailed before parsing the whole
// expression, raise a warning that there is probably
// some syntatical issue
if (expr.getLastToken().endColumn < _elText.trim().length()-1)
{
final int offset = _context.getDocumentPosition() + expr.getLastToken().endColumn;
final int length = _elText.trim().length() - expr.getLastToken().endColumn;
final Diagnostic diagnostic =
_diagnosticFactory.create_GENERAL_SYNTAX_ERROR();
_reporter.report(diagnostic, offset, length);
}