GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
oct-parse.h File Reference

Go to the source code of this file.

Classes

union  OCTAVE_STYPE
 

Macros

#define OCTAVE_DEBUG   0
 
#define OCTAVE_STYPE_IS_DECLARED   1
 
#define OCTAVE_STYPE_IS_TRIVIAL   1
 
#define OCTAVE_TOKENTYPE
 
#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_LT = 274 , EXPR_LE = 275 , EXPR_EQ = 276 , EXPR_NE = 277 ,
  EXPR_GE = 278 , EXPR_GT = 279 , LEFTDIV = 280 , EMUL = 281 ,
  EDIV = 282 , ELEFTDIV = 283 , HERMITIAN = 284 , TRANSPOSE = 285 ,
  PLUS_PLUS = 286 , MINUS_MINUS = 287 , POW = 288 , EPOW = 289 ,
  NUMBER = 290 , CONSTANT = 291 , STRUCT_ELT = 292 , NAME = 293 ,
  END = 294 , DQ_STRING = 295 , SQ_STRING = 296 , FOR = 297 ,
  PARFOR = 298 , WHILE = 299 , DO = 300 , UNTIL = 301 ,
  SPMD = 302 , IF = 303 , ELSEIF = 304 , ELSE = 305 ,
  SWITCH = 306 , CASE = 307 , OTHERWISE = 308 , BREAK = 309 ,
  CONTINUE = 310 , RETURN = 311 , UNWIND = 312 , CLEANUP = 313 ,
  TRY = 314 , CATCH = 315 , GLOBAL = 316 , PERSISTENT = 317 ,
  FCN_HANDLE = 318 , CLASSDEF = 319 , PROPERTIES = 320 , METHODS = 321 ,
  EVENTS = 322 , ENUMERATION = 323 , METAQUERY = 324 , SUPERCLASSREF = 325 ,
  FQ_IDENT = 326 , GET = 327 , SET = 328 , FUNCTION = 329 ,
  ARGUMENTS = 330 , LEXICAL_ERROR = 331 , END_OF_INPUT = 332 , INPUT_FILE = 333 ,
  UNARY = 334
}
 

Functions

int octave_parse (octave::base_parser &parser)
 
void octave_pstate_delete (octave_pstate *ps)
 
octave_pstate * octave_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

◆ OCTAVE_DEBUG

#define OCTAVE_DEBUG   0

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

◆ OCTAVE_STYPE_IS_DECLARED

#define OCTAVE_STYPE_IS_DECLARED   1

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

◆ OCTAVE_STYPE_IS_TRIVIAL

#define OCTAVE_STYPE_IS_TRIVIAL   1

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

◆ OCTAVE_TOKENTYPE

#define OCTAVE_TOKENTYPE

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

◆ YYPUSH_MORE_DEFINED

#define YYPUSH_MORE_DEFINED

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

Typedef Documentation

◆ octave_pstate

typedef struct octave_pstate octave_pstate

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

◆ OCTAVE_STYPE

typedef union OCTAVE_STYPE OCTAVE_STYPE

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

◆ octave_token_kind_t

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYPUSH_MORE 

Definition at line 227 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_LT 
EXPR_LE 
EXPR_EQ 
EXPR_NE 
EXPR_GE 
EXPR_GT 
LEFTDIV 
EMUL 
EDIV 
ELEFTDIV 
HERMITIAN 
TRANSPOSE 
PLUS_PLUS 
MINUS_MINUS 
POW 
EPOW 
NUMBER 
CONSTANT 
STRUCT_ELT 
NAME 
END 
DQ_STRING 
SQ_STRING 
FOR 
PARFOR 
WHILE 
DO 
UNTIL 
SPMD 
IF 
ELSEIF 
ELSE 
SWITCH 
CASE 
OTHERWISE 
BREAK 
CONTINUE 
RETURN 
UNWIND 
CLEANUP 
TRY 
CATCH 
GLOBAL 
PERSISTENT 
FCN_HANDLE 
CLASSDEF 
PROPERTIES 
METHODS 
EVENTS 
ENUMERATION 
METAQUERY 
SUPERCLASSREF 
FQ_IDENT 
GET 
SET 
FUNCTION 
ARGUMENTS 
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 2991 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 3061 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 3005 of file oct-parse.cc.

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

Referenced by 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 3082 of file oct-parse.cc.

References base_parser::append_args_validation_list(), base_parser::append_argument_list(), base_parser::append_cell_row(), base_parser::append_classdef_attribute(), base_parser::append_classdef_enum(), base_parser::append_classdef_enum_block(), base_parser::append_classdef_event(), base_parser::append_classdef_events_block(), base_parser::append_classdef_method(), base_parser::append_classdef_methods_block(), base_parser::append_classdef_properties_block(), base_parser::append_classdef_property(), base_parser::append_classdef_superclass(), base_parser::append_decl_init_list(), base_parser::append_function_body(), base_parser::append_function_def_list(), base_parser::append_if_clause(), base_parser::append_matrix_row(), base_parser::append_parameter_list(), base_parser::append_statement_list(), base_parser::append_switch_case(), base_parser::bison_error(), base_parser::end_token_error(), base_parser::end_token_ok(), base_parser::endfunction_found(), base_parser::finish_cell(), base_parser::finish_classdef_external_method(), base_parser::finish_classdef_file(), base_parser::finish_if_command(), base_parser::finish_input(), base_parser::finish_matrix(), base_parser::finish_switch_command(), lexer::input_from_eval_string(), lexical_feedback::m_arguments_is_keyword, lexical_feedback::m_at_beginning_of_statement, lexical_feedback::m_classdef_element_names_are_keywords, lexical_feedback::m_defining_fcn, lexical_feedback::m_end_of_input, lexical_feedback::m_looking_at_anon_fcn_args, lexical_feedback::m_looking_at_decl_list, lexical_feedback::m_looking_at_function_handle, lexical_feedback::m_looking_at_indirect_ref, lexical_feedback::m_looking_at_matrix_or_assign_lhs, lexical_feedback::m_looking_at_parameter_list, lexical_feedback::m_looking_at_return_list, lexical_feedback::m_looking_for_object_index, lexical_feedback::m_maybe_classdef_get_set_method, lexical_feedback::m_nesting_level, lexical_feedback::m_parsed_function_name, lexical_feedback::m_parsing_anon_fcn_body, lexical_feedback::m_parsing_classdef, lexical_feedback::m_parsing_classdef_decl, lexical_feedback::m_parsing_classdef_get_method, lexical_feedback::m_parsing_classdef_set_method, lexical_feedback::m_parsing_classdef_superclass, lexical_feedback::m_reading_classdef_file, lexical_feedback::m_reading_fcn_file, lexical_feedback::m_reading_script_file, lexical_feedback::m_symtab_context, base_parser::make_anon_fcn_handle(), base_parser::make_arg_size_spec(), base_parser::make_arg_validation(), base_parser::make_arg_validation_fcns(), base_parser::make_args_attribute_list(), base_parser::make_args_validation_list(), base_parser::make_argument_list(), base_parser::make_arguments_block(), base_parser::make_assign_op(), base_parser::make_binary_op(), base_parser::make_black_hole(), base_parser::make_boolean_op(), base_parser::make_break_command(), base_parser::make_cell(), base_parser::make_classdef(), base_parser::make_classdef_attribute(), base_parser::make_classdef_attribute_list(), base_parser::make_classdef_body(), base_parser::make_classdef_enum(), base_parser::make_classdef_enum_block(), base_parser::make_classdef_enum_list(), base_parser::make_classdef_event(), base_parser::make_classdef_event_list(), base_parser::make_classdef_events_block(), base_parser::make_classdef_method_list(), base_parser::make_classdef_methods_block(), base_parser::make_classdef_properties_block(), base_parser::make_classdef_property(), base_parser::make_classdef_property_list(), base_parser::make_classdef_superclass(), base_parser::make_classdef_superclass_list(), base_parser::make_colon_expression(), base_parser::make_constant(), base_parser::make_continue_command(), base_parser::make_decl_command(), base_parser::make_decl_elt(), base_parser::make_decl_init_list(), base_parser::make_default_switch_case(), base_parser::make_do_until_command(), base_parser::make_end(), base_parser::make_fcn_handle(), base_parser::make_fcn_name(), base_parser::make_for_command(), base_parser::make_function(), base_parser::make_function_def_list(), base_parser::make_identifier(), base_parser::make_if_clause(), base_parser::make_index_expression(), base_parser::make_indirect_ref(), base_parser::make_matrix(), base_parser::make_metaclass_query(), base_parser::make_not_classdef_attribute(), base_parser::make_parameter_list(), base_parser::make_postfix_op(), base_parser::make_prefix_op(), base_parser::make_return_command(), base_parser::make_script(), base_parser::make_spmd_command(), base_parser::make_statement(), base_parser::make_statement_list(), base_parser::make_superclass_ref(), base_parser::make_switch_case(), base_parser::make_switch_case_list(), base_parser::make_try_command(), base_parser::make_unwind_command(), base_parser::make_while_command(), base_parser::make_word_list_command(), lexical_feedback::mark_as_variables(), tree_parameter_list::mark_in_delims(), base_parser::maybe_convert_to_braindead_shortcircuit(), OCTAVE_EMPTY, OCTAVE_EOF, OCTAVE_error, OCTAVE_UNDEF, OCTAVE_YYUSE, base_parser::parsing_local_functions(), lexical_feedback::symbol_table_context::pop(), lexical_feedback::symbol_table_context::push(), base_parser::push_fcn_symtab(), lexical_feedback::bbp_nesting_level::remove(), base_parser::set_stmt_print_flag(), base_parser::start_classdef_external_method(), base_parser::start_if_command(), base_parser::validate_array_list(), base_parser::validate_matrix_for_assignment(), base_parser::validate_param_list(), base_parser::validate_primary_fcn(), 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, YYDPRINTF, yyerror, YYERROR, yyerrstatus, YYFINAL, YYLAST, yylval, YYMAXDEPTH, yynerrs, YYNOMEM, YYNSTATES, YYNTOKENS, yypact_value_is_default, YYPOPSTACK, yypstate_clear, YYPTRDIFF_T, YYPUSH_MORE, YYSIZE_T, YYSIZEOF, yyss, yyssa, yyssp, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystacksize, yystate, YYSTYPE, YYSYMBOL_YYEMPTY, YYSYMBOL_YYEOF, YYSYMBOL_YYerror, yytable_value_is_error, YYTRANSLATE, yyvs, and yyvsp.

Referenced by push_parser::run().