
#line 3 "<stdout>"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define yy_create_buffer tclscanYY_create_buffer
#define yy_delete_buffer tclscanYY_delete_buffer
#define yy_flex_debug tclscanYY_flex_debug
#define yy_init_buffer tclscanYY_init_buffer
#define yy_flush_buffer tclscanYY_flush_buffer
#define yy_load_buffer_state tclscanYY_load_buffer_state
#define yy_switch_to_buffer tclscanYY_switch_to_buffer
#define yyin tclscanYYin
#define yyleng tclscanYYleng
#define yylex tclscanYYlex
#define yylineno tclscanYYlineno
#define yyout tclscanYYout
#define yyrestart tclscanYYrestart
#define yytext tclscanYYtext
#define yywrap tclscanYYwrap
#define yyalloc tclscanYYalloc
#define yyrealloc tclscanYYrealloc
#define yyfree tclscanYYfree

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>

/* end standard C headers. */

/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L

/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 * if you want the limit (max/min) macros for int types. 
 */
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif

#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN              (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX               (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX              (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX              (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX              (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else	/* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)

#define YY_USE_CONST

#endif	/* defined (__STDC__) */
#endif	/* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
 * we want to instead treat it as an 8-bit unsigned char, hence the
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN (yy_start) = 1 + 2 *

/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START

/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)

/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE tclscanYYrestart(tclscanYYin  )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 262144
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

extern yy_size_t tclscanYYleng;

extern FILE *tclscanYYin, *tclscanYYout;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
     *       access to the local variable yy_act. Since yyless() is a macro, it would break
     *       existing scanners that call yyless() from OUTSIDE tclscanYYlex. 
     *       One obvious solution it to make yy_act a global. I tried that, and saw
     *       a 5% performance hit in a non-tclscanYYlineno scanner, because yy_act is
     *       normally declared as a register variable-- so it is not worth it.
     */
    #define  YY_LESS_LINENO(n) \
            do { \
                int yyl;\
                for ( yyl = n; yyl < tclscanYYleng; ++yyl )\
                    if ( tclscanYYtext[yyl] == '\n' )\
                        --tclscanYYlineno;\
            }while(0)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up tclscanYYtext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = (yy_hold_char); \
		YY_RESTORE_YY_MORE_OFFSET \
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up tclscanYYtext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, (yytext_ptr)  )

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	yy_size_t yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	yy_size_t yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via tclscanYYrestart()), so that the user can continue scanning by
	 * just pointing tclscanYYin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
 */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]

/* yy_hold_char holds the character lost when tclscanYYtext is formed. */
static char yy_hold_char;
static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
yy_size_t tclscanYYleng;

/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0;		/* whether we need to initialize */
static int yy_start = 0;	/* start state number */

/* Flag which is used to allow tclscanYYwrap()'s to do buffer switches
 * instead of setting up a fresh tclscanYYin.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;

void tclscanYYrestart (FILE *input_file  );
void tclscanYY_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE tclscanYY_create_buffer (FILE *file,int size  );
void tclscanYY_delete_buffer (YY_BUFFER_STATE b  );
void tclscanYY_flush_buffer (YY_BUFFER_STATE b  );
void tclscanYYpush_buffer_state (YY_BUFFER_STATE new_buffer  );
void tclscanYYpop_buffer_state (void );

static void tclscanYYensure_buffer_stack (void );
static void tclscanYY_load_buffer_state (void );
static void tclscanYY_init_buffer (YY_BUFFER_STATE b,FILE *file  );

#define YY_FLUSH_BUFFER tclscanYY_flush_buffer(YY_CURRENT_BUFFER )

YY_BUFFER_STATE tclscanYY_scan_buffer (char *base,yy_size_t size  );
YY_BUFFER_STATE tclscanYY_scan_string (yyconst char *yy_str  );
YY_BUFFER_STATE tclscanYY_scan_bytes (yyconst char *bytes,yy_size_t len  );

void *tclscanYYalloc (yy_size_t  );
void *tclscanYYrealloc (void *,yy_size_t  );
void tclscanYYfree (void *  );

#define yy_new_buffer tclscanYY_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        tclscanYYensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            tclscanYY_create_buffer(tclscanYYin,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}

#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        tclscanYYensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            tclscanYY_create_buffer(tclscanYYin,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

#define tclscanYYwrap(n) 1
#define YY_SKIP_YYWRAP

typedef unsigned char YY_CHAR;

FILE *tclscanYYin = (FILE *) 0, *tclscanYYout = (FILE *) 0;

typedef int yy_state_type;

extern int tclscanYYlineno;

int tclscanYYlineno = 1;

extern char *tclscanYYtext;
#define yytext_ptr tclscanYYtext

static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
static int yy_get_next_buffer (void );
static void yy_fatal_error (yyconst char msg[]  );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up tclscanYYtext.
 */
#define YY_DO_BEFORE_ACTION \
	(yytext_ptr) = yy_bp; \
	(yytext_ptr) -= (yy_more_len); \
	tclscanYYleng = (size_t) (yy_cp - (yytext_ptr)); \
	(yy_hold_char) = *yy_cp; \
	*yy_cp = '\0'; \
	(yy_c_buf_p) = yy_cp;

#define YY_NUM_RULES 48
#define YY_END_OF_BUFFER 49
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[168] =
    {   0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        5,    5,    0,    0,    0,    0,    0,    0,   21,   21,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       49,   48,    1,    4,    3,    3,    2,    4,   33,   31,
       30,   29,   30,   33,   33,   47,   43,   45,   46,   42,
       41,   44,   39,   47,   40,   37,   38,   20,    5,   19,
       20,   48,   16,   48,   48,   10,   48,   48,   13,   48,
       27,   21,   27,   48,   25,   26,   48,    3,    0,   31,
       30,   30,    0,    0,    0,    0,    0,   35,   36,   34,
        5,    0,   18,   17,    0,    0,    0,    0,   16,    0,

       15,    0,   10,    0,    0,   13,    0,   21,    0,    0,
       25,   26,    0,   24,   28,    0,    0,    0,    7,   17,
        0,    0,    0,   14,    0,    0,    0,   23,    0,   32,
        6,    0,    0,    0,    0,   22,    0,    0,    0,    0,
        0,    0,    0,    0,   18,    0,    0,    0,    8,    8,
        0,    0,    0,    0,    0,    0,    0,    9,    0,   18,
        0,   11,   11,    0,    0,   12,    0
    } ;

static yyconst flex_int32_t yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    4,    1,    1,    1,    1,
        1,    5,    1,    6,    7,    1,    1,    1,    1,    1,
        1,    8,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    9,   10,
        1,    1,    1,   11,   12,   13,   14,   15,   16,    1,
        1,    1,   17,    1,    1,    1,   18,   19,   20,    1,
        1,   21,    1,   22,    1,   23,    1,    1,    1,    1,
       24,   25,   26,    1,    1,    1,   27,   28,   29,   30,

       31,    1,    1,    1,   32,    1,    1,    1,   33,   34,
       35,    1,    1,   36,    1,   37,    1,   38,    1,    1,
        1,    1,   39,    1,   40,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1
    } ;

static yyconst flex_int32_t yy_meta[41] =
    {   0,
        1,    2,    3,    1,    2,    2,    4,    1,    2,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    2,    2,    2,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    2
    } ;

static yyconst flex_int16_t yy_base[190] =
    {   0,
        0,    0,  234,  217,    0,    8,   32,   70,  108,  147,
       14,   22,    3,    5,   35,   36,   37,   42,   45,   46,
       51,   55,    0,    0,    0,    0,    0,    0,    0,    0,
      219,  448,  448,  448,   58,   79,  448,  208,  448,   91,
      448,  448,   96,  200,  169,  448,  448,  448,  448,  448,
      448,  448,  448,   43,  448,  448,  448,  448,   18,  448,
      115,   53,  448,   61,  166,  448,   66,  140,  448,  104,
      448,   60,  131,  102,  448,  120,  132,  156,  134,  165,
      448,  137,   94,  173,   79,   82,   26,  448,  448,  448,
       85,  151,  448,  160,  179,  202,  238,   67,  448,  105,

      448,   19,  448,  163,   11,  448,  181,   97,  135,  185,
      448,  188,  192,  448,  448,    0,  196,  198,  448,  204,
      211,  229,  231,  448,  190,  219,  223,  448,  225,  448,
      448,  240,  254,  215,  236,  448,  256,  270,  117,  265,
      274,  281,  266,  286,  123,  288,  279,  293,  448,  295,
      301,  304,  308,  312,    9,  316,  319,  448,  309,  322,
      331,  448,  336,  329,    1,  448,  448,  363,  367,  371,
      375,  379,  383,  387,  391,  395,  399,  403,  406,  409,
      413,  417,  421,  425,  429,  433,  437,  441,  444
    } ;

static yyconst flex_int16_t yy_def[190] =
    {   0,
      168,  168,  169,  169,  170,  170,  171,  171,  172,  172,
      173,  173,  174,  174,  175,  175,  176,  176,  177,  177,
      178,  178,  168,  168,  168,  168,  168,  168,  168,  168,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  179,  167,  167,  167,  167,  167,  167,
      180,  181,  167,  181,  182,  167,  182,  183,  167,  183,
      167,  167,  167,  184,  167,  184,  184,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  180,  167,  180,  185,  180,  180,  181,  167,  181,

      167,  182,  167,  182,  183,  167,  183,  167,  186,  184,
      167,  184,  184,  167,  167,  187,  180,  185,  167,  185,
      185,  180,  180,  167,  182,  183,  186,  167,  186,  167,
      167,  180,  180,  182,  183,  167,  180,  180,  182,  183,
      180,  180,  182,  183,  188,  180,  182,  183,  167,  188,
      180,  182,  183,  180,  182,  183,  180,  167,  183,  189,
      183,  167,  189,  183,  183,  167,    0,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167
    } ;

static yyconst flex_int16_t yy_nxt[489] =
    {   0,
      167,   35,   36,  166,   35,   63,   37,   63,   35,   35,
       36,  158,   35,  106,   37,   59,   35,   60,   59,   91,
       61,  103,   91,   59,   38,   60,   59,   64,   61,   64,
      167,  167,   38,   40,   41,   42,   40,   66,   66,   69,
       43,   67,   67,   70,   69,   89,   72,   72,   70,   72,
       72,   73,   73,   75,   76,   99,   44,   75,   76,   78,
       78,  108,   78,  101,  108,  116,   78,   90,  103,   99,
       45,   40,   41,   42,   40,   77,  104,  100,   43,   77,
       78,   78,   79,   78,   84,  100,   91,   78,  115,   91,
      104,  100,   80,   81,   44,   80,   80,   84,  108,   82,

       84,  108,   85,   79,  111,  112,  106,  101,   45,   47,
       48,   49,   50,   51,  107,   83,   52,   93,   94,  103,
       86,   95,  111,  112,  150,   96,  113,  150,  107,  100,
      143,   53,   54,   55,  114,  112,   78,  128,   84,   97,
      109,   84,  106,   85,  113,  143,   56,   57,   47,   48,
       49,   50,   51,   93,   94,   52,  113,   78,   78,  129,
       78,   86,   93,   94,   78,  103,   80,   81,  103,   80,
       53,   54,   55,   82,   84,  117,   87,   84,  125,   85,
       79,  119,  120,  106,  117,   56,   57,  111,  112,   83,
      111,  112,  103,  125,  114,  112,  126,   86,  124,   94,

      119,  120,   80,  121,   93,   94,  119,  120,  134,  113,
       78,  126,  113,  131,  120,  122,  113,  103,  167,   32,
      117,  106,  121,  134,  123,  128,  117,  136,  121,  139,
      122,   93,   94,   93,   94,  121,   32,  135,  106,  123,
      124,   94,   93,   94,  139,  167,  133,  129,  132,  129,
      140,  122,  135,  117,  137,  117,   93,   94,   93,   94,
      123,  133,  117,  132,  117,  140,  122,  106,  103,  137,
      167,  141,   93,   94,  138,  123,  145,   94,  117,  167,
      117,  103,  142,   93,   94,  147,  141,  144,  106,  138,
       93,   94,  146,  152,  117,  106,  150,  142,  117,  150,

      147,  148,  144,   93,   94,  117,  103,  146,  152,  151,
      106,  106,  117,  153,   93,   94,  148,  154,  106,  155,
      156,  160,   94,  163,  151,  117,  163,  159,  153,  157,
      161,  106,  154,  106,  155,  156,  117,  163,  167,  167,
      163,  167,  159,  117,  157,  161,  165,  164,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  165,  164,   32,   32,   32,   32,   33,   33,   33,
       33,   34,   34,   34,   34,   39,   39,   39,   39,   46,
       46,   46,   46,   58,   58,   58,   58,   62,   62,   62,
       62,   65,   65,   65,   65,   68,   68,   68,   68,   71,

       71,   71,   71,   74,   74,   74,   74,   88,   88,   92,
       92,   92,   92,   98,   98,   98,   98,  102,  102,  102,
      102,  105,  105,  105,  105,  110,  110,  110,  110,  118,
      118,  118,  118,  127,  127,  127,  127,  130,  130,  167,
      130,  149,  149,  149,  162,  162,  162,   31,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167
    } ;

static yyconst flex_int16_t yy_chk[489] =
    {   0,
        0,    5,    5,  165,    5,   13,    5,   14,    5,    6,
        6,  155,    6,  105,    6,   11,    6,   11,   11,   59,
       11,  102,   59,   12,    5,   12,   12,   13,   12,   14,
        0,    0,    6,    7,    7,    7,    7,   15,   16,   17,
        7,   15,   16,   17,   18,   54,   19,   20,   18,   19,
       20,   19,   20,   21,   21,   62,    7,   22,   22,   35,
       35,   72,   35,   64,   72,   87,   35,   54,   67,   98,
        7,    8,    8,    8,    8,   21,   67,   62,    8,   22,
       36,   36,   35,   36,   86,   64,   91,   36,   85,   91,
       67,   98,   40,   40,    8,   40,   83,   43,  108,   40,

       43,  108,   43,   36,   74,   74,   70,  100,    8,    9,
        9,    9,    9,    9,   70,   40,    9,   61,   61,  139,
       43,   61,   76,   76,  145,   61,   74,  145,   70,  100,
      139,    9,    9,    9,   77,   77,   79,  109,   82,   61,
       73,   82,   68,   82,   76,  139,    9,    9,   10,   10,
       10,   10,   10,   92,   92,   10,   77,   78,   78,  109,
       78,   82,   94,   94,   78,  104,   80,   80,   65,   80,
       10,   10,   10,   80,   84,   92,   45,   84,  104,   84,
       78,   95,   95,  107,   94,   10,   10,  110,  110,   80,
      112,  112,  125,  104,  113,  113,  107,   84,  117,  117,

      118,  118,   44,   95,   96,   96,  120,  120,  125,  110,
       38,  107,  112,  121,  121,   96,  113,  134,   31,    4,
      117,  126,  118,  125,   96,  127,   96,  129,  120,  134,
       96,  122,  122,  123,  123,  121,    3,  126,  135,   96,
       97,   97,  132,  132,  134,    0,  123,  127,  122,  129,
      135,   97,  126,  122,  132,  123,  133,  133,  137,  137,
       97,  123,   97,  122,  132,  135,   97,  140,  143,  132,
        0,  137,  138,  138,  133,   97,  141,  141,  133,    0,
      137,  147,  138,  142,  142,  143,  137,  140,  144,  133,
      146,  146,  142,  147,  138,  148,  150,  138,  141,  150,

      143,  144,  140,  151,  151,  142,  152,  142,  147,  146,
      153,  159,  146,  148,  154,  154,  144,  151,  156,  152,
      153,  157,  157,  160,  146,  151,  160,  156,  148,  154,
      159,  164,  151,  161,  152,  153,  154,  163,    0,    0,
      163,    0,  156,  157,  154,  159,  164,  161,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,  164,  161,  168,  168,  168,  168,  169,  169,  169,
      169,  170,  170,  170,  170,  171,  171,  171,  171,  172,
      172,  172,  172,  173,  173,  173,  173,  174,  174,  174,
      174,  175,  175,  175,  175,  176,  176,  176,  176,  177,

      177,  177,  177,  178,  178,  178,  178,  179,  179,  180,
      180,  180,  180,  181,  181,  181,  181,  182,  182,  182,
      182,  183,  183,  183,  183,  184,  184,  184,  184,  185,
      185,  185,  185,  186,  186,  186,  186,  187,  187,    0,
      187,  188,  188,  188,  189,  189,  189,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167,  167,  167,
      167,  167,  167,  167,  167,  167,  167,  167
    } ;

/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[49] =
    {   0,
0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 
    1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 
    0, 0, 0, 0, 0, 1, 0, 0, 0,     };

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

extern int tclscanYY_flex_debug;
int tclscanYY_flex_debug = 0;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
static int yy_more_flag = 0;
static int yy_more_len = 0;
#define yymore() ((yy_more_flag) = 1)
#define YY_MORE_ADJ (yy_more_len)
#define YY_RESTORE_YY_MORE_OFFSET
char *tclscanYYtext;
#line 1 "tclscanner.l"
/*****************************************************************************
 * Parser for Tcl subset
 *
 * Copyright (C) 2010      by Rene Zaumseil
 * based on the work of Dimitri van Heesch.
 *
 * Permission to use, copy, modify, and distribute this software and its
 * documentation under the terms of the GNU General Public License is hereby 
 * granted. No representations are made about the suitability of this software 
 * for any purpose. It is provided "as is" without express or implied warranty.
 * See the GNU General Public License for more details.
 *
 * Documents produced by Doxygen are derivative works derived from the
 * input used in their production; they are not affected by this license.
 *
 */ 
#line 18 "tclscanner.l"
#include <stdio.h> 
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>

#include "qtbc.h"
#include <qarray.h>
#include <qstack.h>
#include <qregexp.h>
#include <unistd.h> 
#include <qfile.h>
#include <qdict.h>
  
#include "entry.h"
#include "message.h"
#include "config.h"
#include "doxygen.h"
#include "util.h"
#include "defargs.h"
#include "language.h"
#include "commentscan.h" 
#include "pre.h"
#include "tclscanner.h"
#include "outputlist.h"
#include "membername.h"
#include "searchindex.h"
#include "commentcnv.h"
#include "bufstr.h"
#include "portable.h"

#include <stdarg.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qlist.h>
//#include <qmap.h>

#define HAS_TCL_SUBST 0

#define YY_NEVER_INTERACTIVE 1

#define MAX_INCLUDE_DEPTH 10

#define tcl_abort \
	fprintf(stderr,"%s#%d %s()",__FILE__,__LINE__,__FUNCTION__); \
        yy_push_state(ERROR); \
        yyless(0); \
	tcl_Abort
//#define TCL_DEBUG_FD NULL
#define TCL_WARN_FD stdout
#define tcl_warn \
	tcl_Warn("%.6d--(%s) %d# ",__LINE__,__FUNCTION__,tclscanYYlineno); \
	tcl_Warn
#define TCL_DEBUG_FD NULL
//#define TCL_DEBUG_FD stdout
#define tcl_debug \
	tcl_Debug("%.6d--(%s) %d#%d ",__LINE__,__FUNCTION__,tclscanYYlineno,yy_start_stack_ptr); \
	tcl_Debug

//#define D printf("%.6d---(%s)%s\n",__LINE__,__FUNCTION__,tclscanYYtext);
#define D

// BEGIN of copy from tclUtil.c
// - Tcl_Interp removed
// - changes are marked with RZ
// #define's to adapt the code:
#define CONST		const
#define UCHAR		(unsigned char)
#define TCL_ERROR	1
#define TCL_OK		0
#define ckalloc		malloc
#define ckfree		free
#define TclCopyAndCollapse(size,src,dest) memcpy(dest,src,size); *(dest+size)=0
int TclFindElement(
      CONST char *list,		/* Points to the first byte of a string
				 * containing a Tcl list with zero or more
				 * elements (possibly in braces). */
      int listLength,		/* Number of bytes in the list's string. */
      CONST char **elementPtr,	/* Where to put address of first significant
				 * character in first element of list. */
      CONST char **nextPtr,	/* Fill in with location of character just
				 * after all white space following end of
				 * argument (next arg or end of list). */
      int *sizePtr,		/* If non-zero, fill in with size of
				 * element. */
      int *bracePtr)		/* If non-zero, fill in with non-zero/zero to
				 * indicate that arg was/wasn't in braces. */
{
  CONST char *p = list;
  CONST char *elemStart;	/* Points to first byte of first element. */
  CONST char *limit;		/* Points just after list's last byte. */
  int openBraces = 0;		/* Brace nesting level during parse. */
  int inQuotes = 0;
  int size = 0;		/* lint. */
  //RZ    int numChars;

  /*
   * Skim off leading white space and check for an opening brace or quote.
   * We treat embedded NULLs in the list as bytes belonging to a list
   * element.
   */

  limit = (list + listLength);
  while ((p < limit) && (isspace(UCHAR(*p)))) 
  { /* INTL: ISO space. */
    p++;
  }
  if (p == limit) 
  {		/* no element found */
    elemStart = limit;
    goto done;
  }

  if (*p == '{') 
  {
    openBraces = 1;
    p++;
  } 
  else if (*p == '"') 
  {
    inQuotes = 1;
    p++;
  }
  elemStart = p;
  if (bracePtr != 0) 
  {
    *bracePtr = openBraces;
  }

  /*
   * Find element's end (a space, close brace, or the end of the string).
   */

  while (p < limit) 
  {
    switch (*p) 
    {
      /*
       * Open brace: don't treat specially unless the element is in
       * braces. In this case, keep a nesting count.
       */

      case '{':
	if (openBraces != 0) 
	{
	  openBraces++;
	}
	break;

	/*
	 * Close brace: if element is in braces, keep nesting count and
	 * quit when the last close brace is seen.
	 */

      case '}':
	if (openBraces > 1) 
	{
	  openBraces--;
	} 
	else if (openBraces == 1) 
	{
	  size = (p - elemStart);
	  p++;
	  if ((p >= limit) || isspace(UCHAR(*p))) 
	  {	/* INTL: ISO space. */
	    goto done;
	  }

	  /*
	   * Garbage after the closing brace; return an error.
	   */

	  return TCL_ERROR;
	}
	break;

	/*
	 * Backslash: skip over everything up to the end of the backslash
	 * sequence.
	 */

      case '\\':
	//RZ	    Tcl_UtfBackslash(p, &numChars, NULL);
	//RZ	    p += (numChars - 1);
	p++; //RZ
	break;

	/*
	 * Space: ignore if element is in braces or quotes; otherwise
	 * terminate element.
	 */

      case ' ':
      case '\f':
      case '\n':
      case '\r':
      case '\t':
      case '\v':
	if ((openBraces == 0) && !inQuotes) {
	  size = (p - elemStart);
	  goto done;
	}
	break;

	/*
	 * Double-quote: if element is in quotes then terminate it.
	 */

      case '"':
	if (inQuotes) 
	{
	  size = (p - elemStart);
	  p++;
	  if ((p >= limit) || isspace(UCHAR(*p))) 
	  {	/* INTL: ISO space */
	    goto done;
	  }

	  /*
	   * Garbage after the closing quote; return an error.
	   */
	  return TCL_ERROR;
	}
	break;
    }
    p++;
  }

  /*
   * End of list: terminate element.
   */

  if (p == limit) 
  {
    if (openBraces != 0) 
    {
      return TCL_ERROR;
    } 
    else if (inQuotes) 
    {
      return TCL_ERROR;
    }
    size = (p - elemStart);
  }

done:
  while ((p < limit) && (isspace(UCHAR(*p)))) 
  { /* INTL: ISO space. */
    p++;
  }
  *elementPtr = elemStart;
  *nextPtr = p;
  if (sizePtr != 0) 
  {
    *sizePtr = size;
  }
  return TCL_OK;
}

int Tcl_SplitList(
    CONST char *list,		/* Pointer to string with list structure. */
    int *argcPtr,		/* Pointer to location to fill in with the
				 * number of elements in the list. */
    CONST char ***argvPtr)	/* Pointer to place to store pointer to array
				 * of pointers to list elements. */
{
  CONST char **argv, *l, *element;
  char *p;
  int length, size, i, result, elSize, brace;

  /*
   * Figure out how much space to allocate. There must be enough space for
   * both the array of pointers and also for a copy of the list. To estimate
   * the number of pointers needed, count the number of space characters in
   * the list.
   */

  for (size = 2, l = list; *l != 0; l++) 
  {
    if (isspace(UCHAR(*l))) 
    {			/* INTL: ISO space. */
      size++;

      /*
       * Consecutive space can only count as a single list delimiter.
       */

      while (1) 
      {
	char next = *(l + 1);

	if (next == '\0') 
	{
	  break;
	}
	++l;
	if (isspace(UCHAR(next))) 
	{		/* INTL: ISO space. */
	  continue;
	}
	break;
      }
    }
  }
  length = l - list;
  argv = (CONST char **) ckalloc((unsigned)
      ((size * sizeof(char *)) + length + 1));
  for (i = 0, p = ((char *) argv) + size*sizeof(char *);
      *list != 0;  i++) 
  {
    CONST char *prevList = list;

    result = TclFindElement(list, length, &element, &list,
	&elSize, &brace);
    length -= (list - prevList);
    if (result != TCL_OK) 
    {
      ckfree((char *) argv);
      return result;
    }
    if (*element == 0) 
    {
      break;
    }
    if (i >= size) 
    {
      ckfree((char *) argv);
      return TCL_ERROR;
    }
    argv[i] = p;
    if (brace) 
    {
      memcpy(p, element, (size_t) elSize);
      p += elSize;
      *p = 0;
      p++;
    } 
    else 
    {
      TclCopyAndCollapse(elSize, element, p);
      p += elSize+1;
    }
  }

  argv[i] = NULL;
  *argvPtr = argv;
  *argcPtr = i;
  return TCL_OK;
}
// END of tclUtil.c

void tcl_split_list(QString &str, QStringList &list)
{
  int argc;
  const char **argv;

  list.clear();
  if (str.left(1)=="{" && str.right(1)=="}")
  {
    str=str.mid(1,str.length()-2);
  }
  else if (str.left(1)=="\"" && str.right(1)=="\"")
  {
    str=str.mid(1,str.length()-2);
  }
  if (Tcl_SplitList(str.ascii(),&argc,&argv) != TCL_OK)
  {
    list.append(str);
  }
  else
  {
    for (int i = 0; i < argc; i++)
    {
      list.append(argv[i]);
    }
    ckfree((char *) argv);
  }
}

//! Structure containing information about current scan context.
typedef struct
{
  int type;
  QCString string_after;
  int line0; // start line of scan context
  int line1; // end line of scan context
  int start_stack_ptr; // value of scan context
  YY_BUFFER_STATE buffer_state; // value of scan context
  Entry *entry_ns; // current namespace
  Entry *entry_fn; // if set contains the current proc/method/constructor/destructor
  Entry *entry_cl; // if set contain the current class
  Entry *entry_scan; // current scan entry
  Protection protection; // current protections state
} tcl_scan;

//* Structure containing all internal global variables.
static struct
{
  CodeOutputInterface * code; // if set then we are codifying the file
  int code_line; // current line of code
  int code_linenumbers; // if true create line numbers in code
  const char *code_font; // used font to codify
  bool config_autobrief; // value of configuration option
#if HAS_TCL_SUBST 
  QMap<QString,QString> config_subst; // map of configuration option values
#endif
  const char *   input_string; // file contents
  int		input_position; // position in file
  QCString	file_name; // name of used file
  ParserInterface *this_parser; // myself
  int command; // true if command was found
  int comment; // set true if comment was scaned
  int brace_level; // bookkeeping of braces
  int bracket_level; // bookkeeping of brackets
  int bracket_quote; // bookkeeping of quotes (toggles)
  int word_is; // type of current word
  int line_comment; // line number of comment
  int line_commentline; // line number of comment after command
  int line_command; // line number of command
  int line_body0; // start line of body
  int line_body1; // end line of body
  QString string_command; // contain current command
  QString string_commentline; // contain current comment after command
  QString string_commentcodify; // current comment string used in codifying
  QString string_comment; // contain current comment
  QString string_last; // contain last read word or part of word
  QString string; // temporary string value
  Entry*		entry_main; // top level entry
  Entry*		entry_file; // entry of current file
  Entry*		entry_current; // currently used entry
  Entry*		entry_inside; // contain entry of current scan context
  QStringList list_command; // list of command words
  QList<tcl_scan> scan; // stack of scan contexts
  QDict<Entry> ns; // all read namespace entries
  QDict<Entry> cl; // all read class entries
  QDict<Entry> fn; // all read function entries
  QList<Entry> entry; // list of all created entries, will be deleted after codifying
  Protection protection; // current protections state
} tcl;

// scanner functions
static int yyread(char *buf,int max_size);
tcl_scan *tcl_scan_start(int type, QString content);
static void tcl_scan_end();
static void tcl_comment(int what,const char *text);
static void tcl_word(int what,const char *text);
static void tcl_command(int what,const char *text);

// helper functions

//! Create new entry.
// @return new initialised entry
Entry* tcl_entry_new()
{
  Entry *myEntry = new Entry;
  myEntry->section    = Entry::EMPTY_SEC;
  myEntry->name       = "";
//  myEntry->type       = "";
  myEntry->brief      = "";
//  myEntry->doc        = "";
  myEntry->protection = Package;
//  myEntry->mtype      = Method;
//  myEntry->virt       = Normal;
//  myEntry->stat       = FALSE;
  myEntry->fileName   = tcl.file_name;
  myEntry->lang       = SrcLangExt_Tcl;
  initGroupInfo(myEntry);
  // collect entries
  if (tcl.code==NULL)
  {
    tcl.entry.insert(0,myEntry);
  }
  return myEntry;
}

//! Set protection level.
void tcl_protection(Entry *entry) {
  if (entry->protection!=Public&&entry->protection!=Protected&&entry->protection!=Private)
  {
    entry->protection = tcl.protection;
  }
  if (entry->protection!=Protected&&entry->protection!=Private)
  {
    entry->protection = Public;
  }
}

//! Check name.
// @return 'ns' and 'name' of given current 'ns0' and 'name0'
static void tcl_name(const QString ns0, const QString name0, QString &ns, QString &name)
{
  QString myNm;
  int myStart;

  if (strncmp(name0.ascii(),"::",2)==0)
  {
    myNm = name0.mid(2);
  }
  else if (ns0.length())
  {
    myNm = ns0 + "::" + name0;
  }
  else
  {
    myNm = name0;
  }
  myStart = myNm.findRev("::");
  if (myStart == -1)
  {
    ns = "";
    name = myNm;
  }
  else
  {
    ns = myNm.mid(0,myStart);
    name = myNm.mid(myStart+2);
  }
}

// Check and return namespace entry.
// @return namespace entry
Entry* tcl_entry_namespace(const QString ns)
{
  Entry *myEntry;
  QString myNs = " ";
  if (strlen(ns.ascii())) {myNs = ns;}

  myEntry = tcl.ns.find(myNs);
  if (myEntry == NULL)
  {
    myEntry = tcl_entry_new();
    myEntry->section    = Entry::NAMESPACE_SEC;
    myEntry->name       = ns.ascii();
    tcl.entry_main->addSubEntry(myEntry);
    tcl.ns.insert(ns,myEntry);
  }
  return myEntry;
}

// Check and return class entry.
// @return class entry
Entry* tcl_entry_class(const QString cl)
{
  Entry *myEntry;
  QString myCl = " ";
  if (strlen(cl.ascii())) {myCl = cl;}

  myEntry = tcl.cl.find(myCl);
  if (myEntry == NULL)
  {
    myEntry = tcl_entry_new();
    myEntry->section    = Entry::CLASS_SEC;
    myEntry->name       = cl.ascii();
    tcl.entry_main->addSubEntry(myEntry);
    tcl.cl.insert(cl,myEntry);
  }
  return myEntry;
}

//! Check for keywords.
// @return 1 if keyword and 0 otherwise
static int tcl_keyword(QString str)
{
  static QStringList myList;
  static int myInit=1;
  if (myInit)
  {
// tcl keywords
    myList <<"append"<<"apply"<<"array"<<"auto_execok"<<"auto_import"<<"auto_load"<<"auto_mkindex"<<"auto_qualify"<<"auto_reset"<<"catch"<<"cd"<<"close"<<"concat"<<"eof"<<"exec"<<"exit"<<"fblocked"<<"fconfigure"<<"file"<<"flush"<<"foreach"<<"format"<<"gets"<<"global"<<"http"<<"if"<<"incr"<<"info"<<"join"<<"lappend"<<"lassign"<<"lindex"<<"linsert"<<"llength"<<"load"<<"lrange"<<"lrepeat"<<"lreplace"<<"lreverse"<<"lset"<<"namespace"<<"parray"<<"pid"<<"pkg_mkIndex"<<"proc"<<"puts"<<"pwd"<<"registry"<<"rename"<<"return"<<"scan"<<"set"<<"split"<<"tclLog"<<"tcl_endOfWord"<<"tcl_findLibrary"<<"tcl_startOfNextWord"<<"tcl_startOfPreviousWord"<<"tcl_wordBreakAfter"<<"tcl_wordBreakBefore"<<"tell"<<"time"<<"unknown"<<"upvar"<<"variable"<<"vwait";
// tk keywords
    myList <<"bell"<<"bind"<<"clipboard"<<"console"<<"consoleinterp"<<"event"<<"focus"<<"grid"<<"pack"<<"place"<<"tkwait"<<"winfo"<<"wm"<<"bindtags"<<"destroy"<<"lower"<<"option"<<"raise"<<"send"<<"tkerror"<<"tkwait"<<"tk_bisque"<<"tk_focusNext"<<"tk_focusPrev"<<"tk_focusFollowsMouse"<<"tk_popup"<<"tk_setPalette"<<"tk_textCut"<<"tk_TextCopy"<<"tk_textPaste"<<"chooseColor"<<"tk_chooseColor"<<"tk_chooseDirectory"<<"tk_dialog"<<"tk_getOpenFile"<<"tkDialog"<<"tk_getSaveFile"<<"tk_messageBox"<<"button"<<"canvas"<<"checkbutton"<<"entry"<<"frame"<<"image"<<"label"<<"labelframe"<<"listbox"<<"menu"<<"menubutton"<<"message"<<"panedwindow"<<"radiobutton"<<"scale"<<"scrollbar"<<"spinbox"<<"toplevel";
    myList.sort();
    myInit=0;
  }
  str=str.stripWhiteSpace();
  if (str.left(2)=="::") {str=str.mid(2);}
  if (myList.findIndex(str) != -1) return(1);
  return 0;
}

//! End codifying with special font class.
static void tcl_font_end()
{
  if (tcl.code==NULL) return;
  if (tcl.code_font)
  {
    tcl.code->endFontClass();
    tcl.code_font=NULL;
  }
}

//! Codify 'str' with special font class 's'.
static void tcl_codify(const char *s,char *str)
{
  if (tcl.code==NULL||str==NULL) return;
  if (s)
  {
    tcl_font_end();
    tcl.code->startFontClass(s);
    tcl.code_font=s;
  }
  char *p=str,*sp=p;
  char c;
  bool done=FALSE;
  while (!done)
  {
    sp=p;
    while ((c=*p++) && c!='\n') {}
    if (c=='\n')
    {
      tcl.code_line++;
      *(p-1)='\0';
      tcl.code->codify(sp);
      //tcl_font_end();
      tcl.code->endCodeLine();
      if (tcl.code_linenumbers) 
      {
        tcl.code->writeLineNumber(0,0,0,tcl.code_line);
      }
    }
    else
    {
      tcl.code->codify(sp);
      done=TRUE;
    }
  }
  tcl_font_end();
}

//! Codify 'str' with special font class 's'.
static void tcl_codify(const char *s,const char *str)
{
  if (tcl.code==NULL) return;
  char *tmp= (char *) malloc(strlen(str)+1);
  strcpy(tmp, str);
  tcl_codify(s,tmp);
  free(tmp);
}

//! Codify 'str' with special font class 's'.
static void tcl_codify(const char *s,QString str)
{
  if (tcl.code==NULL) return;
  char *tmp= (char *) malloc(str.length()+1);
  strcpy(tmp, str.data());
  tcl_codify(s,tmp);
  free(tmp);
}

//! Codify 'str' with special font class 's'.
static void tcl_codify(const char *s,QCString str)
{
  if (tcl.code==NULL) return;
  char *tmp= (char *) malloc(str.length()+1);
  strcpy(tmp, str);
  tcl_codify(s,tmp);
  free(tmp);
}

//! Print abort message.
static void tcl_Abort(const char *format, ...)
{
  va_list myList;

  fprintf(stderr,"=== Error in file %s line: %d, state: %d ===\n",tcl.file_name.data(),tclscanYYlineno,YY_START);
  va_start(myList, format);
  vfprintf(stderr,format, myList);
  va_end(myList);
  fprintf(stderr,"\n===\n");
   
  EntryListIterator eli(*tcl.entry_main->children());
  Entry *ce;
  bool start=FALSE;

  for (;(ce=eli.current());++eli)
  {
     if (ce == tcl.entry_file) start=TRUE;
     if (start) ce->reset(); 
  }
}

//! Print warning message.
static void tcl_Warn(const char *format, ...)
{
  va_list myList;
  FILE *fd=TCL_WARN_FD;

  if (fd==NULL) return;
  va_start(myList, format);
  vfprintf(fd, format, myList);
  fputc('\n',fd);
  va_end(myList);
}

//! Print debug message.
static void tcl_Debug(const char *format, ...)
{
  va_list myList;
  FILE *fd=TCL_DEBUG_FD;

  if (fd==NULL) return;
  va_start(myList, format);
  vfprintf(fd, format, myList);
  fputc('\n',fd);
  va_end(myList);
}
/*
//! Print debug message.
static void tcl_Debug(const tcl_scan *s,const char *format, ...)
{
  va_list myList;
  FILE *fd=TCL_DEBUG_FD;

  if (fd==NULL) return;
  va_start(myList, format);
  vfprintf(fd, format, myList);
  va_end(myList);
  fprintf(fd, ": tcl_scan[%d,%d] stack=%d type=%d name='%s'\n",
	s->line0,s->line1,s->start_stack_ptr,s->type,s->entry_ns->name.data());
}

//! Print debug message.
static void tcl_Debug(const Entry *e,const char *format, ...)
{
  va_list myList;
  FILE *fd=TCL_DEBUG_FD;

  if (fd==NULL) return;
  va_start(myList, format);
  vfprintf(fd, format, myList);
  va_end(myList);
  fprintf(fd,": Entry '%s' type=%s, section=0x%x file=%s (%d children)\n",
    (const char*)e->name, (const char*)e->type, e->section,
    (const char*)e->fileName, e->children()->count());
}
*/
//-----------------------------------------------------------------------------
#undef	YY_INPUT
#define	YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
//-----------------------------------------------------------------------------














#line 1428 "<stdout>"

#define INITIAL 0
#define ERROR 1
#define TOP 2
#define COMMAND 3
#define WORD 4
#define COMMENT 5
#define COMMENT_NL 6
#define COMMENT_CODE 7
#define COMMENT_VERB 8
#define COMMENTLINE 9
#define COMMENTLINE_NL 10
#define STRING 11
#define QUOTE 12
#define BRACE 13
#define BRACKET 14

#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 * down here because we want the user's section 1 to have been scanned first.
 * The user has a chance to override it with an option.
 */
#include <unistd.h>
#endif

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals (void );

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int tclscanYYlex_destroy (void );

int tclscanYYget_debug (void );

void tclscanYYset_debug (int debug_flag  );

YY_EXTRA_TYPE tclscanYYget_extra (void );

void tclscanYYset_extra (YY_EXTRA_TYPE user_defined  );

FILE *tclscanYYget_in (void );

void tclscanYYset_in  (FILE * in_str  );

FILE *tclscanYYget_out (void );

void tclscanYYset_out  (FILE * out_str  );

yy_size_t tclscanYYget_leng (void );

char *tclscanYYget_text (void );

int tclscanYYget_lineno (void );

void tclscanYYset_lineno (int line_number  );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int tclscanYYwrap (void );
#else
extern int tclscanYYwrap (void );
#endif
#endif

    static void yyunput (int c,char *buf_ptr  );
    
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * );
#endif

#ifndef YY_NO_INPUT

#ifdef __cplusplus
static int yyinput (void );
#else
static int input (void );
#endif

#endif

        static int yy_start_stack_ptr = 0;
        static int yy_start_stack_depth = 0;
        static int *yy_start_stack = NULL;
    
    static void yy_push_state (int new_state );
    
    static void yy_pop_state (void );
    
    static int yy_top_state (void );
    
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 262144
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO fwrite( tclscanYYtext, tclscanYYleng, 1, tclscanYYout )
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		yy_size_t n; \
		for ( n = 0; n < max_size && \
			     (c = getc( tclscanYYin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( tclscanYYin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, tclscanYYin))==0 && ferror(tclscanYYin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(tclscanYYin); \
			} \
		}\
\

#endif

/* No semi-colon after return; correct usage is to write "yyterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif

/* end tables serialization structures and prototypes */

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1

extern int tclscanYYlex (void);

#define YY_DECL int tclscanYYlex (void)
#endif /* !YY_DECL */

/* Code executed at the beginning of each rule, after tclscanYYtext and tclscanYYleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;
    
#line 778 "tclscanner.l"

#line 1636 "<stdout>"

	if ( !(yy_init) )
		{
		(yy_init) = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! (yy_start) )
			(yy_start) = 1;	/* first start state */

		if ( ! tclscanYYin )
			tclscanYYin = stdin;

		if ( ! tclscanYYout )
			tclscanYYout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			tclscanYYensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				tclscanYY_create_buffer(tclscanYYin,YY_BUF_SIZE );
		}

		tclscanYY_load_buffer_state( );
		}

	while ( 1 )		/* loops until end-of-file is reached */
		{
		(yy_more_len) = 0;
		if ( (yy_more_flag) )
			{
			(yy_more_len) = (yy_c_buf_p) - (yytext_ptr);
			(yy_more_flag) = 0;
			}
		yy_cp = (yy_c_buf_p);

		/* Support of tclscanYYtext. */
		*yy_cp = (yy_hold_char);

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = (yy_start);
yy_match:
		do
			{
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
			if ( yy_accept[yy_current_state] )
				{
				(yy_last_accepting_state) = yy_current_state;
				(yy_last_accepting_cpos) = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 168 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 448 );

yy_find_action:
		yy_act = yy_accept[yy_current_state];
		if ( yy_act == 0 )
			{ /* have to back up */
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			yy_act = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
			{
			int yyl;
			for ( yyl = (yy_more_len); yyl < tclscanYYleng; ++yyl )
				if ( tclscanYYtext[yyl] == '\n' )
					   
    tclscanYYlineno++;
;
			}

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = (yy_hold_char);
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			goto yy_find_action;

case 1:
YY_RULE_SETUP
#line 779 "tclscanner.l"
{
D
  yyterminate();
}
	YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(ERROR):
case YY_STATE_EOF(TOP):
case YY_STATE_EOF(COMMAND):
case YY_STATE_EOF(WORD):
case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(COMMENT_NL):
case YY_STATE_EOF(COMMENT_CODE):
case YY_STATE_EOF(COMMENT_VERB):
case YY_STATE_EOF(COMMENTLINE):
case YY_STATE_EOF(COMMENTLINE_NL):
case YY_STATE_EOF(STRING):
case YY_STATE_EOF(QUOTE):
case YY_STATE_EOF(BRACE):
case YY_STATE_EOF(BRACKET):
#line 783 "tclscanner.l"
{
D
  if (tcl.scan.count()<1)
  {// error
D
    tcl_abort("stack empty");
    yyterminate();
  }
  else if (tcl.scan.count()==1)
  {// exit, check on input?
D
    yyterminate();
  }
  else
  {// continue
D
    tcl_command(-1,"");
    tcl_scan_end();
  }
}
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 803 "tclscanner.l"
{
D
  yyless(0);
  tcl.line_comment=tclscanYYlineno;
  tcl_comment(0,"");
}
	YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
#line 809 "tclscanner.l"
{
D
  tcl_codify(NULL,tclscanYYtext);
}
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 813 "tclscanner.l"
{
D
  yyless(0);
  tcl.line_command=tclscanYYlineno;
  tcl_command(0,"");
}
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 820 "tclscanner.l"
{
D
  tcl_codify("comment",tclscanYYtext);
}
	YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
#line 824 "tclscanner.l"
{
D
  tcl_codify("comment",tclscanYYtext);
  QString t=tclscanYYtext;
  t = t.mid(2,t.length()-3);
  t.append('\n');
  tcl_comment(1,t.ascii());
  yy_push_state(COMMENT_NL);
}
	YY_BREAK
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
#line 833 "tclscanner.l"
{
D
  tcl_codify("comment",tclscanYYtext);
  tcl_comment(1,tclscanYYtext+2);
}
	YY_BREAK
case 8:
/* rule 8 can match eol */
YY_RULE_SETUP
#line 838 "tclscanner.l"
{
D
  QString t=tclscanYYtext;
  tcl_codify("comment",t.left(7));
  tcl_comment(2,"\n@code\n");
  yyless(7);
  yy_push_state(COMMENT_CODE);
}
	YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
#line 846 "tclscanner.l"
{
D
  QString t=tclscanYYtext;
  t = t.left(t.length()-10);
  tcl_comment(2,t.ascii());
  tcl_comment(2,"\n@endcode\n");
  yy_pop_state();
  yyless(0);
}
	YY_BREAK
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
#line 855 "tclscanner.l"
{
D
  yymore();
}
	YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
#line 859 "tclscanner.l"
{
D
  QString t=tclscanYYtext;
  tcl_codify("comment",t.left(11));
  tcl_comment(2,"\n@verbatim\n");
  yyless(11);
  yy_push_state(COMMENT_VERB);
}
	YY_BREAK
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
#line 867 "tclscanner.l"
{
D
  QString t=tclscanYYtext;
  t = t.left(t.length()-14);
  tcl_comment(2,t.ascii());
  tcl_comment(2,"\n@endverbatim\n");
  yy_pop_state();
  yyless(0);
}
	YY_BREAK
case 13:
/* rule 13 can match eol */
YY_RULE_SETUP
#line 876 "tclscanner.l"
{
D
  yymore();
}
	YY_BREAK
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
#line 880 "tclscanner.l"
{
D
  tcl_codify("comment",tclscanYYtext);
  QString t=tclscanYYtext;
  t = t.mid(1,t.length()-3);
  t.append('\n');
  tcl_comment(2,t.ascii());
  yy_push_state(COMMENT_NL);
}
	YY_BREAK
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
#line 889 "tclscanner.l"
{
D
  tcl_codify("comment",tclscanYYtext);
  tcl_comment(2,tclscanYYtext);
}
	YY_BREAK
case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
#line 894 "tclscanner.l"
{
D
  tcl_codify("comment",tclscanYYtext);
  tcl_comment(2,tclscanYYtext);
  yy_pop_state();
}
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 900 "tclscanner.l"
{
D
  QString t=tclscanYYtext;
  t = t.mid(0,t.length()-1);
  tcl_codify("comment",t.ascii());
  t = t.mid(1,t.length());
  tcl_comment(-2,t.ascii());
  unput(0x1A);
}
	YY_BREAK
case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
#line 909 "tclscanner.l"
{
D
  tcl_codify("comment",tclscanYYtext);
  tcl_comment(2,tclscanYYtext+1);
}
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 914 "tclscanner.l"
{
D
  tcl_comment(-2,tclscanYYtext);
}
	YY_BREAK
case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
#line 918 "tclscanner.l"
{
D
  yyless(0);
  tcl_comment(-2,tclscanYYtext);
}
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 924 "tclscanner.l"
{
D
  tcl.string_commentcodify += tclscanYYtext;
}
	YY_BREAK
case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
#line 928 "tclscanner.l"
{
D
  tcl.string_commentcodify += tclscanYYtext;
  QString t=tclscanYYtext;
  t = t.mid(2,t.length()-4);
  t.append('\n');
  tcl.string_commentline += t;
  yy_push_state(COMMENTLINE_NL);
}
	YY_BREAK
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
#line 937 "tclscanner.l"
{
D
  tcl.string_commentcodify += tclscanYYtext;
  tcl.string_commentline += (tclscanYYtext+2);
}
	YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
#line 942 "tclscanner.l"
{
D
  tcl.string_commentcodify += tclscanYYtext;
  QString t=tclscanYYtext;
  t = t.left(t.length()-3);
  t.append('\n');
  tcl.string_commentline += t;
}
	YY_BREAK
case 25:
/* rule 25 can match eol */
YY_RULE_SETUP
#line 950 "tclscanner.l"
{
D
  tcl.string_commentcodify += tclscanYYtext;
  tcl.string_commentline += tclscanYYtext;
  yy_pop_state();
}
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 956 "tclscanner.l"
{
D
  QString t=tclscanYYtext;
  t = t.left(t.length()-1);
  tcl.string_commentcodify += t;
  tcl.string_commentline += t;
  yy_pop_state();
  unput(0x1A);
}
	YY_BREAK
case 27:
/* rule 27 can match eol */
YY_RULE_SETUP
#line 965 "tclscanner.l"
{
D
  yy_pop_state();
  if (tcl.string_commentline.length())
  {
    tcl.entry_current->brief = tcl.string_commentline;
    tcl.entry_current->briefLine = tcl.line_commentline;
    tcl.entry_current->briefFile = tcl.file_name;
  }
  yyless(0);
  tcl_command(-1,tcl.string_commentcodify.ascii());
  tcl.string_commentline="";
  tcl.string_commentcodify="";
}
	YY_BREAK
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
#line 980 "tclscanner.l"
{
D
  tcl.string_commentcodify = tclscanYYtext;
  tcl.string_commentcodify = tcl.string_commentcodify.left(tcl.string_commentcodify.length()-2);
  tcl.string_commentline = "";
  tcl.line_commentline = tclscanYYlineno;
  tcl.line_body1=tclscanYYlineno;
  unput('<');
  unput('#');
  yy_push_state(COMMENTLINE);
}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 991 "tclscanner.l"
{
D
  tcl.string_commentcodify = "";
  tcl.string_commentline = "";
  tcl.line_body1=tclscanYYlineno-1;
  tcl_command(-1,"");
}
	YY_BREAK
case 30:
/* rule 30 can match eol */
YY_RULE_SETUP
#line 998 "tclscanner.l"
{
D
  tcl.string_commentcodify = "";
  tcl.string_commentline = "";
  tcl.line_body1=tclscanYYlineno-1;
  tcl_command(-1,tclscanYYtext);
}
	YY_BREAK
case 31:
/* rule 31 can match eol */
YY_RULE_SETUP
#line 1005 "tclscanner.l"
{
D
  tcl_command(1,tclscanYYtext);
}
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 1009 "tclscanner.l"
{
D
  tcl.word_is = WORD;
  tcl.string_last = "{*}";
  tcl_word(0,&tclscanYYtext[3]);
}
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 1015 "tclscanner.l"
{
D
  switch (tclscanYYtext[0])
  {
    case '{': tcl.word_is = BRACE; break;
    case '[': tcl.word_is = BRACKET; break;
    case '"': tcl.word_is = QUOTE; break;
    default: tcl.word_is = WORD;
  }
  tcl.string_last = "";
  tcl_word(0,tclscanYYtext);
}
	YY_BREAK
case 34:
#line 1029 "tclscanner.l"
case 35:
YY_RULE_SETUP
#line 1029 "tclscanner.l"
{
  tcl_word(1,tclscanYYtext);
}
	YY_BREAK
case 36:
/* rule 36 can match eol */
YY_RULE_SETUP
#line 1032 "tclscanner.l"
{
  tcl_word(2,tclscanYYtext);
}
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 1035 "tclscanner.l"
{
  tcl_word(3,tclscanYYtext);
}
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 1038 "tclscanner.l"
{
  tcl_word(4,tclscanYYtext);
}
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 1041 "tclscanner.l"
{
  tcl_word(5,tclscanYYtext);
}
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 1044 "tclscanner.l"
{
  tcl_word(6,tclscanYYtext);
}
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 1047 "tclscanner.l"
{
  tcl_word(7,tclscanYYtext);
}
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 1050 "tclscanner.l"
{
  tcl_word(8,tclscanYYtext);
}
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 1053 "tclscanner.l"
{
  tcl_word(9,tclscanYYtext);
}
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 1056 "tclscanner.l"
{
  tcl_word(10,tclscanYYtext);
}
	YY_BREAK
case 45:
/* rule 45 can match eol */
YY_RULE_SETUP
#line 1059 "tclscanner.l"
{
  tcl_word(11,tclscanYYtext);
}
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 1062 "tclscanner.l"
{
  tcl_word(12,tclscanYYtext);
}
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 1065 "tclscanner.l"
{
  tcl_word(1,tclscanYYtext);
}
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 1068 "tclscanner.l"
ECHO;
	YY_BREAK
#line 2251 "<stdout>"

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = (yy_hold_char);
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed tclscanYYin at a new source and called
			 * tclscanYYlex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = tclscanYYin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */
		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state(  );

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = (yytext_ptr) + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++(yy_c_buf_p);
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = (yy_c_buf_p);
				goto yy_find_action;
				}
			}

		else switch ( yy_get_next_buffer(  ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				(yy_did_buffer_switch_on_eof) = 0;

				if ( tclscanYYwrap( ) )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * tclscanYYtext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! (yy_did_buffer_switch_on_eof) )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				(yy_c_buf_p) =
					(yytext_ptr) + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state(  );

				yy_cp = (yy_c_buf_p);
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				(yy_c_buf_p) =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];

				yy_current_state = yy_get_previous_state(  );

				yy_cp = (yy_c_buf_p);
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
} /* end of tclscanYYlex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (void)
{
    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	register char *source = (yytext_ptr);
	register int number_to_move, i;
	int ret_val;

	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;

	else
		{
			yy_size_t num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;

			int yy_c_buf_p_offset =
				(int) ((yy_c_buf_p) - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				yy_size_t new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					tclscanYYrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = 0;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			(yy_n_chars), num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			tclscanYYrestart(tclscanYYin  );
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) tclscanYYrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	(yy_n_chars) += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;

	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (void)
{
	register yy_state_type yy_current_state;
	register char *yy_cp;
    
	yy_current_state = (yy_start);

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			(yy_last_accepting_state) = yy_current_state;
			(yy_last_accepting_cpos) = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 168 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	register int yy_is_jam;
    	register char *yy_cp = (yy_c_buf_p);

	register YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 168 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
	yy_is_jam = (yy_current_state == 167);

	return yy_is_jam ? 0 : yy_current_state;
}

    static void yyunput (int c, register char * yy_bp )
{
	register char *yy_cp;
    
    yy_cp = (yy_c_buf_p);

	/* undo effects of setting up tclscanYYtext */
	*yy_cp = (yy_hold_char);

	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
		{ /* need to shift things up to make room */
		/* +2 for EOB chars. */
		register yy_size_t number_to_move = (yy_n_chars) + 2;
		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
		register char *source =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];

		while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			*--dest = *--source;

		yy_cp += (int) (dest - source);
		yy_bp += (int) (dest - source);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;

		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
			YY_FATAL_ERROR( "flex scanner push-back overflow" );
		}

	*--yy_cp = (char) c;

    if ( c == '\n' ){
        --tclscanYYlineno;
    }

	(yytext_ptr) = yy_bp;
	(yy_hold_char) = *yy_cp;
	(yy_c_buf_p) = yy_cp;
}

#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (void)
#else
    static int input  (void)
#endif

{
	int c;
    
	*(yy_c_buf_p) = (yy_hold_char);

	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
			/* This was really a NUL. */
			*(yy_c_buf_p) = '\0';

		else
			{ /* need more input */
			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
			++(yy_c_buf_p);

			switch ( yy_get_next_buffer(  ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					tclscanYYrestart(tclscanYYin );

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( tclscanYYwrap( ) )
						return 0;

					if ( ! (yy_did_buffer_switch_on_eof) )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput();
#else
					return input();
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					(yy_c_buf_p) = (yytext_ptr) + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
	*(yy_c_buf_p) = '\0';	/* preserve tclscanYYtext */
	(yy_hold_char) = *++(yy_c_buf_p);

	if ( c == '\n' )
		   
    tclscanYYlineno++;
;

	return c;
}
#endif	/* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * 
 * @note This function does not reset the start condition to @c INITIAL .
 */
    void tclscanYYrestart  (FILE * input_file )
{
    
	if ( ! YY_CURRENT_BUFFER ){
        tclscanYYensure_buffer_stack ();
		YY_CURRENT_BUFFER_LVALUE =
            tclscanYY_create_buffer(tclscanYYin,YY_BUF_SIZE );
	}

	tclscanYY_init_buffer(YY_CURRENT_BUFFER,input_file );
	tclscanYY_load_buffer_state( );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
    void tclscanYY_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		tclscanYYpop_buffer_state();
	 *		tclscanYYpush_buffer_state(new_buffer);
     */
	tclscanYYensure_buffer_stack ();
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	tclscanYY_load_buffer_state( );

	/* We don't actually know whether we did this switch during
	 * EOF (tclscanYYwrap()) processing, but the only time this flag
	 * is looked at is after tclscanYYwrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	(yy_did_buffer_switch_on_eof) = 1;
}

static void tclscanYY_load_buffer_state  (void)
{
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	tclscanYYin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	(yy_hold_char) = *(yy_c_buf_p);
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE tclscanYY_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) tclscanYYalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in tclscanYY_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) tclscanYYalloc(b->yy_buf_size + 2  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in tclscanYY_create_buffer()" );

	b->yy_is_our_buffer = 1;

	tclscanYY_init_buffer(b,file );

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with tclscanYY_create_buffer()
 * 
 */
    void tclscanYY_delete_buffer (YY_BUFFER_STATE  b )
{
    
	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		tclscanYYfree((void *) b->yy_ch_buf  );

	tclscanYYfree((void *) b  );
}

#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
    
/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a tclscanYYrestart() or at EOF.
 */
    static void tclscanYY_init_buffer  (YY_BUFFER_STATE  b, FILE * file )

{
	int oerrno = errno;
    
	tclscanYY_flush_buffer(b );

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

    /* If b is the current buffer, then tclscanYY_init_buffer was _probably_
     * called from tclscanYYrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){
        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * 
 */
    void tclscanYY_flush_buffer (YY_BUFFER_STATE  b )
{
    	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		tclscanYY_load_buffer_state( );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  
 */
void tclscanYYpush_buffer_state (YY_BUFFER_STATE new_buffer )
{
    	if (new_buffer == NULL)
		return;

	tclscanYYensure_buffer_stack();

	/* This block is copied from tclscanYY_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		(yy_buffer_stack_top)++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from tclscanYY_switch_to_buffer. */
	tclscanYY_load_buffer_state( );
	(yy_did_buffer_switch_on_eof) = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  
 */
void tclscanYYpop_buffer_state (void)
{
    	if (!YY_CURRENT_BUFFER)
		return;

	tclscanYY_delete_buffer(YY_CURRENT_BUFFER );
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if ((yy_buffer_stack_top) > 0)
		--(yy_buffer_stack_top);

	if (YY_CURRENT_BUFFER) {
		tclscanYY_load_buffer_state( );
		(yy_did_buffer_switch_on_eof) = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void tclscanYYensure_buffer_stack (void)
{
	yy_size_t num_to_alloc;
    
	if (!(yy_buffer_stack)) {

		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
		num_to_alloc = 1;
		(yy_buffer_stack) = (struct yy_buffer_state**)tclscanYYalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in tclscanYYensure_buffer_stack()" );
								  
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
				
		(yy_buffer_stack_max) = num_to_alloc;
		(yy_buffer_stack_top) = 0;
		return;
	}

	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){

		/* Increase the buffer to prepare for a possible push. */
		int grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = (yy_buffer_stack_max) + grow_size;
		(yy_buffer_stack) = (struct yy_buffer_state**)tclscanYYrealloc
								((yy_buffer_stack),
								num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in tclscanYYensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
		(yy_buffer_stack_max) = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * 
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE tclscanYY_scan_buffer  (char * base, yy_size_t  size )
{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return 0;

	b = (YY_BUFFER_STATE) tclscanYYalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in tclscanYY_scan_buffer()" );

	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = 0;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	tclscanYY_switch_to_buffer(b  );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to tclscanYYlex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * 
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       tclscanYY_scan_bytes() instead.
 */
YY_BUFFER_STATE tclscanYY_scan_string (yyconst char * yystr )
{
    
	return tclscanYY_scan_bytes(yystr,strlen(yystr) );
}

/** Setup the input buffer state to scan the given bytes. The next call to tclscanYYlex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE tclscanYY_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n, i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = _yybytes_len + 2;
	buf = (char *) tclscanYYalloc(n  );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in tclscanYY_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = tclscanYY_scan_buffer(buf,n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in tclscanYY_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

    static void yy_push_state (int  new_state )
{
    	if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
		{
		yy_size_t new_size;

		(yy_start_stack_depth) += YY_START_STACK_INCR;
		new_size = (yy_start_stack_depth) * sizeof( int );

		if ( ! (yy_start_stack) )
			(yy_start_stack) = (int *) tclscanYYalloc(new_size  );

		else
			(yy_start_stack) = (int *) tclscanYYrealloc((void *) (yy_start_stack),new_size  );

		if ( ! (yy_start_stack) )
			YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
		}

	(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;

	BEGIN(new_state);
}

    static void yy_pop_state  (void)
{
    	if ( --(yy_start_stack_ptr) < 0 )
		YY_FATAL_ERROR( "start-condition stack underflow" );

	BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
}

    static int yy_top_state  (void)
{
    	return (yy_start_stack)[(yy_start_stack_ptr) - 1];
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void yy_fatal_error (yyconst char* msg )
{
    	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up tclscanYYtext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		tclscanYYtext[tclscanYYleng] = (yy_hold_char); \
		(yy_c_buf_p) = tclscanYYtext + yyless_macro_arg; \
		(yy_hold_char) = *(yy_c_buf_p); \
		*(yy_c_buf_p) = '\0'; \
		tclscanYYleng = yyless_macro_arg; \
		} \
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the current line number.
 * 
 */
int tclscanYYget_lineno  (void)
{
        
    return tclscanYYlineno;
}

/** Get the input stream.
 * 
 */
FILE *tclscanYYget_in  (void)
{
        return tclscanYYin;
}

/** Get the output stream.
 * 
 */
FILE *tclscanYYget_out  (void)
{
        return tclscanYYout;
}

/** Get the length of the current token.
 * 
 */
yy_size_t tclscanYYget_leng  (void)
{
        return tclscanYYleng;
}

/** Get the current token.
 * 
 */

char *tclscanYYget_text  (void)
{
        return tclscanYYtext;
}

/** Set the current line number.
 * @param line_number
 * 
 */
void tclscanYYset_lineno (int  line_number )
{
    
    tclscanYYlineno = line_number;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * 
 * @see tclscanYY_switch_to_buffer
 */
void tclscanYYset_in (FILE *  in_str )
{
        tclscanYYin = in_str ;
}

void tclscanYYset_out (FILE *  out_str )
{
        tclscanYYout = out_str ;
}

int tclscanYYget_debug  (void)
{
        return tclscanYY_flex_debug;
}

void tclscanYYset_debug (int  bdebug )
{
        tclscanYY_flex_debug = bdebug ;
}

static int yy_init_globals (void)
{
        /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from tclscanYYlex_destroy(), so don't allocate here.
     */

    /* We do not touch tclscanYYlineno unless the option is enabled. */
    tclscanYYlineno =  1;
    
    (yy_buffer_stack) = 0;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = (char *) 0;
    (yy_init) = 0;
    (yy_start) = 0;

    (yy_start_stack_ptr) = 0;
    (yy_start_stack_depth) = 0;
    (yy_start_stack) =  NULL;

/* Defined in main.c */
#ifdef YY_STDINIT
    tclscanYYin = stdin;
    tclscanYYout = stdout;
#else
    tclscanYYin = (FILE *) 0;
    tclscanYYout = (FILE *) 0;
#endif

    /* For future reference: Set errno on error, since we are called by
     * tclscanYYlex_init()
     */
    return 0;
}

/* tclscanYYlex_destroy is for both reentrant and non-reentrant scanners. */
int tclscanYYlex_destroy  (void)
{
    
    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		tclscanYY_delete_buffer(YY_CURRENT_BUFFER  );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		tclscanYYpop_buffer_state();
	}

	/* Destroy the stack itself. */
	tclscanYYfree((yy_buffer_stack) );
	(yy_buffer_stack) = NULL;

    /* Destroy the start condition stack. */
        tclscanYYfree((yy_start_stack)  );
        (yy_start_stack) = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * tclscanYYlex() is called, initialization will occur. */
    yy_init_globals( );

    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
	register int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s )
{
	register int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif

void *tclscanYYalloc (yy_size_t  size )
{
	return (void *) malloc( size );
}

void *tclscanYYrealloc  (void * ptr, yy_size_t  size )
{
	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return (void *) realloc( (char *) ptr, size );
}

void tclscanYYfree (void * ptr )
{
	free( (char *) ptr );	/* see tclscanYYrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

#line 1068 "tclscanner.l"



//! Start new scan context for given 'content'.
// @return created new scan context.
tcl_scan *tcl_scan_start(int type, QString content, const char *after)
{
  tcl_scan *myScan;
  QString myName;
  char c[2]=" ";

  myScan=tcl.scan.at(0);
  myScan->line1=tclscanYYlineno;
  myScan->start_stack_ptr=yy_start_stack_ptr;
  yy_push_state(TOP);

  myScan=new tcl_scan;
  myScan->type = type;
  myScan->string_after=after;

  switch (myScan->type)
  {
    case QUOTE: c[0]='"';
tcl_debug("+++\" %d\n?%s?",tcl.line_body0,content.ascii());
      break;
    case BRACE: c[0]='{';
tcl_debug("+++{ %d\n?%s?",tcl.line_body0,content.ascii());
      break;
    case BRACKET: c[0]='[';
tcl_debug("+++[ %d\n?%s?",tcl.line_body0,content.ascii());
      break;
    default:
tcl_debug("+++. %d\n?%s?",tcl.line_body0,content.ascii());
      break;
  }
  if (c[0]!=' ')
  {
    tcl_codify(NULL,c);
    content = content.mid(1,content.length()-2);
    content += (char)0x1A;// for detection end of scan context
tcl_debug("???%s?",content.ascii());
  }
  myScan->entry_ns = tcl.scan.at(0)->entry_ns;
  myScan->entry_cl = tcl.scan.at(0)->entry_cl;
  myScan->entry_fn = tcl.scan.at(0)->entry_fn;
  myScan->entry_scan = tcl.entry_current;
  myScan->buffer_state=tclscanYY_scan_string(content.ascii());
  myScan->line0=tcl.line_body0;
  myScan->line1=tcl.line_body1;
  tclscanYYlineno=myScan->line0;
  myScan->start_stack_ptr=yy_start_stack_ptr;
  myScan->protection = tcl.protection;

  tcl.entry_inside = myScan->entry_scan;
  tcl.entry_current = tcl_entry_new();
  tcl.scan.insert(0,myScan);
  tclscanYY_switch_to_buffer(myScan->buffer_state);
  return (myScan);
}

//! Close current scan context.
static void tcl_scan_end()
{
  tcl_scan *myScan;
  char c[2]=" ";

  myScan=tcl.scan.at(0);
  switch (myScan->type)
  {
    case QUOTE: c[0]='"'; break;
    case BRACE: c[0]='}'; break;
    case BRACKET: c[0]=']'; break;
  }
  if (c[0]!=' ') {tcl_codify(NULL,c);}
  if (myScan->string_after.length()) {tcl_codify("comment",myScan->string_after);}
  tclscanYY_delete_buffer(myScan->buffer_state);
  tcl.scan.removeFirst();
  yy_pop_state();
  myScan=tcl.scan.at(0);
  tcl.entry_inside = myScan->entry_scan;
tcl_debug("---%d",myScan->line1);
  tclscanYY_switch_to_buffer(myScan->buffer_state);
  tclscanYYlineno=myScan->line1;
  tcl.protection = myScan->protection;
}

//! Handling of word parsing.
static void tcl_word(int what,const char *text) 
{
  static char myList[1024]="";// nesting level list
  static int myLevel=0;// number of current nesting level
  static int myWhite=0;// set true when next char should be whitespace
  static char myWord;// internal state

  switch (what)
  {
  case 0:// start
    yy_push_state(WORD);
    switch (text[0])
    {
      case '{':
      case '[':
      case '"': myWord = text[0]; break;
      default: myWord = '.';
    }
    myList[0]=myWord;
    myLevel=1;
    myWhite=0;
  break;
  case 1:// all other chars
    if (myWhite)
    {// {x}y "x"y
      tcl_abort("expected word separator: %s",text);
      return;
    }
    if (myLevel==0)
    {
      myWord='.';
      myList[0]=myWord;
      myLevel=1;
    }
  break;
  case 2:// \\\n
    if (myLevel==0)
    {
      myWord=' ';
      yy_pop_state();
      yyless(0);
tcl_debug("(\\\n) ?%s?",tcl.string_last.ascii());
      return;
    }
    switch (myList[myLevel-1])
    {
      case '{':
      case '[':
      case '"':
      break;
      case '.':
        if (myLevel==1)
        {
          myWord=' ';
          yy_pop_state();
          yyless(0);
tcl_debug("(\\\n) ?%s?",tcl.string_last.ascii());
          return;
        }
      break;
    }
    myWhite=0;
  break;
  case 3:// {
    if (myWhite)
    {// {x}{ "x"{
      tcl_abort("expected word separator: %s",text);
      return;
    }
    switch (myList[myLevel-1])
    {
      case '{':
      case '[':
        myList[myLevel++]='{';
      break;
      case '"':
      case '.':
      break;
    }
    myWhite=0;
  break;
  case 4:// }
    if (myWhite)
    {// {x}{ "x"{
      tcl_abort("expected word separator: %s",text);
      return;
    }
    switch (myList[myLevel-1])
    {
      case '{':// {{x}}
        myLevel--;
        if (myLevel==0) {myWhite=1;}
      break;
      case '[':
      case '"':
      case '.':
      break;
    }
  break;
  case 5:// [
    if (myWhite)
    {// {x}[
      tcl_abort("expected word separator: %s",text);
      return;
    }
    switch (myList[myLevel-1])
    {
      case '{':
      break;
      case '[':
      case '"':
      case '.':
        myList[myLevel++]='[';
      break;
    }
    myWhite=0;
  break;
  case 6:// ]
    if (myWhite)
    {// {x}]
      tcl_abort("expected word separator: %s",text);
      return;
    }
    switch (myList[myLevel-1])
    {
      case '{':
      break;
      case '[':
	myLevel--;
      break;
      case '"':
      case '.':
      break;
    }
    myWhite=0;
  break;
  case 7:// "
    if (myWhite)
    {// {x}"
      tcl_abort("expected word separator: %s",text);
      return;
    }
    switch (myList[myLevel-1])
    {
      case '{':
      break;
      case '[':
        myList[myLevel++]='"';
      break;
      case '"':
        myLevel--;
      case '.':
      break;
    }
  break;
  case 8:// ' '
  case 9:// \t
  case 10:// ;
  case 11:// \n
  case 12:// \x1A
    if (myLevel==0)
    {
      myWord=' ';
      yy_pop_state();
      yyless(0);
tcl_debug("(%d) ?%s?",what,tcl.string_last.ascii());
      return;
    }
    switch (myList[myLevel-1])
    {
      case '{':
      case '[':
      case '"':
      break;
      case '.':
        if (myLevel==1)
        {
          myWord=' ';
          yy_pop_state();
          yyless(0);
tcl_debug("(.%d) ?%s?",what,tcl.string_last.ascii());
          return;
	}
        else
        {
          myLevel--;
        }
      break;
    }
    myWhite=0;
  break;
  default:
    tcl_abort("wrong state: %d",what);
    return;
  }
  tcl.string_last += text;
}

//! Handling of comment parsing.
static void tcl_comment(int what,const char *text)
{
  if (what==0)
  { // begin of comment
    if (tcl.comment)
    {
      tcl_abort("comment in comment");
      return;
    }
    yy_push_state(COMMENT);
tcl_debug("+++%s",text);
    tcl.string_comment="";
    tcl.comment=0;
  }
  else if (what==1)
  { // start new comment
    if (tcl.comment)
    {
      tcl_comment(99,""); // inbody
    }
    tcl.string_comment=text;
    tcl.comment=1;
  }
  else if (what==2)
  { // add to comment
    if (tcl.comment)
    {
      tcl.string_comment+=text;
    }
  }
  else if (what==-1 || what == -2)
  { // end of comment without/with command
    if (tcl.comment)
    {
      tcl.string_last=tcl.string_comment;
      tcl_comment(100+what,"");
    }
    else
    {
      tcl.string_last = "";
tcl_debug("---%s",(const char *)tcl.string_comment);
    }
    yy_pop_state();
    tcl.string_comment="";
    tcl.comment=0;
  }
  else if (what==98 || what==99)
  { // 98=new 99=inbody
    if (tcl.this_parser && tcl.string_comment.length())
    {
tcl_debug("---%s",(const char *)tcl.string_comment);
      int myPos=0;
      bool myNew=0;
      int myLine=tcl.line_comment;
      BufStr myI(1024);
      BufStr myO(1024);
      Protection myProt=tcl.protection;

      // resolve ALIASES
      myI.addArray("/*!",3);
      myI.addArray(tcl.string_comment.ascii(),tcl.string_comment.length());
      myI.addArray("*/",2);
      convertCppComments(&myI,&myO,tcl.file_name);
      myO.dropFromStart(3);
      myO.shrink(myO.curPos()-2);
      myO.addChar('\0');
      QCString myDoc = myO.data();
      if (what==99)
      { // inbody comment file or namespace or class or proc/metho
        int myPos0;
        int myLine0;
        Entry myEntry0; // used to test parsing
        Entry *myEntry;

        Entry *myEntry1=tcl.scan.at(0)->entry_ns;
        if (tcl.scan.at(0)->entry_fn)
        {
          myEntry1=tcl.scan.at(0)->entry_fn;
        }
        else if (tcl.scan.at(0)->entry_cl)
        {
          myEntry1=tcl.scan.at(0)->entry_cl;
        }

        myPos0=myPos;
        myLine0=myLine;
        while (parseCommentBlock(tcl.this_parser, &myEntry0, myDoc, tcl.file_name,
	  myLine, FALSE, tcl.config_autobrief, FALSE, myProt, myPos, myNew))
        {
          if (myNew)
          { // we need a new entry in this case
            myNew=0;
            myEntry = tcl_entry_new();
            parseCommentBlock(tcl.this_parser, myEntry, myDoc, tcl.file_name,
	      myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew);
	    tcl.entry_inside->addSubEntry(myEntry);
          }
          else
          { // we can add to current entry in this case
            parseCommentBlock(tcl.this_parser, myEntry1, myDoc, tcl.file_name,
	      myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew);
          }
          myPos0=myPos;
          myLine0=myLine;
        }
        if (myNew)
        { // we need a new entry
          myNew=0;
          myEntry = tcl_entry_new();
          parseCommentBlock(tcl.this_parser, myEntry, myDoc, tcl.file_name,
	    myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew);
	  tcl.entry_inside->addSubEntry(myEntry);
        }
        else
        { // we can add to current entry
          parseCommentBlock(tcl.this_parser, myEntry1, myDoc, tcl.file_name,
	    myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew);
        }
      }
      else
      { // new entry
        tcl.entry_current = tcl_entry_new();
        while (parseCommentBlock(tcl.this_parser, tcl.entry_current, myDoc,
  	  tcl.file_name, myLine, FALSE, tcl.config_autobrief, FALSE,
	  myProt, myPos, myNew))
        {
          if (myNew)
          {
	    tcl.entry_inside->addSubEntry(tcl.entry_current);
	    tcl.entry_current = tcl_entry_new();
          }
          else
          {
	    tcl.entry_current->section = tcl.entry_inside->section;
	    tcl.entry_current->name = tcl.entry_inside->name;
          }
        }
        if (myNew)
        {
          tcl.entry_inside->addSubEntry(tcl.entry_current);
          tcl.entry_current = tcl_entry_new();
        }
        else
        {
          tcl.entry_current->section = tcl.entry_inside->section;
          tcl.entry_current->name = tcl.entry_inside->name;
        }
      }
      if (tcl.protection != myProt)
      {
        tcl.scan.at(0)->protection = tcl.protection = myProt;
      }
    }
  }
  else
  {
    tcl_abort("what %d",what);
    return;
  }
}

//! Parse given \c arglist .
static void tcl_command_ARGLIST(QString &arglist)
{
  Argument *myArg;
  QStringList myArgs;
  QString myArglist="";

  if (tcl.entry_current->argList==NULL)
  {
    tcl.entry_current->argList=new ArgumentList;
  }
  tcl_split_list(arglist,myArgs);
  for (uint i=0;i<myArgs.count();i++)
  {
    QStringList myArgs1;
    myArg=new Argument;

    tcl_split_list(*myArgs.at(i),myArgs1);
    if (myArgs1.count()==2)
    {
      myArg->name= *myArgs1.at(0);
      myArg->defval= *myArgs1.at(1);
      if (myArg->defval.isEmpty())
      {
	myArg->defval = " ";
      }
      myArglist = myArglist + "?" + myArg->name.data() + "? ";
    }
    else
    {
      myArg->name= *myArgs.at(i);
      myArglist = myArglist + myArg->name.data() + " ";
    }
    tcl.entry_current->argList->append(myArg);
  }
  arglist = myArglist;
  tcl.entry_current->args = arglist;
}

//! Handle all other commands.
static void tcl_command_OTHER(const char *text)
{
  for (unsigned int i=0; i< tcl.list_command.count(); i++)
  {
    if (i==0 && tcl_keyword(*tcl.list_command.at(i)))
    {
      tcl_codify("keyword",*tcl.list_command.at(i));
    }
    else
    {
      tcl_codify(NULL,*tcl.list_command.at(i));
    }
  }
  tcl_codify(NULL,text);
}

//! Handle \c proc statements.
static void tcl_command_PROC(const char *text)
{
  QString myNs, myName;
  Entry *myEntryNs, *myEntry;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_codify(NULL,*tcl.list_command.at(2));
  tcl_codify(NULL,*tcl.list_command.at(3));
  tcl_codify(NULL,*tcl.list_command.at(4));
  tcl_codify(NULL,*tcl.list_command.at(5));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(2),myNs,myName);
  if (myNs.length())
  {
    myEntryNs = tcl_entry_namespace(myNs);
  }
  else
  {
    myEntryNs = myScan->entry_ns;
  }
  tcl.entry_current->section = Entry::FUNCTION_SEC;
  tcl.entry_current->mtype = Method;
  tcl.entry_current->name = myName;
  tcl.entry_current->startLine = tcl.line_command;
  tcl.entry_current->bodyLine = tcl.line_body0;
  tcl.entry_current->endBodyLine = tcl.line_body1;
  tcl_protection(tcl.entry_current);
  tcl_command_ARGLIST(*tcl.list_command.at(4));
  myEntryNs->addSubEntry(tcl.entry_current);
  myEntry = tcl.entry_current;
  tcl.fn.insert(myName,myEntry);
  myScan = tcl_scan_start(tcl.word_is,*tcl.list_command.at(6),text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = NULL;
  myScan->entry_fn = myEntry;
}

//! Handle \c itcl::body statements.
static void tcl_command_ITCL_BODY(const char *text)
{
  QString myNs, myName;
  Entry *myEntryNs, *myEntryCl, *myEntry;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_codify(NULL,*tcl.list_command.at(2));
  tcl_codify(NULL,*tcl.list_command.at(3));
  tcl_codify(NULL,*tcl.list_command.at(4));
  tcl_codify(NULL,*tcl.list_command.at(5));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(2),myNs,myName);
  if (myNs.length())
  {
    myEntryNs = tcl_entry_namespace(myNs);
    myEntryCl = tcl_entry_class(myNs);
  }
  else
  {
    myEntryNs = myScan->entry_ns;
    myEntryCl = myScan->entry_cl;
  }
  tcl_command_ARGLIST(*tcl.list_command.at(4));
  myEntry = tcl.fn.find(myName);
  if (myEntry != NULL)
  {
    tcl.entry_current->section = Entry::EMPTY_SEC;
    if (myEntry->args.isEmpty())
    {
      myEntry->args = tcl.entry_current->args;
      myEntry->argList = tcl.entry_current->argList;
    }
    if (myEntry->brief.isEmpty())
    {
      myEntry->brief = tcl.entry_current->brief;
      myEntry->briefFile = tcl.entry_current->briefFile;
      myEntry->briefLine = tcl.entry_current->briefLine;
    }
    else if (!tcl.entry_current->brief.isEmpty())
    {
      myEntry->doc.append("\n<p>\n");
      myEntry->doc.append(tcl.entry_current->brief);
    }
    if (myEntry->doc.isEmpty())
    {
      myEntry->doc = tcl.entry_current->doc;
      myEntry->docFile = tcl.entry_current->docFile;
      myEntry->docLine = tcl.entry_current->docLine;
    }
    else if (!tcl.entry_current->doc.isEmpty())
    {
      myEntry->doc.append("\n<p>\n");
      myEntry->doc.append(tcl.entry_current->doc);
    }
    myEntry->bodyLine = tcl.line_body0;
    myEntry->endBodyLine = tcl.line_body1;
  } else {// should not happen, may be ignore?
    tcl.entry_current->section = Entry::FUNCTION_SEC;
    tcl.entry_current->mtype = Method;
    tcl.entry_current->name = myName;
    tcl.entry_current->startLine = tcl.line_command;
    tcl.entry_current->bodyLine = tcl.line_body0;
    tcl.entry_current->endBodyLine = tcl.line_body1;
    tcl_protection(tcl.entry_current);
    tcl.fn.insert(myName,tcl.entry_current);
    myEntryCl->addSubEntry(tcl.entry_current);
    myEntry = tcl.entry_current;
  }
  myScan = tcl_scan_start(tcl.word_is,*tcl.list_command.at(6),text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = myEntryCl;
  myScan->entry_fn = myEntry;
}

//! Handle \c oo::define method and method inside \c itcl::class statements.
static void tcl_command_METHOD(const char *text)
{
  QString myNs, myName;
  Entry *myEntryNs, *myEntryCl, *myEntry;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_codify(NULL,*tcl.list_command.at(2));
  tcl_codify(NULL,*tcl.list_command.at(3));
  tcl_codify(NULL,*tcl.list_command.at(4));
  tcl_codify(NULL,*tcl.list_command.at(5));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(2),myNs,myName);
  if (myNs.length())
  {
    myEntryNs = tcl_entry_namespace(myNs);
    myEntryCl = tcl_entry_class(myNs);
  }
  else
  {
    myEntryNs = myScan->entry_ns;
    myEntryCl = myScan->entry_cl;
  }
  tcl.entry_current->section = Entry::FUNCTION_SEC;
  tcl.entry_current->mtype = Method;
  tcl.entry_current->name = myName;
  tcl.entry_current->startLine = tcl.line_command;
  tcl.entry_current->bodyLine = tcl.line_body0;
  tcl.entry_current->endBodyLine = tcl.line_body1;
  tcl_protection(tcl.entry_current);
  tcl_command_ARGLIST(*tcl.list_command.at(4));
  myEntryCl->addSubEntry(tcl.entry_current);
  tcl.fn.insert(myName,tcl.entry_current);
  myEntry = tcl.entry_current;
  myScan = tcl_scan_start(tcl.word_is,*tcl.list_command.at(6),text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = myEntryCl;
  myScan->entry_fn = myEntry;
}

//! Handle \c constructor statements inside class definitions.
static void tcl_command_CONSTRUCTOR(const char *text)
{
  QString myNs, myName;
  Entry *myEntryNs, *myEntryCl, *myEntry;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_codify(NULL,*tcl.list_command.at(2));
  tcl_codify(NULL,*tcl.list_command.at(3));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(0),myNs,myName);
  if (myNs.length())
  {
    myEntryNs = tcl_entry_namespace(myNs);
    myEntryCl = tcl_entry_class(myNs);
  }
  else
  {
    myEntryNs = myScan->entry_ns;
    myEntryCl = myScan->entry_cl;
  }
  tcl.entry_current->section = Entry::FUNCTION_SEC;
  tcl.entry_current->mtype = Method;
  tcl.entry_current->name = myName;
  tcl.entry_current->startLine = tcl.line_command;
  tcl.entry_current->bodyLine = tcl.line_body0;
  tcl.entry_current->endBodyLine = tcl.line_body1;
  tcl_protection(tcl.entry_current);
  tcl_command_ARGLIST(*tcl.list_command.at(2));
  myEntryCl->addSubEntry(tcl.entry_current);
  myEntry = tcl.entry_current;
  tcl.fn.insert(myName,myEntry);
  myScan = tcl_scan_start(tcl.word_is,*tcl.list_command.at(4),text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = myEntryCl;
  myScan->entry_fn = myEntry;
}

//! Handle \c destructor statements inside class definitions.
static void tcl_command_DESTRUCTOR(const char *text)
{
  QString myNs, myName;
  Entry *myEntryNs, *myEntryCl, *myEntry;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(0),myNs,myName);
  if (myNs.length())
  {
    myEntryNs = tcl_entry_namespace(myNs);
    myEntryCl = tcl_entry_class(myNs);
  }
  else
  {
    myEntryNs = myScan->entry_ns;
    myEntryCl = myScan->entry_cl;
  }
  tcl.entry_current->section = Entry::FUNCTION_SEC;
  tcl.entry_current->mtype = Method;
  tcl.entry_current->name = myName;
  tcl.entry_current->startLine = tcl.line_command;
  tcl.entry_current->bodyLine = tcl.line_body0;
  tcl.entry_current->endBodyLine = tcl.line_body1;
  tcl_protection(tcl.entry_current);
  myEntryCl->addSubEntry(tcl.entry_current);
  myEntry = tcl.entry_current;
  tcl.fn.insert(myName,myEntry);
  myScan = tcl_scan_start(tcl.word_is,*tcl.list_command.at(2),text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = myEntryCl;
  myScan->entry_fn = myEntry;
}

//! Handle \c namespace statements.
static void tcl_command_NAMESPACE(const char *text)
{
  QString myNs, myName, myStr;
  Entry *myEntryNs=NULL;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_codify("keyword",*tcl.list_command.at(2));
  tcl_codify(NULL,*tcl.list_command.at(3));
  tcl_codify(NULL,*tcl.list_command.at(4));
  tcl_codify(NULL,*tcl.list_command.at(5));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(4),myNs,myName);
  if (myNs.length())
  {
    myName = myNs+"::"+myName;
  }
  tcl.entry_current->section = Entry::NAMESPACE_SEC;
  tcl.entry_current->name = myName;
  tcl.entry_current->startLine = tcl.line_command;
  tcl.entry_current->bodyLine = tcl.line_body0;
  tcl.entry_current->endBodyLine = tcl.line_body1;
  tcl.entry_main->addSubEntry(tcl.entry_current);
  tcl.ns.insert(myName,tcl.entry_current);
  myEntryNs = tcl.entry_current;
  myStr = *tcl.list_command.at(6);
  if (tcl.list_command.count() > 7)
  {
    for (uint i=7;i<tcl.list_command.count();i++)
    {
      myStr.append(*tcl.list_command.at(i));
    }
    tcl.word_is=STRING;
  }
  myScan = tcl_scan_start(tcl.word_is,myStr,text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = NULL;
  myScan->entry_fn = NULL;
}

//! Handle \c itcl::class statements.
static void tcl_command_ITCL_CLASS(const char *text)
{
  QString myNs, myName, myStr;
  Entry *myEntryNs, *myEntryCl;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_codify("NULL",*tcl.list_command.at(2));
  tcl_codify("NULL",*tcl.list_command.at(3));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(2),myNs,myName);
  if (myNs.length())
  {
    myName = myNs+"::"+myName;
  }
  tcl.entry_current->section = Entry::CLASS_SEC;
  tcl.entry_current->name = myName;
  tcl.entry_current->startLine = tcl.line_command;
  tcl.entry_current->bodyLine = tcl.line_body0;
  tcl.entry_current->endBodyLine = tcl.line_body1;
  tcl.entry_main->addSubEntry(tcl.entry_current);
  myEntryNs = tcl_entry_namespace(myName);
  tcl.cl.insert(myName,tcl.entry_current);
  myEntryCl = tcl.entry_current;
  myScan = tcl_scan_start(tcl.word_is,*tcl.list_command.at(4),text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = myEntryCl;
  myScan->entry_fn = NULL;
}

//! Handle \c oo::class statements.
static void tcl_command_OO_CLASS(const char *text)
{
  QString myNs, myName, myStr;
  Entry *myEntryNs, *myEntryCl;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_codify("NULL",*tcl.list_command.at(2));
  tcl_codify("NULL",*tcl.list_command.at(3));
  tcl_codify("NULL",*tcl.list_command.at(4));
  tcl_codify("NULL",*tcl.list_command.at(5));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(4),myNs,myName);
  if (myNs.length())
  {
    myName = myNs+"::"+myName;
  }
  tcl.entry_current->section = Entry::CLASS_SEC;
  tcl.entry_current->name = myName;
  tcl.entry_current->startLine = tcl.line_command;
  tcl.entry_current->bodyLine = tcl.line_body0;
  tcl.entry_current->endBodyLine = tcl.line_body1;
  tcl.entry_main->addSubEntry(tcl.entry_current);
  myEntryNs = tcl_entry_namespace(myName);
  tcl.cl.insert(myName,tcl.entry_current);
  myEntryCl = tcl.entry_current;
  myScan = tcl_scan_start(tcl.word_is,*tcl.list_command.at(6),text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = myEntryCl;
  myScan->entry_fn = NULL;
}

//! Handle \c oo::define statements.
static void tcl_command_OO_DEFINE(const char *text)
{
  QString myNs, myName, myStr;
  Entry *myEntryNs, *myEntryCl;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  tcl_codify(NULL,*tcl.list_command.at(1));
  tcl_codify("NULL",*tcl.list_command.at(2));
  tcl_codify("NULL",*tcl.list_command.at(3));
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(2),myNs,myName);
  if (myNs.length())
  {
    myName = myNs+"::"+myName;
  }
  myEntryNs = tcl_entry_namespace(myName);
  myEntryCl = tcl_entry_class(myName);
  myStr = *tcl.list_command.at(4);
  if (tcl.list_command.count() > 5)
  {
    for (uint i=5;i<tcl.list_command.count();i++)
    {
      myStr.append(*tcl.list_command.at(i));
    }
    tcl.word_is=STRING;
  }
  myScan = tcl_scan_start(tcl.word_is,myStr,text);
  myScan->entry_ns = myEntryNs;
  myScan->entry_cl = myEntryCl;
  myScan->entry_fn = NULL;
}

//! Handle \c variable statements.
static void tcl_command_VARIABLE(const char *text, int inclass)
{
  QString myNs, myName;
  Entry *myEntry;
  tcl_scan *myScan = tcl.scan.at(0);

  tcl_codify("keyword",*tcl.list_command.at(0));
  for (unsigned int i=1; i< tcl.list_command.count(); i++)
  {
    tcl_codify(NULL,*tcl.list_command.at(i));
  }
  tcl_name(myScan->entry_ns->name,*tcl.list_command.at(2),myNs,myName);
  if (myNs.length())
  {// qualified variables go into namespace
    myEntry = tcl_entry_namespace(myNs);
    tcl.entry_current->stat = true;
  }
  else
  {
    if (inclass)
    {
      myEntry = myScan->entry_cl;
      tcl.entry_current->stat = false;
    }
    else
    {
      myEntry = myScan->entry_ns;
      tcl.entry_current->stat = true;
    }
  }
  tcl.entry_current->section = Entry::VARIABLE_SEC;
  tcl.entry_current->name = myName;
  tcl.entry_current->startLine = tcl.line_command;
  tcl.entry_current->bodyLine = tcl.line_body0;
  tcl.entry_current->endBodyLine = tcl.line_body1;
  tcl_protection(tcl.entry_current);
  myEntry->addSubEntry(tcl.entry_current);
  tcl.entry_current = tcl_entry_new();
  tcl_codify("comment",text);
}

//! Handling of command parsing.
static void tcl_command(int what,const char *text)
{
  if (what==0)
  {
    tcl.scan.at(0)->line1=tclscanYYlineno;// current line in scan context
    tcl.line_body0=tclscanYYlineno;// start line of command
tcl_debug("+++%s",text);
    yy_push_state(COMMAND);
    tcl.list_command.clear();
    tcl.string_command="";
    tcl.string_last="";
    tcl.command=1;
    return;
  }
  if (what==1)
  {
    if (tcl.string_last.length())
    {
      tcl.list_command.append(tcl.string_last);
      tcl.string_last="";
    }
    if (text) {
      tcl.list_command.append(text);
    }
    return;
  }
  if (what!=-1)
  {// should not happen
    tcl_abort("what %d",what);
    return;
  }
  tcl_debug("---");
  if (tcl.command==0)
  {
    return;//TODO check on inside comment
  }
  if (tcl.string_last != "")
  {// get last word
    tcl.list_command.append(tcl.string_last);
    tcl.string_last="";
  }
  yy_pop_state();

  // check command
  QString myStr = *tcl.list_command.at(0);
  int myLevel = 0;
  Protection myProt = tcl.protection;

  if (tcl.list_command.count() < 3)
  {
    tcl_command_OTHER(text);
    goto command_end;
  }
  // remove leading "::" and apply TCL_SUBST
  if (myStr.left(2)=="::") myStr = myStr.mid(2);
#if HAS_TCL_SUBST 
  if (tcl.config_subst.contains(myStr)) {myStr=tcl.config_subst[myStr];}
#endif
  if (strcmp("private",myStr)==0)
  {
    tcl.protection = Private;
    myLevel = 1;
  }
  else if (strcmp("protected",myStr)==0)
  {
    tcl.protection = Protected;
    myLevel = 1;
  }
  else if (strcmp("public",myStr)==0)
  {
    tcl.protection = Public;
    myLevel = 1;
  }
  if (myLevel)
  {
    tcl_codify("keyword",*tcl.list_command.at(0));
    tcl_codify(NULL,*tcl.list_command.at(1));
    tcl.list_command.remove(tcl.list_command.at(1));
    tcl.list_command.remove(tcl.list_command.at(0));
    if (tcl.list_command.count()==1)
    {
      tcl_scan *myScan = tcl.scan.at(0);
      myScan = tcl_scan_start(tcl.word_is,*tcl.list_command.at(0),text);
      myProt = tcl.protection;
      goto command_end;
    }
    myStr	= *tcl.list_command.at(0);
    // remove leading "::" and apply TCL_SUBST
    if (myStr.left(2)=="::") myStr = myStr.mid(2);
#if HAS_TCL_SUBST 
    if (tcl.config_subst.contains(myStr)) {myStr=tcl.config_subst[myStr];}
#endif
  }
  if (strcmp("proc",myStr)==0)
  {
    if (tcl.list_command.count() == 5)
    {// itcl::proc
      tcl.list_command.append("");
      tcl.list_command.append("");
    }
    if (tcl.list_command.count() != 7) {goto command_warn;}
    tcl_command_PROC(text);
    goto command_end;
  }
  if (strcmp("method",myStr)==0)
  {
    if (tcl.list_command.count() == 5)
    {// itcl::method
      tcl.list_command.append("");
      tcl.list_command.append("");
    }
    if (tcl.list_command.count() != 7) {goto command_warn;}
    tcl_command_METHOD(text);
    goto command_end;
  }
  if (strcmp("constructor",myStr)==0)
  {
    if (tcl.list_command.count() != 5) {goto command_warn;}
    tcl_command_CONSTRUCTOR(text);
    goto command_end;
  }
  if (strcmp("destructor",myStr)==0)
  {
    if (tcl.list_command.count() != 3) {goto command_warn;}
    tcl_command_DESTRUCTOR(text);
    goto command_end;
  }
  if (strcmp("namespace",myStr)==0)
  {
    if (strcmp("eval",*tcl.list_command.at(2))==0)
    {
      if (tcl.list_command.count() < 7) {goto command_warn;}
      tcl_command_NAMESPACE(text);
      goto command_end;
    }
    tcl_command_OTHER(text);
    goto command_end;
  }
  if (strcmp("itcl::class",myStr)==0)
  {
    if (tcl.list_command.count() != 5) {goto command_warn;}
    tcl_command_ITCL_CLASS(text);
    goto command_end;
  }
  if (strcmp("itcl::body",myStr)==0)
  {
    if (tcl.list_command.count() != 7) {goto command_warn;}
    tcl_command_ITCL_BODY(text);
    goto command_end;
  }
  if (strcmp("oo::class",myStr)==0)
  {
    if (strcmp("create",*tcl.list_command.at(2))==0)
    {
      if (tcl.list_command.count() != 7) {goto command_warn;}
      tcl_command_OO_CLASS(text);
      goto command_end;
    }
    tcl_command_OTHER(text);
    goto command_end;
  }
  if (strcmp("oo::define",myStr)==0)
  {
    if (tcl.list_command.count() < 5) {goto command_warn;}
    tcl_command_OO_DEFINE(text);
    goto command_end;
  }
  if (strcmp("variable",myStr)==0)
  {
    if (tcl.list_command.count() < 3) {goto command_warn;}
    if (tcl.scan.at(0)->entry_fn == NULL)
    {// only parsed outside functions
      tcl_command_VARIABLE(text,tcl.scan.at(0)->entry_cl!=NULL&&tcl.scan.at(0)->entry_cl->name!="");
      goto command_end;
    }
  }
  if (strcmp("common",myStr)==0)
  {
    if (tcl.list_command.count() < 3) {goto command_warn;}
    if (tcl.scan.at(0)->entry_fn == NULL)
    {// only parsed outside functions
      tcl_command_VARIABLE(text,0);
      goto command_end;
    }
  }
  if (strcmp("inherit",myStr)==0 || strcmp("superclass",myStr)==0)
  {
    if (tcl.list_command.count() < 3) {goto command_warn;}
    if (tcl.scan.at(0)->entry_cl!=NULL&&tcl.scan.at(0)->entry_cl->name!="")
    {
      for (unsigned int i = 2; i < tcl.list_command.count(); i++)
      {
        tcl.scan.at(0)->entry_cl->extends->append(new BaseInfo(*tcl.list_command.at(i),Public,Normal));
      }
    }
  }
  tcl_command_OTHER(text);
  goto command_end;
  command_warn:
    tcl_warn("count=%d: %s",tcl.list_command.count(),tcl.list_command.join(" ").ascii());
    tcl_command_OTHER(text);
  command_end:
    tcl.list_command.clear();
    tcl.command = 0;
    tcl.protection = myProt;
}

//----------------------------------------------------------------------------
//! Common initializations.
static void tcl_init()
{
#if HAS_TCL_SUBST 
  // Get values from option TCL_SUBST
  QStrList myStrLst = Config_getList("TCL_SUBST");
  if (myStrLst.count()%2 != 0) 
  {
    tcl.config_subst.clear();
  } 
  else 
  {
    for (unsigned int i=0; i < myStrLst.count(); i=i+2) 
    {
      tcl.config_subst[myStrLst.at(i)] = myStrLst.at(i+1);
    }
  }
#endif
  
  tcl.code = NULL;
  tcl.code_font=NULL;
  tcl.code_line=1;
  tcl.code_linenumbers=1;
  tcl.config_autobrief = Config_getBool("JAVADOC_AUTOBRIEF");
  tcl.input_string = NULL;
  tcl.input_position = 0;
  tcl.file_name = NULL;
  tcl.this_parser = NULL;
  tcl.command=0;
  tcl.comment=0;
  tcl.brace_level=0;
  tcl.bracket_level=0;
  tcl.bracket_quote=0;
  tcl.word_is=WORD;
  tcl.string_command="";
  tcl.string_commentline="";
  tcl.string_commentcodify="";
  tcl.string_comment	= "";
  tcl.string_last	= "";
  tcl.entry_main	= NULL;
  tcl.entry_file	= NULL;
  tcl.entry_current	= NULL;
  tcl.entry_inside	= NULL;
  tcl.list_command.clear();
  tcl.scan.clear();
  tcl.ns.clear();
  tcl.cl.clear();
  tcl.fn.clear();
  tclscanYYlineno		= 1;
  tcl.protection	= Public;
}

//! Start parsing.
static void tcl_parse()
{
  tcl_scan *myScan;

  tcl.entry_file          = tcl_entry_new();
  tcl.entry_file->name    = tcl.file_name;
  tcl.entry_file->section = Entry::SOURCE_SEC;
  tcl.entry_file->protection = Public;
  tcl.entry_main->addSubEntry(tcl.entry_file);
  tcl.entry_current = tcl_entry_new();

  tclscanYYrestart( tclscanYYin );
  BEGIN( TOP );
  tclscanYYlineno=1;
  myScan = new tcl_scan;
  myScan->type=STRING;
  myScan->string_after="";
  myScan->line0=tclscanYYlineno;
  myScan->line1=tclscanYYlineno;
  myScan->start_stack_ptr=yy_start_stack_ptr;
  myScan->buffer_state=YY_CURRENT_BUFFER;
  myScan->entry_ns=tcl_entry_namespace("");
  myScan->entry_cl=tcl_entry_class("");
  myScan->entry_fn=NULL;
  tcl.entry_inside = myScan->entry_ns;
  tcl.entry_inside = tcl.entry_file;
  myScan->entry_scan = myScan->entry_ns;
  tcl.scan.insert(0,myScan);

  tclscanYYlex();
  tcl.scan.clear();
  tcl.ns.clear();
  tcl.cl.clear();
  tcl.fn.clear();
  tcl.entry.clear();
}

//! Parse text file and build up entry tree.
void TclLanguageScanner::parseInput(const char *fileName,const char *input,Entry *root)
{
  QFile            myFile;

  myFile.setName(fileName);
  if (!myFile.open(IO_ReadOnly)) return;

  msg("Parsing '%s'...\n",fileName);
  groupEnterFile(fileName,tclscanYYlineno);

  tcl_init();
  tcl.code = NULL;
  tcl.input_string = input;
  tcl.file_name = fileName;
  tcl.this_parser = this;
  tcl.entry_main          = root; /* toplevel entry */
  tcl_parse();

  groupLeaveFile(tcl.file_name,tclscanYYlineno);
  root->program.resize(0);
  myFile.close();
}

//! Parse file and codify.
void TclLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
                   const char * scopeName,
                   const QCString & input,
                   bool isExampleBlock,
                   const char * exampleName,
                   FileDef * fileDef,
                   int startLine,
                   int endLine,
                   bool inlineFragment,
		   MemberDef *memberDef,
                   bool showLineNumbers
                  )
{
  (void)scopeName;
  (void)exampleName;
  (void)fileDef;
  (void)endLine;
  (void)inlineFragment;
  (void)memberDef;

  if (input.isEmpty()) return;
/*
  QString myStr="Codifying..";
  if (scopeName) {myStr+=" scope=";myStr+=scopeName;}
  if (exampleName) {myStr+=" example=";myStr+=exampleName;}
  if (memberDef) {myStr+=" member=";myStr+=memberDef->memberTypeName();
	myStr+=" ";myStr+=memberDef->qualifiedName();}
  if (fileDef) {myStr+=" file=";myStr+=fileDef->fileName();}
  
printf("%s (%d,%d) %d %d\n====%s\n====\n",myStr.ascii(),startLine,endLine,isExampleBlock,inlineFragment,input.data());
*/
  QCString myInput = input;
  if (input.at(input.length()-1) != '\n') 
  {
    myInput += "\n";
  }
  if (isExampleBlock) {tcl_codify(NULL,input);return;}
  tcl_init();
  tcl.code = &codeOutIntf;
  if (startLine<0) 
  {
    startLine=1;
  }
  tclscanYYlineno=startLine;
  tcl.code_linenumbers = showLineNumbers;
  tcl.code_line=tclscanYYlineno;
  if (tcl.code_linenumbers) 
  {
    tcl.code->writeLineNumber(0,0,0,tcl.code_line);
  }
  tcl.input_string = myInput.data();
  tcl.file_name = "";
  tcl.this_parser = NULL;
  tcl.entry_main = tcl_entry_new();
  tcl_parse();
  tcl.scan.clear();
  tcl.ns.clear();
  tcl.cl.clear();
  tcl.fn.clear();
  tcl.entry.clear();
}

bool TclLanguageScanner::needsPreprocessing(const QCString &extension)
{
  (void)extension;
  return FALSE;
}

void TclLanguageScanner::resetCodeParserState()
{
}

void TclLanguageScanner::parsePrototype(const char *text)
{
  (void)text;
}

static int yyread(char *buf,int max_size)
{
  int c=0;

  *buf = '\0';
  while ( c < max_size && tcl.input_string[tcl.input_position] )
  {
    *buf = tcl.input_string[tcl.input_position++] ;
    c++; buf++;
  }
  //printf("Read from=%d size=%d max=%d c=%d\n",tcl.input_position,strlen(&tcl.input_string[tcl.input_position]),max_size,c);
  return c;
}

//----------------------------------------------------------------------------

// to avoid a warning
void tclDummy()
{
  yy_top_state();
}

#if !defined(YY_FLEX_SUBMINOR_VERSION) 
//----------------------------------------------------------------------------
extern "C" { // some bogus code to keep the compiler happy
  void tclscannerYYdummy() { yy_flex_realloc(0,0); } 
}
#endif


