#line 44 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif




#line 10 "parse-tree/lex.cc"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 39
#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;

/* 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 /* ! C99 */

#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)

/* An opaque pointer. */
#ifndef YY_TYPEDEF_YY_SCANNER_T
#define YY_TYPEDEF_YY_SCANNER_T
typedef void* yyscan_t;
#endif

/* For convenience, these vars (plus the bison vars far below)
   are macros in the reentrant scanner. */
#define yyin yyg->yyin_r
#define yyout yyg->yyout_r
#define yyextra yyg->yyextra_r
#define yyleng yyg->yyleng_r
#define yytext yyg->yytext_r
#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
#define yy_flex_debug yyg->yy_flex_debug_r

/* 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 yyg->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 ((yyg->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 octave_restart(yyin ,yyscanner )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#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

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

    #define YY_LESS_LINENO(n)
    #define YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = yyg->yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )

#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 octave_restart()), so that the user can continue scanning by
	 * just pointing yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* 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 ( yyg->yy_buffer_stack \
                          ? yyg->yy_buffer_stack[yyg->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 yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

void octave_restart (FILE *input_file ,yyscan_t yyscanner );
void octave__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE octave__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
void octave__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void octave__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void octave_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void octave_pop_buffer_state (yyscan_t yyscanner );

static void octave_ensure_buffer_stack (yyscan_t yyscanner );
static void octave__load_buffer_state (yyscan_t yyscanner );
static void octave__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );

#define YY_FLUSH_BUFFER octave__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

YY_BUFFER_STATE octave__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE octave__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE octave__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );

void *octave_alloc (yy_size_t ,yyscan_t yyscanner );
void *octave_realloc (void *,yy_size_t ,yyscan_t yyscanner );
void octave_free (void * ,yyscan_t yyscanner );

#define yy_new_buffer octave__create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        octave_ensure_buffer_stack (yyscanner); \
		YY_CURRENT_BUFFER_LVALUE =    \
            octave__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}

#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        octave_ensure_buffer_stack (yyscanner); \
		YY_CURRENT_BUFFER_LVALUE =    \
            octave__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

#define octave_wrap(yyscanner) 1
#define YY_SKIP_YYWRAP

typedef unsigned char YY_CHAR;

typedef int yy_state_type;

#define yytext_ptr yytext_r

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

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

#define YY_NUM_RULES 123
#define YY_END_OF_BUFFER 124
/* 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_acclist[356] =
    {   0,
        5,    6,    8,    9,    5,    6,    8,    9,   10,   10,
      124,  122,  123,   51,  122,  123,   60,  123,   60,  122,
      123,   93,  122,  123,   62,  122,  123,  122,  123,   56,
      122,  123,   76,  122,  123,   61,  122,  123,   98,  122,
      123,   99,  122,  123,   80,  122,  123,   90,  122,  123,
       94,  122,  123,   91,  122,  123,  100,  122,  123,   81,
      122,  123,   50,  122,  123,   50,  122,  123,   63,  122,
      123,   89,  122,  123,   78,  122,  123,  101,  122,  123,
       79,  122,  123,  122,  123,   59,  122,  123,   14,  122,
      123,   82,  122,  123,   15,  122,  123,   83,  122,  123,

       56,  122,  123,   56,  122,  123,  120,  122,  123,   77,
      122,  123,  121,  122,  123,   92,  122,  123,   51,  122,
      123,  122,  123,    9,  123,    8,  123,    3,  123,    3,
      123,    7,  123,  123,    5,  123,    6,  123,    4,  123,
        9,  123,   10,   51,  122,  123,   11,   60,  123,   11,
       60,  122,  123,   12,   15,  122,  123,   13,  121,  122,
      123,   10,   51,  122,  123,    1,  123,    1,  123,  123,
       19,  123,   19,  123,  123,  123,   22,  123,   22,  123,
       22,  123,   22,  123,   39,  123,   40,  123,   40,  123,
       24,  123,   38,  123,  123,   43,  123,   44,  123,   44,

      123,   42,  123,   47,  123,   46,   47,  123,  123,   45,
       47,  123,   51,   60,   74,   20,   20,   56,   85,  116,
       84,  104,   96,  102,   97,  103,   95,   66,   64,   65,
       67,   50,   68,   69,  105,   50,   50,   48,   87,   71,
       72,   75,   88,   58,   53,   53,  106,  112,   56,   56,
      117,   86,   73,   51,    9,    8,    3,    3,    5,    6,
       10,   51,   11,   60,   10,   51,    1,   19,   19,   22,
       21,   21,   39,   40,   23,   37,   37,   36,   36,   37,
       25,   37,   27,   37,   28,   37,   29,   37,   30,   37,
       31,   37,   32,   37,   33,   37,   37,   43,   44,   41,

       46,   45,   57,  113,   70,  109,  107,  108,  110,  111,
      114,   49,   50,   50,   50,  118,  119,   58,   54,   54,
       56,16439,   16,   20,   16,   20,   17,   19,   17,   19,
       18,   19,   18,   19,   35,   35,   25,   26,   45,   57,
      115,   52,   52,   50,   58, 8247,    2,    2,   34,   34,
       25,   45,   57,   58,   57
    } ;

static yyconst flex_int16_t yy_accept[265] =
    {   0,
        1,    1,    1,    5,    9,   10,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   12,
       14,   17,   19,   22,   25,   28,   30,   33,   36,   39,
       42,   45,   48,   51,   54,   57,   60,   63,   66,   69,
       72,   75,   78,   81,   84,   86,   89,   92,   95,   98,
      101,  104,  107,  110,  113,  116,  119,  122,  124,  126,
      128,  130,  132,  134,  135,  137,  139,  141,  143,  147,
      150,  154,  158,  162,  166,  168,  170,  171,  173,  175,
      176,  177,  179,  181,  183,  185,  187,  189,  191,  193,
      195,  196,  198,  200,  202,  204,  206,  209,  210,  213,

      214,  214,  215,  216,  216,  217,  218,  219,  219,  220,
      221,  222,  223,  224,  225,  226,  227,  228,  229,  230,
      231,  231,  232,  233,  234,  235,  236,  237,  238,  238,
      239,  239,  240,  241,  242,  243,  244,  245,  245,  246,
      247,  247,  248,  249,  250,  251,  252,  253,  254,  255,
      255,  255,  256,  257,  258,  258,  259,  260,  261,  261,
      263,  265,  267,  268,  268,  269,  270,  270,  270,  270,
      270,  270,  270,  271,  271,  272,  273,  274,  275,  276,
      276,  277,  278,  279,  281,  283,  285,  287,  289,  291,
      293,  295,  297,  298,  299,  300,  301,  302,  303,  303,

      304,  305,  306,  307,  308,  309,  309,  310,  310,  311,
      312,  313,  314,  314,  315,  316,  317,  318,  319,  319,
      319,  320,  321,  323,  323,  325,  327,  327,  327,  329,
      331,  331,  333,  335,  335,  335,  336,  337,  338,  339,
      340,  341,  341,  342,  342,  343,  344,  344,  345,  346,
      346,  347,  347,  348,  349,  349,  350,  351,  352,  353,
      354,  355,  356,  356
    } ;

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

       39,   40,   41,    8,   31,   31,    8,    8,    8,   42,
        8,    8,    8,   43,   44,   45,    8,   46,    8,   47,
        8,    8,   48,   49,   50,   51,    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[52] =
    {   0,
        1,    2,    3,    3,    1,    4,    2,    5,    1,    6,
        2,    2,    1,    1,    2,    1,    7,    1,    8,    8,
        8,    1,    2,    1,    1,    1,    1,    9,   10,   10,
        5,    5,    2,   11,    2,    1,   10,   10,   10,   10,
        5,    5,    5,    5,    5,    5,    5,    2,    1,    2,
        1
    } ;

static yyconst flex_int16_t yy_base[296] =
    {   0,
        0,   50,   56,  105,   51,   91,  657,  656,   61,   73,
       80,   81,   93,  115,  120,  132,  154,  200,  659,  721,
       54,  721,  655,  630,  721,   66,  613,   65,  721,  721,
      721,   89,   67,  721,  109,  238,  613,  258,  148,  721,
      721,  119,  610,  120,    0,  721,  721,  156,  721,  607,
      109,  111,  721,   80,  721,  606,  145,  167,    0,  628,
      721,  626,  721,  169,  171,  139,  721,  609,  159,  721,
      620,  721,  721,  173,  721,  613,  173,  721,  610,  203,
      213,  721,  207,  593,  208,    0,  721,  590,  586,  535,
      304,    0,  721,  548,  539,  721,  546,  721,  530,  211,

      217,  721,  721,  219,  721,  541,  515,    0,  721,  721,
      517,  721,  721,  721,  721,  721,  721,  211,  516,  511,
      518,  419,  261,  418,  417,  721,  342,  282,  246,  721,
        0,  416,  721,  721,  721,  401,  383,  266,  721,  381,
      222,  721,  721,  205,  248,  721,  721,  721,  302,  280,
      283,    0,  377,  721,  224,  374,  283,  283,  354,  308,
      721,  312,  721,  231,  721,  356,  323,  332,  335,  354,
      315,  350,  721,  361,  721,  345,    0,  721,  721,  328,
      721,  364,  721,  340,  350,  721,  721,  721,  721,  721,
      721,  721,    0,    0,  721,  721,  338,  317,    0,  315,

      721,  304,  721,  721,  721,  371,  721,  369,  721,  721,
      721,  372,  375,  378,  267,  721,  721,  279,    0,  383,
      721,  268,  399,  402,  721,  261,  404,  410,  721,  250,
      413,  721,  246,  416,  419,  721,  187,  405,    0,  171,
      147,    0,  721,  425,  721,  151,  411,  414,  116,  309,
      721,  433,  721,  128,  436,  721,  110,  721,   86,   83,
       61,   55,  721,  445,  456,  467,  478,  489,  500,  511,
      522,  529,  535,  545,  556,  567,  578,  589,  599,  610,
      617,  623,  626,  632,  642,  646,  652,  658,  668,  675,
      685,  692,  698,  704,  710

    } ;

static yyconst flex_int16_t yy_def[296] =
    {   0,
      263,    1,  264,  264,    1,    1,  265,  265,  266,  266,
      267,  267,  268,  268,  269,  269,  270,  270,  263,  263,
      263,  263,  263,  263,  263,  271,  272,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  273,  263,  263,  263,  263,  263,
      272,  272,  263,  263,  263,  263,  263,  271,  274,  263,
      263,  263,  263,  275,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  276,  263,  263,  276,
      276,  263,  263,  263,  277,  278,  263,  263,  263,  263,
      279,  280,  263,  263,  263,  263,  263,  263,  281,  263,

      271,  263,  263,  271,  263,  263,  272,  282,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      283,  263,  263,  263,  263,  263,  284,  263,  263,  263,
      285,  263,  263,  272,  272,  263,  263,  263,  263,  271,
      271,  274,  263,  263,  275,  263,  263,  263,  263,  263,
      263,  263,  263,  276,  263,  263,  276,  276,  276,  276,
      263,  277,  263,  277,  263,  263,  278,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  286,  280,  263,  263,  263,  281,  287,  288,

      263,  263,  263,  263,  263,  289,  263,  263,  263,  263,
      263,  263,  263,  263,  283,  263,  263,  284,  290,  285,
      263,  263,  272,  271,  263,  263,  291,  276,  263,  263,
      276,  263,  263,  263,  263,  263,  263,  263,  286,  292,
      288,  293,  263,  289,  263,  263,  263,  263,  294,  263,
      263,  291,  263,  263,  263,  263,  263,  263,  292,  295,
      294,  295,    0,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263

    } ;

static yyconst flex_int16_t yy_nxt[773] =
    {   0,
       20,   21,   22,   23,   24,   25,   26,   27,   28,   29,
       30,   31,   32,   33,   34,   35,   36,   37,   38,   39,
       39,   40,   41,   42,   43,   44,   45,   46,   27,   27,
       27,   27,   47,   48,   49,   50,   27,   27,   27,   27,
       51,   27,   27,   52,   27,   27,   27,   53,   54,   55,
       56,   57,   69,   70,   71,  100,   58,   60,   61,   62,
      101,   63,   64,   78,   79,   63,   65,   66,  105,  106,
       67,  242,   68,  109,   80,   78,   79,  219,   67,   81,
      113,   83,   83,   84,   84,   72,   85,   85,   65,  110,
       66,  114,   74,   70,   71,   87,   88,   58,   89,  242,

       73,  111,  199,   65,  146,   66,   60,   61,   62,   90,
       63,   64,  256,  112,   63,   65,   66,   87,   88,   67,
       89,   68,   93,   94,  115,   72,   91,   67,  147,   95,
      253,   90,  219,  116,   93,   94,  108,   65,  108,   66,
       73,   95,  132,  133,  135,  136,  149,  144,   91,  145,
      158,  150,   65,  245,   66,   97,   98,  138,  139,  140,
      160,   99,  141,  242,  127,  101,  128,  128,  128,  105,
      106,  154,  156,  158,  162,  165,  166,  129,  130,  150,
      142,  157,   99,   99,   99,   99,  129,  199,  158,  236,
       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,

       99,   97,   98,  157,  167,  165,  166,   99,  171,  168,
      175,  176,  100,  172,  151,  165,  166,  101,  157,  105,
      106,  105,  106,  202,  221,  222,  154,  156,   99,   99,
       99,   99,  108,  165,  166,  203,   99,   99,   99,   99,
       99,   99,   99,   99,   99,   99,   99,  117,  232,  223,
      118,  119,  229,  120,  121,  122,  123,  123,  123,  213,
      169,  213,  170,  225,  214,  214,  214,  138,  139,  140,
      221,  124,  141,  125,  127,  108,  128,  128,  128,  123,
      123,  123,  105,  106,  224,  225,  226,  129,  130,  131,
      208,  130,  223,  157,  158,  219,  129,  130,  127,  208,

      128,  128,  128,  149,  131,  182,  183,  184,  150,  160,
      250,  129,  130,  162,  101,  157,  171,  158,  150,  251,
      129,  172,  185,  185,  167,  165,  166,  151,  243,  168,
      157,  242,  158,  199,  165,  166,  228,  229,  230,  197,
      186,  187,  183,  188,  234,  189,  190,  175,  191,  192,
      193,  211,  175,  176,  211,  231,  232,  233,  165,  211,
      212,  212,  212,  175,  176,  235,  236,  237,  238,  238,
      227,  129,  130,  245,  246,  211,  154,  211,  153,  169,
      129,  170,  247,  139,  247,  221,  222,  248,  248,  248,
      212,  212,  212,  214,  214,  214,  214,  214,  214,  219,

      250,  129,  130,  224,  225,  226,  253,  254,  130,  251,
      129,  228,  229,  230,  231,  232,  233,  255,  256,  257,
      235,  236,  237,  258,  258,  217,  108,  245,  246,  248,
      248,  248,  248,  248,  248,  253,  254,  255,  256,  257,
      216,  210,  209,  207,  130,   59,   59,   59,   59,   59,
       59,   59,   59,   59,   59,   59,   75,   75,   75,   75,
       75,   75,   75,   75,   75,   75,   75,   77,   77,   77,
       77,   77,   77,   77,   77,   77,   77,   77,   82,   82,
       82,   82,   82,   82,   82,   82,   82,   82,   82,   86,
       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,

       92,   92,   92,   92,   92,   92,   92,   92,   92,   92,
       92,   96,   96,   96,   96,   96,   96,   96,   96,   96,
       96,   96,  104,  104,  104,  104,  104,  104,  104,  104,
      104,  104,  104,  107,  206,  205,  107,  107,  107,  137,
      204,  201,  108,  105,  137,  152,  199,  197,  196,  152,
      195,  180,  152,  152,  152,  152,  155,  155,  155,  155,
      155,  155,  155,  155,  155,  155,  155,  164,  164,  164,
      164,  164,  164,  164,  164,  164,  164,  164,  174,  174,
      174,  174,  174,  174,  174,  174,  174,  174,  174,  177,
      177,  179,  178,  177,  177,  173,  177,  177,  177,  181,

      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
      194,  194,  165,  194,  194,  163,  194,  194,  194,  194,
      194,  198,  161,  198,  198,  159,  198,  200,  154,  153,
      148,  143,  200,  215,  134,  215,  218,  126,  218,  218,
      108,  218,  220,  220,  220,  220,  220,  220,  220,  220,
      220,  220,  220,  239,  103,  239,  240,  102,  263,   76,
       76,  240,  241,  263,  241,  241,  263,  241,  244,  244,
      244,  244,  244,  244,  244,  244,  244,  244,  244,  249,
      263,  263,  263,  263,  249,  252,  252,  252,  252,  252,
      252,  252,  252,  252,  252,  252,  259,  263,  259,  259,

      263,  259,  260,  263,  263,  263,  263,  260,  261,  263,
      261,  261,  263,  261,  262,  263,  262,  262,  263,  262,
       19,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263
    } ;

static yyconst flex_int16_t yy_chk[773] =
    {   0,
        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,    2,    5,    5,    5,   21,    2,    3,    3,    3,
       21,    3,    3,    9,    9,    3,    3,    3,   26,   26,
        3,  262,    3,   28,   10,   10,   10,  261,    3,   10,
       33,   11,   12,   11,   12,    5,   11,   12,    3,   28,
        3,   33,    6,    6,    6,   13,   13,    6,   13,  260,

        5,   32,  259,    3,   54,    3,    4,    4,    4,   13,
        4,    4,  257,   32,    4,    4,    4,   14,   14,    4,
       14,    4,   15,   15,   35,    6,   13,    4,   54,   15,
      254,   14,  249,   35,   16,   16,   51,    4,   52,    4,
        6,   16,   42,   42,   44,   44,   57,   51,   14,   52,
       66,   57,    4,  246,    4,   17,   17,   48,   48,   48,
       69,   17,   48,  241,   39,   69,   39,   39,   39,   58,
       58,   64,   64,   66,   74,   77,   77,   39,   39,   74,
       48,   65,   17,   17,   17,   17,   39,  240,   66,  237,
       17,   17,   17,   17,   17,   17,   17,   17,   17,   17,

       17,   18,   18,   65,   80,   80,   80,   18,   83,   80,
       85,   85,  100,   83,   58,   81,   81,  100,   65,  101,
      101,  104,  104,  118,  141,  141,  155,  155,   18,   18,
       18,   18,  144,  164,  164,  118,   18,   18,   18,   18,
       18,   18,   18,   18,   18,   18,   18,   36,  233,  144,
       36,   36,  230,   36,   36,   36,   36,   36,   36,  129,
       81,  129,   81,  226,  129,  129,  129,  138,  138,  138,
      222,   36,  138,   36,   38,  145,   38,   38,   38,  123,
      123,  123,  150,  150,  151,  151,  151,   38,   38,   38,
      123,  123,  145,  157,  158,  218,   38,  215,  128,  123,

      128,  128,  128,  149,   38,   91,   91,   91,  149,  160,
      250,  128,  128,  162,  160,  157,  171,  158,  162,  250,
      128,  171,   91,   91,  167,  167,  167,  150,  202,  167,
      157,  200,  158,  198,  168,  168,  169,  169,  169,  197,
       91,   91,  184,   91,  180,   91,   91,  176,   91,   91,
       91,  127,  172,  172,  127,  170,  170,  170,  166,  127,
      127,  127,  127,  174,  174,  182,  182,  182,  185,  185,
      159,  127,  127,  206,  206,  127,  156,  127,  153,  168,
      127,  168,  208,  140,  208,  220,  220,  208,  208,  208,
      212,  212,  212,  213,  213,  213,  214,  214,  214,  137,

      223,  212,  212,  224,  224,  224,  227,  227,  214,  223,
      212,  228,  228,  228,  231,  231,  231,  234,  234,  234,
      235,  235,  235,  238,  238,  136,  223,  244,  244,  247,
      247,  247,  248,  248,  248,  252,  252,  255,  255,  255,
      132,  125,  124,  122,  248,  264,  264,  264,  264,  264,
      264,  264,  264,  264,  264,  264,  265,  265,  265,  265,
      265,  265,  265,  265,  265,  265,  265,  266,  266,  266,
      266,  266,  266,  266,  266,  266,  266,  266,  267,  267,
      267,  267,  267,  267,  267,  267,  267,  267,  267,  268,
      268,  268,  268,  268,  268,  268,  268,  268,  268,  268,

      269,  269,  269,  269,  269,  269,  269,  269,  269,  269,
      269,  270,  270,  270,  270,  270,  270,  270,  270,  270,
      270,  270,  271,  271,  271,  271,  271,  271,  271,  271,
      271,  271,  271,  272,  121,  120,  272,  272,  272,  273,
      119,  111,  107,  106,  273,  274,   99,   97,   95,  274,
       94,   90,  274,  274,  274,  274,  275,  275,  275,  275,
      275,  275,  275,  275,  275,  275,  275,  276,  276,  276,
      276,  276,  276,  276,  276,  276,  276,  276,  277,  277,
      277,  277,  277,  277,  277,  277,  277,  277,  277,  278,
      278,   89,   88,  278,  278,   84,  278,  278,  278,  279,

      279,  279,  279,  279,  279,  279,  279,  279,  279,  279,
      280,  280,   79,  280,  280,   76,  280,  280,  280,  280,
      280,  281,   71,  281,  281,   68,  281,  282,   62,   60,
       56,   50,  282,  283,   43,  283,  284,   37,  284,  284,
       27,  284,  285,  285,  285,  285,  285,  285,  285,  285,
      285,  285,  285,  286,   24,  286,  287,   23,   19,    8,
        7,  287,  288,    0,  288,  288,    0,  288,  289,  289,
      289,  289,  289,  289,  289,  289,  289,  289,  289,  290,
        0,    0,    0,    0,  290,  291,  291,  291,  291,  291,
      291,  291,  291,  291,  291,  291,  292,    0,  292,  292,

        0,  292,  293,    0,    0,    0,    0,  293,  294,    0,
      294,  294,    0,  294,  295,    0,  295,  295,    0,  295,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263,  263,  263,  263,  263,  263,  263,  263,  263,
      263,  263
    } ;

#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yyg->yy_full_match; /* restore poss. backed-over text */ \
yyg->yy_lp = yyg->yy_full_lp; /* restore orig. accepting pos. */ \
yyg->yy_state_ptr = yyg->yy_full_state; /* restore orig. state */ \
yy_current_state = *yyg->yy_state_ptr; /* restore curr. state */ \
++yyg->yy_lp; \
goto find_rule; \
}

#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
/*

Copyright (C) 1993-2015 John W. Eaton

This file is part of Octave.

Octave is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

Octave is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with Octave; see the file COPYING.  If not, see
<http://www.gnu.org/licenses/>.

*/
/*
We are using the pure parser interface and the reentrant lexer
interface but the Octave parser and lexer are NOT properly
reentrant because both still use many global variables.  It should be
safe to create a parser object and call it while anotehr parser
object is active (to parse a callback function while the main
interactive parser is waiting for input, for example) if you take
care to properly save and restore (typically with an unwind_protect
object) relevant global values before and after the nested call.
*/









#line 64 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"

#include <cctype>
#include <cstring>

#include <iostream>
#include <set>
#include <sstream>
#include <string>
#include <stack>

#include <sys/types.h>
#include <unistd.h>

#include "cmd-edit.h"
#include "quit.h"
#include "lo-mappers.h"

// These would be alphabetical, but oct-parse.h must be included before
// oct-gperf.h and oct-parse.h must be included after token.h and the tree
// class declarations.  We can't include oct-parse.h in oct-gperf.h
// because it may not be protected to allow it to be included multiple
// times.

#include "Cell.h"
#include "comment-list.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "input.h"
#include "lex.h"
#include "ov.h"
#include "parse.h"
#include "pt-all.h"
#include "symtab.h"
#include "token.h"
#include "toplev.h"
#include "utils.h"
#include "variables.h"
#include <oct-parse.h>
#include <oct-gperf.h>

// FIXME: with bison 3.x, OCTAVE_STYPE appears in the generated
// oct-parse.h file, but there is no definition for YYSTYPE, which is
// needed by the code that is generated by flex.  I can't seem to find a
// way to tell flex to use OCTAVE_STYPE instead of YYSTYPE in the code
// it generates, or to tell bison to provide the definition of YYSTYPE
// in the generated oct-parse.h file.

#if defined (OCTAVE_STYPE_IS_DECLARED) && ! defined YYSTYPE
#define YYSTYPE OCTAVE_STYPE
#endif

#if defined (GNULIB_NAMESPACE)
// Calls to the following functions appear in the generated output from
// flex without the namespace tag.  Redefine them so we will use them
// via the gnulib namespace.
#define fprintf GNULIB_NAMESPACE::fprintf
#define fwrite GNULIB_NAMESPACE::fwrite
#define isatty GNULIB_NAMESPACE::isatty
#define malloc GNULIB_NAMESPACE::malloc
#define realloc GNULIB_NAMESPACE::realloc
#endif

#if ! (defined (FLEX_SCANNER) \
       && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \
       && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)
#error lex.l requires flex version 2.5.4 or later
#endif

#define YY_EXTRA_TYPE octave_base_lexer *
#define curr_lexer yyextra

// Arrange to get input via readline.

#ifdef YY_INPUT
#undef YY_INPUT
#endif
#define YY_INPUT(buf, result, max_size) \
  result = curr_lexer->fill_flex_buffer (buf, max_size)

// Try to avoid crashing out completely on fatal scanner errors.

#ifdef YY_FATAL_ERROR
#undef YY_FATAL_ERROR
#endif
#define YY_FATAL_ERROR(msg) \
  (octave_get_extra (yyscanner))->fatal_error (msg)

#define CMD_OR_OP(PATTERN, TOK, COMPAT) \
 \
  do \
    { \
      curr_lexer->lexer_debug (PATTERN); \
 \
      if (curr_lexer->looks_like_command_arg ()) \
        { \
          yyless (0); \
          curr_lexer->push_start_state (COMMAND_START); \
        } \
      else \
        { \
          return curr_lexer->handle_op_internal (TOK, false, COMPAT); \
        } \
    } \
  while (0)

#define CMD_OR_COMPUTED_ASSIGN_OP(PATTERN, TOK) \
 \
  do \
    { \
      curr_lexer->lexer_debug (PATTERN); \
 \
      if (curr_lexer->previous_token_may_be_command () \
          && curr_lexer->space_follows_previous_token ()) \
        { \
          yyless (0); \
          curr_lexer->push_start_state (COMMAND_START); \
        } \
      else \
        { \
          return curr_lexer->handle_language_extension_op (PATTERN, TOK, \
                                                           false); \
        } \
    } \
  while (0)

#define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \
 \
  do \
    { \
      curr_lexer->lexer_debug (PATTERN); \
 \
      if (curr_lexer->previous_token_may_be_command ()) \
        { \
          if (curr_lexer->looks_like_command_arg ()) \
            { \
              yyless (0); \
              curr_lexer->push_start_state (COMMAND_START); \
            } \
          else \
            { \
              return curr_lexer->handle_op_internal (TOK, false, COMPAT); \
            } \
        } \
      else \
        { \
          int tok \
            = (COMPAT \
               ? curr_lexer->handle_unary_op (TOK) \
               : curr_lexer->handle_language_extension_unary_op (TOK)); \
 \
          if (tok < 0) \
            { \
              yyless (0); \
              curr_lexer->xunput (','); \
              /* Adjust for comma that was not really in the input stream. */ \
              curr_lexer->current_input_column--; \
            } \
          else \
            { \
              return tok; \
            } \
        } \
    } \
  while (0)

// We can't rely on the trick used elsewhere of sticking ASCII 1 in
// the input buffer and recognizing it as a special case because ASCII
// 1 is a valid character for a character string.  If we are at the
// end of the buffer, ask for more input.  If we are at the end of the
// file, deal with it.  Otherwise, just keep going with the text from
// the current buffer.
#define HANDLE_STRING_CONTINUATION \
  do \
    { \
      curr_lexer->decrement_promptflag (); \
      curr_lexer->input_line_number++; \
      curr_lexer->current_input_column = 1; \
 \
      if (curr_lexer->is_push_lexer ()) \
        { \
          if (curr_lexer->at_end_of_buffer ()) \
            return -1; \
 \
          if (curr_lexer->at_end_of_file ()) \
            return curr_lexer->handle_end_of_input (); \
        } \
    } \
  while (0)

// When a command argument boundary is detected, push out the
// current argument being built.  This one seems like a good
// candidate for a function call.

#define COMMAND_ARG_FINISH \
  do \
    { \
      if (curr_lexer->string_text.empty ()) \
        break; \
 \
      int retval = curr_lexer->handle_token (curr_lexer->string_text, \
                                             SQ_STRING); \
 \
      curr_lexer->string_text = ""; \
      curr_lexer->command_arg_paren_count = 0; \
 \
      yyless (0); \
 \
      return retval; \
    } \
  while (0)

#define HANDLE_IDENTIFIER(pattern, get_set) \
  do \
    { \
      curr_lexer->lexer_debug (pattern); \
 \
      int tok = curr_lexer->previous_token_value (); \
 \
      if (curr_lexer->whitespace_is_significant () \
          && curr_lexer->space_follows_previous_token () \
          && ! (tok == '[' || tok == '{' \
                || curr_lexer->previous_token_is_binop ())) \
        { \
          yyless (0); \
          unput (','); \
        } \
      else \
        { \
          if (! curr_lexer->looking_at_decl_list \
              && curr_lexer->previous_token_may_be_command ()) \
            { \
              yyless (0); \
              curr_lexer->push_start_state (COMMAND_START); \
            } \
          else \
            { \
              if (get_set) \
                curr_lexer->maybe_classdef_get_set_method = false; \
 \
              int id_tok = curr_lexer->handle_identifier (); \
 \
              if (id_tok >= 0) \
                return curr_lexer->count_token_internal (id_tok); \
            } \
        } \
    } \
  while (0)

static bool Vdisplay_tokens = false;

static unsigned int Vtoken_count = 0;

// Internal variable for lexer debugging state.
static bool lexer_debug_flag = false;

#line 1062 "parse-tree/lex.cc"

#define INITIAL 0
#define COMMAND_START 1
#define MATRIX_START 2
#define INPUT_FILE_START 3
#define BLOCK_COMMENT_START 4
#define LINE_COMMENT_START 5
#define DQ_STRING_START 6
#define SQ_STRING_START 7
#define FQ_IDENT_START 8

#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

/* Holds the entire state of the reentrant scanner. */
struct yyguts_t
    {

    /* User-defined. Not touched by flex. */
    YY_EXTRA_TYPE yyextra_r;

    /* The rest are the same as the globals declared in the non-reentrant scanner. */
    FILE *yyin_r, *yyout_r;
    size_t yy_buffer_stack_top; /**< index of top of stack. */
    size_t yy_buffer_stack_max; /**< capacity of stack. */
    YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
    char yy_hold_char;
    yy_size_t yy_n_chars;
    yy_size_t yyleng_r;
    char *yy_c_buf_p;
    int yy_init;
    int yy_start;
    int yy_did_buffer_switch_on_eof;
    int yy_start_stack_ptr;
    int yy_start_stack_depth;
    int *yy_start_stack;
    yy_state_type yy_last_accepting_state;
    char* yy_last_accepting_cpos;

    int yylineno_r;
    int yy_flex_debug_r;

    yy_state_type *yy_state_buf;
    yy_state_type *yy_state_ptr;
    char *yy_full_match;
    int yy_lp;

    /* These are only needed for trailing context rules,
     * but there's no conditional variable for that yet. */
    int yy_looking_for_trail_begin;
    int yy_full_lp;
    int *yy_full_state;

    char *yytext_r;
    int yy_more_flag;
    int yy_more_len;

    YYSTYPE * yylval_r;

    }; /* end struct yyguts_t */

static int yy_init_globals (yyscan_t yyscanner );

    /* This must go here because YYSTYPE and YYLTYPE are included
     * from bison output in section 1.*/
    #    define yylval yyg->yylval_r
    
int octave_lex_init (yyscan_t* scanner);

int octave_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);

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

int octave_lex_destroy (yyscan_t yyscanner );

int octave_get_debug (yyscan_t yyscanner );

void octave_set_debug (int debug_flag ,yyscan_t yyscanner );

YY_EXTRA_TYPE octave_get_extra (yyscan_t yyscanner );

void octave_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );

FILE *octave_get_in (yyscan_t yyscanner );

void octave_set_in  (FILE * in_str ,yyscan_t yyscanner );

FILE *octave_get_out (yyscan_t yyscanner );

void octave_set_out  (FILE * out_str ,yyscan_t yyscanner );

yy_size_t octave_get_leng (yyscan_t yyscanner );

char *octave_get_text (yyscan_t yyscanner );

int octave_get_lineno (yyscan_t yyscanner );

void octave_set_lineno (int line_number ,yyscan_t yyscanner );

int octave_get_column  (yyscan_t yyscanner );

void octave_set_column (int column_no ,yyscan_t yyscanner );

YYSTYPE * octave_get_lval (yyscan_t yyscanner );

void octave_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );

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

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int octave_wrap (yyscan_t yyscanner );
#else
extern int octave_wrap (yyscan_t yyscanner );
#endif
#endif

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

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

#ifndef YY_NO_INPUT

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

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#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 do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#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 = '*'; \
		size_t n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(yyin); \
			} \
		}\
\

#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 , yyscanner)
#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 octave_lex \
               (YYSTYPE * yylval_param ,yyscan_t yyscanner);

#define YY_DECL int octave_lex \
               (YYSTYPE * yylval_param , yyscan_t yyscanner)
#endif /* !YY_DECL */

/* Code executed at the beginning of each rule, after yytext and yyleng
 * 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 \
	if ( yyleng > 0 ) \
		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
				(yytext[yyleng - 1] == '\n'); \
	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;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yylval = yylval_param;

	if ( !yyg->yy_init )
		{
		yyg->yy_init = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

        /* Create the reject buffer large enough to save one state per allowed character. */
        if ( ! yyg->yy_state_buf )
            yyg->yy_state_buf = (yy_state_type *)octave_alloc(YY_STATE_BUF_SIZE  ,yyscanner);
            if ( ! yyg->yy_state_buf )
                YY_FATAL_ERROR( "out of dynamic memory in octave_lex()" );

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

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			octave_ensure_buffer_stack (yyscanner);
			YY_CURRENT_BUFFER_LVALUE =
				octave__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
		}

		octave__load_buffer_state(yyscanner );
		}

	{
#line 335 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"



// Make script and function files start with a bogus token. This makes
// the parser go down a special path.


#line 1369 "parse-tree/lex.cc"

	while ( 1 )		/* loops until end-of-file is reached */
		{
		yy_cp = yyg->yy_c_buf_p;

		/* Support of yytext. */
		*yy_cp = yyg->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 = yyg->yy_start;
		yy_current_state += YY_AT_BOL();

		yyg->yy_state_ptr = yyg->yy_state_buf;
		*yyg->yy_state_ptr++ = yy_current_state;

yy_match:
		do
			{
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*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 >= 264 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			*yyg->yy_state_ptr++ = yy_current_state;
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 721 );

yy_find_action:
		yy_current_state = *--yyg->yy_state_ptr;
		yyg->yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
		for ( ; ; ) /* until we find what rule we matched */
			{
			if ( yyg->yy_lp && yyg->yy_lp < yy_accept[yy_current_state + 1] )
				{
				yy_act = yy_acclist[yyg->yy_lp];
				if ( yy_act & YY_TRAILING_HEAD_MASK ||
				     yyg->yy_looking_for_trail_begin )
					{
					if ( yy_act == yyg->yy_looking_for_trail_begin )
						{
						yyg->yy_looking_for_trail_begin = 0;
						yy_act &= ~YY_TRAILING_HEAD_MASK;
						break;
						}
					}
				else if ( yy_act & YY_TRAILING_MASK )
					{
					yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
					yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
					}
				else
					{
					yyg->yy_full_match = yy_cp;
					yyg->yy_full_state = yyg->yy_state_ptr;
					yyg->yy_full_lp = yyg->yy_lp;
					break;
					}
				++yyg->yy_lp;
				goto find_rule;
				}
			--yy_cp;
			yy_current_state = *--yyg->yy_state_ptr;
			yyg->yy_lp = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

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

		switch ( yy_act )
	{ /* beginning of action switch */
case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
#line 342 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<INPUT_FILE_START>{ANY_INCLUDING_NL}");

    curr_lexer->xunput (yytext[0]);

    // May be reset later if we see "function" or "classdef" appears
    // as the first token.
    curr_lexer->reading_script_file = true;

    curr_lexer->pop_start_state ();

    return curr_lexer->show_token (INPUT_FILE);
  }
	YY_BREAK
case YY_STATE_EOF(INPUT_FILE_START):
#line 356 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<INPUT_FILE_START><<EOF>>");

    // May be reset later if we see "function" or "classdef" appears
    // as the first token.
    curr_lexer->reading_script_file = true;

    curr_lexer->pop_start_state ();

    return curr_lexer->show_token (INPUT_FILE);
  }
	YY_BREAK

// Help and other command-style functions.


// Commands can be continued on a second line using the ellipsis.
// If an argument is in construction, it is completed.

case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
#line 377 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<COMMAND_START>(\\.\\.\\.){ANY_EXCEPT_NL}*{NL}");

    COMMAND_ARG_FINISH;

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;

    HANDLE_STRING_CONTINUATION;
  }
	YY_BREAK

// Commands normally end at the end of a line or a semicolon.

case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
#line 392 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<COMMAND_START>({CCHAR}{ANY_EXCEPT_NL}*)?{NL}");

    COMMAND_ARG_FINISH;

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;
    curr_lexer->looking_for_object_index = false;
    curr_lexer->at_beginning_of_statement = true;
    curr_lexer->pop_start_state ();

    return curr_lexer->handle_token ('\n');
  }
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 406 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<COMMAND_START>[\\,\\;]");

    if (yytext[0] != ',' || curr_lexer->command_arg_paren_count == 0)
      {
        COMMAND_ARG_FINISH;
        curr_lexer->looking_for_object_index = false;
        curr_lexer->at_beginning_of_statement = true;
        curr_lexer->pop_start_state ();
        return curr_lexer->handle_token (yytext[0]);
      }
    else
      curr_lexer->string_text += yytext;

    curr_lexer->current_input_column += yyleng;
  }
	YY_BREAK

// Unbalanced parentheses serve as pseudo-quotes: they are included in
// the final argument string, but they cause parentheses and quotes to
// be slurped into that argument as well.

case 5:
YY_RULE_SETUP
#line 429 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<COMMAND_START>[\\(\\[\\{]+");

    curr_lexer->command_arg_paren_count += yyleng;
    curr_lexer->string_text += yytext;
    curr_lexer->current_input_column += yyleng;
  }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 437 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
   curr_lexer->lexer_debug ("<COMMAND_START>[\\)\\]\\}]+");

   curr_lexer->command_arg_paren_count -= yyleng;
   curr_lexer->string_text += yytext;
   curr_lexer->current_input_column += yyleng;
}
	YY_BREAK

// Handle quoted strings.  Quoted strings that are not separated by
// whitespace from other argument text are combined with that previous
// text.  For instance,
//
//   command 'text1'"text2"
//
// has a single argument text1text2, not two separate arguments.
// That's why we must test to see if we are in command argument mode
// when processing the end of a string.

case 7:
YY_RULE_SETUP
#line 457 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<COMMAND_START>[\\\"\\']");

    if (curr_lexer->command_arg_paren_count == 0)
      curr_lexer->begin_string (yytext[0] == '"'
                                ? DQ_STRING_START : SQ_STRING_START);
    else
      curr_lexer->string_text += yytext;

    curr_lexer->current_input_column += yyleng;
  }
	YY_BREAK

// In standard command argument processing, whitespace separates
// arguments.  In the presence of unbalanced parentheses, it is
// incorporated into the argument.

case 8:
YY_RULE_SETUP
#line 475 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<COMMAND_START>{S}*");

    if (curr_lexer->command_arg_paren_count == 0)
      COMMAND_ARG_FINISH;
    else
      curr_lexer->string_text += yytext;

    curr_lexer->current_input_column += yyleng;
  }
	YY_BREAK

// Everything else is slurped into the command arguments.

case 9:
YY_RULE_SETUP
#line 490 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<COMMAND_START>([\\.]|[^#% \\t\\r\\n\\.\\,\\;\\\"\\'\\(\\[\\{\\}\\]\\)]*");

    curr_lexer->string_text += yytext;
    curr_lexer->current_input_column += yyleng;
  }
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 497 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<MATRIX_START>{S}*");

    curr_lexer->mark_previous_token_trailing_space ();
  }
	YY_BREAK
case 11:
/* rule 11 can match eol */
YY_RULE_SETUP
#line 503 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<MATRIX_START>{NL}");

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;

    if (curr_lexer->nesting_level.is_paren ())
      curr_lexer->gripe_language_extension ("bare newline inside parentheses");
    else
      {
        int tok = curr_lexer->previous_token_value ();

        if (! (tok == ';' || tok == '[' || tok == '{'))
          {
            curr_lexer->xunput (';');
            // Adjust for semicolon that was not really in the input stream.
            curr_lexer->current_input_column--;
          }
      }
  }
	YY_BREAK

// For this and the next two rules, we're looking at ']', and we
// need to know if the next token is '=' or '=='.
//
// It would have been so much easier if the delimiters were simply
// different for the expression on the left hand side of the equals
// operator.
//
// It's also a pain in the ass to decide whether to insert a comma
// after seeing a ']' character...

// FIXME: we need to handle block comments here.

case 12:
YY_RULE_SETUP
#line 538 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<MATRIX_START>\\]");

    curr_lexer->looking_at_object_index.pop_front ();

    curr_lexer->looking_for_object_index = true;
    curr_lexer->at_beginning_of_statement = false;

    curr_lexer->handle_close_bracket (']');

    return curr_lexer->count_token (']');
  }
	YY_BREAK

// FIXME: we need to handle block comments here.

case 13:
YY_RULE_SETUP
#line 555 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<MATRIX_START>\\}*");

    curr_lexer->looking_at_object_index.pop_front ();

    curr_lexer->looking_for_object_index = true;
    curr_lexer->at_beginning_of_statement = false;

    curr_lexer->handle_close_bracket ('}');

    return curr_lexer->count_token ('}');
  }
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 568 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("\\[");

        bool unput_comma = false;

    if (curr_lexer->whitespace_is_significant ()
        && curr_lexer->space_follows_previous_token ())
      {
        int tok = curr_lexer->previous_token_value ();

        if (! (tok == '[' || tok == '{'
               || curr_lexer->previous_token_is_binop ()))
          unput_comma = true;
      }

    if (unput_comma)
      {
        yyless (0);
        curr_lexer->xunput (',');
        // Adjust for comma that was not really in the input stream.
        curr_lexer->current_input_column--;
      }
    else
      {
        curr_lexer->nesting_level.bracket ();

        curr_lexer->looking_at_object_index.push_front (false);

        curr_lexer->current_input_column += yyleng;
        curr_lexer->looking_for_object_index = false;
        curr_lexer->at_beginning_of_statement = false;

        if (curr_lexer->defining_func
            && ! curr_lexer->parsed_function_name.top ())
          curr_lexer->looking_at_return_list = true;
        else
          curr_lexer->looking_at_matrix_or_assign_lhs = true;

        curr_lexer->decrement_promptflag ();

        curr_lexer->bracketflag++;

        curr_lexer->push_start_state (MATRIX_START);

        return curr_lexer->count_token ('[');
      }
  }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 616 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("\\]");

    curr_lexer->nesting_level.remove ();

    curr_lexer->looking_at_object_index.pop_front ();

    curr_lexer->looking_for_object_index = true;
    curr_lexer->at_beginning_of_statement = false;

    return curr_lexer->handle_token (']');
  }
	YY_BREAK

// Gobble comments.


// Start of a block comment.  If the comment marker appears immediately
// after a block of full-line comments, finish the full line comment
// block.

case 16:
/* rule 16 can match eol */
YY_RULE_SETUP
#line 639 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("^{S}*{CCHAR}\\{{S}*{NL}");

    yyless (0);

    if (curr_lexer->start_state () == LINE_COMMENT_START)
      {
        if (! curr_lexer->comment_text.empty ())
          curr_lexer->finish_comment (octave_comment_elt::full_line);

        curr_lexer->pop_start_state ();
      }

    curr_lexer->decrement_promptflag ();

    curr_lexer->push_start_state (BLOCK_COMMENT_START);

  }
	YY_BREAK
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
#line 658 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<BLOCK_COMMENT_START>^{S}*{CCHAR}\\{{S}*{NL}");

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;

    if (curr_lexer->block_comment_nesting_level)
      curr_lexer->comment_text = "\n";

    curr_lexer->block_comment_nesting_level++;
  }
	YY_BREAK

// End of a block comment.  If this block comment is nested inside
// another, wait for the outermost block comment block to be closed
// before storing the comment.

case 18:
/* rule 18 can match eol */
YY_RULE_SETUP
#line 676 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<BLOCK_COMMENT_START>^{S}*{CCHAR}\\}{S}*{NL}");

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;

    if (curr_lexer->block_comment_nesting_level > 1)
      curr_lexer->comment_text = "\n";
    else
      curr_lexer->finish_comment (octave_comment_elt::block);

    curr_lexer->block_comment_nesting_level--;

    if (curr_lexer->block_comment_nesting_level == 0)
      {
        curr_lexer->increment_promptflag ();

        curr_lexer->pop_start_state ();
      }
  }
	YY_BREAK

// Body of a block comment.

case 19:
/* rule 19 can match eol */
YY_RULE_SETUP
#line 701 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<BLOCK_COMMENT_START>{ANY_EXCEPT_NL}*{NL}");

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;
    curr_lexer->comment_text += yytext;
  }
	YY_BREAK

// Full-line or end-of-line comment.

case 20:
/* rule 20 can match eol */
YY_RULE_SETUP
#line 713 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");

    curr_lexer->push_start_state (LINE_COMMENT_START);
    yyless (0);
  }
	YY_BREAK
case 21:
/* rule 21 can match eol */
YY_RULE_SETUP
#line 720 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<LINE_COMMENT_START>{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");

    bool full_line_comment = curr_lexer->current_input_column == 1;
    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;

    bool have_space = false;
    size_t len = yyleng;
    size_t i = 0;
    while (i < len)
      {
        char c = yytext[i];
        if (c == ' ' || c == '\t')
          {
            have_space = true;
            i++;
          }
        else
          break;
      }

    size_t num_comment_chars = 0;

    while (i < len)
      {
        char c = yytext[i];
        if (c == '#' || c == '%')
          {
            num_comment_chars++;
            i++;
          }
        else
          break;
      }

    curr_lexer->comment_text += &yytext[i];

    if (full_line_comment)
      {
        if (num_comment_chars == 1 && yytext[i++] == '{')
          {
            bool looks_like_block_comment = true;

            while (i < len)
              {
                char c = yytext[i++];
                if (! (c == ' ' || c == '\t' || c == '\n' || c == '\r'))
                  {
                    looks_like_block_comment = false;
                    break;
                  }
              }

            if (looks_like_block_comment)
              {
                yyless (0);

                curr_lexer->finish_comment (octave_comment_elt::full_line);

                curr_lexer->pop_start_state ();
              }
          }
      }
    else
      {
        if (have_space)
          curr_lexer->mark_previous_token_trailing_space ();

        curr_lexer->finish_comment (octave_comment_elt::end_of_line);

        curr_lexer->pop_start_state ();

        curr_lexer->xunput ('\n');
        curr_lexer->input_line_number--;
      }
  }
	YY_BREAK

// End of a block of full-line comments.

case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
#line 802 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<LINE_COMMENT_START>{ANY_INCLUDING_NL}");

    curr_lexer->xunput (yytext[0]);

    curr_lexer->finish_comment (octave_comment_elt::full_line);

    curr_lexer->pop_start_state ();
  }
	YY_BREAK

// End of a block of full-line comments.

case YY_STATE_EOF(LINE_COMMENT_START):
#line 816 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<LINE_COMMENT_START><<EOF>>");

    curr_lexer->finish_comment (octave_comment_elt::full_line);

    curr_lexer->pop_start_state ();
  }
	YY_BREAK

// Double-quoted character strings.

case 23:
YY_RULE_SETUP
#line 828 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\\\"\\\"");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '"';
  }
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 835 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\\\"");

    curr_lexer->current_input_column++;

    curr_lexer->pop_start_state ();

    if (curr_lexer->start_state() != COMMAND_START)
      {
        curr_lexer->looking_for_object_index = true;
        curr_lexer->at_beginning_of_statement = false;

        curr_lexer->push_token (new token (DQ_STRING,
                                           curr_lexer->string_text,
                                           curr_lexer->string_line,
                                           curr_lexer->string_column));

        curr_lexer->string_text = "";

        return curr_lexer->count_token_internal (DQ_STRING);
      }
  }
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 858 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\\\\[0-7]{1,3}");

    curr_lexer->current_input_column += yyleng;

    int result;
    sscanf (yytext+1, "%o", &result);

    if (result > 0xff)
      error ("invalid octal escape sequence in character string");
    else
      curr_lexer->string_text += static_cast<unsigned char> (result);
  }
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 872 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\\\\x[0-9a-fA-F]+");

    curr_lexer->current_input_column += yyleng;

    int result;
    sscanf (yytext+2, "%x", &result);

    // Truncate the value silently instead of checking the range like
    // we do for octal above.  This is to match C/C++ where any number
    // of digits is allowed but the value is implementation-defined if
    // it exceeds the range of the character type.
    curr_lexer->string_text += static_cast<unsigned char> (result);
  }
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 887 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\"\\\\a\"");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '\a';
  }
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 894 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\"\\\\b\"");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '\b';
  }
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 901 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\"\\\\f\"");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '\f';
  }
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 908 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\"\\\\n\"");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '\n';
  }
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 915 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\"\\\\r\"");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '\r';
  }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 922 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\"\\\\t\"");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '\t';
  }
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 929 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\"\\\\v\"");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '\v';
  }
	YY_BREAK
case 34:
/* rule 34 can match eol */
YY_RULE_SETUP
#line 936 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>(\\.\\.\\.){S}*{NL}");

    static const char *msg = "'...' continuations in double-quoted character strings are obsolete and will not be allowed in a future version of Octave; please use '\\' instead";

    std::string nm = curr_lexer->fcn_file_full_name;

    if (nm.empty ())
      warning_with_id ("Octave:deprecated-syntax", "%s", msg);
    else
      warning_with_id ("Octave:deprecated-syntax",
                       "%s; near line %d of file '%s'", msg,
                       curr_lexer->input_line_number, nm.c_str ());

    HANDLE_STRING_CONTINUATION;
  }
	YY_BREAK
case 35:
/* rule 35 can match eol */
YY_RULE_SETUP
#line 953 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\\\\{S}+{NL}");

    static const char *msg = "white space and comments after continuation markers in double-quoted character strings are obsolete and will not be allowed in a future version of Octave";

    std::string nm = curr_lexer->fcn_file_full_name;

    if (nm.empty ())
      warning_with_id ("Octave:deprecated-syntax", "%s", msg);
    else
      warning_with_id ("Octave:deprecated-syntax",
                       "%s; near line %d of file '%s'", msg,
                       curr_lexer->input_line_number, nm.c_str ());

    HANDLE_STRING_CONTINUATION;
  }
	YY_BREAK
case 36:
/* rule 36 can match eol */
YY_RULE_SETUP
#line 970 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\\\\{NL}");

    HANDLE_STRING_CONTINUATION;
  }
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 976 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\\\\.");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += yytext[1];
  }
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 983 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>\\.");

    curr_lexer->current_input_column++;
    curr_lexer->string_text += yytext[0];
  }
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 990 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>[^\\.\\\\\\r\\n\\\"]+");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += yytext;
  }
	YY_BREAK
case 40:
/* rule 40 can match eol */
YY_RULE_SETUP
#line 997 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<DQ_STRING_START>{NL}");

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;

    error ("unterminated character string constant");

    return LEXICAL_ERROR;
  }
	YY_BREAK

// Single-quoted character strings.

case 41:
YY_RULE_SETUP
#line 1012 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<SQ_STRING_START>\\'\\'");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += '\'';
  }
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 1019 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<SQ_STRING_START>\\'");

    curr_lexer->current_input_column++;

    curr_lexer->pop_start_state ();

    if (curr_lexer->start_state() != COMMAND_START)
      {
        curr_lexer->looking_for_object_index = true;
        curr_lexer->at_beginning_of_statement = false;

        curr_lexer->push_token (new token (SQ_STRING,
                                           curr_lexer->string_text,
                                           curr_lexer->string_line,
                                           curr_lexer->string_column));

        curr_lexer->string_text = "";

        return curr_lexer->count_token_internal (SQ_STRING);
      }
  }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 1042 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<SQ_STRING_START>[^\\'\\n\\r]+");

    curr_lexer->current_input_column += yyleng;
    curr_lexer->string_text += yytext;
  }
	YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
#line 1049 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<SQ_STRING_START>{NL}");

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;

    error ("unterminated character string constant");

    return LEXICAL_ERROR;
  }
	YY_BREAK

// Fully-qualified identifiers (used for classdef).

case 45:
YY_RULE_SETUP
#line 1064 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("<FQ_IDENT_START>{FQIDENT}");
    curr_lexer->pop_start_state ();

    int id_tok = curr_lexer->handle_fq_identifier ();

    if (id_tok >= 0)
      {
        curr_lexer->looking_for_object_index = true;

        return curr_lexer->count_token_internal (id_tok);
      }
  }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 1078 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->current_input_column += yyleng;

    curr_lexer->mark_previous_token_trailing_space ();
  }
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 1084 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    yyless (0);
    curr_lexer->pop_start_state ();
  }
	YY_BREAK

// Imaginary numbers.

case 48:
YY_RULE_SETUP
#line 1093 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("{NUMBER}{Im}");

    if (curr_lexer->previous_token_may_be_command ()
        &&  curr_lexer->space_follows_previous_token ())
      {
        yyless (0);
        curr_lexer->push_start_state (COMMAND_START);
      }
    else
      {
        int tok = curr_lexer->previous_token_value ();

        if (curr_lexer->whitespace_is_significant ()
            && curr_lexer->space_follows_previous_token ()
            && ! (tok == '[' || tok == '{'
                  || curr_lexer->previous_token_is_binop ()))
          {
            yyless (0);
            unput (',');
          }
        else
          {
            curr_lexer->handle_number ();
            return curr_lexer->count_token_internal (IMAG_NUM);
          }
      }
  }
	YY_BREAK

// Real numbers.  Don't grab the '.' part of a dot operator as part of
// the constant.

case 49:
*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
yyg->yy_c_buf_p = yy_cp -= 2;
YY_DO_BEFORE_ACTION; /* set up yytext again */
#line 1128 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
case 50:
YY_RULE_SETUP
#line 1128 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("{D}+/\\.[\\*/\\\\^\\']|{NUMBER}");

    if (curr_lexer->previous_token_may_be_command ()
        &&  curr_lexer->space_follows_previous_token ())
      {
        yyless (0);
        curr_lexer->push_start_state (COMMAND_START);
      }
    else
      {
        int tok = curr_lexer->previous_token_value ();

        if (curr_lexer->whitespace_is_significant ()
            && curr_lexer->space_follows_previous_token ()
            && ! (tok == '[' || tok == '{'
                  || curr_lexer->previous_token_is_binop ()))
          {
            yyless (0);
            unput (',');
          }
        else
          {
            curr_lexer->handle_number ();
            return curr_lexer->count_token_internal (NUM);
          }
      }
  }
	YY_BREAK

// Eat whitespace.  Whitespace inside matrix constants is handled by
// the <MATRIX_START> start state code above.

case 51:
YY_RULE_SETUP
#line 1162 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->current_input_column += yyleng;

    curr_lexer->mark_previous_token_trailing_space ();
  }
	YY_BREAK

// Continuation lines.  Allow arbitrary text after continuations.

case 52:
/* rule 52 can match eol */
YY_RULE_SETUP
#line 1172 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("\\.\\.\\.{ANY_EXCEPT_NL}*{NL}");

    curr_lexer->handle_continuation ();
  }
	YY_BREAK

// Deprecated C preprocessor style continuation markers.

case 53:
/* rule 53 can match eol */
#line 1183 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
#line 1183 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("\\\\{S}*{NL}|\\\\{S}*{CCHAR}{ANY_EXCEPT_NL}*{NL}");

    static const char *msg = "using continuation marker \\ outside of double quoted strings is deprecated and will be removed in a future version of Octave";

    std::string nm = curr_lexer->fcn_file_full_name;

    if (nm.empty ())
      warning_with_id ("Octave:deprecated-syntax", "%s", msg);
    else
      warning_with_id ("Octave:deprecated-syntax",
                       "%s; near line %d of file '%s'", msg,
                       curr_lexer->input_line_number, nm.c_str ());

    curr_lexer->handle_continuation ();
  }
	YY_BREAK

// End of file.

case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(COMMAND_START):
case YY_STATE_EOF(MATRIX_START):
case YY_STATE_EOF(BLOCK_COMMENT_START):
case YY_STATE_EOF(DQ_STRING_START):
case YY_STATE_EOF(SQ_STRING_START):
case YY_STATE_EOF(FQ_IDENT_START):
#line 1204 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
   return curr_lexer->handle_end_of_input ();
  }
	YY_BREAK

// Identifiers.

// Don't allow get and set to be recognized as keywords if they are
// followed by "(".

case 55:
YY_RULE_SETUP
#line 1215 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    HANDLE_IDENTIFIER ("(set|get)/{S}*\\(", true);
  }
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 1219 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    HANDLE_IDENTIFIER ("{IDENT}", false);
  }
	YY_BREAK

// Superclass method identifiers.

case 57:
YY_RULE_SETUP
#line 1227 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("{IDENT}@{FQIDENT}");

    if (curr_lexer->previous_token_may_be_command ())
      {
        yyless (0);
        curr_lexer->push_start_state (COMMAND_START);
      }
    else
      {
        int id_tok = curr_lexer->handle_superclass_identifier ();

        if (id_tok >= 0)
          {
            curr_lexer->looking_for_object_index = true;

            return curr_lexer->count_token_internal (id_tok);
          }
      }
  }
	YY_BREAK

// Metaclass query

case 58:
YY_RULE_SETUP
#line 1252 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("\\?{FQIDENT}");

    if (curr_lexer->previous_token_may_be_command ()
        &&  curr_lexer->space_follows_previous_token ())
      {
        yyless (0);
        curr_lexer->push_start_state (COMMAND_START);
      }
    else
      {
        int id_tok = curr_lexer->handle_meta_identifier ();

        if (id_tok >= 0)
          {
            curr_lexer->looking_for_object_index = true;

            return curr_lexer->count_token_internal (id_tok);
          }
      }
  }
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 1274 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("@");

    if (curr_lexer->previous_token_may_be_command ()
        &&  curr_lexer->space_follows_previous_token ())
      {
        yyless (0);
        curr_lexer->push_start_state (COMMAND_START);
      }
    else
      {
        int tok = curr_lexer->previous_token_value ();

        if (curr_lexer->whitespace_is_significant ()
            && curr_lexer->space_follows_previous_token ()
            && ! (tok == '[' || tok == '{'
                  || curr_lexer->previous_token_is_binop ()))
          {
            yyless (0);
            unput (',');
          }
        else
          {
            curr_lexer->current_input_column++;

            curr_lexer->looking_at_function_handle++;
            curr_lexer->looking_for_object_index = false;
            curr_lexer->at_beginning_of_statement = false;

            return curr_lexer->count_token ('@');
          }
      }
  }
	YY_BREAK

// A new line character.  New line characters inside matrix constants
// are handled by the <MATRIX_START> start state code above.  If closest
// nesting is inside parentheses, don't return a row separator.

case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
#line 1314 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("{NL}");

    curr_lexer->input_line_number++;
    curr_lexer->current_input_column = 1;

    if (curr_lexer->nesting_level.is_paren ())
      {
        curr_lexer->at_beginning_of_statement = false;
        curr_lexer->gripe_language_extension
          ("bare newline inside parentheses");
      }
    else if (curr_lexer->nesting_level.none ()
        || curr_lexer->nesting_level.is_anon_fcn_body ())
      {
        curr_lexer->at_beginning_of_statement = true;
        return curr_lexer->count_token ('\n');
      }
    else if (curr_lexer->nesting_level.is_bracket_or_brace ())
      return LEXICAL_ERROR;
  }
	YY_BREAK

// Single quote can either be the beginning of a string or a transpose
// operator.

case 61:
YY_RULE_SETUP
#line 1341 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("'");

    if (curr_lexer->previous_token_may_be_command ()
        &&  curr_lexer->space_follows_previous_token ())
      {
        curr_lexer->current_input_column++;
        curr_lexer->push_start_state (COMMAND_START);
        curr_lexer->begin_string (SQ_STRING_START);
      }
    else if (curr_lexer->at_beginning_of_statement)
      {
        curr_lexer->current_input_column++;
        curr_lexer->begin_string (SQ_STRING_START);
      }
    else
      {
        int tok = curr_lexer->previous_token_value ();

        if (curr_lexer->whitespace_is_significant ())
          {
            if (curr_lexer->space_follows_previous_token ())
              {
                if (tok == '[' || tok == '{'
                    || curr_lexer->previous_token_is_binop ())
                  {
                    curr_lexer->current_input_column++;
                    curr_lexer->begin_string (SQ_STRING_START);
                  }
                else
                  {
                    yyless (0);
                    curr_lexer->xunput (',');
                    // Adjust for comma that was not really in the input stream.
                    curr_lexer->current_input_column--;
                  }
              }
            else
              {
                if (tok == '[' || tok == '{'
                    || curr_lexer->previous_token_is_binop ()
                    || curr_lexer->previous_token_is_keyword ())
                  {
                    curr_lexer->current_input_column++;
                    curr_lexer->begin_string (SQ_STRING_START);
                  }
                else
                  return curr_lexer->count_token (HERMITIAN);
              }
          }
        else
          {
            if (! tok || tok == '[' || tok == '{' || tok == '('
                || curr_lexer->previous_token_is_binop ()
                || curr_lexer->previous_token_is_keyword ())
              {
                curr_lexer->current_input_column++;
                curr_lexer->begin_string (SQ_STRING_START);
              }
            else
              return curr_lexer->count_token (HERMITIAN);
          }
      }
  }
	YY_BREAK

// Double quotes always begin strings.

case 62:
YY_RULE_SETUP
#line 1410 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("\\\"");

    if (curr_lexer->previous_token_may_be_command ()
        &&  curr_lexer->space_follows_previous_token ())
      {
        curr_lexer->current_input_column++;
        curr_lexer->push_start_state (COMMAND_START);
        curr_lexer->begin_string (DQ_STRING_START);
      }
    else
      {
        int tok = curr_lexer->previous_token_value ();

        if (curr_lexer->whitespace_is_significant ())
          {
            if (curr_lexer->space_follows_previous_token ())
              {
                if (tok == '[' || tok == '{'
                    || curr_lexer->previous_token_is_binop ())
                  {
                    curr_lexer->current_input_column++;
                    curr_lexer->begin_string (DQ_STRING_START);
                  }
                else
                  {
                    yyless (0);
                    curr_lexer->xunput (',');
                    // Adjust for comma that was not really in the input stream.
                    curr_lexer->current_input_column--;
                  }
              }
            else
              {
                curr_lexer->current_input_column++;
                curr_lexer->begin_string (DQ_STRING_START);
              }
          }
        else
          {
            curr_lexer->current_input_column++;
            curr_lexer->begin_string (DQ_STRING_START);
          }
      }
  }
	YY_BREAK

// Other operators.

case 63:
YY_RULE_SETUP
#line 1460 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (":", ':', true); }
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 1461 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (".+", EPLUS, false); }
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 1462 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (".-", EMINUS, false); }
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 1463 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (".*", EMUL, true); }
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 1464 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("./", EDIV, true); }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 1465 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (".\\", ELEFTDIV, true); }
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 1466 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (".^", EPOW, true); }
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 1467 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (".**", EPOW, false); }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 1468 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("<=", EXPR_LE, true); }
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 1469 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("==", EXPR_EQ, true); }
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 1470 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("~=", EXPR_NE, true); }
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 1471 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("!=", EXPR_NE, false); }
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 1472 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (">=", EXPR_GE, true); }
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 1473 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("&", EXPR_AND, true); }
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 1474 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("|", EXPR_OR, true); }
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 1475 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("<", EXPR_LT, true); }
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 1476 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (">", EXPR_GT, true); }
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 1477 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("*", '*', true); }
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 1478 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("/", '/', true); }
	YY_BREAK

// In Matlab, '\' may also trigger command syntax.

case 82:
YY_RULE_SETUP
#line 1484 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ return curr_lexer->handle_op ("\\", LEFTDIV); }
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 1486 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("^", POW, true); }
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 1487 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("**", POW, false); }
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 1488 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("&&", EXPR_AND_AND, true); }
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 1489 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("||", EXPR_OR_OR, true); }
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 1490 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP ("<<", LSHIFT, false); }
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 1491 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_OP (">>", RSHIFT, false); }
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 1493 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    bool at_beginning_of_statement
      = (! (curr_lexer->whitespace_is_significant ()
            || curr_lexer->looking_at_object_index.front ()));

    return curr_lexer->handle_op (";", ';', at_beginning_of_statement);
  }
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 1501 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_UNARY_OP ("+", '+', true); }
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 1502 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_UNARY_OP ("-", '-', true); }
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 1504 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_UNARY_OP ("~", EXPR_NOT, true); }
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 1505 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_UNARY_OP ("!", EXPR_NOT, false); }
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 1507 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    bool at_beginning_of_statement
      = (! (curr_lexer->whitespace_is_significant ()
            || curr_lexer->looking_at_object_index.front ()));

    return curr_lexer->handle_op (",", ',', at_beginning_of_statement);
  }
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 1515 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    return curr_lexer->handle_op (".'", TRANSPOSE, false);
  }
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 1519 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_UNARY_OP ("++", PLUS_PLUS, false); }
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 1520 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_UNARY_OP ("--", MINUS_MINUS, false); }
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 1522 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("(");

    bool unput_comma = false;

    if (curr_lexer->whitespace_is_significant ()
        && curr_lexer->space_follows_previous_token ())
      {
        int tok = curr_lexer->previous_token_value ();

        if (! (tok == '[' || tok == '{'
               || curr_lexer->previous_token_is_binop ()))
          unput_comma = true;
      }

    if (unput_comma)
      {
        yyless (0);
        curr_lexer->xunput (',');
        // Adjust for comma that was not really in the input stream.
        curr_lexer->current_input_column--;
      }
    else
      {
        // If we are looking for an object index, then push TRUE for
        // looking_at_object_index.  Otherwise, just push whatever state
        // is current (so that we can pop it off the stack when we find
        // the matching close paren).

        curr_lexer->looking_at_object_index.push_front
          (curr_lexer->looking_for_object_index);

        curr_lexer->looking_at_indirect_ref = false;
        curr_lexer->looking_for_object_index = false;
        curr_lexer->at_beginning_of_statement = false;

        curr_lexer->nesting_level.paren ();
        curr_lexer->decrement_promptflag ();

        return curr_lexer->handle_token ('(');
      }
  }
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 1565 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug (")");

    curr_lexer->nesting_level.remove ();
    curr_lexer->current_input_column++;

    curr_lexer->looking_at_object_index.pop_front ();

    curr_lexer->looking_for_object_index = true;
    curr_lexer->at_beginning_of_statement = false;

    if (curr_lexer->looking_at_anon_fcn_args)
      {
        curr_lexer->looking_at_anon_fcn_args = false;
        curr_lexer->nesting_level.anon_fcn_body ();
      }

    return curr_lexer->count_token (')');
  }
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 1585 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug (".");

    if (curr_lexer->previous_token_may_be_command ()
        && curr_lexer->space_follows_previous_token ())
      {
        yyless (0);
        curr_lexer->push_start_state (COMMAND_START);
      }
    else
      {
        curr_lexer->looking_for_object_index = false;
        curr_lexer->at_beginning_of_statement = false;

        return curr_lexer->handle_token ('.');
      }
  }
	YY_BREAK

// = and op= operators.

case 101:
YY_RULE_SETUP
#line 1607 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->maybe_mark_previous_token_as_variable ();

    return curr_lexer->handle_op ("=", '=');
  }
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 1613 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("+=", ADD_EQ); }
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 1614 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("-=", SUB_EQ); }
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 1615 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("*=", MUL_EQ); }
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 1616 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("/=", DIV_EQ); }
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 1617 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("\\=", LEFTDIV_EQ); }
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 1618 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP (".+=", ADD_EQ); }
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 1619 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP (".-=", SUB_EQ); }
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 1620 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP (".*=", EMUL_EQ); }
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 1621 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("./=", EDIV_EQ); }
	YY_BREAK
case 111:
YY_RULE_SETUP
#line 1622 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP (".\\=", ELEFTDIV_EQ); }
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 1623 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("^=", POW_EQ); }
	YY_BREAK
case 113:
YY_RULE_SETUP
#line 1624 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("^=", POW_EQ); }
	YY_BREAK
case 114:
YY_RULE_SETUP
#line 1625 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP (".^=", EPOW_EQ); }
	YY_BREAK
case 115:
YY_RULE_SETUP
#line 1626 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP (".^=", EPOW_EQ); }
	YY_BREAK
case 116:
YY_RULE_SETUP
#line 1627 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("&=", AND_EQ); }
	YY_BREAK
case 117:
YY_RULE_SETUP
#line 1628 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("|=", OR_EQ); }
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 1629 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP ("<<=", LSHIFT_EQ); }
	YY_BREAK
case 119:
YY_RULE_SETUP
#line 1630 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{ CMD_OR_COMPUTED_ASSIGN_OP (">>=", RSHIFT_EQ); }
	YY_BREAK

// In Matlab, '{' may also trigger command syntax.

case 120:
YY_RULE_SETUP
#line 1636 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("{");

    bool unput_comma = false;

    if (curr_lexer->whitespace_is_significant ()
        && curr_lexer->space_follows_previous_token ())
      {
        int tok = curr_lexer->previous_token_value ();

        if (! (tok == '[' || tok == '{'
               || curr_lexer->previous_token_is_binop ()))
          unput_comma = true;
      }

    if (unput_comma)
      {
        yyless (0);
        curr_lexer->xunput (',');
        // Adjust for comma that was not really in the input stream.
        curr_lexer->current_input_column--;
      }
    else
      {
        curr_lexer->nesting_level.brace ();

        curr_lexer->looking_at_object_index.push_front
          (curr_lexer->looking_for_object_index);

        curr_lexer->current_input_column += yyleng;
        curr_lexer->looking_for_object_index = false;
        curr_lexer->at_beginning_of_statement = false;

        curr_lexer->decrement_promptflag ();

        curr_lexer->braceflag++;

        curr_lexer->push_start_state (MATRIX_START);

        return curr_lexer->count_token ('{');
      }
  }
	YY_BREAK
case 121:
YY_RULE_SETUP
#line 1679 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug ("}");

    curr_lexer->looking_at_object_index.pop_front ();

    curr_lexer->looking_for_object_index = true;
    curr_lexer->at_beginning_of_statement = false;

    curr_lexer->nesting_level.remove ();

    return curr_lexer->handle_token ('}');
  }
	YY_BREAK

// Unrecognized input is a lexical error.

case 122:
YY_RULE_SETUP
#line 1696 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
{
    curr_lexer->lexer_debug (".");

    curr_lexer->xunput (yytext[0]);

    int c = curr_lexer->text_yyinput ();

    if (c == 1)
      return -1;
    else if (c == EOF)
      return curr_lexer->handle_end_of_input ();
    else
      {
        curr_lexer->current_input_column++;

        error ("invalid character '%s' (ASCII %d) near line %d, column %d",
               undo_string_escape (static_cast<char> (c)), c,
               curr_lexer->input_line_number, curr_lexer->current_input_column);

        return LEXICAL_ERROR;
      }
  }
	YY_BREAK
case 123:
YY_RULE_SETUP
#line 1719 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"
ECHO;
	YY_BREAK
#line 3236 "parse-tree/lex.cc"

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

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = yyg->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 yyin at a new source and called
			 * octave_lex().  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.
			 */
			yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			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 ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state( yyscanner );

			/* 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 , yyscanner);

			yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;

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

			else
				{
				yy_cp = yyg->yy_c_buf_p;
				goto yy_find_action;
				}
			}

		else switch ( yy_get_next_buffer( yyscanner ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				yyg->yy_did_buffer_switch_on_eof = 0;

				if ( octave_wrap(yyscanner ) )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, 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.
					 */
					yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! yyg->yy_did_buffer_switch_on_eof )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				yyg->yy_c_buf_p =
					yyg->yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
				goto yy_match;

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

				yy_current_state = yy_get_previous_state( yyscanner );

				yy_cp = yyg->yy_c_buf_p;
				yy_bp = yyg->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 user's declarations */
} /* end of octave_lex */

/* 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 (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	register char *source = yyg->yytext_ptr;
	register int number_to_move, i;
	int ret_val;

	if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->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 ( yyg->yy_c_buf_p - yyg->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) (yyg->yy_c_buf_p - yyg->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 = yyg->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. */

			YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );

			}

		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]),
			yyg->yy_n_chars, num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
		}

	if ( yyg->yy_n_chars == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			octave_restart(yyin  ,yyscanner);
			}

		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) (yyg->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 = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) octave_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

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

	yyg->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 (yyscan_t yyscanner)
{
	register yy_state_type yy_current_state;
	register char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	yy_current_state = yyg->yy_start;
	yy_current_state += YY_AT_BOL();

	yyg->yy_state_ptr = yyg->yy_state_buf;
	*yyg->yy_state_ptr++ = yy_current_state;

	for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
		{
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		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 >= 264 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		*yyg->yy_state_ptr++ = yy_current_state;
		}

	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 , yyscan_t yyscanner)
{
	register int yy_is_jam;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */

	register YY_CHAR yy_c = 1;
	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 >= 264 )
			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 == 263);
	if ( ! yy_is_jam )
		*yyg->yy_state_ptr++ = yy_current_state;

	(void)yyg;
	return yy_is_jam ? 0 : yy_current_state;
}

    static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
{
	register char *yy_cp;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    yy_cp = yyg->yy_c_buf_p;

	/* undo effects of setting up yytext */
	*yy_cp = yyg->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 = yyg->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 =
			yyg->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;

	yyg->yytext_ptr = yy_bp;
	yyg->yy_hold_char = *yy_cp;
	yyg->yy_c_buf_p = yy_cp;
}

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

{
	int c;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	*yyg->yy_c_buf_p = yyg->yy_hold_char;

	if ( *yyg->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 ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
			/* This was really a NUL. */
			*yyg->yy_c_buf_p = '\0';

		else
			{ /* need more input */
			yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
			++yyg->yy_c_buf_p;

			switch ( yy_get_next_buffer( yyscanner ) )
				{
				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. */
					octave_restart(yyin ,yyscanner);

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( octave_wrap(yyscanner ) )
						return EOF;

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

				case EOB_ACT_CONTINUE_SCAN:
					yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
					break;
				}
			}
		}

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

	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');

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

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * @param yyscanner The scanner object.
 * @note This function does not reset the start condition to @c INITIAL .
 */
    void octave_restart  (FILE * input_file , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if ( ! YY_CURRENT_BUFFER ){
        octave_ensure_buffer_stack (yyscanner);
		YY_CURRENT_BUFFER_LVALUE =
            octave__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
	}

	octave__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
	octave__load_buffer_state(yyscanner );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * @param yyscanner The scanner object.
 */
    void octave__switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	/* TODO. We should be able to replace this entire function body
	 * with
	 *		octave_pop_buffer_state();
	 *		octave_push_buffer_state(new_buffer);
     */
	octave_ensure_buffer_stack (yyscanner);
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

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

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	octave__load_buffer_state(yyscanner );

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

static void octave__load_buffer_state  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	yyg->yy_hold_char = *yyg->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.
 * @param yyscanner The scanner object.
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE octave__create_buffer  (FILE * file, int  size , yyscan_t yyscanner)
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) octave_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in octave__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 *) octave_alloc(b->yy_buf_size + 2 ,yyscanner );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in octave__create_buffer()" );

	b->yy_is_our_buffer = 1;

	octave__init_buffer(b,file ,yyscanner);

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with octave__create_buffer()
 * @param yyscanner The scanner object.
 */
    void octave__delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	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 )
		octave_free((void *) b->yy_ch_buf ,yyscanner );

	octave_free((void *) b ,yyscanner );
}

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a octave_restart() or at EOF.
 */
    static void octave__init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)

{
	int oerrno = errno;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	octave__flush_buffer(b ,yyscanner);

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

    /* If b is the current buffer, then octave__init_buffer was _probably_
     * called from octave_restart() 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.
 * @param yyscanner The scanner object.
 */
    void octave__flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	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 )
		octave__load_buffer_state(yyscanner );
}

/** 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.
 *  @param yyscanner The scanner object.
 */
void octave_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	if (new_buffer == NULL)
		return;

	octave_ensure_buffer_stack(yyscanner);

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

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

	/* copied from octave__switch_to_buffer. */
	octave__load_buffer_state(yyscanner );
	yyg->yy_did_buffer_switch_on_eof = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  @param yyscanner The scanner object.
 */
void octave_pop_buffer_state (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
	if (!YY_CURRENT_BUFFER)
		return;

	octave__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if (yyg->yy_buffer_stack_top > 0)
		--yyg->yy_buffer_stack_top;

	if (YY_CURRENT_BUFFER) {
		octave__load_buffer_state(yyscanner );
		yyg->yy_did_buffer_switch_on_eof = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void octave_ensure_buffer_stack (yyscan_t yyscanner)
{
	yy_size_t num_to_alloc;
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

	if (!yyg->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;
		yyg->yy_buffer_stack = (struct yy_buffer_state**)octave_alloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )
			YY_FATAL_ERROR( "out of dynamic memory in octave_ensure_buffer_stack()" );
								  
		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
				
		yyg->yy_buffer_stack_max = num_to_alloc;
		yyg->yy_buffer_stack_top = 0;
		return;
	}

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

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

		num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
		yyg->yy_buffer_stack = (struct yy_buffer_state**)octave_realloc
								(yyg->yy_buffer_stack,
								num_to_alloc * sizeof(struct yy_buffer_state*)
								, yyscanner);
		if ( ! yyg->yy_buffer_stack )
			YY_FATAL_ERROR( "out of dynamic memory in octave_ensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
		yyg->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
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE octave__scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)
{
	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) octave_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in octave__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;

	octave__switch_to_buffer(b ,yyscanner );

	return b;
}

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

/** Setup the input buffer state to scan the given bytes. The next call to octave_lex() will
 * scan from a @e copy of @a bytes.
 * @param yybytes the byte buffer to scan
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
 * @param yyscanner The scanner object.
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE octave__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	yy_size_t i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = _yybytes_len + 2;
	buf = (char *) octave_alloc(n ,yyscanner );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in octave__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 = octave__scan_buffer(buf,n ,yyscanner);
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in octave__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;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
{
    	(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 yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = yyg->yy_hold_char; \
		yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
		yyg->yy_hold_char = *yyg->yy_c_buf_p; \
		*yyg->yy_c_buf_p = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
	while ( 0 )

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

/** Get the user-defined data for this scanner.
 * @param yyscanner The scanner object.
 */
YY_EXTRA_TYPE octave_get_extra  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yyextra;
}

/** Get the current line number.
 * @param yyscanner The scanner object.
 */
int octave_get_lineno  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yylineno;
}

/** Get the current column number.
 * @param yyscanner The scanner object.
 */
int octave_get_column  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    
        if (! YY_CURRENT_BUFFER)
            return 0;
    
    return yycolumn;
}

/** Get the input stream.
 * @param yyscanner The scanner object.
 */
FILE *octave_get_in  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yyin;
}

/** Get the output stream.
 * @param yyscanner The scanner object.
 */
FILE *octave_get_out  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yyout;
}

/** Get the length of the current token.
 * @param yyscanner The scanner object.
 */
yy_size_t octave_get_leng  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yyleng;
}

/** Get the current token.
 * @param yyscanner The scanner object.
 */

char *octave_get_text  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yytext;
}

/** Set the user-defined data. This data is never touched by the scanner.
 * @param user_defined The data to be associated with this scanner.
 * @param yyscanner The scanner object.
 */
void octave_set_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yyextra = user_defined ;
}

/** Set the current line number.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void octave_set_lineno (int  line_number , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

        /* lineno is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "octave_set_lineno called with no buffer" );
    
    yylineno = line_number;
}

/** Set the current column.
 * @param line_number
 * @param yyscanner The scanner object.
 */
void octave_set_column (int  column_no , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

        /* column is only valid if an input buffer exists. */
        if (! YY_CURRENT_BUFFER )
           YY_FATAL_ERROR( "octave_set_column called with no buffer" );
    
    yycolumn = column_no;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * @param yyscanner The scanner object.
 * @see octave__switch_to_buffer
 */
void octave_set_in (FILE *  in_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yyin = in_str ;
}

void octave_set_out (FILE *  out_str , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yyout = out_str ;
}

int octave_get_debug  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yy_flex_debug;
}

void octave_set_debug (int  bdebug , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yy_flex_debug = bdebug ;
}

/* Accessor methods for yylval and yylloc */

YYSTYPE * octave_get_lval  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    return yylval;
}

void octave_set_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    yylval = yylval_param;
}

/* User-visible API */

/* octave_lex_init is special because it creates the scanner itself, so it is
 * the ONLY reentrant function that doesn't take the scanner as the last argument.
 * That's why we explicitly handle the declaration, instead of using our macros.
 */

int octave_lex_init(yyscan_t* ptr_yy_globals)

{
    if (ptr_yy_globals == NULL){
        errno = EINVAL;
        return 1;
    }

    *ptr_yy_globals = (yyscan_t) octave_alloc ( sizeof( struct yyguts_t ), NULL );

    if (*ptr_yy_globals == NULL){
        errno = ENOMEM;
        return 1;
    }

    /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));

    return yy_init_globals ( *ptr_yy_globals );
}

/* octave_lex_init_extra has the same functionality as octave_lex_init, but follows the
 * convention of taking the scanner as the last argument. Note however, that
 * this is a *pointer* to a scanner, as it will be allocated by this call (and
 * is the reason, too, why this function also must handle its own declaration).
 * The user defined value in the first argument will be available to octave_alloc in
 * the yyextra field.
 */

int octave_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )

{
    struct yyguts_t dummy_yyguts;

    octave_set_extra (yy_user_defined, &dummy_yyguts);

    if (ptr_yy_globals == NULL){
        errno = EINVAL;
        return 1;
    }
	
    *ptr_yy_globals = (yyscan_t) octave_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
	
    if (*ptr_yy_globals == NULL){
        errno = ENOMEM;
        return 1;
    }
    
    /* By setting to 0xAA, we expose bugs in
    yy_init_globals. Leave at 0x00 for releases. */
    memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
    
    octave_set_extra (yy_user_defined, *ptr_yy_globals);
    
    return yy_init_globals ( *ptr_yy_globals );
}

static int yy_init_globals (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
    /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from octave_lex_destroy(), so don't allocate here.
     */

    yyg->yy_buffer_stack = 0;
    yyg->yy_buffer_stack_top = 0;
    yyg->yy_buffer_stack_max = 0;
    yyg->yy_c_buf_p = (char *) 0;
    yyg->yy_init = 0;
    yyg->yy_start = 0;

    yyg->yy_start_stack_ptr = 0;
    yyg->yy_start_stack_depth = 0;
    yyg->yy_start_stack =  NULL;

    yyg->yy_state_buf = 0;
    yyg->yy_state_ptr = 0;
    yyg->yy_full_match = 0;
    yyg->yy_lp = 0;

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

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

/* octave_lex_destroy is for both reentrant and non-reentrant scanners. */
int octave_lex_destroy  (yyscan_t yyscanner)
{
    struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;

    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		octave__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		octave_pop_buffer_state(yyscanner);
	}

	/* Destroy the stack itself. */
	octave_free(yyg->yy_buffer_stack ,yyscanner);
	yyg->yy_buffer_stack = NULL;

    /* Destroy the start condition stack. */
        octave_free(yyg->yy_start_stack ,yyscanner );
        yyg->yy_start_stack = NULL;

    octave_free ( yyg->yy_state_buf , yyscanner);
    yyg->yy_state_buf  = NULL;

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

    /* Destroy the main struct (reentrant only). */
    octave_free ( yyscanner , yyscanner );
    yyscanner = NULL;
    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
	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 , yyscan_t yyscanner)
{
	register int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif

#define YYTABLES_NAME "yytables"

#line 1718 "/home/jwe/src/octave-stable/libinterp/parse-tree/lex.ll"



void *
octave_alloc (yy_size_t size, yyscan_t)
{
  return malloc (size);
}

void *
octave_realloc (void *ptr, yy_size_t size, yyscan_t)
{
  return realloc (ptr, size);
}

void
octave_free (void *ptr, yyscan_t)
{
  free (ptr);
}

static void
display_character (char c)
{
  if (isgraph (c))
    std::cerr << c;
  else
    switch (c)
      {
      case 0:
        std::cerr << "NUL";
        break;

      case 1:
        std::cerr << "SOH";
        break;

      case 2:
        std::cerr << "STX";
        break;

      case 3:
        std::cerr << "ETX";
        break;

      case 4:
        std::cerr << "EOT";
        break;

      case 5:
        std::cerr << "ENQ";
        break;

      case 6:
        std::cerr << "ACK";
        break;

      case 7:
        std::cerr << "\\a";
        break;

      case 8:
        std::cerr << "\\b";
        break;

      case 9:
        std::cerr << "\\t";
        break;

      case 10:
        std::cerr << "\\n";
        break;

      case 11:
        std::cerr << "\\v";
        break;

      case 12:
        std::cerr << "\\f";
        break;

      case 13:
        std::cerr << "\\r";
        break;

      case 14:
        std::cerr << "SO";
        break;

      case 15:
        std::cerr << "SI";
        break;

      case 16:
        std::cerr << "DLE";
        break;

      case 17:
        std::cerr << "DC1";
        break;

      case 18:
        std::cerr << "DC2";
        break;

      case 19:
        std::cerr << "DC3";
        break;

      case 20:
        std::cerr << "DC4";
        break;

      case 21:
        std::cerr << "NAK";
        break;

      case 22:
        std::cerr << "SYN";
        break;

      case 23:
        std::cerr << "ETB";
        break;

      case 24:
        std::cerr << "CAN";
        break;

      case 25:
        std::cerr << "EM";
        break;

      case 26:
        std::cerr << "SUB";
        break;

      case 27:
        std::cerr << "ESC";
        break;

      case 28:
        std::cerr << "FS";
        break;

      case 29:
        std::cerr << "GS";
        break;

      case 30:
        std::cerr << "RS";
        break;

      case 31:
        std::cerr << "US";
        break;

      case 32:
        std::cerr << "SPACE";
        break;

      case 127:
        std::cerr << "DEL";
        break;
      }
}

bool
is_keyword (const std::string& s)
{
  // Parsing function names like "set.property_name" inside
  // classdef-style class definitions is simplified by handling the
  // "set" and "get" portions of the names using the same mechanism as
  // is used for keywords.  However, they are not really keywords in
  // the language, so omit them from the list of possible keywords.

  return (octave_kw_hash::in_word_set (s.c_str (), s.length ()) != 0
          && ! (s == "set" || s == "get"));
}

DEFUN (iskeyword, args, ,
  "-*- texinfo -*-\n\
@deftypefn  {Built-in Function} {} iskeyword ()\n\
@deftypefnx {Built-in Function} {} iskeyword (@var{name})\n\
Return true if @var{name} is an Octave keyword.\n\
\n\
If @var{name} is omitted, return a list of keywords.\n\
@seealso{isvarname, exist}\n\
@end deftypefn")
{
  octave_value retval;

  int argc = args.length () + 1;

  string_vector argv = args.make_argv ("iskeyword");

  if (error_state)
    return retval;

  if (argc == 1)
    {
      // Neither set and get are keywords.  See the note in the
      // is_keyword function for additional details.

      string_vector lst (TOTAL_KEYWORDS);

      int j = 0;

      for (int i = 0; i < TOTAL_KEYWORDS; i++)
        {
          std::string tmp = wordlist[i].name;

          if (! (tmp == "set" || tmp == "get"))
            lst[j++] = tmp;
        }

      lst.resize (j);

      retval = Cell (lst.sort ());
    }
  else if (argc == 2)
    {
      retval = is_keyword (argv[1]);
    }
  else
    print_usage ();

  return retval;
}

/*

%!assert (iskeyword ("for"))
%!assert (iskeyword ("fort"), false)
%!assert (iskeyword ("fft"), false)

*/

DEFUN (__display_tokens__, args, nargout,
  "-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} __display_tokens__ ()\n\
Query or set the internal variable that determines whether Octave's\n\
lexer displays tokens as they are read.\n\
@seealso{__lexer_debug_flag__, __token_count__}\n\
@end deftypefn")
{
  return SET_INTERNAL_VARIABLE (display_tokens);
}

DEFUN (__token_count__, , ,
  "-*- texinfo -*-\n\
@deftypefn {Built-in Function} {} __token_count__ ()\n\
Return the number of language tokens processed since Octave startup.\n\
@seealso{__lexer_debug_flag__, __display_tokens__}\n\
@end deftypefn")
{
  return octave_value (Vtoken_count);
}

DEFUN (__lexer_debug_flag__, args, nargout,
  "-*- texinfo -*-\n\
@deftypefn  {Built-in Function} {@var{val} =} __lexer_debug_flag__ ()\n\
@deftypefnx {Built-in Function} {@var{old_val} =} __lexer_debug_flag__ (@var{new_val})\n\
Query or set the internal flag that determines whether Octave's lexer prints\n\
debug information as it processes an expression.\n\
@seealso{__display_tokens__, __token_count__, __parse_debug_flag__}\n\
@end deftypefn")
{
  octave_value retval;

  retval = set_internal_variable (lexer_debug_flag, args, nargout,
                                  "__lexer_debug_flag__");

  return retval;
}

lexical_feedback::~lexical_feedback (void)
{
  tokens.clear ();
}

void
lexical_feedback::init (void)
{
  // The closest paren, brace, or bracket nesting is not an object
  // index.
  looking_at_object_index.push_front (false);
}

void
lexical_feedback::reset (void)
{
  end_of_input = false;
  at_beginning_of_statement = true;
  looking_at_anon_fcn_args = false;
  looking_at_return_list = false;
  looking_at_parameter_list = false;
  looking_at_decl_list = false;
  looking_at_initializer_expression = false;
  looking_at_matrix_or_assign_lhs = false;
  looking_for_object_index = false;
  looking_at_indirect_ref = false;
  parsing_class_method = false;
  parsing_classdef = false;
  maybe_classdef_get_set_method = false;
  parsing_classdef_get_method = false;
  parsing_classdef_set_method = false;
  quote_is_transpose = false;
  force_script = false;
  reading_fcn_file = false;
  reading_script_file = false;
  reading_classdef_file = false;
  input_line_number = 1;
  current_input_column = 1;
  bracketflag = 0;
  braceflag = 0;
  looping = 0;
  defining_func = 0;
  looking_at_function_handle = 0;
  block_comment_nesting_level = 0;
  command_arg_paren_count = 0;
  token_count = 0;
  current_input_line = "";
  comment_text = "";
  help_text = "";
  string_text = "";
  string_line = 0;
  string_column = 0;
  fcn_file_name = "";
  fcn_file_full_name = "";
  looking_at_object_index.clear ();
  looking_at_object_index.push_front (false);

  while (! parsed_function_name.empty ())
    parsed_function_name.pop ();

  pending_local_variables.clear ();
  symtab_context.clear ();
  nesting_level.reset ();
  tokens.clear ();
}

int
lexical_feedback::previous_token_value (void) const
{
  const token *tok = tokens.front ();
  return tok ? tok->token_value () : 0;
}

bool
lexical_feedback::previous_token_value_is (int tok_val) const
{
  const token *tok = tokens.front ();
  return tok ? tok->token_value_is (tok_val) : false;
}

void
lexical_feedback::mark_previous_token_trailing_space (void)
{
  token *tok = tokens.front ();
  if (tok && ! previous_token_value_is ('\n'))
    tok->mark_trailing_space ();
}

bool
lexical_feedback::space_follows_previous_token (void) const
{
  const token *tok = tokens.front ();
  return tok ? tok->space_follows_token () : false;
}

bool
lexical_feedback::previous_token_is_binop (void) const
{
  int tok = previous_token_value ();

  return (tok == '+' || tok == '-' || tok == '@'
          || tok == ',' || tok == ';' || tok == '*' || tok == '/'
          || tok == ':' || tok == '=' || tok == ADD_EQ
          || tok == AND_EQ || tok == DIV_EQ || tok == EDIV
          || tok == EDIV_EQ || tok == ELEFTDIV || tok == ELEFTDIV_EQ
          || tok == EMINUS || tok == EMUL || tok == EMUL_EQ
          || tok == EPOW || tok == EPOW_EQ || tok == EXPR_AND
          || tok == EXPR_AND_AND || tok == EXPR_EQ || tok == EXPR_GE
          || tok == EXPR_GT || tok == EXPR_LE || tok == EXPR_LT
          || tok == EXPR_NE || tok == EXPR_NOT || tok == EXPR_OR
          || tok == EXPR_OR_OR || tok == LEFTDIV || tok == LEFTDIV_EQ
          || tok == LSHIFT || tok == LSHIFT_EQ || tok == MUL_EQ
          || tok == OR_EQ || tok == POW || tok == POW_EQ
          || tok == RSHIFT || tok == RSHIFT_EQ || tok == SUB_EQ);
}

bool
lexical_feedback::previous_token_is_keyword (void) const
{
  const token *tok = tokens.front ();
  return tok ? tok->is_keyword () : false;
}

bool
lexical_feedback::previous_token_may_be_command (void) const
{
  const token *tok = tokens.front ();
  return tok ? tok->may_be_command () : false;
}

void
lexical_feedback::maybe_mark_previous_token_as_variable (void)
{
  token *tok = tokens.front ();

  if (tok && tok->is_symbol ())
    pending_local_variables.insert (tok->symbol_name ());
}

void
lexical_feedback::mark_as_variables (const std::list<std::string>& lst)
{
  for (std::list<std::string>::const_iterator p = lst.begin ();
       p != lst.end (); p++)
    {
      pending_local_variables.insert (*p);
    }
}

static bool
looks_like_copyright (const std::string& s)
{
  bool retval = false;

  if (! s.empty ())
    {
      size_t offset = s.find_first_not_of (" \t");

      retval = (s.substr (offset, 9) == "Copyright" || s.substr (offset, 6) == "Author");
    }

  return retval;
}

void
octave_base_lexer::input_buffer::fill (const std::string& input, bool eof_arg)
{
  buffer = input;
  chars_left = buffer.length ();
  pos = buffer.c_str ();
  eof = eof_arg;
}

int
octave_base_lexer::input_buffer::copy_chunk (char *buf, size_t max_size)
{
  static const char * const eol = "\n";

  size_t len = max_size > chars_left ? chars_left : max_size;
  assert (len > 0);

  memcpy (buf, pos, len);

  chars_left -= len;
  pos += len;

  // Make sure input ends with a new line character.
  if (chars_left == 0 && buf[len-1] != '\n')
    {
      if (len < max_size)
        {
          // There is enough room to plug the newline character in
          // the buffer.
          buf[len++] = '\n';
        }
      else
        {
          // There isn't enough room to plug the newline character
          // in the buffer so arrange to have it returned on the next
          // call to octave_base_lexer::read.
          pos = eol;
          chars_left = 1;
        }
    }

  return len;
}

octave_base_lexer::~octave_base_lexer (void)
{
  octave_lex_destroy (scanner);
}

void
octave_base_lexer::init (void)
{
  octave_lex_init (&scanner);

  // Make octave_base_lexer object available through yyextra in
  // flex-generated lexer.
  octave_set_extra (this, scanner);

  clear_start_state ();
}

// Inside Flex-generated functions, yyg is the scanner cast to its real
// type.  Some flex macros that we use in octave_base_lexer member functions
// (for example, BEGIN) use yyg.  If we could perform the actions of
// these macros with functions instead, we could eliminate the
// OCTAVE_YYG macro.

#define OCTAVE_YYG \
  struct yyguts_t *yyg = static_cast<struct yyguts_t*> (scanner)

void
octave_base_lexer::reset (void)
{
  // Start off on the right foot.
  clear_start_state ();

  symtab_context.clear ();

  // We do want a prompt by default.
  promptflag (1);

  // Only ask for input from stdin if we are expecting interactive
  // input.

  if (! quitting_gracefully
      && interactive
      && ! (reading_fcn_file
            || reading_classdef_file
            || reading_script_file
            || input_from_eval_string ()))
    octave_restart (stdin, scanner);

  lexical_feedback::reset ();

  comment_buf.reset ();
}

void
octave_base_lexer::prep_for_file (void)
{
  reading_script_file = true;

  push_start_state (INPUT_FILE_START);
}

void
octave_base_lexer::begin_string (int state)
{
  string_line = input_line_number;
  string_column = current_input_column;

  push_start_state (state);
}

int
octave_base_lexer::handle_end_of_input (void)
{
  lexer_debug ("<<EOF>>");

  if (block_comment_nesting_level != 0)
    {
      warning ("block comment open at end of input");

      if ((reading_fcn_file || reading_script_file || reading_classdef_file)
          && ! fcn_file_name.empty ())
        warning ("near line %d of file '%s.m'",
                 input_line_number, fcn_file_name.c_str ());
    }

  return handle_token (END_OF_INPUT);
}

char *
octave_base_lexer::flex_yytext (void)
{
  return octave_get_text (scanner);
}

int
octave_base_lexer::flex_yyleng (void)
{
  return octave_get_leng (scanner);
}

int
octave_base_lexer::text_yyinput (void)
{
  int c = yyinput (scanner);

  if (lexer_debug_flag)
    {
      std::cerr << "I: ";
      display_character (c);
      std::cerr << std::endl;
    }

  // Convert CRLF into just LF and single CR into LF.

  if (c == '\r')
    {
      c = yyinput (scanner);

      if (lexer_debug_flag)
        {
          std::cerr << "I: ";
          display_character (c);
          std::cerr << std::endl;
        }

      if (c != '\n')
        {
          xunput (c);
          c = '\n';
        }
    }

  return c;
}

void
octave_base_lexer::xunput (char c, char *buf)
{
  if (c != EOF)
    {
      if (lexer_debug_flag)
        {
          std::cerr << "U: ";
          display_character (c);
          std::cerr << std::endl;
        }

      yyunput (c, buf, scanner);
    }
}

void
octave_base_lexer::xunput (char c)
{
  char *yytxt = flex_yytext ();

  xunput (c, yytxt);
}

bool
octave_base_lexer::looking_at_space (void)
{
  int c = text_yyinput ();
  xunput (c);
  return (c == ' ' || c == '\t');
}

bool
octave_base_lexer::inside_any_object_index (void)
{
  bool retval = false;

  for (std::list<bool>::const_iterator i = looking_at_object_index.begin ();
       i != looking_at_object_index.end (); i++)
    {
      if (*i)
        {
          retval = true;
          break;
        }
    }

  return retval;
}

bool
octave_base_lexer::is_variable (const std::string& name)
{
  return (symbol_table::is_variable (name)
          || (pending_local_variables.find (name)
              != pending_local_variables.end ()));
}

// Handle keywords.  Return -1 if the keyword should be ignored.

int
octave_base_lexer::is_keyword_token (const std::string& s)
{
  int l = input_line_number;
  int c = current_input_column;

  int len = s.length ();

  const octave_kw *kw = octave_kw_hash::in_word_set (s.c_str (), len);

  if (kw)
    {
      bool previous_at_bos = at_beginning_of_statement;

      // May be reset to true for some token types.
      at_beginning_of_statement = false;

      token *tok_val = 0;

      switch (kw->kw_id)
        {
        case break_kw:
        case catch_kw:
        case continue_kw:
        case else_kw:
        case otherwise_kw:
        case return_kw:
        case unwind_protect_cleanup_kw:
          at_beginning_of_statement = true;
          break;

        case persistent_kw:
        case global_kw:
          looking_at_decl_list = true;
          break;

        case case_kw:
        case elseif_kw:
        case until_kw:
          break;

        case end_kw:
          if (inside_any_object_index ()
              || (defining_func
                  && ! (looking_at_return_list
                        || parsed_function_name.top ())))
            {
              at_beginning_of_statement = previous_at_bos;
              return 0;
            }

          tok_val = new token (end_kw, token::simple_end, l, c);
          at_beginning_of_statement = true;
          break;

        case end_try_catch_kw:
          tok_val = new token (end_try_catch_kw, token::try_catch_end, l, c);
          at_beginning_of_statement = true;
          break;

        case end_unwind_protect_kw:
          tok_val = new token (end_unwind_protect_kw,
                               token::unwind_protect_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endfor_kw:
          tok_val = new token (endfor_kw, token::for_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endfunction_kw:
          tok_val = new token (endfunction_kw, token::function_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endif_kw:
          tok_val = new token (endif_kw, token::if_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endparfor_kw:
          tok_val = new token (endparfor_kw, token::parfor_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endswitch_kw:
          tok_val = new token (endswitch_kw, token::switch_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endwhile_kw:
          tok_val = new token (endwhile_kw, token::while_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endclassdef_kw:
          tok_val = new token (endclassdef_kw, token::classdef_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endenumeration_kw:
          tok_val = new token (endenumeration_kw, token::enumeration_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endevents_kw:
          tok_val = new token (endevents_kw, token::events_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endmethods_kw:
          tok_val = new token (endmethods_kw, token::methods_end, l, c);
          at_beginning_of_statement = true;
          break;

        case endproperties_kw:
          tok_val = new token (endproperties_kw, token::properties_end, l, c);
          at_beginning_of_statement = true;
          break;


        case for_kw:
        case parfor_kw:
        case while_kw:
          decrement_promptflag ();
          looping++;
          break;

        case do_kw:
          at_beginning_of_statement = true;
          decrement_promptflag ();
          looping++;
          break;

        case try_kw:
        case unwind_protect_kw:
          at_beginning_of_statement = true;
          decrement_promptflag ();
          break;

        case if_kw:
        case switch_kw:
          decrement_promptflag ();
          break;

        case get_kw:
        case set_kw:
          // 'get' and 'set' are keywords in classdef method
          // declarations.
          if (! maybe_classdef_get_set_method)
            {
              at_beginning_of_statement = previous_at_bos;
              return 0;
            }
          break;

        case enumeration_kw:
        case events_kw:
        case methods_kw:
        case properties_kw:
          // 'properties', 'methods' and 'events' are keywords for
          // classdef blocks.
          if (! parsing_classdef)
            {
              at_beginning_of_statement = previous_at_bos;
              return 0;
            }
          // fall through ...

        case classdef_kw:
          // 'classdef' is always a keyword.
          decrement_promptflag ();

          if (! force_script && token_count == 0 && input_from_file ())
            {
              reading_classdef_file = true;
              reading_script_file = false;
            }
          break;

        case function_kw:
          decrement_promptflag ();

          defining_func++;
          parsed_function_name.push (false);

          if (! force_script && token_count == 0 && input_from_file ())
            {
              reading_fcn_file = true;
              reading_script_file = false;
            }

          if (! (reading_fcn_file || reading_script_file
                 || reading_classdef_file))
            input_line_number = 1;
          break;

        case magic_file_kw:
          {
            if ((reading_fcn_file || reading_script_file
                 || reading_classdef_file)
                && ! fcn_file_full_name.empty ())
              tok_val = new token (magic_file_kw, fcn_file_full_name, l, c);
            else
              tok_val = new token (magic_file_kw, "stdin", l, c);
          }
          break;

        case magic_line_kw:
          tok_val = new token (magic_line_kw, static_cast<double> (l),
                               "", l, c);
          break;

        default:
          panic_impossible ();
        }

      if (! tok_val)
        tok_val = new token (kw->tok, true, l, c);

      push_token (tok_val);

      return kw->tok;
    }

  return 0;
}

bool
octave_base_lexer::fq_identifier_contains_keyword (const std::string& s)
{
  size_t p1 = 0;
  size_t p2;

  std::string s_part;

  do
    {
      p2 = s.find ('.', p1);

      if (p2 != std::string::npos)
        {
          s_part = s.substr (p1, p2 - p1);
          p1 = p2 + 1;
        }
      else
        s_part = s.substr (p1);

      if (is_keyword_token (s_part))
        return true;
    }
  while (p2 != std::string::npos);

  return false;
}

bool
octave_base_lexer::whitespace_is_significant (void)
{
  return (nesting_level.is_bracket ()
          || (nesting_level.is_brace ()
              && ! looking_at_object_index.front ()));
}

static inline bool
looks_like_hex (const char *s, int len)
{
  return (len > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X'));
}

void
octave_base_lexer::handle_number (void)
{
  double value = 0.0;
  int nread = 0;

  char *yytxt = flex_yytext ();

  if (looks_like_hex (yytxt, strlen (yytxt)))
    {
      unsigned long ival;

      nread = sscanf (yytxt, "%lx", &ival);

      value = static_cast<double> (ival);
    }
  else
    {
      char *tmp = strsave (yytxt);

      char *idx = strpbrk (tmp, "Dd");

      if (idx)
        *idx = 'e';

      nread = sscanf (tmp, "%lf", &value);

      delete [] tmp;
    }

  // If yytext doesn't contain a valid number, we are in deep doo doo.

  assert (nread == 1);

  looking_for_object_index = false;
  at_beginning_of_statement = false;

  push_token (new token (NUM, value, yytxt, input_line_number,
                         current_input_column));

  current_input_column += flex_yyleng ();
}

void
octave_base_lexer::handle_continuation (void)
{
  char *yytxt = flex_yytext ();
  int yylng = flex_yyleng ();

  int offset = 1;
  if (yytxt[0] == '\\')
    gripe_language_extension_continuation ();
  else
    offset = 3;

  bool have_space = false;
  while (offset < yylng)
    {
      char c = yytxt[offset];
      if (c == ' ' || c == '\t')
        {
          have_space = true;
          offset++;
        }
      else
        break;
    }

  if (have_space)
    mark_previous_token_trailing_space ();

  bool have_comment = false;
  while (offset < yylng)
    {
      char c = yytxt[offset];
      if (c == '#' || c == '%')
        {
          have_comment = true;
          offset++;
        }
      else
        break;
    }

  if (have_comment)
    {
      comment_text = &yytxt[offset];

      // finish_comment sets at_beginning_of_statement to true but
      // that's not be correct if we are handling a continued
      // statement.  Preserve the current state.

      bool saved_bos = at_beginning_of_statement;

      finish_comment (octave_comment_elt::end_of_line);

      at_beginning_of_statement = saved_bos;
    }

  decrement_promptflag ();
  input_line_number++;
  current_input_column = 1;
}

void
octave_base_lexer::finish_comment (octave_comment_elt::comment_type typ)
{
  bool copyright = looks_like_copyright (comment_text);

  if (nesting_level.none () && help_text.empty ()
    && ! comment_text.empty () && ! copyright)
    help_text = comment_text;

  if (copyright)
    typ = octave_comment_elt::copyright;

  comment_buf.append (comment_text, typ);

  comment_text = "";

  at_beginning_of_statement = true;
}

int
octave_base_lexer::handle_close_bracket (int bracket_type)
{
  int retval = bracket_type;

  if (! nesting_level.none ())
    {
      nesting_level.remove ();

      if (bracket_type == ']')
        bracketflag--;
      else if (bracket_type == '}')
        braceflag--;
      else
        panic_impossible ();
    }

  pop_start_state ();

  return retval;
}

bool
octave_base_lexer::looks_like_command_arg (void)
{
  bool space_before = space_follows_previous_token ();
  bool space_after = looking_at_space ();

  return (space_before && ! space_after
          && previous_token_may_be_command ());
}

int
octave_base_lexer::handle_superclass_identifier (void)
{
  std::string meth = flex_yytext ();

  size_t pos = meth.find ("@");
  std::string cls = meth.substr (pos + 1);
  meth = meth.substr (0, pos);

  bool kw_token = (is_keyword_token (meth)
                   || fq_identifier_contains_keyword (cls));

  if (kw_token)
    {
      error ("method, class, and package names may not be keywords");
      return LEXICAL_ERROR;
    }

  push_token (new token (SUPERCLASSREF, meth, cls,
                         input_line_number, current_input_column));

  current_input_column += flex_yyleng ();

  return SUPERCLASSREF;
}

int
octave_base_lexer::handle_meta_identifier (void)
{
  std::string cls = std::string(flex_yytext ()).substr (1);

  if (fq_identifier_contains_keyword (cls))
    {
      error ("class and package names may not be keywords");
      return LEXICAL_ERROR;
    }

  push_token (new token (METAQUERY, cls, input_line_number,
                         current_input_column));

  current_input_column += flex_yyleng ();

  return METAQUERY;
}

int
octave_base_lexer::handle_fq_identifier (void)
{
  std::string tok = flex_yytext ();

  if (fq_identifier_contains_keyword (tok))
    {
      error ("function, method, class, and package names may not be keywords");
      return LEXICAL_ERROR;
    }

  push_token (new token (FQ_IDENT, tok, input_line_number,
                         current_input_column));

  current_input_column += flex_yyleng ();

  return FQ_IDENT;
}

// Figure out exactly what kind of token to return when we have seen
// an identifier.  Handles keywords.  Return -1 if the identifier
// should be ignored.

int
octave_base_lexer::handle_identifier (void)
{
  char *yytxt = flex_yytext ();

  std::string tok = yytxt;

  // If we are expecting a structure element, avoid recognizing
  // keywords and other special names and return STRUCT_ELT, which is
  // a string that is also a valid identifier.

  if (looking_at_indirect_ref)
    {
      push_token (new token (STRUCT_ELT, tok, input_line_number,
                             current_input_column));

      looking_for_object_index = true;

      current_input_column += flex_yyleng ();

      return STRUCT_ELT;
    }

  // If tok is a keyword token, then is_keyword_token will set
  // at_beginning_of_statement.  For example, if tok is an IF
  // token, then at_beginning_of_statement will be false.

  int kw_token = is_keyword_token (tok);

  if (looking_at_function_handle)
    {
      if (kw_token)
        {
          error ("function handles may not refer to keywords");

          return LEXICAL_ERROR;
        }
      else
        {
          push_token (new token (FCN_HANDLE, tok, input_line_number,
                                 current_input_column));

          current_input_column += flex_yyleng ();
          looking_for_object_index = true;

          at_beginning_of_statement = false;

          return FCN_HANDLE;
        }
    }

  // If we have a regular keyword, return it.
  // Keywords can be followed by identifiers.

  if (kw_token)
    {
      if (kw_token >= 0)
        {
          current_input_column += flex_yyleng ();
          looking_for_object_index = false;
        }

      // The call to is_keyword_token set at_beginning_of_statement.

      return kw_token;
    }

  // Find the token in the symbol table.

  symbol_table::scope_id sid = symtab_context.curr_scope ();

  token *tok_val = new token (NAME, &(symbol_table::insert (tok, sid)),
                              input_line_number, current_input_column);

  // The following symbols are handled specially so that things like
  //
  //   pi +1
  //
  // are parsed as an addition expression instead of as a command-style
  // function call with the argument "+1".

  if (at_beginning_of_statement
      && (! (is_variable (tok)
             || tok == "e" || tok == "pi"
             || tok == "I" || tok == "i"
             || tok == "J" || tok == "j"
             || tok == "Inf" || tok == "inf"
             || tok == "NaN" || tok == "nan")))
    tok_val->mark_may_be_command ();

  push_token (tok_val);

  current_input_column += flex_yyleng ();

  // The magic end index can't be indexed.

  if (tok != "end")
    looking_for_object_index = true;

  at_beginning_of_statement = false;

  return NAME;
}

void
octave_base_lexer::maybe_warn_separator_insert (char sep)
{
  std::string nm = fcn_file_full_name;

  if (nm.empty ())
    warning_with_id ("Octave:separator-insert",
                     "potential auto-insertion of '%c' near line %d",
                     sep, input_line_number);
  else
    warning_with_id ("Octave:separator-insert",
                     "potential auto-insertion of '%c' near line %d of file %s",
                     sep, input_line_number, nm.c_str ());
}

void
octave_base_lexer::gripe_single_quote_string (void)
{
  std::string nm = fcn_file_full_name;

  if (nm.empty ())
    warning_with_id ("Octave:single-quote-string",
                     "single quote delimited string near line %d",
                     input_line_number);
  else
    warning_with_id ("Octave:single-quote-string",
                     "single quote delimited string near line %d of file %s",
                     input_line_number, nm.c_str ());
}

void
octave_base_lexer::gripe_language_extension (const std::string& msg)
{
  std::string nm = fcn_file_full_name;

  if (nm.empty ())
    warning_with_id ("Octave:language-extension",
                     "Octave language extension used: %s",
                     msg.c_str ());
  else
    warning_with_id ("Octave:language-extension",
                     "Octave language extension used: %s near line %d offile %s",
                     msg.c_str (), input_line_number, nm.c_str ());
}

void
octave_base_lexer::maybe_gripe_language_extension_comment (char c)
{
  if (c == '#')
    gripe_language_extension ("# used as comment character");
}

void
octave_base_lexer::gripe_language_extension_continuation (void)
{
  gripe_language_extension ("\\ used as line continuation marker");
}

void
octave_base_lexer::gripe_language_extension_operator (const std::string& op)
{
  std::string t = op;
  int n = t.length ();
  if (t[n-1] == '\n')
    t.resize (n-1);
  gripe_language_extension (t + " used as operator");
}

void
octave_base_lexer::push_token (token *tok)
{
  YYSTYPE *lval = octave_get_lval (scanner);
  lval->tok_val = tok;
  tokens.push (tok);
}

token *
octave_base_lexer::current_token (void)
{
  YYSTYPE *lval = octave_get_lval (scanner);
  return lval->tok_val;
}

void
octave_base_lexer::display_token (int tok)
{
  switch (tok)
    {
    case '=': std::cerr << "'='\n"; break;
    case ':': std::cerr << "':'\n"; break;
    case '-': std::cerr << "'-'\n"; break;
    case '+': std::cerr << "'+'\n"; break;
    case '*': std::cerr << "'*'\n"; break;
    case '/': std::cerr << "'/'\n"; break;
    case ADD_EQ: std::cerr << "ADD_EQ\n"; break;
    case SUB_EQ: std::cerr << "SUB_EQ\n"; break;
    case MUL_EQ: std::cerr << "MUL_EQ\n"; break;
    case DIV_EQ: std::cerr << "DIV_EQ\n"; break;
    case LEFTDIV_EQ: std::cerr << "LEFTDIV_EQ\n"; break;
    case POW_EQ: std::cerr << "POW_EQ\n"; break;
    case EMUL_EQ: std::cerr << "EMUL_EQ\n"; break;
    case EDIV_EQ: std::cerr << "EDIV_EQ\n"; break;
    case ELEFTDIV_EQ: std::cerr << "ELEFTDIV_EQ\n"; break;
    case EPOW_EQ: std::cerr << "EPOW_EQ\n"; break;
    case AND_EQ: std::cerr << "AND_EQ\n"; break;
    case OR_EQ: std::cerr << "OR_EQ\n"; break;
    case LSHIFT_EQ: std::cerr << "LSHIFT_EQ\n"; break;
    case RSHIFT_EQ: std::cerr << "RSHIFT_EQ\n"; break;
    case LSHIFT: std::cerr << "LSHIFT\n"; break;
    case RSHIFT: std::cerr << "RSHIFT\n"; break;
    case EXPR_AND_AND: std::cerr << "EXPR_AND_AND\n"; break;
    case EXPR_OR_OR: std::cerr << "EXPR_OR_OR\n"; break;
    case EXPR_AND: std::cerr << "EXPR_AND\n"; break;
    case EXPR_OR: std::cerr << "EXPR_OR\n"; break;
    case EXPR_NOT: std::cerr << "EXPR_NOT\n"; break;
    case EXPR_LT: std::cerr << "EXPR_LT\n"; break;
    case EXPR_LE: std::cerr << "EXPR_LE\n"; break;
    case EXPR_EQ: std::cerr << "EXPR_EQ\n"; break;
    case EXPR_NE: std::cerr << "EXPR_NE\n"; break;
    case EXPR_GE: std::cerr << "EXPR_GE\n"; break;
    case EXPR_GT: std::cerr << "EXPR_GT\n"; break;
    case LEFTDIV: std::cerr << "LEFTDIV\n"; break;
    case EMUL: std::cerr << "EMUL\n"; break;
    case EDIV: std::cerr << "EDIV\n"; break;
    case ELEFTDIV: std::cerr << "ELEFTDIV\n"; break;
    case EPLUS: std::cerr << "EPLUS\n"; break;
    case EMINUS: std::cerr << "EMINUS\n"; break;
    case HERMITIAN: std::cerr << "HERMITIAN\n"; break;
    case TRANSPOSE: std::cerr << "TRANSPOSE\n"; break;
    case PLUS_PLUS: std::cerr << "PLUS_PLUS\n"; break;
    case MINUS_MINUS: std::cerr << "MINUS_MINUS\n"; break;
    case POW: std::cerr << "POW\n"; break;
    case EPOW: std::cerr << "EPOW\n"; break;

    case NUM:
    case IMAG_NUM:
      {
        token *tok_val = current_token ();
        std::cerr << (tok == NUM ? "NUM" : "IMAG_NUM")
                  << " [" << tok_val->number () << "]\n";
      }
      break;

    case STRUCT_ELT:
      {
        token *tok_val = current_token ();
        std::cerr << "STRUCT_ELT [" << tok_val->text () << "]\n";
      }
      break;

    case NAME:
      {
        token *tok_val = current_token ();
        symbol_table::symbol_record *sr = tok_val->sym_rec ();
        std::cerr << "NAME";
        if (sr)
          std::cerr << " [" << sr->name () << "]";
        std::cerr << "\n";
      }
      break;

    case END: std::cerr << "END\n"; break;

    case DQ_STRING:
    case SQ_STRING:
      {
        token *tok_val = current_token ();

        std::cerr << (tok == DQ_STRING ? "DQ_STRING" : "SQ_STRING")
                  << " [" << tok_val->text () << "]\n";
      }
      break;

    case FOR: std::cerr << "FOR\n"; break;
    case WHILE: std::cerr << "WHILE\n"; break;
    case DO: std::cerr << "DO\n"; break;
    case UNTIL: std::cerr << "UNTIL\n"; break;
    case IF: std::cerr << "IF\n"; break;
    case ELSEIF: std::cerr << "ELSEIF\n"; break;
    case ELSE: std::cerr << "ELSE\n"; break;
    case SWITCH: std::cerr << "SWITCH\n"; break;
    case CASE: std::cerr << "CASE\n"; break;
    case OTHERWISE: std::cerr << "OTHERWISE\n"; break;
    case BREAK: std::cerr << "BREAK\n"; break;
    case CONTINUE: std::cerr << "CONTINUE\n"; break;
    case FUNC_RET: std::cerr << "FUNC_RET\n"; break;
    case UNWIND: std::cerr << "UNWIND\n"; break;
    case CLEANUP: std::cerr << "CLEANUP\n"; break;
    case TRY: std::cerr << "TRY\n"; break;
    case CATCH: std::cerr << "CATCH\n"; break;
    case GLOBAL: std::cerr << "GLOBAL\n"; break;
    case PERSISTENT: std::cerr << "PERSISTENT\n"; break;
    case FCN_HANDLE: std::cerr << "FCN_HANDLE\n"; break;
    case END_OF_INPUT: std::cerr << "END_OF_INPUT\n\n"; break;
    case LEXICAL_ERROR: std::cerr << "LEXICAL_ERROR\n\n"; break;
    case FCN: std::cerr << "FCN\n"; break;
    case INPUT_FILE: std::cerr << "INPUT_FILE\n"; break;
    case SUPERCLASSREF: std::cerr << "SUPERCLASSREF\n"; break;
    case METAQUERY: std::cerr << "METAQUERY\n"; break;
    case GET: std::cerr << "GET\n"; break;
    case SET: std::cerr << "SET\n"; break;
    case PROPERTIES: std::cerr << "PROPERTIES\n"; break;
    case METHODS: std::cerr << "METHODS\n"; break;
    case EVENTS: std::cerr << "EVENTS\n"; break;
    case CLASSDEF: std::cerr << "CLASSDEF\n"; break;
    case '\n': std::cerr << "\\n\n"; break;
    case '\r': std::cerr << "\\r\n"; break;
    case '\t': std::cerr << "TAB\n"; break;
    default:
      {
        if (tok < 256 && tok > 31)
          std::cerr << static_cast<char> (tok) << "\n";
        else
          std::cerr << "UNKNOWN(" << tok << ")\n";
      }
      break;
    }
}

void
octave_base_lexer::fatal_error (const char *msg)
{
  error (msg);

  OCTAVE_QUIT;

  yy_fatal_error (msg, scanner);
}

void
octave_base_lexer::lexer_debug (const char *pattern)
{
  if (lexer_debug_flag)
    {
      std::cerr << std::endl;

      display_start_state ();

      std::cerr << "P: " << pattern << std::endl;
      std::cerr << "T: " << flex_yytext () << std::endl;
    }
}

void
octave_base_lexer::push_start_state (int state)
{
  OCTAVE_YYG;

  start_state_stack.push (state);

  BEGIN (start_state ());
}

void
octave_base_lexer::pop_start_state (void)
{
  OCTAVE_YYG;

  start_state_stack.pop ();

  BEGIN (start_state ());
}

void
octave_base_lexer::clear_start_state (void)
{
  while (! start_state_stack.empty ())
    start_state_stack.pop ();

  push_start_state (INITIAL);
}

void
octave_base_lexer::display_start_state (void) const
{
  std::cerr << "S: ";

  switch (start_state ())
    {
    case INITIAL:
      std::cerr << "INITIAL" << std::endl;
      break;

    case COMMAND_START:
      std::cerr << "COMMAND_START" << std::endl;
      break;

    case MATRIX_START:
      std::cerr << "MATRIX_START" << std::endl;
      break;

    case INPUT_FILE_START:
      std::cerr << "INPUT_FILE_BEGIN" << std::endl;
      break;

    case BLOCK_COMMENT_START:
      std::cerr << "BLOCK_COMMENT_START" << std::endl;
      break;

    case LINE_COMMENT_START:
      std::cerr << "LINE_COMMENT_START" << std::endl;
      break;

    case DQ_STRING_START:
      std::cerr << "DQ_STRING_START" << std::endl;
      break;

    case SQ_STRING_START:
      std::cerr << "SQ_STRING_START" << std::endl;
      break;

    default:
      std::cerr << "UNKNOWN START STATE!" << std::endl;
      break;
    }
}

int
octave_base_lexer::handle_op (const char *pattern, int tok, bool bos)
{
  lexer_debug (pattern);

  return handle_op_internal (tok, bos, true);
}

int
octave_base_lexer::handle_language_extension_op (const char *pattern, int tok,
                                                 bool bos)
{
  lexer_debug (pattern);

  return handle_op_internal (tok, bos, false);
}

bool
octave_base_lexer::maybe_unput_comma_before_unary_op (int tok)
{
  int prev_tok = previous_token_value ();

  bool unput_comma = false;

  if (whitespace_is_significant () && space_follows_previous_token ())
    {
      int c = text_yyinput ();
      xunput (c);

      bool space_after = (c == ' ' || c == '\t');

      if (! (prev_tok == '[' || prev_tok == '{'
             || previous_token_is_binop ()
             || ((tok == '+' || tok == '-') && space_after)))
        unput_comma = true;
    }

  return unput_comma;
}

int
octave_base_lexer::handle_unary_op (int tok, bool bos)
{
  return maybe_unput_comma_before_unary_op (tok)
    ? -1 : handle_op_internal (tok, bos, true);
}

int
octave_base_lexer::handle_language_extension_unary_op (int tok, bool bos)
{
  return maybe_unput_comma_before_unary_op (tok)
    ? -1 : handle_op_internal (tok, bos, false);
}

int
octave_base_lexer::handle_op_internal (int tok, bool bos, bool compat)
{
  if (! compat)
    gripe_language_extension_operator (flex_yytext ());

  push_token (new token (tok, input_line_number, current_input_column));

  current_input_column += flex_yyleng ();
  looking_for_object_index = false;
  at_beginning_of_statement = bos;

  return count_token_internal (tok);
}

int
octave_base_lexer::handle_token (const std::string& name, int tok)
{
  token *tok_val = new token (tok, name, input_line_number,
                              current_input_column);

  return handle_token (tok, tok_val);
}

int
octave_base_lexer::handle_token (int tok, token *tok_val)
{
  if (! tok_val)
    tok_val = new token (tok, input_line_number, current_input_column);

  push_token (tok_val);

  current_input_column += flex_yyleng ();

  return count_token_internal (tok);
}

int
octave_base_lexer::count_token (int tok)
{
  token *tok_val = new token (tok, input_line_number, current_input_column);

  push_token (tok_val);

  return count_token_internal (tok);
}

int
octave_base_lexer::count_token_internal (int tok)
{
  if (tok != '\n')
    {
      Vtoken_count++;
      token_count++;
    }

  return show_token (tok);
}

int
octave_base_lexer::show_token (int tok)
{
  if (Vdisplay_tokens)
    display_token (tok);

  if (lexer_debug_flag)
    {
      std::cerr << "R: ";
      display_token (tok);
      std::cerr << std::endl;
    }

  return tok;
}

void
octave_base_lexer::enable_fq_identifier (void)
{
  push_start_state (FQ_IDENT_START);
}

int
octave_lexer::fill_flex_buffer (char *buf, unsigned max_size)
{
  int status = 0;

  if (input_buf.empty ())
    {
      bool eof = false;
      current_input_line = input_reader.get_input (eof);
      input_buf.fill (current_input_line, eof);
    }

  if (! input_buf.empty ())
    status = input_buf.copy_chunk (buf, max_size);
  else
    status = YY_NULL;

  return status;
}

int
octave_push_lexer::fill_flex_buffer (char *buf, unsigned max_size)
{
  int status = 0;

  if (input_buf.empty () && ! input_buf.at_eof ())
    input_buf.fill (std::string (1, static_cast<char> (1)), false);

  if (! input_buf.empty ())
    status = input_buf.copy_chunk (buf, max_size);
  else
    status = YY_NULL;

  return status;
}


