GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-parse.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  OCTAVE_STYPE
 

Macros

#define ADD_EQ   258
 
#define AND_EQ   268
 
#define BREAK   311
 
#define CASE   309
 
#define CATCH   317
 
#define CLASSDEF   321
 
#define CLEANUP   315
 
#define CONTINUE   312
 
#define DIV_EQ   261
 
#define DO   303
 
#define DQ_STRING   298
 
#define EDIV   283
 
#define EDIV_EQ   265
 
#define ELEFTDIV   284
 
#define ELEFTDIV_EQ   266
 
#define ELSE   307
 
#define ELSEIF   306
 
#define EMINUS   286
 
#define EMUL   282
 
#define EMUL_EQ   264
 
#define END   297
 
#define END_OF_INPUT   333
 
#define ENUMERATION   325
 
#define EPLUS   285
 
#define EPOW   292
 
#define EPOW_EQ   267
 
#define EVENTS   324
 
#define EXPR_AND   272
 
#define EXPR_AND_AND   270
 
#define EXPR_EQ   277
 
#define EXPR_GE   279
 
#define EXPR_GT   280
 
#define EXPR_LE   276
 
#define EXPR_LT   275
 
#define EXPR_NE   278
 
#define EXPR_NOT   274
 
#define EXPR_OR   273
 
#define EXPR_OR_OR   271
 
#define FCN   331
 
#define FCN_HANDLE   320
 
#define FOR   300
 
#define FQ_IDENT   328
 
#define FUNC_RET   313
 
#define GET   329
 
#define GLOBAL   318
 
#define HERMITIAN   287
 
#define IF   305
 
#define IMAG_NUM   294
 
#define INPUT_FILE   334
 
#define LEFTDIV   281
 
#define LEFTDIV_EQ   262
 
#define LEXICAL_ERROR   332
 
#define METAQUERY   326
 
#define METHODS   323
 
#define MINUS_MINUS   290
 
#define MUL_EQ   260
 
#define NAME   296
 
#define NUM   293
 
#define OCTAVE_DEBUG   0
 
#define OCTAVE_EMPTY   -2
 
#define OCTAVE_EOF   0
 
#define OCTAVE_error   256
 
#define OCTAVE_STYPE_IS_DECLARED   1
 
#define OCTAVE_STYPE_IS_TRIVIAL   1
 
#define OCTAVE_TOKENTYPE
 
#define OCTAVE_UNDEF   257
 
#define OR_EQ   269
 
#define OTHERWISE   310
 
#define PARFOR   301
 
#define PERSISTENT   319
 
#define PLUS_PLUS   289
 
#define POW   291
 
#define POW_EQ   263
 
#define PROPERTIES   322
 
#define SET   330
 
#define SQ_STRING   299
 
#define STRUCT_ELT   295
 
#define SUB_EQ   259
 
#define SUPERCLASSREF   327
 
#define SWITCH   308
 
#define TRANSPOSE   288
 
#define TRY   316
 
#define UNARY   335
 
#define UNTIL   304
 
#define UNWIND   314
 
#define WHILE   302
 
#define YYPUSH_MORE_DEFINED
 

Typedefs

typedef struct octave_pstate octave_pstate
 
typedef union OCTAVE_STYPE OCTAVE_STYPE
 
typedef enum octave_tokentype octave_token_kind_t
 

Enumerations

enum  { YYPUSH_MORE = 4 }
 
enum  octave_tokentype {
  OCTAVE_EMPTY = -2 , OCTAVE_EOF = 0 , OCTAVE_error = 256 , OCTAVE_UNDEF = 257 ,
  ADD_EQ = 258 , SUB_EQ = 259 , MUL_EQ = 260 , DIV_EQ = 261 ,
  LEFTDIV_EQ = 262 , POW_EQ = 263 , EMUL_EQ = 264 , EDIV_EQ = 265 ,
  ELEFTDIV_EQ = 266 , EPOW_EQ = 267 , AND_EQ = 268 , OR_EQ = 269 ,
  EXPR_AND_AND = 270 , EXPR_OR_OR = 271 , EXPR_AND = 272 , EXPR_OR = 273 ,
  EXPR_NOT = 274 , EXPR_LT = 275 , EXPR_LE = 276 , EXPR_EQ = 277 ,
  EXPR_NE = 278 , EXPR_GE = 279 , EXPR_GT = 280 , LEFTDIV = 281 ,
  EMUL = 282 , EDIV = 283 , ELEFTDIV = 284 , EPLUS = 285 ,
  EMINUS = 286 , HERMITIAN = 287 , TRANSPOSE = 288 , PLUS_PLUS = 289 ,
  MINUS_MINUS = 290 , POW = 291 , EPOW = 292 , NUM = 293 ,
  IMAG_NUM = 294 , STRUCT_ELT = 295 , NAME = 296 , END = 297 ,
  DQ_STRING = 298 , SQ_STRING = 299 , FOR = 300 , PARFOR = 301 ,
  WHILE = 302 , DO = 303 , UNTIL = 304 , IF = 305 ,
  ELSEIF = 306 , ELSE = 307 , SWITCH = 308 , CASE = 309 ,
  OTHERWISE = 310 , BREAK = 311 , CONTINUE = 312 , FUNC_RET = 313 ,
  UNWIND = 314 , CLEANUP = 315 , TRY = 316 , CATCH = 317 ,
  GLOBAL = 318 , PERSISTENT = 319 , FCN_HANDLE = 320 , CLASSDEF = 321 ,
  PROPERTIES = 322 , METHODS = 323 , EVENTS = 324 , ENUMERATION = 325 ,
  METAQUERY = 326 , SUPERCLASSREF = 327 , FQ_IDENT = 328 , GET = 329 ,
  SET = 330 , FCN = 331 , LEXICAL_ERROR = 332 , END_OF_INPUT = 333 ,
  INPUT_FILE = 334 , UNARY = 335
}
 

Functions

int octave_parse (octave::base_parser &parser)
 
void octave_pstate_delete (octave_pstate *ps)
 
octave_pstateoctave_pstate_new (void)
 
int octave_pull_parse (octave_pstate *ps, octave::base_parser &parser)
 
int octave_push_parse (octave_pstate *ps, int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser &parser)
 

Macro Definition Documentation

◆ ADD_EQ

#define ADD_EQ   258

Definition at line 151 of file oct-parse.h.

◆ AND_EQ

#define AND_EQ   268

Definition at line 161 of file oct-parse.h.

◆ BREAK

#define BREAK   311

Definition at line 204 of file oct-parse.h.

◆ CASE

#define CASE   309

Definition at line 202 of file oct-parse.h.

◆ CATCH

#define CATCH   317

Definition at line 210 of file oct-parse.h.

◆ CLASSDEF

#define CLASSDEF   321

Definition at line 214 of file oct-parse.h.

◆ CLEANUP

#define CLEANUP   315

Definition at line 208 of file oct-parse.h.

◆ CONTINUE

#define CONTINUE   312

Definition at line 205 of file oct-parse.h.

◆ DIV_EQ

#define DIV_EQ   261

Definition at line 154 of file oct-parse.h.

◆ DO

#define DO   303

Definition at line 196 of file oct-parse.h.

◆ DQ_STRING

#define DQ_STRING   298

Definition at line 191 of file oct-parse.h.

◆ EDIV

#define EDIV   283

Definition at line 176 of file oct-parse.h.

◆ EDIV_EQ

#define EDIV_EQ   265

Definition at line 158 of file oct-parse.h.

◆ ELEFTDIV

#define ELEFTDIV   284

Definition at line 177 of file oct-parse.h.

◆ ELEFTDIV_EQ

#define ELEFTDIV_EQ   266

Definition at line 159 of file oct-parse.h.

◆ ELSE

#define ELSE   307

Definition at line 200 of file oct-parse.h.

◆ ELSEIF

#define ELSEIF   306

Definition at line 199 of file oct-parse.h.

◆ EMINUS

#define EMINUS   286

Definition at line 179 of file oct-parse.h.

◆ EMUL

#define EMUL   282

Definition at line 175 of file oct-parse.h.

◆ EMUL_EQ

#define EMUL_EQ   264

Definition at line 157 of file oct-parse.h.

◆ END

#define END   297

Definition at line 190 of file oct-parse.h.

◆ END_OF_INPUT

#define END_OF_INPUT   333

Definition at line 226 of file oct-parse.h.

◆ ENUMERATION

#define ENUMERATION   325

Definition at line 218 of file oct-parse.h.

◆ EPLUS

#define EPLUS   285

Definition at line 178 of file oct-parse.h.

◆ EPOW

#define EPOW   292

Definition at line 185 of file oct-parse.h.

◆ EPOW_EQ

#define EPOW_EQ   267

Definition at line 160 of file oct-parse.h.

◆ EVENTS

#define EVENTS   324

Definition at line 217 of file oct-parse.h.

◆ EXPR_AND

#define EXPR_AND   272

Definition at line 165 of file oct-parse.h.

◆ EXPR_AND_AND

#define EXPR_AND_AND   270

Definition at line 163 of file oct-parse.h.

◆ EXPR_EQ

#define EXPR_EQ   277

Definition at line 170 of file oct-parse.h.

◆ EXPR_GE

#define EXPR_GE   279

Definition at line 172 of file oct-parse.h.

◆ EXPR_GT

#define EXPR_GT   280

Definition at line 173 of file oct-parse.h.

◆ EXPR_LE

#define EXPR_LE   276

Definition at line 169 of file oct-parse.h.

◆ EXPR_LT

#define EXPR_LT   275

Definition at line 168 of file oct-parse.h.

◆ EXPR_NE

#define EXPR_NE   278

Definition at line 171 of file oct-parse.h.

◆ EXPR_NOT

#define EXPR_NOT   274

Definition at line 167 of file oct-parse.h.

◆ EXPR_OR

#define EXPR_OR   273

Definition at line 166 of file oct-parse.h.

◆ EXPR_OR_OR

#define EXPR_OR_OR   271

Definition at line 164 of file oct-parse.h.

◆ FCN

#define FCN   331

Definition at line 224 of file oct-parse.h.

◆ FCN_HANDLE

#define FCN_HANDLE   320

Definition at line 213 of file oct-parse.h.

◆ FOR

#define FOR   300

Definition at line 193 of file oct-parse.h.

◆ FQ_IDENT

#define FQ_IDENT   328

Definition at line 221 of file oct-parse.h.

◆ FUNC_RET

#define FUNC_RET   313

Definition at line 206 of file oct-parse.h.

◆ GET

#define GET   329

Definition at line 222 of file oct-parse.h.

◆ GLOBAL

#define GLOBAL   318

Definition at line 211 of file oct-parse.h.

◆ HERMITIAN

#define HERMITIAN   287

Definition at line 180 of file oct-parse.h.

◆ IF

#define IF   305

Definition at line 198 of file oct-parse.h.

◆ IMAG_NUM

#define IMAG_NUM   294

Definition at line 187 of file oct-parse.h.

◆ INPUT_FILE

#define INPUT_FILE   334

Definition at line 227 of file oct-parse.h.

◆ LEFTDIV

#define LEFTDIV   281

Definition at line 174 of file oct-parse.h.

◆ LEFTDIV_EQ

#define LEFTDIV_EQ   262

Definition at line 155 of file oct-parse.h.

◆ LEXICAL_ERROR

#define LEXICAL_ERROR   332

Definition at line 225 of file oct-parse.h.

◆ METAQUERY

#define METAQUERY   326

Definition at line 219 of file oct-parse.h.

◆ METHODS

#define METHODS   323

Definition at line 216 of file oct-parse.h.

◆ MINUS_MINUS

#define MINUS_MINUS   290

Definition at line 183 of file oct-parse.h.

◆ MUL_EQ

#define MUL_EQ   260

Definition at line 153 of file oct-parse.h.

◆ NAME

#define NAME   296

Definition at line 189 of file oct-parse.h.

◆ NUM

#define NUM   293

Definition at line 186 of file oct-parse.h.

◆ OCTAVE_DEBUG

#define OCTAVE_DEBUG   0

Definition at line 49 of file oct-parse.h.

◆ OCTAVE_EMPTY

#define OCTAVE_EMPTY   -2

Definition at line 147 of file oct-parse.h.

◆ OCTAVE_EOF

#define OCTAVE_EOF   0

Definition at line 148 of file oct-parse.h.

◆ OCTAVE_error

#define OCTAVE_error   256

Definition at line 149 of file oct-parse.h.

◆ OCTAVE_STYPE_IS_DECLARED

#define OCTAVE_STYPE_IS_DECLARED   1

Definition at line 298 of file oct-parse.h.

◆ OCTAVE_STYPE_IS_TRIVIAL

#define OCTAVE_STYPE_IS_TRIVIAL   1

Definition at line 297 of file oct-parse.h.

◆ OCTAVE_TOKENTYPE

#define OCTAVE_TOKENTYPE

Definition at line 58 of file oct-parse.h.

◆ OCTAVE_UNDEF

#define OCTAVE_UNDEF   257

Definition at line 150 of file oct-parse.h.

◆ OR_EQ

#define OR_EQ   269

Definition at line 162 of file oct-parse.h.

◆ OTHERWISE

#define OTHERWISE   310

Definition at line 203 of file oct-parse.h.

◆ PARFOR

#define PARFOR   301

Definition at line 194 of file oct-parse.h.

◆ PERSISTENT

#define PERSISTENT   319

Definition at line 212 of file oct-parse.h.

◆ PLUS_PLUS

#define PLUS_PLUS   289

Definition at line 182 of file oct-parse.h.

◆ POW

#define POW   291

Definition at line 184 of file oct-parse.h.

◆ POW_EQ

#define POW_EQ   263

Definition at line 156 of file oct-parse.h.

◆ PROPERTIES

#define PROPERTIES   322

Definition at line 215 of file oct-parse.h.

◆ SET

#define SET   330

Definition at line 223 of file oct-parse.h.

◆ SQ_STRING

#define SQ_STRING   299

Definition at line 192 of file oct-parse.h.

◆ STRUCT_ELT

#define STRUCT_ELT   295

Definition at line 188 of file oct-parse.h.

◆ SUB_EQ

#define SUB_EQ   259

Definition at line 152 of file oct-parse.h.

◆ SUPERCLASSREF

#define SUPERCLASSREF   327

Definition at line 220 of file oct-parse.h.

◆ SWITCH

#define SWITCH   308

Definition at line 201 of file oct-parse.h.

◆ TRANSPOSE

#define TRANSPOSE   288

Definition at line 181 of file oct-parse.h.

◆ TRY

#define TRY   316

Definition at line 209 of file oct-parse.h.

◆ UNARY

#define UNARY   335

Definition at line 228 of file oct-parse.h.

◆ UNTIL

#define UNTIL   304

Definition at line 197 of file oct-parse.h.

◆ UNWIND

#define UNWIND   314

Definition at line 207 of file oct-parse.h.

◆ WHILE

#define WHILE   302

Definition at line 195 of file oct-parse.h.

◆ YYPUSH_MORE_DEFINED

#define YYPUSH_MORE_DEFINED

Definition at line 304 of file oct-parse.h.

Typedef Documentation

◆ octave_pstate

typedef struct octave_pstate octave_pstate

Definition at line 1 of file oct-parse.h.

◆ OCTAVE_STYPE

typedef union OCTAVE_STYPE OCTAVE_STYPE

Definition at line 1 of file oct-parse.h.

◆ octave_token_kind_t

Definition at line 1 of file oct-parse.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYPUSH_MORE 

Definition at line 305 of file oct-parse.h.

◆ octave_tokentype

Enumerator
OCTAVE_EMPTY 
OCTAVE_EOF 
OCTAVE_error 
OCTAVE_UNDEF 
ADD_EQ 
SUB_EQ 
MUL_EQ 
DIV_EQ 
LEFTDIV_EQ 
POW_EQ 
EMUL_EQ 
EDIV_EQ 
ELEFTDIV_EQ 
EPOW_EQ 
AND_EQ 
OR_EQ 
EXPR_AND_AND 
EXPR_OR_OR 
EXPR_AND 
EXPR_OR 
EXPR_NOT 
EXPR_LT 
EXPR_LE 
EXPR_EQ 
EXPR_NE 
EXPR_GE 
EXPR_GT 
LEFTDIV 
EMUL 
EDIV 
ELEFTDIV 
EPLUS 
EMINUS 
HERMITIAN 
TRANSPOSE 
PLUS_PLUS 
MINUS_MINUS 
POW 
EPOW 
NUM 
IMAG_NUM 
STRUCT_ELT 
NAME 
END 
DQ_STRING 
SQ_STRING 
FOR 
PARFOR 
WHILE 
DO 
UNTIL 
IF 
ELSEIF 
ELSE 
SWITCH 
CASE 
OTHERWISE 
BREAK 
CONTINUE 
FUNC_RET 
UNWIND 
CLEANUP 
TRY 
CATCH 
GLOBAL 
PERSISTENT 
FCN_HANDLE 
CLASSDEF 
PROPERTIES 
METHODS 
EVENTS 
ENUMERATION 
METAQUERY 
SUPERCLASSREF 
FQ_IDENT 
GET 
SET 
FCN 
LEXICAL_ERROR 
END_OF_INPUT 
INPUT_FILE 
UNARY 

Definition at line 59 of file oct-parse.h.

Function Documentation

◆ octave_parse()

int octave_parse ( octave::base_parser parser)

Definition at line 3197 of file oct-parse.cc.

References YY_, yyerror, yypstate, yypstate_delete, yypstate_new, and yypull_parse.

◆ octave_pstate_delete()

void octave_pstate_delete ( octave_pstate ps)

Definition at line 3267 of file oct-parse.cc.

References YYFREE, yyss, yyssa, and YYSTACK_FREE.

◆ octave_pstate_new()

octave_pstate* octave_pstate_new ( void  )

◆ octave_pull_parse()

int octave_pull_parse ( octave_pstate ps,
octave::base_parser parser 
)

Definition at line 3211 of file oct-parse.cc.

References scanner, YY_ASSERT, yylex, yylval, YYPUSH_MORE, yypush_parse, and YYSTYPE.

Referenced by octave::parser::run().

◆ octave_push_parse()

int octave_push_parse ( octave_pstate ps,
int  pushed_char,
OCTAVE_STYPE const *  pushed_val,
octave::base_parser parser 
)

Definition at line 3288 of file oct-parse.cc.

References ADD_EQ, AND_EQ, octave::base_parser::append_statement_list(), octave::base_parser::bison_error(), DIV_EQ, octave::tree_classdef_property::doc_string(), DQ_STRING, EDIV, EDIV_EQ, ELEFTDIV, ELEFTDIV_EQ, EMUL, EMUL_EQ, octave::base_parser::end_token_error(), octave::base_parser::end_token_ok(), octave::base_parser::endfunction_found(), EPOW, EPOW_EQ, EXPR_AND, EXPR_AND_AND, EXPR_EQ, EXPR_GE, EXPR_GT, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_NOT, EXPR_OR, EXPR_OR_OR, octave::base_parser::finish_cell(), octave::base_parser::finish_classdef_external_method(), octave::base_parser::finish_classdef_file(), octave::base_parser::finish_if_command(), octave::base_parser::finish_matrix(), octave::base_parser::finish_switch_command(), FOR, octave::base_list< elt_type >::front(), octave::token::function_end, GLOBAL, octave::tree_classdef_property::have_doc_string(), HERMITIAN, IMAG_NUM, octave::tree_parameter_list::in, octave::comment_elt::is_end_of_line(), LEFTDIV, LEFTDIV_EQ, lexer, octave_value::magic_colon_t, octave::base_parser::make_anon_fcn_handle(), octave::base_parser::make_assign_op(), octave::base_parser::make_binary_op(), octave::base_parser::make_boolean_op(), octave::base_parser::make_break_command(), octave::base_parser::make_classdef(), octave::base_parser::make_classdef_enum_block(), octave::base_parser::make_classdef_events_block(), octave::base_parser::make_classdef_methods_block(), octave::base_parser::make_classdef_properties_block(), octave::base_parser::make_colon_expression(), octave::base_parser::make_constant(), octave::base_parser::make_continue_command(), octave::base_parser::make_decl_command(), octave::base_parser::make_do_until_command(), octave::base_parser::make_elseif_clause(), octave::base_parser::make_end(), octave::base_parser::make_fcn_handle(), octave::base_parser::make_fcn_name(), octave::base_parser::make_for_command(), octave::base_parser::make_function(), octave::base_parser::make_index_expression(), octave::base_parser::make_indirect_ref(), octave::base_parser::make_postfix_op(), octave::base_parser::make_prefix_op(), octave::base_parser::make_return_command(), octave::base_parser::make_script(), octave::base_parser::make_statement(), octave::base_parser::make_statement_list(), octave::base_parser::make_switch_case(), octave::base_parser::make_try_command(), octave::base_parser::make_unwind_command(), octave::base_parser::make_while_command(), MINUS_MINUS, MUL_EQ, NUM, OCTAVE_EMPTY, OCTAVE_EOF, OCTAVE_error, OCTAVE_UNDEF, OCTAVE_YYUSE, OR_EQ, octave::tree_parameter_list::out, PARFOR, octave::base_parser::parsing_local_functions(), PERSISTENT, PLUS_PLUS, POW, POW_EQ, octave::base_parser::push_fcn_symtab(), octave::base_parser::set_stmt_print_flag(), SQ_STRING, octave::base_parser::start_classdef_external_method(), octave::base_parser::start_if_command(), octave::base_parser::statement_list(), SUB_EQ, octave::comment_elt::text(), TRANSPOSE, octave::base_parser::validate_array_list(), octave::base_parser::validate_matrix_for_assignment(), octave::base_parser::validate_param_list(), YY_, YY_ACCESSING_SYMBOL, YY_ASSERT, YY_CAST, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_IGNORE_USELESS_CAST_BEGIN, YY_IGNORE_USELESS_CAST_END, YY_INITIAL_VALUE, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yyalloc, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, yyerror, YYERROR, yyerrstatus, YYFINAL, YYLAST, yylval, YYMAXDEPTH, yynerrs, YYNSTATES, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, yypstate_clear, YYPTRDIFF_T, YYPUSH_MORE, yyr1, yyr2, YYSIZE_T, YYSIZEOF, yyss, yyssa, yyssp, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystacksize, yystate, YYSTYPE, YYSYMBOL_YYEMPTY, YYSYMBOL_YYEOF, YYSYMBOL_YYerror, yytable, yytable_value_is_error, YYTRANSLATE, yyvs, and yyvsp.

Referenced by octave::push_parser::run().