package edu.kit.iti.formal.pse.worthwhile.interpreter;

import edu.kit.iti.formal.pse.worthwhile.model.ast.Annotation;
import edu.kit.iti.formal.pse.worthwhile.model.ast.Assertion;
import edu.kit.iti.formal.pse.worthwhile.model.ast.Expression;
import edu.kit.iti.formal.pse.worthwhile.model.ast.Statement;

/**
 * Default listener for {@link Interpreter} events.
 */
public abstract class AbstractExecutionEventListener {
	/**
	 * Signals that a {@link Statement} has been executed by the {@link Interpreter}.
	 * 
	 * @param statement
	 *                the <code>Statement</code> that was executed
	 */

	public void statementExecuted(final Statement statement) {
	}

	/**
	 * Signals that a {@link Statement} will be executed.
	 * 
	 * @param statement
	 *                the <code>Statement</code> that will be executed
	 */
	public void statementWillExecute(final Statement statement) {
	}

	/**
	 * Signals that the execution of a {@link Statement} failed.
	 * 
	 * @param statement
	 *                the <code>Statement</code> that failed to execute
	 * @param error
	 *                an {@link InterpreterError} object that describes the error
	 */
	public void executionFailed(final Statement statement, final InterpreterError error) {
		throw new RuntimeException("Failed to execute " + statement.toString() + "; Got error "
		                + error.toString());
	}

	/**
	 * Signals the start of the execution of a {@link edu.kit.iti.formal.pse.worthwhile.model.ast.Program}.
	 */
	public void executionStarted() {
	}

	/**
	 * Signals the successful completion of execution of a
	 * {@link edu.kit.iti.formal.pse.worthwhile.model.ast.Program}.
	 */
	public void executionCompleted() {
	}

	/**
	 * Signals the execution of an {@link Assertion} that was not valid.
	 * 
	 * @param assertion
	 *                the invalid <code>Assertion</code>
	 */
	public void annotationFailed(final Annotation annotation) {
		throw new RuntimeException(annotation.toString() + " is invalid.");
	}

	/**
	 * Signals the execution of an {@link Assertion} that was valid.
	 * 
	 * @param assertion
	 *                the valid <code>Assertion</code>
	 */
	public void annotationSucceeded(final Annotation annotation) {
	}

	/**
	 * Signals the evaluation of a {@link Expression}.
	 * 
	 * @param expression
	 *                the <code>Expression</code> that was evaluated
	 */
	public void expressionEvaluated(final Expression expression) {
	}

	/**
	 * Signals that the execution of a {@link Expression} failed.
	 * 
	 * @param expression
	 *                the <code>Expression</code> that failed to execute
	 * @param error
	 *                an {@link InterpreterError} object that describes the error
	 */
	public void expressionFailed(final Expression expression, final InterpreterError error) {
		throw new RuntimeException("Failed to execute " + expression.toString() + "; Got error "
		                + error.toString());
	}
}
@@ -1734,36 +1734,37 @@
 n of an %7B@link A
-sser
+nnota
 tion%7D that was n
@@ -1782,36 +1782,37 @@
  * %0A%09 * @param a
-sser
+nnota
 tion%0A%09 *        
@@ -1830,36 +1830,37 @@
  invalid %3Ccode%3EA
-sser
+nnota
 tion%3C/code%3E%0A%09 */
@@ -2040,20 +2040,21 @@
 %7B@link A
-sser
+nnota
 tion%7D th
@@ -2084,20 +2084,21 @@
 @param a
-sser
+nnota
 tion%0A%09 *
@@ -2130,20 +2130,21 @@
  %3Ccode%3EA
-sser
+nnota
 tion%3C/co

Fix Javadoc comments for Annotation events