diff -r 441121728230 libinterp/corefcn/pt-jit.cc
--- a/libinterp/corefcn/pt-jit.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/corefcn/pt-jit.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -38,6 +38,9 @@
 #include "symtab.h"
 #include "variables.h"
 
+// for some debug information output
+#include <debug_message_settings.h>
+
 #ifdef HAVE_LLVM
 
 static bool Vdebug_jit = false;
@@ -1853,12 +1856,18 @@
 bool
 tree_jit::execute (tree_simple_for_command& cmd, const octave_value& bounds)
 {
+#if VERB_TYPE_ACTIVE(INFORM_JIT)
+  DEBUG_OUTPUT(INFORM_JIT_STR << "JIT was invoked (simple for command).");
+#endif
   return instance ().do_execute (cmd, bounds);
 }
 
 bool
 tree_jit::execute (tree_while_command& cmd)
 {
+#if VERB_TYPE_ACTIVE(INFORM_JIT)
+  DEBUG_OUTPUT(INFORM_JIT_STR << "JIT was invoked (while command).");
+#endif
   return instance ().do_execute (cmd);
 }
 
@@ -1866,6 +1875,9 @@
 tree_jit::execute (octave_user_function& fcn, const octave_value_list& args,
                    octave_value_list& retval)
 {
+#if VERB_TYPE_ACTIVE(INFORM_JIT)
+  DEBUG_OUTPUT(INFORM_JIT_STR << "JIT was invoked (function invocation).");
+#endif
   return instance ().do_execute (fcn, args, retval);
 }
 
diff -r 441121728230 libinterp/corefcn/toplev.cc
--- a/libinterp/corefcn/toplev.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/corefcn/toplev.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -559,9 +559,9 @@
 
           if (symbol_table::at_top_level ())
             tree_evaluator::reset_debug_state ();
-
+          
           retval = parser.run ();
-
+          
           if (retval == 0)
             {
               if (parser.stmt_list)
diff -r 441121728230 libinterp/parse-tree/oct-parse.in.yy
--- a/libinterp/parse-tree/oct-parse.in.yy	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/oct-parse.in.yy	Wed Dec 25 13:10:50 2013 +0100
@@ -52,6 +52,7 @@
 #include "quit.h"
 
 #include "comment-list.h"
+#include "debug_message_settings.h"
 #include "defaults.h"
 #include "defun.h"
 #include "dirfns.h"
@@ -131,9 +132,12 @@
 
 %expect 14
 
+
+// Replaces yyparse, yylex, yyerror, yynerrs, yylval, yychar and yydebug so
+// that yy is replaced by the prefix
+
 // Don't add spaces around the = here; it causes some versions of
 // bison to fail to properly recognize the directive.
-
 %name-prefix="octave_"
 
 // We are using the pure parser interface and the reentrant lexer
@@ -371,6 +375,9 @@
 
 input           : simple_list '\n'
                   {
+#if VERB_TYPE_ACTIVE(PARSE_DBG)
+  DEBUG_OUTPUT(PARSE_DBG_STR << "Front: " << $1->front()->str_print_code());
+#endif
                     parser.stmt_list = $1;
                     YYACCEPT;
                   }
@@ -413,11 +420,26 @@
                 ;
 
 statement       : expression
-                  { $$ = parser.make_statement ($1); }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found expression.");
+#endif
+                    $$ = parser.make_statement ($1);
+                  }
                 | command
-                  { $$ = parser.make_statement ($1); }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found command.");
+#endif
+                    $$ = parser.make_statement ($1);
+                  }
                 | word_list_cmd
-                  { $$ = parser.make_statement ($1); }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found word list.");
+#endif
+                    $$ = parser.make_statement ($1);
+                  }
                 ;
 
 // =================
@@ -430,6 +452,9 @@
 
 word_list_cmd   : identifier word_list
                   {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found identifier word list.");
+#endif
                     $$ = parser.make_index_expression ($1, $2, '(');
                     if (! $$)
                       {
@@ -440,7 +465,9 @@
                 ;
 
 word_list       : string
-                  { $$ = new tree_argument_list ($1); }
+                  {
+                    $$ = new tree_argument_list ($1);
+                  }
                 | word_list string
                   {
                     $1->append ($2);
@@ -454,6 +481,9 @@
 
 identifier      : NAME
                   {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found identifier.");
+#endif
                     symbol_table::symbol_record *sr = $1->sym_rec ();
                     $$ = new tree_identifier (*sr, $1->line (), $1->column ());
                   }
@@ -462,6 +492,9 @@
 superclass_identifier
                 : SUPERCLASSREF
                   {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found superclass identifier.");
+#endif
                     std::string method_nm = $1->superclass_method_name ();
                     std::string package_nm = $1->superclass_package_name ();
                     std::string class_nm = $1->superclass_class_name ();
@@ -484,21 +517,51 @@
                 ;
 
 string          : DQ_STRING
-                  { $$ = parser.make_constant (DQ_STRING, $1); }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found DQ string.");
+#endif
+                    $$ = parser.make_constant (DQ_STRING, $1);
+                  }
                 | SQ_STRING
-                  { $$ = parser.make_constant (SQ_STRING, $1); }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found SQ string.");
+#endif
+                    $$ = parser.make_constant (SQ_STRING, $1);
+                  }
                 ;
 
 constant        : NUM
-                  { $$ = parser.make_constant (NUM, $1); }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found numeric constant.");
+#endif
+                    $$ = parser.make_constant (NUM, $1);
+                  }
                 | IMAG_NUM
-                  { $$ = parser.make_constant (IMAG_NUM, $1); }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found imag. constant.");
+#endif
+                    $$ = parser.make_constant (IMAG_NUM, $1);
+                  }
                 | string
-                  { $$ = $1; }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found string constant.");
+#endif
+                    $$ = $1;
+                  }
                 ;
 
 matrix          : '[' matrix_rows ']'
-                  { $$ = parser.finish_matrix ($2); }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found matrix.");
+#endif
+                    $$ = parser.finish_matrix ($2);
+                  }
                 ;
 
 matrix_rows     : cell_or_matrix_row
@@ -557,13 +620,20 @@
 
 fcn_handle      : '@' FCN_HANDLE
                   {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found function handle.");
+#endif
                     $$ = parser.make_fcn_handle ($2);
                     lexer.looking_at_function_handle--;
                   }
                 ;
 
+// anonymous function handle
 anon_fcn_handle : '@' param_list stmt_begin statement
                   {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found anonymous function handle.");
+#endif
                     $$ = parser.make_anon_fcn_handle ($2, $4);
                     lexer.nesting_level.remove ();
                   }
@@ -821,6 +891,9 @@
 
 assign_lhs      : simple_expr
                   {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found simple expression.");
+#endif
                     $$ = parser.validate_matrix_for_assignment ($1);
 
                     if ($$)
@@ -867,6 +940,9 @@
 
 expression      : simple_expr
                   {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found simple expression.");
+#endif
                     if ($1 && ($1->is_matrix () || $1->is_cell ()))
                       {
                         if (parser.validate_array_list ($1))
@@ -881,9 +957,19 @@
                       $$ = $1;
                   }
                 | assign_expr
-                  { $$ = $1; }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found assign expression.");
+#endif
+                    $$ = $1;
+                  }
                 | anon_fcn_handle
-                  { $$ = $1; }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found anonymous function handle.");
+#endif
+                    $$ = $1;
+                  }
                 ;
 
 // ================================================
@@ -948,9 +1034,19 @@
 // ====================
 
 select_command  : if_command
-                  { $$ = $1; }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found if command.");
+#endif
+                    $$ = $1;
+                  }
                 | switch_command
-                  { $$ = $1; }
+                  {
+#if VERB_TYPE_ACTIVE(PARSE_TRACE)
+  DEBUG_OUTPUT(PARSE_TRACE_STR << "Found switch command.");
+#endif
+                    $$ = $1;
+                  }
                 ;
 
 // ============
@@ -3611,7 +3707,20 @@
 int
 octave_parser::run (void)
 {
-  return octave_parse (*this);
+#if VERB_TYPE_ACTIVE(PARSE_MEASURE) 
+  clock_t start, diff;
+  start = clock();
+  
+  int tmp = octave_parse (*this);
+  
+  diff = clock() - start;
+  DEBUG_OUTPUT(PARSE_MEASURE_STR << "MEASUREMENT: PARSER: "<< diff << " clicks ("
+  << (static_cast<double>(diff))/CLOCKS_PER_SEC << " seconds).\n");
+  
+  return tmp;
+#else
+  return octave_parse(*this);
+#endif
 }
 
 octave_push_parser::~octave_push_parser (void)
@@ -3652,7 +3761,16 @@
 
       yypstate *pstate = static_cast<yypstate *> (parser_state);
 
+#if VERB_TYPE_ACTIVE(PARSE_MEASURE) 
+  clock_t start, diff;
+  start = clock();
+#endif
       status = octave_push_parse (pstate, token, &lval, *this);
+#if VERB_TYPE_ACTIVE(PARSE_MEASURE) 
+  diff = clock() - start;
+  DEBUG_OUTPUT(PARSE_MEASURE_STR << "MEASUREMENT: PUSH_PARSER: "<< diff << " clicks ("
+  << ((double)diff)/CLOCKS_PER_SEC << " seconds).\n");
+#endif
     }
   while (status == YYPUSH_MORE);
 
diff -r 441121728230 libinterp/parse-tree/parse.h
--- a/libinterp/parse-tree/parse.h	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/parse.h	Wed Dec 25 13:10:50 2013 +0100
@@ -257,44 +257,44 @@
   make_elseif_clause (token *elseif_tok, tree_expression *expr,
                       tree_statement_list *list, octave_comment_list *lc);
 
-  // Finish a switch command.
+  /// Finish a switch command.
   tree_switch_command *
   finish_switch_command (token *switch_tok, tree_expression *expr,
                          tree_switch_case_list *list, token *end_tok,
                          octave_comment_list *lc);
 
-  // Build a switch case.
+  /// Build a switch case.
   tree_switch_case *
   make_switch_case (token *case_tok, tree_expression *expr,
                     tree_statement_list *list, octave_comment_list *lc);
 
-  // Build an assignment to a variable.
+  /// Build an assignment to a variable.
   tree_expression *
   make_assign_op (int op, tree_argument_list *lhs, token *eq_tok,
                   tree_expression *rhs);
 
-  // Define a script.
+  /// Define a script.
   void make_script (tree_statement_list *cmds, tree_statement *end_script);
 
-  // Begin defining a function.
+  /// Begin defining a function.
   octave_user_function *
   start_function (tree_parameter_list *param_list, tree_statement_list *body,
                   tree_statement *end_function);
 
-  // Create a no-op statement for end_function.
+  /// Create a no-op statement for end_function.
   tree_statement *make_end (const std::string& type, bool eof, int l, int c);
 
-  // Do most of the work for defining a function.
+  /// Do most of the work for defining a function.
   octave_user_function *
   frob_function (const std::string& fname, octave_user_function *fcn);
 
-  // Finish defining a function.
+  /// Finish defining a function.
   tree_function_def *
   finish_function (tree_parameter_list *ret_list,
                    octave_user_function *fcn, octave_comment_list *lc,
                    int l, int c);
 
-  // Reset state after parsing function.
+  /// Reset state after parsing function.
   void
   recover_from_parsing_function (void);
 
diff -r 441121728230 libinterp/parse-tree/pt-arg-list.cc
--- a/libinterp/parse-tree/pt-arg-list.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-arg-list.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -44,6 +44,9 @@
 #include "toplev.h"
 #include "unwind-prot.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Argument lists.
 
 tree_argument_list::~tree_argument_list (void)
@@ -351,5 +354,8 @@
 void
 tree_argument_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting tree argument list.");
+#endif
   tw.visit_argument_list (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-assign.cc
--- a/libinterp/parse-tree/pt-assign.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-assign.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -43,6 +43,9 @@
 #include "utils.h"
 #include "variables.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Simple assignment expressions.
 
 tree_simple_assignment::tree_simple_assignment
@@ -171,6 +174,9 @@
 void
 tree_simple_assignment::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting simple assignment.");
+#endif
   tw.visit_simple_assignment (*this);
 }
 
@@ -391,5 +397,8 @@
 void
 tree_multi_assignment::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting multi assignment.");
+#endif
   tw.visit_multi_assignment (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-binop.cc
--- a/libinterp/parse-tree/pt-binop.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-binop.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -34,6 +34,9 @@
 #include "pt-walk.h"
 #include "variables.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // TRUE means we mark | and & expressions for braindead short-circuit
 // behavior.
 static bool Vdo_braindead_shortcircuit_evaluation = true;
@@ -179,6 +182,9 @@
 void
 tree_binary_expression::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting binary expression.");
+#endif
   tw.visit_binary_expression (*this);
 }
 
diff -r 441121728230 libinterp/parse-tree/pt-cell.cc
--- a/libinterp/parse-tree/pt-cell.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-cell.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -34,6 +34,9 @@
 #include "pt-walk.h"
 #include "ov.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 octave_value
 tree_cell::rvalue1 (int)
 {
@@ -110,5 +113,8 @@
 void
 tree_cell::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting cell.");
+#endif
   tw.visit_cell (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-check.h
--- a/libinterp/parse-tree/pt-check.h	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-check.h	Wed Dec 25 13:10:50 2013 +0100
@@ -20,6 +20,11 @@
 
 */
 
+/**
+ * @file pt-check.h
+ * @brief Tree walker to check semantics of code represented by parse trees.
+ */
+
 #if !defined (octave_pt_check_h)
 #define octave_pt_check_h 1
 
@@ -133,10 +138,10 @@
 
   void gripe (const std::string& msg, int line);
 
-  // No copying!
+  /// No copying!
 
   tree_checker (const tree_checker&);
-
+  /// No copying!
   tree_checker& operator = (const tree_checker&);
 };
 
diff -r 441121728230 libinterp/parse-tree/pt-classdef.cc
--- a/libinterp/parse-tree/pt-classdef.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-classdef.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -27,11 +27,17 @@
 #include "ov-classdef.h"
 #include "pt-classdef.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Classdef attribute
 
 void
 tree_classdef_attribute::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef attribute.");
+#endif
   tw.visit_classdef_attribute (*this);
 }
 
@@ -50,6 +56,9 @@
 void
 tree_classdef_attribute_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef attribute list.");
+#endif
   tw.visit_classdef_attribute_list (*this);
 }
 
@@ -58,6 +67,9 @@
 void
 tree_classdef_superclass::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef superclass.");
+#endif
   tw.visit_classdef_superclass (*this);
 }
 
@@ -76,6 +88,9 @@
 void
 tree_classdef_superclass_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef superclass list.");
+#endif
   tw.visit_classdef_superclass_list (*this);
 }
 
@@ -84,6 +99,9 @@
 void
 tree_classdef_property::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef property.");
+#endif
   tw.visit_classdef_property (*this);
 }
 
@@ -102,6 +120,9 @@
 void
 tree_classdef_property_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef property list.");
+#endif
   tw.visit_classdef_property_list (*this);
 }
 
@@ -110,6 +131,9 @@
 void
 tree_classdef_properties_block::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef properties block.");
+#endif
   tw.visit_classdef_properties_block (*this);
 }
 
@@ -118,6 +142,9 @@
 void
 tree_classdef_methods_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef methods list.");
+#endif
   tw.visit_classdef_methods_list (*this);
 }
 
@@ -126,6 +153,9 @@
 void
 tree_classdef_methods_block::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef methods block.");
+#endif
   tw.visit_classdef_methods_block (*this);
 }
 
@@ -134,6 +164,9 @@
 void
 tree_classdef_event::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef event.");
+#endif
   tw.visit_classdef_event (*this);
 }
 
@@ -152,6 +185,9 @@
 void
 tree_classdef_events_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef event list.");
+#endif
   tw.visit_classdef_events_list (*this);
 }
 
@@ -160,6 +196,9 @@
 void
 tree_classdef_events_block::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef event block.");
+#endif
   tw.visit_classdef_events_block (*this);
 }
 
@@ -168,6 +207,9 @@
 void
 tree_classdef_enum::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef enum.");
+#endif
   tw.visit_classdef_enum (*this);
 }
 
@@ -186,6 +228,9 @@
 void
 tree_classdef_enum_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef enum list.");
+#endif
   tw.visit_classdef_enum_list (*this);
 }
 
@@ -194,6 +239,9 @@
 void
 tree_classdef_enum_block::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef enum block.");
+#endif
   tw.visit_classdef_enum_block (*this);
 }
 
@@ -255,5 +303,8 @@
 void
 tree_classdef::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting classdef.");
+#endif
   tw.visit_classdef (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-cmd.cc
--- a/libinterp/parse-tree/pt-cmd.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-cmd.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -27,6 +27,9 @@
 #include "pt-cmd.h"
 #include "pt-walk.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // No-op.
 
 tree_command *
@@ -40,6 +43,9 @@
 void
 tree_no_op_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting command with no operation.");
+#endif
   tw.visit_no_op_command (*this);
 }
 
@@ -55,5 +61,8 @@
 void
 tree_function_def::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting function definition.");
+#endif
   tw.visit_function_def (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-colon.cc
--- a/libinterp/parse-tree/pt-colon.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-colon.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -32,6 +32,9 @@
 #include "pt-colon.h"
 #include "pt-walk.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Colon expressions.
 
 tree_colon_expression *
@@ -282,5 +285,8 @@
 void
 tree_colon_expression::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting colon expression.");
+#endif
   tw.visit_colon_expression (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-const.cc
--- a/libinterp/parse-tree/pt-const.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-const.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -32,6 +32,9 @@
 #include "pt-const.h"
 #include "pt-walk.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // We are likely to have a lot of tree_constant objects to allocate,
 // so make the grow_size large.
 DEFINE_OCTAVE_ALLOCATOR2 (tree_constant, 1024);
@@ -84,5 +87,8 @@
 void
 tree_constant::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting constant.");
+#endif
   tw.visit_constant (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-decl.cc
--- a/libinterp/parse-tree/pt-decl.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-decl.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -37,6 +37,9 @@
 #include "utils.h"
 #include "variables.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Declarations (global, static, etc.).
 
 tree_decl_elt::~tree_decl_elt (void)
@@ -78,6 +81,9 @@
 void
 tree_decl_elt::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting decl elt.");
+#endif
   tw.visit_decl_elt (*this);
 }
 
@@ -102,6 +108,9 @@
 void
 tree_decl_init_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting declaration initialization list.");
+#endif
   tw.visit_decl_init_list (*this);
 }
 
@@ -126,6 +135,9 @@
 void
 tree_global_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting global command.");
+#endif
   tw.visit_global_command (*this);
 }
 
@@ -144,5 +156,8 @@
 void
 tree_persistent_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting persistent command.");
+#endif
   tw.visit_persistent_command (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-eval.cc
--- a/libinterp/parse-tree/pt-eval.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-eval.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -32,6 +32,7 @@
 #include <typeinfo>
 
 #include "debug.h"
+#include "debug_message_settings.h"
 #include "defun.h"
 #include "error.h"
 #include "gripes.h"
@@ -784,6 +785,10 @@
 void
 tree_evaluator::visit_statement_list (tree_statement_list& lst)
 {
+#if VERB_TYPE_ACTIVE(EVAL_MEASURE)
+  clock_t start, diff;
+  start = clock();
+#endif
   static octave_value_list empty_list;
 
   if (error_state)
@@ -837,6 +842,11 @@
             error ("invalid statement found in statement list!");
         }
     }
+#if VERB_TYPE_ACTIVE(EVAL_MEASURE)
+  diff = clock() - start;
+  DEBUG_OUTPUT(EVAL_MEASURE_STR << "MEASUREMENT: EVALUATOR: "<< diff << " clicks ("
+  << (static_cast<double>(diff))/CLOCKS_PER_SEC << " seconds).\n");
+#endif
 }
 
 void
diff -r 441121728230 libinterp/parse-tree/pt-eval.h
--- a/libinterp/parse-tree/pt-eval.h	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-eval.h	Wed Dec 25 13:10:50 2013 +0100
@@ -20,6 +20,12 @@
 
 */
 
+/**
+ * @file pt-eval.h
+ * 
+ * @brief Contains methods to evaluate code represented by parse trees
+ */
+
 #if !defined (octave_pt_eval_h)
 #define octave_pt_eval_h 1
 
@@ -118,6 +124,11 @@
 
   void visit_statement (tree_statement&);
 
+  /**
+   * Evaluates all statements of a statement list.
+   * 
+   * @param lst The list to evaluate.
+   */
   void visit_statement_list (tree_statement_list&);
 
   void visit_switch_case (tree_switch_case&);
@@ -146,23 +157,26 @@
   // If < 0, stop executing at the next possible stopping point.
   static int dbstep_flag;
 
-  // The number of the stack frame we are currently debugging.
+  /// The number of the stack frame we are currently debugging.
   static size_t current_frame;
 
   static bool debug_mode;
 
-  // Possible types of evaluation contexts.
+  /// Possible types of evaluation contexts.
   enum stmt_list_type
   {
-    function,  // function body
-    script,    // script file
-    other      // command-line input or eval string
+    /// function body
+    function,
+    /// script file
+    script,
+    /// command-line input or eval string
+    other
   };
 
-  // The context for the current evaluation.
+  /// The context for the current evaluation.
   static stmt_list_type statement_context;
 
-  // TRUE means we are evaluating some kind of looping construct.
+  /// TRUE means we are evaluating some kind of looping construct.
   static bool in_loop_command;
 
 private:
@@ -178,17 +192,18 @@
   virtual octave_value
   do_keyboard (const octave_value_list& args = octave_value_list ()) const;
 
-  // No copying!
-
+  /// No copying!
   tree_evaluator (const tree_evaluator&);
-
+  /// No copying!
   tree_evaluator& operator = (const tree_evaluator&);
 };
 
 extern tree_evaluator *current_evaluator;
 
-// Maximum nesting level for functions, scripts, or sourced files called
-// recursively.
+/**
+ * Maximum nesting level for functions, scripts, or sourced files called
+ * recursively.
+ */
 extern int Vmax_recursion_depth;
 
 #endif
diff -r 441121728230 libinterp/parse-tree/pt-except.cc
--- a/libinterp/parse-tree/pt-except.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-except.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -40,6 +40,9 @@
 #include "unwind-prot.h"
 #include "variables.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Simple exception handling.
 
 tree_try_catch_command::~tree_try_catch_command (void)
@@ -69,6 +72,9 @@
 void
 tree_try_catch_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting try-catch construct.");
+#endif
   tw.visit_try_catch_command (*this);
 }
 
@@ -99,5 +105,8 @@
 void
 tree_unwind_protect_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting unwind-protect construct.");
+#endif
   tw.visit_unwind_protect_command (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-except.h
--- a/libinterp/parse-tree/pt-except.h	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-except.h	Wed Dec 25 13:10:50 2013 +0100
@@ -20,6 +20,12 @@
 
 */
 
+/**
+ * @file pt-except.h
+ * @brief Provides tree_try_catch_command and tree_unwind_protect_command for
+ * exception handling.
+ */
+
 #if !defined (octave_pt_except_h)
 #define octave_pt_except_h 1
 
diff -r 441121728230 libinterp/parse-tree/pt-fcn-handle.cc
--- a/libinterp/parse-tree/pt-fcn-handle.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-fcn-handle.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -35,6 +35,9 @@
 #include "pt-walk.h"
 #include "variables.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 void
 tree_fcn_handle::print (std::ostream& os, bool pr_as_read_syntax,
                         bool pr_orig_text)
@@ -82,6 +85,9 @@
 void
 tree_fcn_handle::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting function handle.");
+#endif
   tw.visit_fcn_handle (*this);
 }
 
@@ -216,5 +222,8 @@
 void
 tree_anon_fcn_handle::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting anonymous function handle.");
+#endif
   tw.visit_anon_fcn_handle (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-funcall.cc
--- a/libinterp/parse-tree/pt-funcall.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-funcall.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -28,6 +28,9 @@
 #include "pt-funcall.h"
 #include "pt-walk.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Function call objects.
 
 void
@@ -79,5 +82,8 @@
 void
 tree_funcall::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting function call.");
+#endif
   tw.visit_funcall (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-funcall.h
--- a/libinterp/parse-tree/pt-funcall.h	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-funcall.h	Wed Dec 25 13:10:50 2013 +0100
@@ -20,6 +20,16 @@
 
 */
 
+/**
+ * @file pt-funcall.h
+ * @brief Class representing function calls to known functions.
+ * 
+ * Function call. This class only represents function calls that have
+ * known functions (most useful for calls to built-in functions that
+ * are generated by the parser) and fixed argument lists, known at
+ * compile time.
+ */
+
 #if !defined (octave_tree_funcall_h)
 #define octave_tree_funcall_h 1
 
diff -r 441121728230 libinterp/parse-tree/pt-id.cc
--- a/libinterp/parse-tree/pt-id.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-id.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -37,6 +37,9 @@
 #include "utils.h"
 #include "variables.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Symbols from the symbol table.
 
 void
@@ -157,5 +160,8 @@
 void
 tree_identifier::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting identifier.");
+#endif
   tw.visit_identifier (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-idx.cc
--- a/libinterp/parse-tree/pt-idx.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-idx.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -40,6 +40,9 @@
 #include "variables.h"
 #include "gripes.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Index expressions.
 
 tree_index_expression::tree_index_expression (int l, int c)
@@ -680,5 +683,8 @@
 void
 tree_index_expression::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting index expression.");
+#endif
   tw.visit_index_expression (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-jump.cc
--- a/libinterp/parse-tree/pt-jump.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-jump.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -30,6 +30,9 @@
 #include "pt-jump.h"
 #include "pt-walk.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 class octave_value_list;
 
 // Break.
@@ -47,6 +50,9 @@
 void
 tree_break_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting break command.");
+#endif
   tw.visit_break_command (*this);
 }
 
@@ -65,6 +71,9 @@
 void
 tree_continue_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting continue command.");
+#endif
   tw.visit_continue_command (*this);
 }
 
@@ -83,5 +92,8 @@
 void
 tree_return_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting return command.");
+#endif
   tw.visit_return_command (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-loop.cc
--- a/libinterp/parse-tree/pt-loop.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-loop.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -42,6 +42,9 @@
 #include "pt-walk.h"
 #include "unwind-prot.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // While.
 
 tree_while_command::~tree_while_command (void)
@@ -69,6 +72,9 @@
 void
 tree_while_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting while command.");
+#endif
   tw.visit_while_command (*this);
 }
 
@@ -88,6 +94,9 @@
 void
 tree_do_until_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting do-until command.");
+#endif
   tw.visit_do_until_command (*this);
 }
 
@@ -122,6 +131,9 @@
 void
 tree_simple_for_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting simple for command.");
+#endif
   tw.visit_simple_for_command (*this);
 }
 
@@ -149,5 +161,8 @@
 void
 tree_complex_for_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting complex for command.");
+#endif
   tw.visit_complex_for_command (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-mat.cc
--- a/libinterp/parse-tree/pt-mat.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-mat.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -46,6 +46,9 @@
 #include "ov-re-sparse.h"
 #include "ov-cx-sparse.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // The character to fill with when creating string arrays.
 char Vstring_fill_char = ' ';
 
@@ -1148,6 +1151,9 @@
 void
 tree_matrix::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting matrix.");
+#endif
   tw.visit_matrix (*this);
 }
 
diff -r 441121728230 libinterp/parse-tree/pt-misc.cc
--- a/libinterp/parse-tree/pt-misc.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-misc.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -36,6 +36,9 @@
 #include "pt-walk.h"
 #include "utils.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Parameter lists.
 
 tree_parameter_list::~tree_parameter_list (void)
@@ -331,6 +334,9 @@
 void
 tree_parameter_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting parameter list.");
+#endif
   tw.visit_parameter_list (*this);
 }
 
@@ -365,5 +371,8 @@
 void
 tree_return_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting return list.");
+#endif
   tw.visit_return_list (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-select.cc
--- a/libinterp/parse-tree/pt-select.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-select.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -35,7 +35,14 @@
 #include "Cell.h"
 #include "ov-typeinfo.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // If clauses.
+/**
+ * @file pt-select.cc
+ * @brief This file provides functions to handle if- and switch-statements.
+ */
 
 tree_if_clause::~tree_if_clause (void)
 {
@@ -56,6 +63,9 @@
 void
 tree_if_clause::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting if clause.");
+#endif
   tw.visit_if_clause (*this);
 }
 
@@ -80,6 +90,9 @@
 void
 tree_if_command_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting if command list.");
+#endif
   tw.visit_if_command_list (*this);
 }
 
@@ -105,6 +118,9 @@
 void
 tree_if_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting if command.");
+#endif
   tw.visit_if_command (*this);
 }
 
@@ -168,6 +184,9 @@
 void
 tree_switch_case::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting switch-case statement.");
+#endif
   tw.visit_switch_case (*this);
 }
 
@@ -192,6 +211,9 @@
 void
 tree_switch_case_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting switch-case list.");
+#endif
   tw.visit_switch_case_list (*this);
 }
 
@@ -219,5 +241,8 @@
 void
 tree_switch_command::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting switch command.");
+#endif
   tw.visit_switch_command (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt-stmt.cc
--- a/libinterp/parse-tree/pt-stmt.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-stmt.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -28,6 +28,7 @@
 
 #include "quit.h"
 
+#include "debug_message_settings.h"
 #include "defun.h"
 #include "error.h"
 #include "gripes.h"
@@ -175,6 +176,9 @@
 void
 tree_statement::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting statement.");
+#endif
   tw.visit_statement (*this);
 }
 
@@ -288,5 +292,17 @@
 void
 tree_statement_list::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting statement list.");
+#endif
+#ifdef DBG_MEASURE 
+  clock_t start, diff;
+  start = clock();
+#endif
   tw.visit_statement_list (*this);
+#ifdef DBG_MEASURE
+  diff = clock() - start;
+  DEBUG_OUTPUT(PARSE_MEASURE_STR << "MEASUREMENT: EVAL: "<< diff
+    << " clicks (" << ((double)diff)/CLOCKS_PER_SEC << " seconds).");
+#endif
 }
diff -r 441121728230 libinterp/parse-tree/pt-stmt.h
--- a/libinterp/parse-tree/pt-stmt.h	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-stmt.h	Wed Dec 25 13:10:50 2013 +0100
@@ -20,6 +20,12 @@
 
 */
 
+/**
+ * @file pt-stmt.h
+ * 
+ * @brief Contains the tree_statement and tree_statement_list class.
+ */
+
 #if !defined (octave_pt_stmt_h)
 #define octave_pt_stmt_h 1
 
@@ -38,9 +44,9 @@
 #include "symtab.h"
 #include "pt.h"
 
-// A statement is either a command to execute or an expression to
-// evaluate.
 
+/// A statement is either a command to execute or an expression to
+/// evaluate.
 class
 tree_statement : public tree
 {
@@ -101,22 +107,27 @@
   tree_statement *dup (symbol_table::scope_id scope,
                        symbol_table::context_id context) const;
 
+  /**
+   * Evaluates the statement.
+   * 
+   * @param tw
+   */
   void accept (tree_walker& tw);
 
 private:
 
   // Only one of cmd or expr can be valid at once.
 
-  // Command to execute.
+  /// Command to execute.
   tree_command *cmd;
 
-  // Expression to evaluate.
+  /// Expression to evaluate.
   tree_expression *expr;
 
-  // Comment associated with this statement.
+  /// Comment associated with this statement.
   octave_comment_list *comm;
 
-  // No copying!
+  /// No copying!
   tree_statement (const tree_statement&);
 
   tree_statement& operator = (const tree_statement&);
@@ -177,19 +188,18 @@
 
 private:
 
-  // Does this list of statements make up the body of a function?
+  /// Does this list of statements make up the body of a function?
   bool function_body;
 
-  // Does this list of statements make up the body of a function?
+  /// Does this list of statements make up the body of a function?
   bool anon_function_body;
 
-  // Does this list of statements make up the body of a script?
+  /// Does this list of statements make up the body of a script?
   bool script_body;
 
-  // No copying!
-
+  /// Prevent copying!
   tree_statement_list (const tree_statement_list&);
-
+  /// Prevent copying!
   tree_statement_list& operator = (const tree_statement_list&);
 };
 
diff -r 441121728230 libinterp/parse-tree/pt-unop.cc
--- a/libinterp/parse-tree/pt-unop.cc	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt-unop.cc	Wed Dec 25 13:10:50 2013 +0100
@@ -33,6 +33,9 @@
 #include "pt-unop.h"
 #include "pt-walk.h"
 
+// For debug messages
+#include "debug_message_settings.h"
+
 // Unary expressions.
 
 std::string
@@ -125,6 +128,9 @@
 void
 tree_prefix_expression::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting prefix expression.");
+#endif
   tw.visit_prefix_expression (*this);
 }
 
@@ -204,5 +210,8 @@
 void
 tree_postfix_expression::accept (tree_walker& tw)
 {
+#if VERB_TYPE_ACTIVE(EVAL_TRACE)
+  DEBUG_OUTPUT(EVAL_TRACE_STR << "Visiting postfix expression.");
+#endif
   tw.visit_postfix_expression (*this);
 }
diff -r 441121728230 libinterp/parse-tree/pt.h
--- a/libinterp/parse-tree/pt.h	Tue Dec 24 01:30:27 2013 -0500
+++ b/libinterp/parse-tree/pt.h	Wed Dec 25 13:10:50 2013 +0100
@@ -62,6 +62,9 @@
 
   bool is_breakpoint (void) const { return bp; }
 
+  /**
+   * Prints the code represented by this tree in a readable format.
+   */
   std::string str_print_code (void);
 
   virtual void accept (tree_walker& tw) = 0;
diff -r 441121728230 liboctave/util/debug_message_settings.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/liboctave/util/debug_message_settings.h	Wed Dec 25 13:10:50 2013 +0100
@@ -0,0 +1,136 @@
+/* Copyright (C) 2013 Lasse Schuirmann
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * @file debug_message_settings.h
+ * @author Lasse Schuirmann <lasse.schuirmann@gmail.com>
+ * 
+ * @brief This file provides the possibility to activate various trace outputs
+ * within octave. Feel free to add more.
+ * 
+ * It is intended as a help to understand the octave parsing process easier.
+ * 
+ * Currently supported types are:
+ * - NONE
+ * - PARSE_TRACE (Partially implemented)
+ * - PARSE_DBG (Not implemented)
+ * - EVAL_TRACE
+ * - PARSE_MEASURE
+ * - EVAL_MEASURE
+ * 
+ * Here is an example how a debug output within the program may look like:
+ * 
+ *  #if VERB_TYPE_ACTIVE(PARSE_TRACE)\n
+ *    DEBUG_OUTPUT(PARSE_TRACE_STR << "Descriptive text " << some_var);\n
+ *  #endif \n
+ * 
+ * The \\n will be added automatically.
+ */
+
+#if !defined (debug_message_settings_h)
+#define debug_message_settings_h
+
+#include <iostream>
+#include <time.h>
+
+/**
+ * Defines what types of debug output may occur
+ */
+#define VERBOSE           (NONE)
+/// If trace is not 0, filename and line will be added to the output
+#define TRACE             0
+/// Output stream
+#define OUTPUT_STREAM     cerr
+/// Prefix which is put out before every debug output
+#define OUTP_PREFIX       "[DBG]"
+
+/**
+ * Deactivates all debug output
+ * 
+ * If VERBOSE is NONE, VERB_TYPE_ACTIVE(arg) will return false for every arg.
+ */
+#define NONE              0
+#define NONE_STR          "[NON] "
+/// TODO Activates output to allow tracing of the parser through the rules
+#define PARSE_TRACE       0x01
+#define PARSE_TRACE_STR   "[PTR] "
+/// TODO Activates only the output of the parsed tree
+#define PARSE_DBG         0x02
+#define PARSE_DBG_STR     "[PDB] "
+/// Activates output to allow tracing of the evaluator
+#define EVAL_TRACE        0x04
+#define EVAL_TRACE_STR    "[ETR] "
+/**
+ * Activates time measurement of the parser
+ * @attention Be aware that the time measurement may be influenced by other
+ * debug outputs!
+ */
+#define PARSE_MEASURE     0x08
+#define PARSE_MEASURE_STR "[PMS] "
+/**
+ * Activates time measurement of the evaluator
+ * @attention Be aware that the time measurement may be influenced by other
+ * debug outputs!
+ */
+#define EVAL_MEASURE      0x10
+#define EVAL_MEASURE_STR  "[EMS] "
+/**
+ * Informs about JIT invocations.
+ */
+#define INFORM_JIT        0x20
+#define INFORM_JIT_STR    "[IJC] "
+
+/* Define new ones here.
+ * Just take the next bit - if you reach 0x80, be sure to redefine ALL and
+ * everything should work as before.
+ */
+/// Activates all output types
+#define ALL               0xFF
+
+/**
+ * VERB_TYPE_ACTIVE
+ * 
+ * Returns false/0 if the given verbose type is inactive. If it's active, the
+ * type value is returned.
+ * 
+ * @param type The verbose type to check.
+ * @return boolean
+ */
+#define VERB_TYPE_ACTIVE(type) (((VERBOSE) & (type)) != 0)
+
+
+/**
+ * DEBUG_OUTPUT
+ * 
+ * Outputs the given string as debug output. It adds some more information
+ * which may be configured in debug_message_settings.h.
+ * 
+ * Note that the brackets around output are omitted intentionally to allow
+ * passing multiple variables.
+ * 
+ * @param output the string to output
+ */
+#if ((TRACE) != 0)
+#define DEBUG_OUTPUT(output)  do { \
+  std::OUTPUT_STREAM << OUTP_PREFIX << output << std::endl;\
+  std::OUTPUT_STREAM << "     File: " << __FILE__ << "\n     Line: " << __LINE__ << \
+  std::endl;\
+} while(0)
+#else
+#define DEBUG_OUTPUT(output)  std::OUTPUT_STREAM << OUTP_PREFIX << output << std::endl;
+#endif
+
+#endif /* debug_message_settings_h */
