GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-tex-lexer.cc File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "unistd-wrappers.h"
#include "text-engine.h"
#include "oct-tex-parser.h"

Go to the source code of this file.

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 SIZE_MAX   (~(size_t)0)
 
#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_create_buffer   octave_tex__create_buffer
 
#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_delete_buffer   octave_tex__delete_buffer
 
#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   4
 
#define yy_flush_buffer   octave_tex__flush_buffer
 
#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
 
#define yy_init_buffer   octave_tex__init_buffer
 
#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_load_buffer_state   octave_tex__load_buffer_state
 
#define YY_MORE_ADJ   0
 
#define yy_new_buffer   yy_create_buffer
 
#define YY_NEW_FILE   yyrestart( 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)   ((YY_CHAR) (c))
 
#define yy_scan_buffer   octave_tex__scan_buffer
 
#define yy_scan_bytes   octave_tex__scan_bytes
 
#define yy_scan_string   octave_tex__scan_string
 
#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_switch_to_buffer   octave_tex__switch_to_buffer
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SCANNER_T
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define YY_USER_ACTION
 
#define yyalloc   octave_tex_alloc
 
#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
 
#define yyconst   const
 
#define yyensure_buffer_stack   octave_tex_ensure_buffer_stack
 
#define yyextra   yyg->yyextra_r
 
#define yyfree   octave_tex_free
 
#define yyget_column   octave_tex_get_column
 
#define yyget_debug   octave_tex_get_debug
 
#define yyget_extra   octave_tex_get_extra
 
#define yyget_in   octave_tex_get_in
 
#define yyget_leng   octave_tex_get_leng
 
#define yyget_lineno   octave_tex_get_lineno
 
#define yyget_lval   octave_tex_get_lval
 
#define yyget_out   octave_tex_get_out
 
#define yyget_text   octave_tex_get_text
 
#define yyguts_t   octave_tex_yyguts_t
 
#define yyin   yyg->yyin_r
 
#define yyleng   yyg->yyleng_r
 
#define yyless(n)
 
#define yyless(n)
 
#define yylex   octave_tex_lex
 
#define yylex_destroy   octave_tex_lex_destroy
 
#define yylex_init   octave_tex_lex_init
 
#define yylex_init_extra   octave_tex_lex_init_extra
 
#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 yypop_buffer_state   octave_tex_pop_buffer_state
 
#define yypush_buffer_state   octave_tex_push_buffer_state
 
#define yyrealloc   octave_tex_realloc
 
#define yyrestart   octave_tex_restart
 
#define yyset_column   octave_tex_set_column
 
#define yyset_debug   octave_tex_set_debug
 
#define yyset_extra   octave_tex_set_extra
 
#define yyset_in   octave_tex_set_in
 
#define yyset_lineno   octave_tex_set_lineno
 
#define yyset_lval   octave_tex_set_lval
 
#define yyset_out   octave_tex_set_out
 
#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
 
#define yywrap   octave_tex_wrap
 

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_state * YY_BUFFER_STATE
 
typedef flex_uint8_t YY_CHAR
 
typedef size_t yy_size_t
 
typedef int yy_state_type
 
typedef void * yyscan_t
 

Functions

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

Macro Definition Documentation

◆ BEGIN

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

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

◆ ECHO

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

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

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

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

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

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

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

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

◆ FLEX_BETA

#define FLEX_BETA

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

◆ FLEX_SCANNER

#define FLEX_SCANNER

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

◆ FLEXINT_H

#define FLEXINT_H

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

◆ INITIAL

#define INITIAL   0

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

◆ INT16_MAX

#define INT16_MAX   (32767)

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

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

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

◆ INT32_MAX

#define INT32_MAX   (2147483647)

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

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

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

◆ INT8_MAX

#define INT8_MAX   (127)

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

◆ INT8_MIN

#define INT8_MIN   (-128)

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

◆ isatty

#define isatty   octave_isatty_wrapper

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

◆ MAYBE_NUM_MODE

#define MAYBE_NUM_MODE   2

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

◆ NUM_MODE

#define NUM_MODE   1

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

◆ octave_tex_wrap

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

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

◆ register

#define register

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

◆ REJECT

#define REJECT   reject_used_but_not_detected

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

◆ SIZE_MAX

#define SIZE_MAX   (~(size_t)0)

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

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

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

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

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

◆ UINT8_MAX

#define UINT8_MAX   (255U)

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

◆ unput

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

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

◆ YY_AT_BOL

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

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

◆ YY_BREAK

#define YY_BREAK   /*LINTED*/break;

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

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

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

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

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

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

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

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

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

◆ yy_create_buffer

#define yy_create_buffer   octave_tex__create_buffer

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

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER
Value:
( yyg->yy_buffer_stack \
? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
: NULL)

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

◆ YY_CURRENT_BUFFER_LVALUE

#define YY_CURRENT_BUFFER_LVALUE   yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]

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

◆ YY_DECL

#define YY_DECL
Value:
int yylex \
(YYSTYPE * yylval_param , yyscan_t yyscanner)
void * yyscan_t
#define YYSTYPE
#define yylex

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

◆ YY_DECL_IS_OURS

#define YY_DECL_IS_OURS   1

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

◆ yy_delete_buffer

#define yy_delete_buffer   octave_tex__delete_buffer

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

◆ YY_DO_BEFORE_ACTION

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

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

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   129

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

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

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

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

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

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

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

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg , yyscanner)

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

◆ yy_flex_debug

#define yy_flex_debug   yyg->yy_flex_debug_r

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

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

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

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   6

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

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   4

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

◆ yy_flush_buffer

#define yy_flush_buffer   octave_tex__flush_buffer

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

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)

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

◆ yy_init_buffer

#define yy_init_buffer   octave_tex__init_buffer

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

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
int 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, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}\
\
octave_idx_type n
Definition: mx-inlines.cc:761
#define YY_CURRENT_BUFFER_LVALUE
#define yyin
size_t yy_size_t

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

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

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

◆ YY_LESS_LINENO

#define YY_LESS_LINENO (   n)

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

◆ YY_LINENO_REWIND_TO

#define YY_LINENO_REWIND_TO (   ptr)

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

◆ yy_load_buffer_state

#define yy_load_buffer_state   octave_tex__load_buffer_state

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

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   0

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

◆ yy_new_buffer

#define yy_new_buffer   yy_create_buffer

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

◆ YY_NEW_FILE

#define YY_NEW_FILE   yyrestart( yyin , yyscanner )

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

◆ YY_NO_UNISTD_H

#define YY_NO_UNISTD_H   1

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

◆ YY_NULL

#define YY_NULL   0

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

◆ YY_NUM_RULES

#define YY_NUM_RULES   128

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

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

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

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

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

◆ YY_RULE_SETUP

#define YY_RULE_SETUP    YY_USER_ACTION

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

◆ YY_SC_TO_UI

#define YY_SC_TO_UI (   c)    ((YY_CHAR) (c))

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

◆ yy_scan_buffer

#define yy_scan_buffer   octave_tex__scan_buffer

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

◆ yy_scan_bytes

#define yy_scan_bytes   octave_tex__scan_bytes

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

◆ yy_scan_string

#define yy_scan_string   octave_tex__scan_string

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

◆ yy_set_bol

#define yy_set_bol (   at_bol)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
#define YY_CURRENT_BUFFER
#define YY_BUF_SIZE

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

◆ yy_set_interactive

#define yy_set_interactive (   is_interactive)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (yyscanner); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}

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

◆ YY_SKIP_YYWRAP

#define YY_SKIP_YYWRAP

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

◆ YY_START

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

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

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

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

◆ YY_STATE_BUF_SIZE

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

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

◆ YY_STATE_EOF

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

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

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

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

◆ yy_switch_to_buffer

#define yy_switch_to_buffer   octave_tex__switch_to_buffer

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

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

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

◆ YY_TYPEDEF_YY_SCANNER_T

#define YY_TYPEDEF_YY_SCANNER_T

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

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

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

◆ YY_USER_ACTION

#define YY_USER_ACTION

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

◆ yyalloc

#define yyalloc   octave_tex_alloc

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

◆ yycolumn

#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

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

◆ yyconst

#define yyconst   const

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

◆ yyensure_buffer_stack

#define yyensure_buffer_stack   octave_tex_ensure_buffer_stack

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

◆ yyextra

#define yyextra   yyg->yyextra_r

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

◆ yyfree

#define yyfree   octave_tex_free

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

◆ yyget_column

#define yyget_column   octave_tex_get_column

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

◆ yyget_debug

#define yyget_debug   octave_tex_get_debug

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

◆ yyget_extra

#define yyget_extra   octave_tex_get_extra

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

◆ yyget_in

#define yyget_in   octave_tex_get_in

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

◆ yyget_leng

#define yyget_leng   octave_tex_get_leng

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

◆ yyget_lineno

#define yyget_lineno   octave_tex_get_lineno

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

◆ yyget_lval

#define yyget_lval   octave_tex_get_lval

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

◆ yyget_out

#define yyget_out   octave_tex_get_out

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

◆ yyget_text

#define yyget_text   octave_tex_get_text

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

◆ yyguts_t

#define yyguts_t   octave_tex_yyguts_t

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

◆ yyin

#define yyin   yyg->yyin_r

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

◆ yyleng

#define yyleng   yyg->yyleng_r

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

◆ yyless [1/2]

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

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

◆ yyless [2/2]

#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 )
#define yytext
#define yyleng

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

◆ yylex

#define yylex   octave_tex_lex

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

◆ yylex_destroy

#define yylex_destroy   octave_tex_lex_destroy

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

◆ yylex_init

#define yylex_init   octave_tex_lex_init

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

◆ yylex_init_extra

#define yylex_init_extra   octave_tex_lex_init_extra

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

◆ yylineno

#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

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

◆ yylval

#define yylval   yyg->yylval_r

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

◆ yymore

#define yymore ( )    yymore_used_but_not_detected

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

◆ yynoreturn

#define yynoreturn

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

◆ yyout

#define yyout   yyg->yyout_r

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

◆ yypop_buffer_state

#define yypop_buffer_state   octave_tex_pop_buffer_state

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

◆ yypush_buffer_state

#define yypush_buffer_state   octave_tex_push_buffer_state

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

◆ yyrealloc

#define yyrealloc   octave_tex_realloc

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

◆ yyrestart

#define yyrestart   octave_tex_restart

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

◆ yyset_column

#define yyset_column   octave_tex_set_column

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

◆ yyset_debug

#define yyset_debug   octave_tex_set_debug

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

◆ yyset_extra

#define yyset_extra   octave_tex_set_extra

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

◆ yyset_in

#define yyset_in   octave_tex_set_in

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

◆ yyset_lineno

#define yyset_lineno   octave_tex_set_lineno

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

◆ yyset_lval

#define yyset_lval   octave_tex_set_lval

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

◆ yyset_out

#define yyset_out   octave_tex_set_out

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

◆ YYSTATE

#define YYSTATE   YY_START

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

◆ YYSTYPE

#define YYSTYPE   OCTAVE_TEX_STYPE

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

◆ YYTABLES_NAME

#define YYTABLES_NAME   "yytables"

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

◆ yyterminate

#define yyterminate ( )    return YY_NULL

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

◆ yytext

#define yytext   yyg->yytext_r

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

◆ yytext_ptr

#define yytext_ptr   yytext_r

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

◆ yywrap

#define yywrap   octave_tex_wrap

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

Typedef Documentation

◆ flex_int16_t

typedef short int flex_int16_t

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

◆ flex_int32_t

typedef int flex_int32_t

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

◆ flex_int8_t

typedef signed char flex_int8_t

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

◆ flex_uint16_t

typedef unsigned short int flex_uint16_t

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

◆ flex_uint32_t

typedef unsigned int flex_uint32_t

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

◆ flex_uint8_t

typedef unsigned char flex_uint8_t

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

◆ YY_BUFFER_STATE

typedef struct yy_buffer_state* YY_BUFFER_STATE

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

◆ YY_CHAR

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

◆ yy_size_t

typedef size_t yy_size_t

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

◆ yy_state_type

typedef int yy_state_type

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

◆ yyscan_t

typedef void* yyscan_t

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

Function Documentation

◆ octave_tex__create_buffer()

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 2533 of file oct-tex-lexer.cc.

References YY_FATAL_ERROR, yy_init_buffer, and yyalloc.

◆ octave_tex__delete_buffer()

void octave_tex__delete_buffer ( YY_BUFFER_STATE  b,
yyscan_t  yyscanner 
)

Destroy the buffer.

Parameters
ba buffer created with yy_create_buffer()
yyscannerThe scanner object.

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

References YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yyfree, and yyguts_t.

◆ octave_tex__flush_buffer()

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 2610 of file oct-tex-lexer.cc.

References YY_BUFFER_NEW, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, yy_load_buffer_state, and yyguts_t.

◆ octave_tex__scan_buffer()

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 2741 of file oct-tex-lexer.cc.

References YY_BUFFER_NEW, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_switch_to_buffer, and yyalloc.

◆ 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 yylex() 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 2791 of file oct-tex-lexer.cc.

References n, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_scan_buffer, and yyalloc.

◆ 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 yylex() 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 yy_scan_bytes() instead.

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

References strlen(), and yy_scan_bytes.

◆ octave_tex__switch_to_buffer()

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 2486 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_load_buffer_state, yyensure_buffer_stack, and yyguts_t.

◆ octave_tex_alloc()

void * octave_tex_alloc ( yy_size_t  size,
yyscan_t  yyscanner 
)

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

References malloc().

◆ octave_tex_free()

void octave_tex_free ( void *  ptr,
yyscan_t  yyscanner 
)

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

References free().

◆ octave_tex_get_column()

int octave_tex_get_column ( yyscan_t  yyscanner)

Get the current column number.

Parameters
yyscannerThe scanner object.

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

References YY_CURRENT_BUFFER, yycolumn, and yyguts_t.

◆ octave_tex_get_debug()

int octave_tex_get_debug ( yyscan_t  yyscanner)

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

References yy_flex_debug, and yyguts_t.

◆ octave_tex_get_extra()

void * octave_tex_get_extra ( yyscan_t  yyscanner)

Get the user-defined data for this scanner.

Parameters
yyscannerThe scanner object.

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

References yyextra, and yyguts_t.

◆ octave_tex_get_in()

FILE * octave_tex_get_in ( yyscan_t  yyscanner)

Get the input stream.

Parameters
yyscannerThe scanner object.

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

References yyguts_t, and yyin.

◆ octave_tex_get_leng()

int octave_tex_get_leng ( yyscan_t  yyscanner)

Get the length of the current token.

Parameters
yyscannerThe scanner object.

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

References yyguts_t, and yyleng.

◆ octave_tex_get_lineno()

int octave_tex_get_lineno ( yyscan_t  yyscanner)

Get the current line number.

Parameters
yyscannerThe scanner object.

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

References YY_CURRENT_BUFFER, yyguts_t, and yylineno.

◆ octave_tex_get_lval()

OCTAVE_TEX_STYPE * octave_tex_get_lval ( yyscan_t  yyscanner)

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

References yyguts_t, and yylval.

◆ octave_tex_get_out()

FILE * octave_tex_get_out ( yyscan_t  yyscanner)

Get the output stream.

Parameters
yyscannerThe scanner object.

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

References yyguts_t, and yyout.

◆ octave_tex_get_text()

char * octave_tex_get_text ( yyscan_t  yyscanner)

Get the current token.

Parameters
yyscannerThe scanner object.

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

References yyguts_t, and yytext.

◆ octave_tex_lex()

int octave_tex_lex ( OCTAVE_TEX_STYPE yylval_param,
yyscan_t  yyscanner 
)

The main scanner function which does all the work.

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

References YY_BUF_SIZE, yy_create_buffer, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_load_buffer_state, yyensure_buffer_stack, yyguts_t, yyin, yylval, and yyout.

◆ octave_tex_lex_destroy()

int octave_tex_lex_destroy ( yyscan_t  yyscanner)

◆ octave_tex_lex_init()

int octave_tex_lex_init ( yyscan_t scanner)

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

References yyalloc, and yyguts_t.

◆ octave_tex_lex_init_extra()

int octave_tex_lex_init_extra ( void *  user_defined,
yyscan_t scanner 
)

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

References yyalloc, yyguts_t, and yyset_extra.

◆ octave_tex_pop_buffer_state()

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 2671 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer, yy_load_buffer_state, and yyguts_t.

◆ octave_tex_push_buffer_state()

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 2640 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_load_buffer_state, yyensure_buffer_stack, and yyguts_t.

◆ octave_tex_realloc()

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

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

◆ octave_tex_restart()

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 2468 of file oct-tex-lexer.cc.

References YY_BUF_SIZE, yy_create_buffer, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init_buffer, yy_load_buffer_state, yyensure_buffer_stack, yyguts_t, and yyin.

◆ octave_tex_set_column()

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 2953 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, YY_FATAL_ERROR, yycolumn, and yyguts_t.

◆ octave_tex_set_debug()

void octave_tex_set_debug ( int  debug_flag,
yyscan_t  yyscanner 
)

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

References yy_flex_debug, and yyguts_t.

◆ octave_tex_set_extra()

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 2928 of file oct-tex-lexer.cc.

References yyextra, and yyguts_t.

◆ octave_tex_set_in()

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
yy_switch_to_buffer

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

References yyguts_t, and yyin.

◆ octave_tex_set_lineno()

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 2938 of file oct-tex-lexer.cc.

References YY_CURRENT_BUFFER, YY_FATAL_ERROR, yyguts_t, and yylineno.

◆ octave_tex_set_lval()

void octave_tex_set_lval ( OCTAVE_TEX_STYPE yylval_param,
yyscan_t  yyscanner 
)

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

References yyguts_t, and yylval.

◆ octave_tex_set_out()

void octave_tex_set_out ( FILE *  _out_str,
yyscan_t  yyscanner 
)

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

References yyguts_t, and yyout.