GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Typedefs | Functions | Variables
oct-tex-lexer.cc File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "unistd-wrappers.h"
#include "txt-eng.h"
#include "oct-tex-parser.h"
Include dependency graph for oct-tex-lexer.cc:

Go to the source code of this file.

Classes

struct  octave_tex_yyguts_t
 
struct  yy_buffer_state
 
struct  yy_trans_info
 

Macros

#define BEGIN   yyg->yy_start = 1 + 2 *
 
#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define FLEX_BETA
 
#define FLEX_SCANNER
 
#define FLEXINT_H
 
#define INITIAL   0
 
#define INT16_MAX   (32767)
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MAX   (2147483647)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT8_MIN   (-128)
 
#define isatty   octave_isatty_wrapper
 
#define MAYBE_NUM_MODE   2
 
#define NUM_MODE   1
 
#define octave_tex_wrap(yyscanner)   (/*CONSTCOND*/1)
 
#define register
 
#define REJECT   reject_used_but_not_detected
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define UINT8_MAX   (255U)
 
#define unput(c)   yyunput( c, yyg->yytext_ptr , yyscanner )
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define YY_BREAK   /*LINTED*/break;
 
#define YY_BUF_SIZE   16384
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_CURRENT_BUFFER
 
#define YY_CURRENT_BUFFER_LVALUE   yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
 
#define YY_DECL
 
#define YY_DECL_IS_OURS   1
 
#define YY_DO_BEFORE_ACTION
 
#define YY_END_OF_BUFFER   129
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_EXIT_FAILURE   2
 
#define YY_EXTRA_TYPE   void *
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg , yyscanner)
 
#define yy_flex_debug   yyg->yy_flex_debug_r
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   6
 
#define YY_FLEX_SUBMINOR_VERSION   1
 
#define YY_FLUSH_BUFFER   octave_tex__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
 
#define YY_INPUT(buf, result, max_size)
 
#define YY_INT_ALIGNED   short int
 
#define YY_LESS_LINENO(n)
 
#define YY_LINENO_REWIND_TO(ptr)
 
#define YY_MORE_ADJ   0
 
#define yy_new_buffer   octave_tex__create_buffer
 
#define YY_NEW_FILE   octave_tex_restart(yyin ,yyscanner )
 
#define YY_NO_UNISTD_H   1
 
#define YY_NULL   0
 
#define YY_NUM_RULES   128
 
#define YY_READ_BUF_SIZE   8192
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_RULE_SETUP   YY_USER_ACTION
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define yy_set_bol(at_bol)
 
#define yy_set_interactive(is_interactive)
 
#define YY_SKIP_YYWRAP
 
#define YY_START   ((yyg->yy_start - 1) / 2)
 
#define YY_START_STACK_INCR   25
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SCANNER_T
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define YY_USER_ACTION
 
#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
 
#define yyconst   const
 
#define yyextra   yyg->yyextra_r
 
#define yyguts_t   octave_tex_yyguts_t
 
#define yyin   yyg->yyin_r
 
#define yyleng   yyg->yyleng_r
 
#define yyless(n)
 
#define yyless(n)
 
#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
 
#define yylval   yyg->yylval_r
 
#define yymore()   yymore_used_but_not_detected
 
#define yynoreturn
 
#define yyout   yyg->yyout_r
 
#define YYSTATE   YY_START
 
#define YYSTYPE   OCTAVE_TEX_STYPE
 
#define YYTABLES_NAME   "yytables"
 
#define yyterminate()   return YY_NULL
 
#define yytext   yyg->yytext_r
 
#define yytext_ptr   yytext_r
 

Typedefs

typedef short int flex_int16_t
 
typedef int flex_int32_t
 
typedef signed char flex_int8_t
 
typedef unsigned short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef unsigned char flex_uint8_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef unsigned char YY_CHAR
 
typedef size_t yy_size_t
 
typedef int yy_state_type
 
typedef void * yyscan_t
 

Functions

static int input (yyscan_t yyscanner)
 
YY_BUFFER_STATE octave_tex__create_buffer (FILE *file, int size, yyscan_t yyscanner)
 Allocate and initialize an input buffer state. More...
 
void octave_tex__delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
 Destroy the buffer. More...
 
void octave_tex__flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
 Discard all buffered characters. More...
 
static void octave_tex__init_buffer (YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
 
static void octave_tex__load_buffer_state (yyscan_t yyscanner)
 
YY_BUFFER_STATE octave_tex__scan_buffer (char *base, yy_size_t size, yyscan_t yyscanner)
 Setup the input buffer state to scan directly from a user-specified character buffer. More...
 
YY_BUFFER_STATE octave_tex__scan_bytes (const char *yybytes, int _yybytes_len, yyscan_t yyscanner)
 Setup the input buffer state to scan the given bytes. More...
 
YY_BUFFER_STATE octave_tex__scan_string (const char *yystr, yyscan_t yyscanner)
 Setup the input buffer state to scan a string. More...
 
void octave_tex__switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
 Switch to a different input buffer. More...
 
void * octave_tex_alloc (yy_size_t, yyscan_t yyscanner)
 
static void octave_tex_ensure_buffer_stack (yyscan_t yyscanner)
 
void octave_tex_free (void *, yyscan_t yyscanner)
 
int octave_tex_get_column (yyscan_t yyscanner)
 Get the current column number. More...
 
int octave_tex_get_debug (yyscan_t yyscanner)
 
void * octave_tex_get_extra (yyscan_t yyscanner)
 Get the user-defined data for this scanner. More...
 
FILE * octave_tex_get_in (yyscan_t yyscanner)
 Get the input stream. More...
 
int octave_tex_get_leng (yyscan_t yyscanner)
 Get the length of the current token. More...
 
int octave_tex_get_lineno (yyscan_t yyscanner)
 Get the current line number. More...
 
OCTAVE_TEX_STYPEoctave_tex_get_lval (yyscan_t yyscanner)
 
FILE * octave_tex_get_out (yyscan_t yyscanner)
 Get the output stream. More...
 
char * octave_tex_get_text (yyscan_t yyscanner)
 Get the current token. More...
 
int octave_tex_lex (OCTAVE_TEX_STYPE *yylval_param, yyscan_t yyscanner)
 The main scanner function which does all the work. More...
 
int octave_tex_lex_destroy (yyscan_t yyscanner)
 
int octave_tex_lex_init (yyscan_t *scanner)
 
int octave_tex_lex_init_extra (void *user_defined, yyscan_t *scanner)
 
void octave_tex_pop_buffer_state (yyscan_t yyscanner)
 Removes and deletes the top of the stack, if present. More...
 
void octave_tex_push_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
 Pushes the new state onto the stack. More...
 
void * octave_tex_realloc (void *, yy_size_t, yyscan_t yyscanner)
 
void octave_tex_restart (FILE *input_file, yyscan_t yyscanner)
 Immediately switch to a different input stream. More...
 
void octave_tex_set_column (int _column_no, yyscan_t yyscanner)
 Set the current column. More...
 
void octave_tex_set_debug (int debug_flag, yyscan_t yyscanner)
 
void octave_tex_set_extra (void *user_defined, yyscan_t yyscanner)
 Set the user-defined data. More...
 
void octave_tex_set_in (FILE *_in_str, yyscan_t yyscanner)
 Set the input stream. More...
 
void octave_tex_set_lineno (int _line_number, yyscan_t yyscanner)
 Set the current line number. More...
 
void octave_tex_set_lval (OCTAVE_TEX_STYPE *yylval_param, yyscan_t yyscanner)
 
void octave_tex_set_out (FILE *_out_str, yyscan_t yyscanner)
 
static void yy_fatal_error (const char *msg, yyscan_t yyscanner)
 
static int yy_get_next_buffer (yyscan_t yyscanner)
 
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
 
static int yy_init_globals (yyscan_t yyscanner)
 
static yy_state_type yy_try_NUL_trans (yy_state_type current_state, yyscan_t yyscanner)
 
static void yyunput (int c, char *buf_ptr, yyscan_t yyscanner)
 

Variables

static const flex_int16_t yy_accept [465]
 
static const flex_uint16_t yy_base [468]
 
static const flex_int16_t yy_chk [533]
 
static const flex_int16_t yy_def [468]
 
static const YY_CHAR yy_ec [256]
 
static const YY_CHAR yy_meta [50]
 
static const flex_uint16_t yy_nxt [533]
 

Macro Definition Documentation

#define BEGIN   yyg->yy_start = 1 + 2 *

Definition at line 151 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)

Definition at line 918 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), raw_mode(), and KPty::setEcho().

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 195 of file oct-tex-lexer.cc.

Referenced by input(), octave_tex_lex(), and yy_get_next_buffer().

#define EOB_ACT_END_OF_FILE   1

Definition at line 196 of file oct-tex-lexer.cc.

Referenced by input(), octave_tex_lex(), and yy_get_next_buffer().

#define EOB_ACT_LAST_MATCH   2

Definition at line 197 of file oct-tex-lexer.cc.

Referenced by input(), octave_tex_lex(), and yy_get_next_buffer().

#define FLEX_BETA

Definition at line 34 of file oct-tex-lexer.cc.

#define FLEX_SCANNER

Definition at line 29 of file oct-tex-lexer.cc.

#define FLEXINT_H

Definition at line 50 of file oct-tex-lexer.cc.

#define INITIAL   0

Definition at line 768 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define INT16_MAX   (32767)

Definition at line 92 of file oct-tex-lexer.cc.

#define INT16_MIN   (-32767-1)

Definition at line 83 of file oct-tex-lexer.cc.

#define INT32_MAX   (2147483647)

Definition at line 95 of file oct-tex-lexer.cc.

#define INT32_MIN   (-2147483647-1)

Definition at line 86 of file oct-tex-lexer.cc.

#define INT8_MAX   (127)

Definition at line 89 of file oct-tex-lexer.cc.

#define INT8_MIN   (-128)

Definition at line 80 of file oct-tex-lexer.cc.

#define isatty   octave_isatty_wrapper
#define MAYBE_NUM_MODE   2

Definition at line 770 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define NUM_MODE   1

Definition at line 769 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define octave_tex_wrap (   yyscanner)    (/*CONSTCOND*/1)

Definition at line 346 of file oct-tex-lexer.cc.

Referenced by input(), and octave_tex_lex().

#define register

Definition at line 20 of file oct-tex-lexer.cc.

#define REJECT   reject_used_but_not_detected

Definition at line 714 of file oct-tex-lexer.cc.

#define UINT16_MAX   (65535U)

Definition at line 101 of file oct-tex-lexer.cc.

#define UINT32_MAX   (4294967295U)

Definition at line 104 of file oct-tex-lexer.cc.

#define UINT8_MAX   (255U)

Definition at line 98 of file oct-tex-lexer.cc.

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

Definition at line 216 of file oct-tex-lexer.cc.

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 342 of file oct-tex-lexer.cc.

#define YY_BREAK   /*LINTED*/break;

Definition at line 999 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define YY_BUF_SIZE   16384

Definition at line 177 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), and octave_tex_restart().

#define YY_BUFFER_EOF_PENDING   2

Definition at line 278 of file oct-tex-lexer.cc.

Referenced by yy_get_next_buffer().

#define YY_BUFFER_NEW   0
#define YY_BUFFER_NORMAL   1

Definition at line 267 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define YY_CURRENT_BUFFER
#define YY_CURRENT_BUFFER_LVALUE   yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
#define YY_DECL
Value:
(YYSTYPE * yylval_param , yyscan_t yyscanner)
#define YYSTYPE
int octave_tex_lex(OCTAVE_TEX_STYPE *yylval_param, yyscan_t yyscanner)
The main scanner function which does all the work.
void * yyscan_t

Definition at line 986 of file oct-tex-lexer.cc.

#define YY_DECL_IS_OURS   1

Definition at line 981 of file oct-tex-lexer.cc.

#define YY_DO_BEFORE_ACTION
Value:
yyg->yytext_ptr = yy_bp; \
yyleng = (int) (yy_cp - yy_bp); \
yyg->yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
#define yyleng

Definition at line 363 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define YY_END_OF_BUFFER   129

Definition at line 371 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define YY_END_OF_BUFFER_CHAR   0
#define YY_EXIT_FAILURE   2

Definition at line 2596 of file oct-tex-lexer.cc.

Referenced by yy_fatal_error().

#define YY_EXTRA_TYPE   void *

Definition at line 781 of file oct-tex-lexer.cc.

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg , yyscanner)
#define yy_flex_debug   yyg->yy_flex_debug_r

Definition at line 145 of file oct-tex-lexer.cc.

Referenced by octave_tex_get_debug(), and octave_tex_set_debug().

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 30 of file oct-tex-lexer.cc.

#define YY_FLEX_MINOR_VERSION   6

Definition at line 31 of file oct-tex-lexer.cc.

#define YY_FLEX_SUBMINOR_VERSION   1

Definition at line 32 of file oct-tex-lexer.cc.

#define YY_FLUSH_BUFFER   octave_tex__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)

Definition at line 310 of file oct-tex-lexer.cc.

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
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 = (int) 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); \
} \
}\
\
#define YY_CURRENT_BUFFER_LVALUE
while(ischar(s=fgets(fid))) fputs(stdout
for(octave_idx_type n=0;n< hcv.numel();n++)
Definition: graphics.cc:10128
if(nargin< 2) print_usage()
Definition: cellfun.cc:405
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
With real return the complex result
Definition: data.cc:3375
#define YY_FATAL_ERROR(msg)
else
Definition: cellfun.cc:437
#define scanner
static int input(yyscan_t yyscanner)
#define yyin

Definition at line 925 of file oct-tex-lexer.cc.

Referenced by yy_get_next_buffer().

#define YY_INT_ALIGNED   short int

Definition at line 25 of file oct-tex-lexer.cc.

#define YY_LESS_LINENO (   n)

Definition at line 199 of file oct-tex-lexer.cc.

#define YY_LINENO_REWIND_TO (   ptr)

Definition at line 200 of file oct-tex-lexer.cc.

#define YY_MORE_ADJ   0

Definition at line 716 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), yy_get_next_buffer(), and yy_get_previous_state().

#define yy_new_buffer   octave_tex__create_buffer

Definition at line 320 of file oct-tex-lexer.cc.

#define YY_NEW_FILE   octave_tex_restart(yyin ,yyscanner )

Definition at line 164 of file oct-tex-lexer.cc.

Referenced by input(), and octave_tex_lex().

#define YY_NO_UNISTD_H   1

Definition at line 762 of file oct-tex-lexer.cc.

#define YY_NULL   0

Definition at line 121 of file oct-tex-lexer.cc.

#define YY_NUM_RULES   128

Definition at line 370 of file oct-tex-lexer.cc.

#define YY_READ_BUF_SIZE   8192

Definition at line 909 of file oct-tex-lexer.cc.

Referenced by yy_get_next_buffer().

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 717 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define YY_RULE_SETUP   YY_USER_ACTION

Definition at line 1002 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define YY_SC_TO_UI (   c)    ((unsigned int) (unsigned char) c)

Definition at line 128 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), and yy_get_previous_state().

#define yy_set_bol (   at_bol)
Value:
{ \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_CURRENT_BUFFER_LVALUE
#define YY_BUF_SIZE
static void octave_tex_ensure_buffer_stack(yyscan_t yyscanner)
if(nargin< 2) print_usage()
Definition: cellfun.cc:405
#define YY_CURRENT_BUFFER
YY_BUFFER_STATE octave_tex__create_buffer(FILE *file, int size, yyscan_t yyscanner)
Allocate and initialize an input buffer state.
#define yyin

Definition at line 332 of file oct-tex-lexer.cc.

#define yy_set_interactive (   is_interactive)
Value:
{ \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
#define YY_CURRENT_BUFFER_LVALUE
#define YY_BUF_SIZE
static void octave_tex_ensure_buffer_stack(yyscan_t yyscanner)
if(nargin< 2) print_usage()
Definition: cellfun.cc:405
#define YY_CURRENT_BUFFER
YY_BUFFER_STATE octave_tex__create_buffer(FILE *file, int size, yyscan_t yyscanner)
Allocate and initialize an input buffer state.
#define yyin

Definition at line 322 of file oct-tex-lexer.cc.

#define YY_SKIP_YYWRAP

Definition at line 347 of file oct-tex-lexer.cc.

#define YY_START   ((yyg->yy_start - 1) / 2)

Definition at line 157 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define YY_START_STACK_INCR   25

Definition at line 967 of file oct-tex-lexer.cc.

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 183 of file oct-tex-lexer.cc.

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Definition at line 161 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 219 of file oct-tex-lexer.cc.

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 186 of file oct-tex-lexer.cc.

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 132 of file oct-tex-lexer.cc.

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 191 of file oct-tex-lexer.cc.

#define YY_USER_ACTION

Definition at line 994 of file oct-tex-lexer.cc.

#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

Definition at line 144 of file oct-tex-lexer.cc.

Referenced by octave_tex_get_column(), and octave_tex_set_column().

#define yyconst   const

Definition at line 112 of file oct-tex-lexer.cc.

#define yyextra   yyg->yyextra_r

Definition at line 140 of file oct-tex-lexer.cc.

Referenced by octave_tex_get_extra(), and octave_tex_set_extra().

Definition at line 764 of file oct-tex-lexer.cc.

#define yyin   yyg->yyin_r
#define yyleng   yyg->yyleng_r

Definition at line 141 of file oct-tex-lexer.cc.

Referenced by octave_tex_get_leng().

#define yyless (   n)
Value:
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 )
while(ischar(s=fgets(fid))) fputs(stdout
#define YY_MORE_ADJ
#define YY_DO_BEFORE_ACTION
#define YY_LESS_LINENO(n)

Definition at line 2610 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define yyless (   n)
Value:
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 )
while(ischar(s=fgets(fid))) fputs(stdout
#define yytext
#define yyleng
#define YY_LESS_LINENO(n)

Definition at line 2610 of file oct-tex-lexer.cc.

#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

Definition at line 143 of file oct-tex-lexer.cc.

Referenced by octave_tex_get_lineno(), and octave_tex_set_lineno().

#define yylval   yyg->yylval_r
#define yymore ( )    yymore_used_but_not_detected

Definition at line 715 of file oct-tex-lexer.cc.

#define yynoreturn

Definition at line 117 of file oct-tex-lexer.cc.

#define yyout   yyg->yyout_r
#define YYSTATE   YY_START

Definition at line 158 of file oct-tex-lexer.cc.

#define YYSTYPE   OCTAVE_TEX_STYPE

Definition at line 759 of file oct-tex-lexer.cc.

#define YYTABLES_NAME   "yytables"

Definition at line 2936 of file oct-tex-lexer.cc.

#define yyterminate ( )    return YY_NULL

Definition at line 962 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex().

#define yytext   yyg->yytext_r

Definition at line 142 of file oct-tex-lexer.cc.

Referenced by octave_tex_get_text(), and octave_tex_lex().

#define yytext_ptr   yytext_r

Definition at line 353 of file oct-tex-lexer.cc.

Typedef Documentation

typedef short int flex_int16_t

Definition at line 72 of file oct-tex-lexer.cc.

typedef int flex_int32_t

Definition at line 73 of file oct-tex-lexer.cc.

typedef signed char flex_int8_t

Definition at line 71 of file oct-tex-lexer.cc.

typedef unsigned short int flex_uint16_t

Definition at line 75 of file oct-tex-lexer.cc.

typedef unsigned int flex_uint32_t

Definition at line 76 of file oct-tex-lexer.cc.

typedef unsigned char flex_uint8_t

Definition at line 74 of file oct-tex-lexer.cc.

Definition at line 187 of file oct-tex-lexer.cc.

typedef unsigned char YY_CHAR

Definition at line 349 of file oct-tex-lexer.cc.

typedef size_t yy_size_t

Definition at line 192 of file oct-tex-lexer.cc.

typedef int yy_state_type

Definition at line 351 of file oct-tex-lexer.cc.

typedef void* yyscan_t

Definition at line 133 of file oct-tex-lexer.cc.

Function Documentation

static int input ( yyscan_t  yyscanner)
static
YY_BUFFER_STATE octave_tex__create_buffer ( FILE *  file,
int  size,
yyscan_t  yyscanner 
)

Allocate and initialize an input buffer state.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
yyscannerThe scanner object.
Returns
the allocated buffer state.

Definition at line 2307 of file oct-tex-lexer.cc.

References b, octave_tex__init_buffer(), octave_tex_alloc(), yy_buffer_state::yy_buf_size, yy_buffer_state::yy_ch_buf, YY_FATAL_ERROR, and yy_buffer_state::yy_is_our_buffer.

Referenced by octave_tex_lex(), and octave_tex_restart().

void octave_tex__delete_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)
void octave_tex__flush_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)

Discard all buffered characters.

On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.
yyscannerThe scanner object.

Definition at line 2384 of file oct-tex-lexer.cc.

References octave_tex__load_buffer_state(), yy_buffer_state::yy_at_bol, yy_buffer_state::yy_buf_pos, YY_BUFFER_NEW, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, and yy_buffer_state::yy_n_chars.

Referenced by octave_tex__init_buffer().

static void octave_tex__init_buffer ( YY_BUFFER_STATE  b,
FILE *  file,
yyscan_t  yyscanner 
)
static
static void octave_tex__load_buffer_state ( yyscan_t  yyscanner)
static
YY_BUFFER_STATE octave_tex__scan_buffer ( char *  base,
yy_size_t  size,
yyscan_t  yyscanner 
)

Setup the input buffer state to scan directly from a user-specified character buffer.

Parameters
basethe character buffer
sizethe size in bytes of the character buffer
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.

Definition at line 2515 of file oct-tex-lexer.cc.

References b, octave_tex__switch_to_buffer(), octave_tex_alloc(), yy_buffer_state::yy_at_bol, yy_buffer_state::yy_buf_pos, yy_buffer_state::yy_buf_size, YY_BUFFER_NEW, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_buffer_state::yy_fill_buffer, yy_buffer_state::yy_input_file, yy_buffer_state::yy_is_interactive, yy_buffer_state::yy_is_our_buffer, and yy_buffer_state::yy_n_chars.

Referenced by octave_tex__scan_bytes().

YY_BUFFER_STATE octave_tex__scan_bytes ( const char *  yybytes,
int  _yybytes_len,
yyscan_t  yyscanner 
)

Setup the input buffer state to scan the given bytes.

The next call to octave_tex_lex() will scan from a copy of bytes.

Parameters
yybytesthe byte buffer to scan
_yybytes_lenthe number of bytes in the buffer pointed to by bytes.
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.

Definition at line 2565 of file oct-tex-lexer.cc.

References b, octave_tex__scan_buffer(), octave_tex_alloc(), YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, and yy_buffer_state::yy_is_our_buffer.

Referenced by text_parser_tex::init_lexer(), and octave_tex__scan_string().

YY_BUFFER_STATE octave_tex__scan_string ( const char *  yystr,
yyscan_t  yyscanner 
)

Setup the input buffer state to scan a string.

The next call to octave_tex_lex() will scan from a copy of str.

Parameters
yystra NUL-terminated string to scan
yyscannerThe scanner object.
Returns
the newly allocated buffer state object.
Note
If you want to scan bytes that may contain NUL values, then use octave_tex__scan_bytes() instead.

Definition at line 2552 of file oct-tex-lexer.cc.

References octave_tex__scan_bytes(), and strlen().

void octave_tex__switch_to_buffer ( YY_BUFFER_STATE  new_buffer,
yyscan_t  yyscanner 
)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.
yyscannerThe scanner object.

Definition at line 2260 of file oct-tex-lexer.cc.

References octave_tex__load_buffer_state(), octave_tex_ensure_buffer_stack(), yyguts_t::yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yyguts_t::yy_did_buffer_switch_on_eof, yyguts_t::yy_hold_char, and yyguts_t::yy_n_chars.

Referenced by octave_tex__scan_buffer().

void * octave_tex_alloc ( yy_size_t  size,
yyscan_t  yyscanner 
)
static void octave_tex_ensure_buffer_stack ( yyscan_t  yyscanner)
static
void octave_tex_free ( void *  ptr,
yyscan_t  yyscanner 
)

Definition at line 2960 of file oct-tex-lexer.cc.

References free().

Referenced by octave_tex__delete_buffer(), and octave_tex_lex_destroy().

int octave_tex_get_column ( yyscan_t  yyscanner)

Get the current column number.

Parameters
yyscannerThe scanner object.

Definition at line 2651 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, and yycolumn.

int octave_tex_get_debug ( yyscan_t  yyscanner)

Definition at line 2756 of file oct-tex-lexer.cc.

References yy_flex_debug.

void * octave_tex_get_extra ( yyscan_t  yyscanner)

Get the user-defined data for this scanner.

Parameters
yyscannerThe scanner object.

Definition at line 2629 of file oct-tex-lexer.cc.

References yyextra.

FILE * octave_tex_get_in ( yyscan_t  yyscanner)

Get the input stream.

Parameters
yyscannerThe scanner object.

Definition at line 2664 of file oct-tex-lexer.cc.

References yyin.

int octave_tex_get_leng ( yyscan_t  yyscanner)

Get the length of the current token.

Parameters
yyscannerThe scanner object.

Definition at line 2682 of file oct-tex-lexer.cc.

References yyleng.

int octave_tex_get_lineno ( yyscan_t  yyscanner)

Get the current line number.

Parameters
yyscannerThe scanner object.

Definition at line 2638 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, and yylineno.

OCTAVE_TEX_STYPE * octave_tex_get_lval ( yyscan_t  yyscanner)

Definition at line 2770 of file oct-tex-lexer.cc.

References yylval.

FILE * octave_tex_get_out ( yyscan_t  yyscanner)

Get the output stream.

Parameters
yyscannerThe scanner object.

Definition at line 2673 of file oct-tex-lexer.cc.

References yyout.

char * octave_tex_get_text ( yyscan_t  yyscanner)

Get the current token.

Parameters
yyscannerThe scanner object.

Definition at line 2692 of file oct-tex-lexer.cc.

References yytext.

int octave_tex_lex ( OCTAVE_TEX_STYPE yylval_param,
yyscan_t  yyscanner 
)
int octave_tex_lex_destroy ( yyscan_t  yyscanner)
int octave_tex_lex_init ( yyscan_t scanner)

Definition at line 2789 of file oct-tex-lexer.cc.

References octave_tex_alloc(), and yy_init_globals().

Referenced by text_parser_tex::init_lexer().

int octave_tex_lex_init_extra ( void *  user_defined,
yyscan_t scanner 
)

Definition at line 2818 of file oct-tex-lexer.cc.

References octave_tex_alloc(), octave_tex_set_extra(), and yy_init_globals().

void octave_tex_pop_buffer_state ( yyscan_t  yyscanner)

Removes and deletes the top of the stack, if present.

The next element becomes the new top.

Parameters
yyscannerThe scanner object.

Definition at line 2445 of file oct-tex-lexer.cc.

References octave_tex__delete_buffer(), octave_tex__load_buffer_state(), yyguts_t::yy_buffer_stack_top, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yyguts_t::yy_did_buffer_switch_on_eof.

Referenced by octave_tex_lex_destroy().

void octave_tex_push_buffer_state ( YY_BUFFER_STATE  new_buffer,
yyscan_t  yyscanner 
)

Pushes the new state onto the stack.

The new state becomes the current state. This function will allocate the stack if necessary.

Parameters
new_bufferThe new state.
yyscannerThe scanner object.

Definition at line 2414 of file oct-tex-lexer.cc.

References octave_tex__load_buffer_state(), octave_tex_ensure_buffer_stack(), yyguts_t::yy_buffer_stack_top, yyguts_t::yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yyguts_t::yy_did_buffer_switch_on_eof, yyguts_t::yy_hold_char, and yyguts_t::yy_n_chars.

void * octave_tex_realloc ( void *  ptr,
yy_size_t  size,
yyscan_t  yyscanner 
)

Definition at line 2954 of file oct-tex-lexer.cc.

Referenced by octave_tex_ensure_buffer_stack(), and yy_get_next_buffer().

void octave_tex_restart ( FILE *  input_file,
yyscan_t  yyscanner 
)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
yyscannerThe scanner object.
Note
This function does not reset the start condition to INITIAL .

Definition at line 2242 of file oct-tex-lexer.cc.

References octave_tex__create_buffer(), octave_tex__init_buffer(), octave_tex__load_buffer_state(), octave_tex_ensure_buffer_stack(), YY_BUF_SIZE, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yyin.

Referenced by input(), and yy_get_next_buffer().

void octave_tex_set_column ( int  _column_no,
yyscan_t  yyscanner 
)

Set the current column.

Parameters
_column_nocolumn number
yyscannerThe scanner object.

Definition at line 2727 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, YY_FATAL_ERROR, and yycolumn.

void octave_tex_set_debug ( int  debug_flag,
yyscan_t  yyscanner 
)

Definition at line 2762 of file oct-tex-lexer.cc.

References yy_flex_debug.

void octave_tex_set_extra ( void *  user_defined,
yyscan_t  yyscanner 
)

Set the user-defined data.

This data is never touched by the scanner.

Parameters
user_definedThe data to be associated with this scanner.
yyscannerThe scanner object.

Definition at line 2702 of file oct-tex-lexer.cc.

References yyextra.

Referenced by octave_tex_lex_init_extra().

void octave_tex_set_in ( FILE *  _in_str,
yyscan_t  yyscanner 
)

Set the input stream.

This does not discard the current input buffer.

Parameters
_in_strA readable stream.
yyscannerThe scanner object.
See also
octave_tex__switch_to_buffer

Definition at line 2744 of file oct-tex-lexer.cc.

References yyin.

void octave_tex_set_lineno ( int  _line_number,
yyscan_t  yyscanner 
)

Set the current line number.

Parameters
_line_numberline number
yyscannerThe scanner object.

Definition at line 2712 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, YY_FATAL_ERROR, and yylineno.

void octave_tex_set_lval ( OCTAVE_TEX_STYPE yylval_param,
yyscan_t  yyscanner 
)

Definition at line 2776 of file oct-tex-lexer.cc.

References yylval.

void octave_tex_set_out ( FILE *  _out_str,
yyscan_t  yyscanner 
)

Definition at line 2750 of file oct-tex-lexer.cc.

References yyout.

static void yy_fatal_error ( const char *  msg,
yyscan_t  yyscanner 
)
static

Definition at line 2599 of file oct-tex-lexer.cc.

References YY_EXIT_FAILURE.

static int yy_get_next_buffer ( yyscan_t  yyscanner)
static
static yy_state_type yy_get_previous_state ( yyscan_t  yyscanner)
static
static int yy_init_globals ( yyscan_t  yyscanner)
static
static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state,
yyscan_t  yyscanner 
)
static
static void yyunput ( int  c,
char *  buf_ptr,
yyscan_t  yyscanner 
)
static

Variable Documentation

const flex_int16_t yy_accept[465]
static

Definition at line 379 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), yy_get_previous_state(), and yy_try_NUL_trans().

const flex_uint16_t yy_base[468]
static

Definition at line 475 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), yy_get_previous_state(), and yy_try_NUL_trans().

const flex_int16_t yy_chk[533]
static

Definition at line 648 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), yy_get_previous_state(), and yy_try_NUL_trans().

const flex_int16_t yy_def[468]
static

Definition at line 530 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), yy_get_previous_state(), and yy_try_NUL_trans().

const YY_CHAR yy_ec[256]
static

Definition at line 434 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), and yy_get_previous_state().

const YY_CHAR yy_meta[50]
static
Initial value:
=
{ 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
}

Definition at line 466 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), yy_get_previous_state(), and yy_try_NUL_trans().

const flex_uint16_t yy_nxt[533]
static

Definition at line 585 of file oct-tex-lexer.cc.

Referenced by octave_tex_lex(), yy_get_previous_state(), and yy_try_NUL_trans().