 PROCEDURE AOP_block_body(i_level          IN INTEGER
                         ,i_params         IN CLOB    DEFAULT NULL)  IS
   l_node   ms_logger.node_typ := ms_logger.new_proc(g_package_name,'AOP_block_body');
-  l_keyword VARCHAR2(50);
+  l_keyword CLOB;
 BEGIN
  
   go_past('\sBEGIN\s');

--------------------------------------------------------------------------------- 
FUNCTION get_next(i_search      IN VARCHAR2
                 ,i_modifier    IN VARCHAR2 DEFAULT 'i'
                 ,i_raise_error IN BOOLEAN  DEFAULT FALSE ) return VARCHAR2 IS
  l_node   ms_logger.node_typ := ms_logger.new_proc(g_package_name,'get_next');	
  l_result varchar2(32000);
BEGIN
  check_timeout;
  ms_logger.param(l_node, 'i_search',i_search);

        AOP_block_body(i_level => i_level + 1);
      WHEN l_keyword = 'BEGIN' THEN
        AOP_block_body(i_level => i_level + 1);
	  WHEN l_keyword LIKE 'CASE%END CASE;' THEN
	    ms_logger.comment(l_node, 'Found CASE-END-CASE;');
		go_past('\sCASE\s');  
	  WHEN l_keyword LIKE 'CASE%END;' THEN
	    ms_logger.comment(l_node, 'Found CASE-END;');
		go_past('\sEND;\s'); 
      ELSE
	    ms_logger.fatal(l_node, 'Expected "DECLARE" "BEGIN" "END;" "CASE%END CASE;" or "CASE%END;"');
        RAISE x_invalid_keyword;
    END CASE;
 
