GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
lex.cc File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <cctype>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <set>
#include <sstream>
#include <string>
#include <stack>
#include "cmd-edit.h"
#include "lo-mappers.h"
#include "quit.h"
#include "unistd-wrappers.h"
#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "input.h"
#include "interpreter.h"
#include "lex.h"
#include "octave.h"
#include "ov-magic-int.h"
#include "ov.h"
#include "parse.h"
#include "pt-all.h"
#include "symtab.h"
#include "token.h"
#include "utils.h"
#include "variables.h"
#include "oct-parse.h"
#include "oct-gperf.h"
Include dependency graph for lex.cc:

Go to the source code of this file.

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 
struct  yyguts_t
 

Macros

#define BEGIN   yyg->yy_start = 1 + 2 *
 
#define BLOCK_COMMENT_START   4
 
#define CMD_OR_DEPRECATED_OP(PATTERN, REPLACEMENT, VERSION, TOK)
 
#define CMD_OR_OP(PATTERN, TOK, COMPAT)
 
#define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT)
 
#define COMMAND_START   1
 
#define curr_lexer   yyextra
 
#define DQ_STRING_START   6
 
#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 FQ_IDENT_START   8
 
#define HANDLE_EOB_OR_EOF(STATUS)
 
#define HANDLE_IDENTIFIER(pattern, get_set)
 
#define HANDLE_NUMBER(PATTERN, BASE)
 
#define HANDLE_STRING_CONTINUATION
 
#define INITIAL   0
 
#define INPUT_FILE_START   3
 
#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 LINE_COMMENT_START   5
 
#define MATRIX_START   2
 
#define octave_wrap(yyscanner)   (/*CONSTCOND*/1)
 
#define OCTAVE_YYG    struct yyguts_t *yyg = static_cast<struct yyguts_t*> (m_scanner)
 
#define register
 
#define REJECT   reject_used_but_not_detected
 
#define SIZE_MAX   (~(size_t)0)
 
#define SQ_STRING_START   7
 
#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__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__delete_buffer
 
#define YY_DO_BEFORE_ACTION
 
#define YY_END_OF_BUFFER   125
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_EXIT_FAILURE   2
 
#define YY_EXTRA_TYPE   octave::base_lexer *
 
#define YY_FATAL_ERROR(msg)    (yyget_extra (yyscanner))->fatal_error (msg)
 
#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__flush_buffer
 
#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)
 
#define yy_init_buffer   octave__init_buffer
 
#define YY_INPUT(buf, result, max_size)    result = curr_lexer->fill_flex_buffer (buf, 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__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   124
 
#define YY_READ_BUF_SIZE   8192
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_RULE_SETUP
 
#define YY_SC_TO_UI(c)   ((YY_CHAR) (c))
 
#define yy_scan_buffer   octave__scan_buffer
 
#define yy_scan_bytes   octave__scan_bytes
 
#define yy_scan_string   octave__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__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_alloc
 
#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
 
#define yyconst   const
 
#define yyensure_buffer_stack   octave_ensure_buffer_stack
 
#define yyextra   yyg->yyextra_r
 
#define yyfree   octave_free
 
#define yyget_column   octave_get_column
 
#define yyget_debug   octave_get_debug
 
#define yyget_extra   octave_get_extra
 
#define yyget_in   octave_get_in
 
#define yyget_leng   octave_get_leng
 
#define yyget_lineno   octave_get_lineno
 
#define yyget_lval   octave_get_lval
 
#define yyget_out   octave_get_out
 
#define yyget_text   octave_get_text
 
#define yyin   yyg->yyin_r
 
#define yyleng   yyg->yyleng_r
 
#define yyless(n)
 
#define yyless(n)
 
#define yylex   octave_lex
 
#define yylex_destroy   octave_lex_destroy
 
#define yylex_init   octave_lex_init
 
#define yylex_init_extra   octave_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_pop_buffer_state
 
#define yypush_buffer_state   octave_push_buffer_state
 
#define yyrealloc   octave_realloc
 
#define yyrestart   octave_restart
 
#define yyset_column   octave_set_column
 
#define yyset_debug   octave_set_debug
 
#define yyset_extra   octave_set_extra
 
#define yyset_in   octave_set_in
 
#define yyset_lineno   octave_set_lineno
 
#define yyset_lval   octave_set_lval
 
#define yyset_out   octave_set_out
 
#define YYSTATE   YY_START
 
#define YYSTYPE   OCTAVE_STYPE
 
#define YYTABLES_NAME   "yytables"
 
#define yyterminate()   return YY_NULL
 
#define yytext   yyg->yytext_r
 
#define yytext_ptr   yytext_r
 
#define yywrap   octave_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_stateYY_BUFFER_STATE
 
typedef flex_uint8_t YY_CHAR
 
typedef size_t yy_size_t
 
typedef int yy_state_type
 
typedef void * yyscan_t
 

Functions

static void display_character (char c)
 
OCTAVE_EXPORT octave_value_list Fiskeyword (const octave_value_list &args, int)
 
static uint64_t flintmax (void)
 
static int input (yyscan_t yyscanner)
 
static bool is_space_or_tab (char c)
 
static bool is_space_or_tab_or_eol (char c)
 
bool iskeyword (const std::string &s)
 
static bool looks_like_bin (const char *s, int len)
 
static bool looks_like_copyright (const std::string &s)
 
static bool looks_like_hex (const char *s, int len)
 
static bool looks_like_shebang (const std::string &s)
 
static octave_value make_integer_value (uintmax_t long_int_val, bool unsigned_val, int bytes)
 
YY_BUFFER_STATE octave__create_buffer (FILE *file, int size, yyscan_t yyscanner)
 Allocate and initialize an input buffer state. More...
 
void octave__delete_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
 Destroy the buffer. More...
 
void octave__flush_buffer (YY_BUFFER_STATE b, yyscan_t yyscanner)
 Discard all buffered characters. More...
 
static void octave__init_buffer (YY_BUFFER_STATE b, FILE *file, yyscan_t yyscanner)
 
static void octave__load_buffer_state (yyscan_t yyscanner)
 
YY_BUFFER_STATE octave__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__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__scan_string (const char *yystr, yyscan_t yyscanner)
 Setup the input buffer state to scan a string. More...
 
void octave__switch_to_buffer (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
 Switch to a different input buffer. More...
 
void * octave_alloc (yy_size_t, yyscan_t yyscanner)
 
static void octave_ensure_buffer_stack (yyscan_t yyscanner)
 
void octave_free (void *, yyscan_t yyscanner)
 
int octave_get_column (yyscan_t yyscanner)
 Get the current column number. More...
 
int octave_get_debug (yyscan_t yyscanner)
 
octave::base_lexer * octave_get_extra (yyscan_t yyscanner)
 Get the user-defined data for this scanner. More...
 
FILE * octave_get_in (yyscan_t yyscanner)
 Get the input stream. More...
 
int octave_get_leng (yyscan_t yyscanner)
 Get the length of the current token. More...
 
int octave_get_lineno (yyscan_t yyscanner)
 Get the current line number. More...
 
OCTAVE_STYPEoctave_get_lval (yyscan_t yyscanner)
 
FILE * octave_get_out (yyscan_t yyscanner)
 Get the output stream. More...
 
char * octave_get_text (yyscan_t yyscanner)
 Get the current token. More...
 
int octave_lex (OCTAVE_STYPE *yylval_param, yyscan_t yyscanner)
 The main scanner function which does all the work. More...
 
int octave_lex_destroy (yyscan_t yyscanner)
 
int octave_lex_init (yyscan_t *scanner)
 
int octave_lex_init_extra (octave::base_lexer *user_defined, yyscan_t *scanner)
 
void octave_pop_buffer_state (yyscan_t yyscanner)
 Removes and deletes the top of the stack, if present. More...
 
void octave_push_buffer_state (YY_BUFFER_STATE new_buffer, yyscan_t yyscanner)
 Pushes the new state onto the stack. More...
 
void * octave_realloc (void *, yy_size_t, yyscan_t yyscanner)
 
void octave_restart (FILE *input_file, yyscan_t yyscanner)
 Immediately switch to a different input stream. More...
 
void octave_set_column (int _column_no, yyscan_t yyscanner)
 Set the current column. More...
 
void octave_set_debug (int debug_flag, yyscan_t yyscanner)
 
void octave_set_extra (octave::base_lexer *user_defined, yyscan_t yyscanner)
 Set the user-defined data. More...
 
void octave_set_in (FILE *_in_str, yyscan_t yyscanner)
 Set the input stream. More...
 
void octave_set_lineno (int _line_number, yyscan_t yyscanner)
 Set the current line number. More...
 
void octave_set_lval (OCTAVE_STYPE *yylval_param, yyscan_t yyscanner)
 
void octave_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 [314]
 
static const flex_int16_t yy_base [358]
 
static const flex_int16_t yy_chk [1288]
 
static const flex_int16_t yy_def [358]
 
static const YY_CHAR yy_ec [256]
 
static const YY_CHAR yy_meta [61]
 
static const flex_int16_t yy_nxt [1288]
 

Macro Definition Documentation

◆ BEGIN

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

Definition at line 406 of file lex.cc.

◆ BLOCK_COMMENT_START

#define BLOCK_COMMENT_START   4

Definition at line 1402 of file lex.cc.

◆ CMD_OR_DEPRECATED_OP

#define CMD_OR_DEPRECATED_OP (   PATTERN,
  REPLACEMENT,
  VERSION,
  TOK 
)
Value:
do \
{ \
curr_lexer->lexer_debug (PATTERN); \
\
if (curr_lexer->looks_like_command_arg ()) \
{ \
yyless (0); \
curr_lexer->push_start_state (COMMAND_START); \
} \
else \
{ \
curr_lexer->warn_deprecated_operator (PATTERN, REPLACEMENT, \
#VERSION); \
/* set COMPAT to true here to avoid warning about \
compatibility since we've already warned about the \
operator being deprecated. */ \
return curr_lexer->handle_op (TOK, false, true); \
} \
} \
while (0)
#define COMMAND_START
Definition: lex.cc:1399
#define curr_lexer
Definition: lex.cc:1171

Definition at line 1204 of file lex.cc.

◆ CMD_OR_OP

#define CMD_OR_OP (   PATTERN,
  TOK,
  COMPAT 
)
Value:
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 (TOK, false, COMPAT); \
} \
while (0)

Definition at line 1189 of file lex.cc.

◆ CMD_OR_UNARY_OP

#define CMD_OR_UNARY_OP (   PATTERN,
  TOK,
  COMPAT 
)
Value:
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 (TOK, false, COMPAT); \
} \
else \
{ \
if (curr_lexer->maybe_unput_comma_before_unary_op (TOK)) \
{ \
yyless (0); \
curr_lexer->xunput (','); \
} \
else \
return curr_lexer->handle_op (TOK, false, COMPAT); \
} \
} \
while (0)

Definition at line 1224 of file lex.cc.

◆ COMMAND_START

#define COMMAND_START   1

Definition at line 1399 of file lex.cc.

◆ curr_lexer

#define curr_lexer   yyextra

Definition at line 1171 of file lex.cc.

◆ DQ_STRING_START

#define DQ_STRING_START   6

Definition at line 1404 of file lex.cc.

◆ ECHO

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

Definition at line 1553 of file lex.cc.

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 446 of file lex.cc.

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 447 of file lex.cc.

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 448 of file lex.cc.

◆ FLEX_BETA

#define FLEX_BETA

Definition at line 63 of file lex.cc.

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 58 of file lex.cc.

◆ FLEXINT_H

#define FLEXINT_H

Definition at line 301 of file lex.cc.

◆ FQ_IDENT_START

#define FQ_IDENT_START   8

Definition at line 1406 of file lex.cc.

◆ HANDLE_EOB_OR_EOF

#define HANDLE_EOB_OR_EOF (   STATUS)
Value:
do \
{ \
if (curr_lexer->is_push_lexer ()) \
{ \
if (curr_lexer->at_end_of_buffer ()) \
return STATUS; \
\
if (curr_lexer->at_end_of_file ()) \
return curr_lexer->handle_end_of_input (); \
} \
} \
while (0)

Definition at line 1252 of file lex.cc.

◆ HANDLE_IDENTIFIER

#define HANDLE_IDENTIFIER (   pattern,
  get_set 
)

Definition at line 1307 of file lex.cc.

◆ HANDLE_NUMBER

#define HANDLE_NUMBER (   PATTERN,
  BASE 
)
Value:
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 \
{ \
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); \
curr_lexer->xunput (','); \
} \
else \
return curr_lexer->handle_number<BASE> (); \
} \
} \
while (0)

Definition at line 1278 of file lex.cc.

◆ HANDLE_STRING_CONTINUATION

#define HANDLE_STRING_CONTINUATION
Value:
do \
{ \
curr_lexer->m_filepos.next_line (); \
} \
while (0)
#define HANDLE_EOB_OR_EOF(STATUS)
Definition: lex.cc:1252

Definition at line 1269 of file lex.cc.

◆ INITIAL

#define INITIAL   0

Definition at line 1398 of file lex.cc.

◆ INPUT_FILE_START

#define INPUT_FILE_START   3

Definition at line 1401 of file lex.cc.

◆ INT16_MAX

#define INT16_MAX   (32767)

Definition at line 343 of file lex.cc.

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

Definition at line 334 of file lex.cc.

◆ INT32_MAX

#define INT32_MAX   (2147483647)

Definition at line 346 of file lex.cc.

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

Definition at line 337 of file lex.cc.

◆ INT8_MAX

#define INT8_MAX   (127)

Definition at line 340 of file lex.cc.

◆ INT8_MIN

#define INT8_MIN   (-128)

Definition at line 331 of file lex.cc.

◆ isatty

#define isatty   octave_isatty_wrapper

Definition at line 1162 of file lex.cc.

◆ LINE_COMMENT_START

#define LINE_COMMENT_START   5

Definition at line 1403 of file lex.cc.

◆ MATRIX_START

#define MATRIX_START   2

Definition at line 1400 of file lex.cc.

◆ octave_wrap

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

Definition at line 591 of file lex.cc.

◆ OCTAVE_YYG

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

Definition at line 5376 of file lex.cc.

◆ register

#define register

Definition at line 49 of file lex.cc.

◆ REJECT

#define REJECT   reject_used_but_not_detected

Definition at line 1082 of file lex.cc.

◆ SIZE_MAX

#define SIZE_MAX   (~(size_t)0)

Definition at line 359 of file lex.cc.

◆ SQ_STRING_START

#define SQ_STRING_START   7

Definition at line 1405 of file lex.cc.

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

Definition at line 352 of file lex.cc.

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

Definition at line 355 of file lex.cc.

◆ UINT8_MAX

#define UINT8_MAX   (255U)

Definition at line 349 of file lex.cc.

◆ unput

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

Definition at line 466 of file lex.cc.

◆ YY_AT_BOL

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 587 of file lex.cc.

◆ YY_BREAK

#define YY_BREAK   /*LINTED*/break;

Definition at line 1634 of file lex.cc.

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Definition at line 428 of file lex.cc.

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

Definition at line 528 of file lex.cc.

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 516 of file lex.cc.

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 517 of file lex.cc.

◆ yy_create_buffer

#define yy_create_buffer   octave__create_buffer

Definition at line 69 of file lex.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 539 of file lex.cc.

◆ YY_CURRENT_BUFFER_LVALUE

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

Definition at line 545 of file lex.cc.

◆ YY_DECL

#define YY_DECL
Value:
int yylex \
(YYSTYPE * yylval_param , yyscan_t yyscanner)
#define YYSTYPE
Definition: lex.cc:1158
#define yylex
Definition: lex.cc:141
void * yyscan_t

Definition at line 1621 of file lex.cc.

◆ YY_DECL_IS_OURS

#define YY_DECL_IS_OURS   1

Definition at line 1616 of file lex.cc.

◆ yy_delete_buffer

#define yy_delete_buffer   octave__delete_buffer

Definition at line 75 of file lex.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 607 of file lex.cc.

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   125

Definition at line 614 of file lex.cc.

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 417 of file lex.cc.

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

Definition at line 4499 of file lex.cc.

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   octave::base_lexer *

Definition at line 1170 of file lex.cc.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)     (yyget_extra (yyscanner))->fatal_error (msg)

Definition at line 1186 of file lex.cc.

◆ yy_flex_debug

#define yy_flex_debug   yyg->yy_flex_debug_r

Definition at line 400 of file lex.cc.

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 59 of file lex.cc.

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   6

Definition at line 60 of file lex.cc.

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   4

Definition at line 61 of file lex.cc.

◆ yy_flush_buffer

#define yy_flush_buffer   octave__flush_buffer

Definition at line 105 of file lex.cc.

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER , yyscanner)

Definition at line 558 of file lex.cc.

◆ yy_init_buffer

#define yy_init_buffer   octave__init_buffer

Definition at line 99 of file lex.cc.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)     result = curr_lexer->fill_flex_buffer (buf, max_size)

Definition at line 1178 of file lex.cc.

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

Definition at line 54 of file lex.cc.

◆ YY_LESS_LINENO

#define YY_LESS_LINENO (   n)

Definition at line 450 of file lex.cc.

◆ YY_LINENO_REWIND_TO

#define YY_LINENO_REWIND_TO (   ptr)

Definition at line 451 of file lex.cc.

◆ yy_load_buffer_state

#define yy_load_buffer_state   octave__load_buffer_state

Definition at line 111 of file lex.cc.

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   0

Definition at line 1084 of file lex.cc.

◆ yy_new_buffer

#define yy_new_buffer   yy_create_buffer

Definition at line 568 of file lex.cc.

◆ YY_NEW_FILE

#define YY_NEW_FILE   yyrestart( yyin , yyscanner )

Definition at line 416 of file lex.cc.

◆ YY_NO_UNISTD_H

#define YY_NO_UNISTD_H   1

Definition at line 1161 of file lex.cc.

◆ YY_NULL

#define YY_NULL   0

Definition at line 378 of file lex.cc.

◆ YY_NUM_RULES

#define YY_NUM_RULES   124

Definition at line 613 of file lex.cc.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 1544 of file lex.cc.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 1085 of file lex.cc.

◆ YY_RULE_SETUP

#define YY_RULE_SETUP
Value:
if ( yyleng > 0 ) \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
#define yytext
Definition: lex.cc:397
#define yyleng
Definition: lex.cc:396

Definition at line 1637 of file lex.cc.

◆ YY_SC_TO_UI

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

Definition at line 383 of file lex.cc.

◆ yy_scan_buffer

#define yy_scan_buffer   octave__scan_buffer

Definition at line 81 of file lex.cc.

◆ yy_scan_bytes

#define yy_scan_bytes   octave__scan_bytes

Definition at line 93 of file lex.cc.

◆ yy_scan_string

#define yy_scan_string   octave__scan_string

Definition at line 87 of file lex.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
Definition: lex.cc:539
#define yyin
Definition: lex.cc:393
#define YY_BUF_SIZE
Definition: lex.cc:428

Definition at line 578 of file lex.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 569 of file lex.cc.

◆ YY_SKIP_YYWRAP

#define YY_SKIP_YYWRAP

Definition at line 592 of file lex.cc.

◆ YY_START

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

Definition at line 411 of file lex.cc.

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Definition at line 1602 of file lex.cc.

◆ YY_STATE_BUF_SIZE

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

Definition at line 434 of file lex.cc.

◆ YY_STATE_EOF

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

Definition at line 414 of file lex.cc.

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 469 of file lex.cc.

◆ yy_switch_to_buffer

#define yy_switch_to_buffer   octave__switch_to_buffer

Definition at line 117 of file lex.cc.

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 437 of file lex.cc.

◆ YY_TYPEDEF_YY_SCANNER_T

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 387 of file lex.cc.

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 442 of file lex.cc.

◆ YY_USER_ACTION

#define YY_USER_ACTION

Definition at line 1629 of file lex.cc.

◆ yyalloc

#define yyalloc   octave_alloc

Definition at line 273 of file lex.cc.

◆ yycolumn

#define yycolumn   (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)

Definition at line 399 of file lex.cc.

◆ yyconst

#define yyconst   const

Definition at line 369 of file lex.cc.

◆ yyensure_buffer_stack

#define yyensure_buffer_stack   octave_ensure_buffer_stack

Definition at line 135 of file lex.cc.

◆ yyextra

#define yyextra   yyg->yyextra_r

Definition at line 395 of file lex.cc.

◆ yyfree

#define yyfree   octave_free

Definition at line 285 of file lex.cc.

◆ yyget_column

#define yyget_column   octave_get_column

Definition at line 243 of file lex.cc.

◆ yyget_debug

#define yyget_debug   octave_get_debug

Definition at line 171 of file lex.cc.

◆ yyget_extra

#define yyget_extra   octave_get_extra

Definition at line 183 of file lex.cc.

◆ yyget_in

#define yyget_in   octave_get_in

Definition at line 195 of file lex.cc.

◆ yyget_leng

#define yyget_leng   octave_get_leng

Definition at line 219 of file lex.cc.

◆ yyget_lineno

#define yyget_lineno   octave_get_lineno

Definition at line 231 of file lex.cc.

◆ yyget_lval

#define yyget_lval   octave_get_lval

Definition at line 261 of file lex.cc.

◆ yyget_out

#define yyget_out   octave_get_out

Definition at line 207 of file lex.cc.

◆ yyget_text

#define yyget_text   octave_get_text

Definition at line 225 of file lex.cc.

◆ yyin

#define yyin   yyg->yyin_r

Definition at line 393 of file lex.cc.

◆ yyleng

#define yyleng   yyg->yyleng_r

Definition at line 396 of file lex.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: lex.cc:1084
octave_idx_type n
Definition: mx-inlines.cc:753

Definition at line 4513 of file lex.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 )

Definition at line 4513 of file lex.cc.

◆ yylex

#define yylex   octave_lex

Definition at line 141 of file lex.cc.

◆ yylex_destroy

#define yylex_destroy   octave_lex_destroy

Definition at line 165 of file lex.cc.

◆ yylex_init

#define yylex_init   octave_lex_init

Definition at line 153 of file lex.cc.

◆ yylex_init_extra

#define yylex_init_extra   octave_lex_init_extra

Definition at line 159 of file lex.cc.

◆ yylineno

#define yylineno   (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)

Definition at line 398 of file lex.cc.

◆ yylval

#define yylval   yyg->yylval_r

Definition at line 1460 of file lex.cc.

◆ yymore

#define yymore ( )    yymore_used_but_not_detected

Definition at line 1083 of file lex.cc.

◆ yynoreturn

#define yynoreturn

Definition at line 374 of file lex.cc.

◆ yyout

#define yyout   yyg->yyout_r

Definition at line 394 of file lex.cc.

◆ yypop_buffer_state

#define yypop_buffer_state   octave_pop_buffer_state

Definition at line 129 of file lex.cc.

◆ yypush_buffer_state

#define yypush_buffer_state   octave_push_buffer_state

Definition at line 123 of file lex.cc.

◆ yyrealloc

#define yyrealloc   octave_realloc

Definition at line 279 of file lex.cc.

◆ yyrestart

#define yyrestart   octave_restart

Definition at line 147 of file lex.cc.

◆ yyset_column

#define yyset_column   octave_set_column

Definition at line 249 of file lex.cc.

◆ yyset_debug

#define yyset_debug   octave_set_debug

Definition at line 177 of file lex.cc.

◆ yyset_extra

#define yyset_extra   octave_set_extra

Definition at line 189 of file lex.cc.

◆ yyset_in

#define yyset_in   octave_set_in

Definition at line 201 of file lex.cc.

◆ yyset_lineno

#define yyset_lineno   octave_set_lineno

Definition at line 237 of file lex.cc.

◆ yyset_lval

#define yyset_lval   octave_set_lval

Definition at line 267 of file lex.cc.

◆ yyset_out

#define yyset_out   octave_set_out

Definition at line 213 of file lex.cc.

◆ YYSTATE

#define YYSTATE   YY_START

Definition at line 412 of file lex.cc.

◆ YYSTYPE

#define YYSTYPE   OCTAVE_STYPE

Definition at line 1158 of file lex.cc.

◆ YYTABLES_NAME

#define YYTABLES_NAME   "yytables"

Definition at line 4835 of file lex.cc.

◆ yyterminate

#define yyterminate ( )    return YY_NULL

Definition at line 1597 of file lex.cc.

◆ yytext

#define yytext   yyg->yytext_r

Definition at line 397 of file lex.cc.

◆ yytext_ptr

#define yytext_ptr   yytext_r

Definition at line 597 of file lex.cc.

◆ yywrap

#define yywrap   octave_wrap

Definition at line 255 of file lex.cc.

Typedef Documentation

◆ flex_int16_t

typedef short int flex_int16_t

Definition at line 323 of file lex.cc.

◆ flex_int32_t

typedef int flex_int32_t

Definition at line 324 of file lex.cc.

◆ flex_int8_t

typedef signed char flex_int8_t

Definition at line 322 of file lex.cc.

◆ flex_uint16_t

typedef unsigned short int flex_uint16_t

Definition at line 326 of file lex.cc.

◆ flex_uint32_t

typedef unsigned int flex_uint32_t

Definition at line 327 of file lex.cc.

◆ flex_uint8_t

typedef unsigned char flex_uint8_t

Definition at line 325 of file lex.cc.

◆ YY_BUFFER_STATE

Definition at line 438 of file lex.cc.

◆ YY_CHAR

Definition at line 593 of file lex.cc.

◆ yy_size_t

typedef size_t yy_size_t

Definition at line 443 of file lex.cc.

◆ yy_state_type

typedef int yy_state_type

Definition at line 595 of file lex.cc.

◆ yyscan_t

typedef void* yyscan_t

Definition at line 388 of file lex.cc.

Function Documentation

◆ display_character()

static void display_character ( char  c)
static

Definition at line 4864 of file lex.cc.

Referenced by base_lexer::text_yyinput(), and base_lexer::xunput().

◆ Fiskeyword()

◆ flintmax()

static uint64_t flintmax ( void  )
static

Definition at line 6019 of file lex.cc.

Referenced by base_lexer::handle_number().

◆ input()

◆ is_space_or_tab()

◆ is_space_or_tab_or_eol()

static bool is_space_or_tab_or_eol ( char  c)
inlinestatic

Definition at line 1352 of file lex.cc.

◆ iskeyword()

◆ looks_like_bin()

static bool looks_like_bin ( const char *  s,
int  len 
)
inlinestatic

Definition at line 5870 of file lex.cc.

References len.

◆ looks_like_copyright()

static bool looks_like_copyright ( const std::string &  s)
static

Definition at line 5267 of file lex.cc.

Referenced by base_lexer::finish_comment().

◆ looks_like_hex()

static bool looks_like_hex ( const char *  s,
int  len 
)
inlinestatic

Definition at line 5876 of file lex.cc.

References len.

◆ looks_like_shebang()

static bool looks_like_shebang ( const std::string &  s)
static

Definition at line 5284 of file lex.cc.

Referenced by base_lexer::finish_comment().

◆ make_integer_value()

static octave_value make_integer_value ( uintmax_t  long_int_val,
bool  unsigned_val,
int  bytes 
)
inlinestatic

Definition at line 5882 of file lex.cc.

References octave_value(), and panic_impossible.

Referenced by base_lexer::handle_number().

◆ octave__create_buffer()

YY_BUFFER_STATE octave__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 4210 of file lex.cc.

References yy_buffer_state::yy_buf_size, yy_buffer_state::yy_ch_buf, YY_FATAL_ERROR, yy_init_buffer, yy_buffer_state::yy_is_our_buffer, and yyalloc.

◆ octave__delete_buffer()

void octave__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 4238 of file lex.cc.

References yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_buffer_state::yy_is_our_buffer, and yyfree.

◆ octave__flush_buffer()

void octave__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 4287 of file lex.cc.

References 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, yy_load_buffer_state, and yy_buffer_state::yy_n_chars.

◆ octave__init_buffer()

◆ octave__load_buffer_state()

static void octave__load_buffer_state ( yyscan_t  yyscanner)
static

Definition at line 4195 of file lex.cc.

◆ octave__scan_buffer()

YY_BUFFER_STATE octave__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 4418 of file lex.cc.

References 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, yy_buffer_state::yy_n_chars, yy_switch_to_buffer, and yyalloc.

◆ octave__scan_bytes()

YY_BUFFER_STATE octave__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 4468 of file lex.cc.

References n, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_buffer_state::yy_is_our_buffer, yy_scan_buffer, and yyalloc.

◆ octave__scan_string()

YY_BUFFER_STATE octave__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 4455 of file lex.cc.

References strlen(), and yy_scan_bytes.

◆ octave__switch_to_buffer()

void octave__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 4163 of file lex.cc.

References 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, yy_load_buffer_state, yyguts_t::yy_n_chars, and yyensure_buffer_stack.

◆ octave_alloc()

void * octave_alloc ( yy_size_t  size,
yyscan_t  yyscanner 
)

Definition at line 4846 of file lex.cc.

References malloc().

◆ octave_ensure_buffer_stack()

static void octave_ensure_buffer_stack ( yyscan_t  yyscanner)
static

◆ octave_free()

void octave_free ( void *  ptr,
yyscan_t  yyscanner 
)

Definition at line 4858 of file lex.cc.

References free().

◆ octave_get_column()

int octave_get_column ( yyscan_t  yyscanner)

Get the current column number.

Parameters
yyscannerThe scanner object.

Definition at line 4554 of file lex.cc.

References YY_CURRENT_BUFFER, and yycolumn.

◆ octave_get_debug()

int octave_get_debug ( yyscan_t  yyscanner)

Definition at line 4659 of file lex.cc.

◆ octave_get_extra()

octave::base_lexer * octave_get_extra ( yyscan_t  yyscanner)

Get the user-defined data for this scanner.

Parameters
yyscannerThe scanner object.

Definition at line 4532 of file lex.cc.

References yyextra.

◆ octave_get_in()

FILE * octave_get_in ( yyscan_t  yyscanner)

Get the input stream.

Parameters
yyscannerThe scanner object.

Definition at line 4567 of file lex.cc.

References yyin.

◆ octave_get_leng()

int octave_get_leng ( yyscan_t  yyscanner)

Get the length of the current token.

Parameters
yyscannerThe scanner object.

Definition at line 4585 of file lex.cc.

References yyleng.

◆ octave_get_lineno()

int octave_get_lineno ( yyscan_t  yyscanner)

Get the current line number.

Parameters
yyscannerThe scanner object.

Definition at line 4541 of file lex.cc.

References YY_CURRENT_BUFFER, and yylineno.

◆ octave_get_lval()

OCTAVE_STYPE * octave_get_lval ( yyscan_t  yyscanner)

Definition at line 4673 of file lex.cc.

References yylval.

◆ octave_get_out()

FILE * octave_get_out ( yyscan_t  yyscanner)

Get the output stream.

Parameters
yyscannerThe scanner object.

Definition at line 4576 of file lex.cc.

References yyout.

◆ octave_get_text()

char * octave_get_text ( yyscan_t  yyscanner)

Get the current token.

Parameters
yyscannerThe scanner object.

Definition at line 4595 of file lex.cc.

References yytext.

◆ octave_lex()

int octave_lex ( OCTAVE_STYPE yylval_param,
yyscan_t  yyscanner 
)

The main scanner function which does all the work.

Definition at line 1645 of file lex.cc.

References ADD_EQ, AND_EQ, BLOCK_COMMENT_START, CMD_OR_DEPRECATED_OP, CMD_OR_OP, CMD_OR_UNARY_OP, COMMAND_START, curr_lexer, DIV_EQ, DQ_STRING, DQ_STRING_START, ECHO, EDIV, EDIV_EQ, ELEFTDIV, ELEFTDIV_EQ, EMUL, EMUL_EQ, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EPOW, EPOW_EQ, EXPR_AND, EXPR_AND_AND, EXPR_EQ, EXPR_GE, EXPR_GT, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_OR, EXPR_OR_OR, FCN_HANDLE, FQ_IDENT_START, HANDLE_EOB_OR_EOF, HANDLE_IDENTIFIER, HANDLE_NUMBER, HANDLE_STRING_CONTINUATION, HERMITIAN, INITIAL, INPUT_FILE, INPUT_FILE_START, is_space_or_tab(), iskeyword(), LEFTDIV, LEFTDIV_EQ, LEXICAL_ERROR, LINE_COMMENT_START, MATRIX_START, MINUS_MINUS, MUL_EQ, OR_EQ, PLUS_PLUS, POW, POW_EQ, SQ_STRING, SQ_STRING_START, SUB_EQ, TRANSPOSE, undo_string_escape(), yy_accept, YY_AT_BOL, yy_base, YY_BREAK, YY_BUF_SIZE, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yyguts_t::yy_c_buf_p, yy_chk, yy_create_buffer, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_def, yyguts_t::yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, yy_ec, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yyguts_t::yy_hold_char, yyguts_t::yy_init, yyguts_t::yy_last_accepting_cpos, yyguts_t::yy_last_accepting_state, yy_load_buffer_state, yy_meta, YY_MORE_ADJ, yyguts_t::yy_n_chars, YY_NEW_FILE, yy_nxt, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yyguts_t::yy_start, YY_STATE_EOF, yy_try_NUL_trans(), yyensure_buffer_stack, yyin, yyleng, yyless, yylval, yyout, yytext, and yywrap.

Referenced by push_parser::run().

◆ octave_lex_destroy()

◆ octave_lex_init()

int octave_lex_init ( yyscan_t scanner)

Definition at line 4691 of file lex.cc.

References yy_init_globals(), and yyalloc.

◆ octave_lex_init_extra()

int octave_lex_init_extra ( octave::base_lexer *  user_defined,
yyscan_t scanner 
)

Definition at line 4718 of file lex.cc.

References yy_init_globals(), yyalloc, and yyset_extra.

◆ octave_pop_buffer_state()

void octave_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 4348 of file lex.cc.

References yyguts_t::yy_buffer_stack_top, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer, yyguts_t::yy_did_buffer_switch_on_eof, and yy_load_buffer_state.

◆ octave_push_buffer_state()

void octave_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 4317 of file lex.cc.

References 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, yy_load_buffer_state, yyguts_t::yy_n_chars, and yyensure_buffer_stack.

◆ octave_realloc()

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

Definition at line 4852 of file lex.cc.

◆ octave_restart()

void octave_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 4145 of file lex.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, and yyin.

◆ octave_set_column()

void octave_set_column ( int  _column_no,
yyscan_t  yyscanner 
)

Set the current column.

Parameters
_column_nocolumn number
yyscannerThe scanner object.

Definition at line 4630 of file lex.cc.

References YY_CURRENT_BUFFER, YY_FATAL_ERROR, and yycolumn.

◆ octave_set_debug()

void octave_set_debug ( int  debug_flag,
yyscan_t  yyscanner 
)

Definition at line 4665 of file lex.cc.

◆ octave_set_extra()

void octave_set_extra ( octave::base_lexer *  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 4605 of file lex.cc.

References yyextra.

◆ octave_set_in()

void octave_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 4647 of file lex.cc.

References yyin.

◆ octave_set_lineno()

void octave_set_lineno ( int  _line_number,
yyscan_t  yyscanner 
)

Set the current line number.

Parameters
_line_numberline number
yyscannerThe scanner object.

Definition at line 4615 of file lex.cc.

References YY_CURRENT_BUFFER, YY_FATAL_ERROR, and yylineno.

◆ octave_set_lval()

void octave_set_lval ( OCTAVE_STYPE yylval_param,
yyscan_t  yyscanner 
)

Definition at line 4679 of file lex.cc.

◆ octave_set_out()

void octave_set_out ( FILE *  _out_str,
yyscan_t  yyscanner 
)

Definition at line 4653 of file lex.cc.

◆ yy_fatal_error()

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

Definition at line 4502 of file lex.cc.

References YY_EXIT_FAILURE.

◆ yy_get_next_buffer()

◆ yy_get_previous_state()

◆ yy_init_globals()

static int yy_init_globals ( yyscan_t  yyscanner)
static

Definition at line 4745 of file lex.cc.

Referenced by octave_lex_destroy(), octave_lex_init(), and octave_lex_init_extra().

◆ yy_try_NUL_trans()

static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state,
yyscan_t  yyscanner 
)
static

◆ yyunput()

static void yyunput ( int  c,
char *  buf_ptr,
yyscan_t  yyscanner 
)
static

Variable Documentation

◆ yy_accept

const flex_int16_t yy_accept[314]
static

Definition at line 622 of file lex.cc.

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

◆ yy_base

const flex_int16_t yy_base[358]
static

Definition at line 703 of file lex.cc.

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

◆ yy_chk

const flex_int16_t yy_chk[1288]
static

Definition at line 934 of file lex.cc.

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

◆ yy_def

const flex_int16_t yy_def[358]
static

Definition at line 746 of file lex.cc.

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

◆ yy_ec

const YY_CHAR yy_ec[256]
static

Definition at line 661 of file lex.cc.

Referenced by octave_lex(), and yy_get_previous_state().

◆ yy_meta

const YY_CHAR yy_meta[61]
static
Initial value:
=
{ 0,
1, 2, 3, 3, 1, 4, 5, 6, 1, 7,
5, 5, 1, 8, 5, 8, 9, 1, 10, 10,
10, 10, 10, 10, 10, 10, 10, 1, 5, 1,
1, 1, 1, 11, 12, 12, 13, 14, 6, 5,
15, 5, 1, 16, 12, 12, 13, 12, 6, 6,
6, 17, 6, 17, 6, 6, 5, 1, 5, 1
}

Definition at line 693 of file lex.cc.

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

◆ yy_nxt

const flex_int16_t yy_nxt[1288]
static

Definition at line 789 of file lex.cc.

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