class CustomExpectedStepParser implements StepParser<ExpectedStep> {

	private ParseContext parse(String expression) {
		ExpectedStepLexer lexer = new ExpectedStepLexer(new ANTLRInputStream(expression));
		ExpectedStepParser parser = new ExpectedStepParser(new CommonTokenStream(lexer));
		parser.addErrorListener(new BaseErrorListener() {
	        @Override
	        public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
	            throw new IllegalStateException("failed to parse at line " + line + " due to " + msg, e);
	        }
	    });
		return parser.parse();
		
	}

}