GNU Octave 7.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-parse.h
Go to the documentation of this file.
1/* A Bison parser, made by GNU Bison 3.8.2. */
2
3/* Bison interface for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35 especially those whose name start with YY_ or yy_. They are
36 private implementation details that can be changed or removed. */
37
38#ifndef YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
39# define YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
40/* Debug traces. */
41#ifndef OCTAVE_DEBUG
42# if defined YYDEBUG
43#if YYDEBUG
44# define OCTAVE_DEBUG 1
45# else
46# define OCTAVE_DEBUG 0
47# endif
48# else /* ! defined YYDEBUG */
49# define OCTAVE_DEBUG 0
50# endif /* ! defined YYDEBUG */
51#endif /* ! defined OCTAVE_DEBUG */
52#if OCTAVE_DEBUG
53extern int octave_debug;
54#endif
55
56/* Token kinds. */
57#ifndef OCTAVE_TOKENTYPE
58# define OCTAVE_TOKENTYPE
60 {
62 OCTAVE_EOF = 0, /* "end of file" */
63 OCTAVE_error = 256, /* error */
64 OCTAVE_UNDEF = 257, /* "invalid token" */
65 ADD_EQ = 258, /* ADD_EQ */
66 SUB_EQ = 259, /* SUB_EQ */
67 MUL_EQ = 260, /* MUL_EQ */
68 DIV_EQ = 261, /* DIV_EQ */
69 LEFTDIV_EQ = 262, /* LEFTDIV_EQ */
70 POW_EQ = 263, /* POW_EQ */
71 EMUL_EQ = 264, /* EMUL_EQ */
72 EDIV_EQ = 265, /* EDIV_EQ */
73 ELEFTDIV_EQ = 266, /* ELEFTDIV_EQ */
74 EPOW_EQ = 267, /* EPOW_EQ */
75 AND_EQ = 268, /* AND_EQ */
76 OR_EQ = 269, /* OR_EQ */
77 EXPR_AND_AND = 270, /* EXPR_AND_AND */
78 EXPR_OR_OR = 271, /* EXPR_OR_OR */
79 EXPR_AND = 272, /* EXPR_AND */
80 EXPR_OR = 273, /* EXPR_OR */
81 EXPR_NOT = 274, /* EXPR_NOT */
82 EXPR_LT = 275, /* EXPR_LT */
83 EXPR_LE = 276, /* EXPR_LE */
84 EXPR_EQ = 277, /* EXPR_EQ */
85 EXPR_NE = 278, /* EXPR_NE */
86 EXPR_GE = 279, /* EXPR_GE */
87 EXPR_GT = 280, /* EXPR_GT */
88 LEFTDIV = 281, /* LEFTDIV */
89 EMUL = 282, /* EMUL */
90 EDIV = 283, /* EDIV */
91 ELEFTDIV = 284, /* ELEFTDIV */
92 HERMITIAN = 285, /* HERMITIAN */
93 TRANSPOSE = 286, /* TRANSPOSE */
94 PLUS_PLUS = 287, /* PLUS_PLUS */
95 MINUS_MINUS = 288, /* MINUS_MINUS */
96 POW = 289, /* POW */
97 EPOW = 290, /* EPOW */
98 NUMBER = 291, /* NUMBER */
99 STRUCT_ELT = 292, /* STRUCT_ELT */
100 NAME = 293, /* NAME */
101 END = 294, /* END */
102 DQ_STRING = 295, /* DQ_STRING */
103 SQ_STRING = 296, /* SQ_STRING */
104 FOR = 297, /* FOR */
105 PARFOR = 298, /* PARFOR */
106 WHILE = 299, /* WHILE */
107 DO = 300, /* DO */
108 UNTIL = 301, /* UNTIL */
109 SPMD = 302, /* SPMD */
110 IF = 303, /* IF */
111 ELSEIF = 304, /* ELSEIF */
112 ELSE = 305, /* ELSE */
113 SWITCH = 306, /* SWITCH */
114 CASE = 307, /* CASE */
115 OTHERWISE = 308, /* OTHERWISE */
116 BREAK = 309, /* BREAK */
117 CONTINUE = 310, /* CONTINUE */
118 FUNC_RET = 311, /* FUNC_RET */
119 UNWIND = 312, /* UNWIND */
120 CLEANUP = 313, /* CLEANUP */
121 TRY = 314, /* TRY */
122 CATCH = 315, /* CATCH */
123 GLOBAL = 316, /* GLOBAL */
124 PERSISTENT = 317, /* PERSISTENT */
125 FCN_HANDLE = 318, /* FCN_HANDLE */
126 CLASSDEF = 319, /* CLASSDEF */
127 PROPERTIES = 320, /* PROPERTIES */
128 METHODS = 321, /* METHODS */
129 EVENTS = 322, /* EVENTS */
130 ENUMERATION = 323, /* ENUMERATION */
131 METAQUERY = 324, /* METAQUERY */
132 SUPERCLASSREF = 325, /* SUPERCLASSREF */
133 FQ_IDENT = 326, /* FQ_IDENT */
134 GET = 327, /* GET */
135 SET = 328, /* SET */
136 FCN = 329, /* FCN */
137 ARGUMENTS = 330, /* ARGUMENTS */
138 LEXICAL_ERROR = 331, /* LEXICAL_ERROR */
139 END_OF_INPUT = 332, /* END_OF_INPUT */
140 INPUT_FILE = 333, /* INPUT_FILE */
141 UNARY = 334 /* UNARY */
142 };
144#endif
145
146/* Value type. */
147#if ! defined OCTAVE_STYPE && ! defined OCTAVE_STYPE_IS_DECLARED
149{
150#line 139 "/home/jwe/src/octave-stable/libinterp/parse-tree/oct-parse.yy"
151
153
154 // The type of the basic tokens returned by the lexer.
156
157 // Comment strings that we need to deal with mid-rule.
159
160 // Types for the nonterminals we generate.
196
214
215#line 216 "libinterp/parse-tree/oct-parse.h"
216
217};
219# define OCTAVE_STYPE_IS_TRIVIAL 1
220# define OCTAVE_STYPE_IS_DECLARED 1
221#endif
222
223
224
225
226#ifndef YYPUSH_MORE_DEFINED
227# define YYPUSH_MORE_DEFINED
228enum { YYPUSH_MORE = 4 };
229#endif
230
232
233
236 int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser& parser);
240
241
242#endif /* !YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED */
octave_pstate * octave_pstate_new(void)
Definition: oct-parse.cc:3092
int octave_push_parse(octave_pstate *ps, int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser &parser)
Definition: oct-parse.cc:3127
enum octave_tokentype octave_token_kind_t
Definition: oct-parse.h:143
int octave_pull_parse(octave_pstate *ps, octave::base_parser &parser)
Definition: oct-parse.cc:3050
void octave_pstate_delete(octave_pstate *ps)
Definition: oct-parse.cc:3106
int octave_parse(octave::base_parser &parser)
Definition: oct-parse.cc:3036
@ YYPUSH_MORE
Definition: oct-parse.h:228
octave_tokentype
Definition: oct-parse.h:60
@ LEFTDIV
Definition: oct-parse.h:88
@ EDIV
Definition: oct-parse.h:90
@ PROPERTIES
Definition: oct-parse.h:127
@ FCN_HANDLE
Definition: oct-parse.h:125
@ FUNC_RET
Definition: oct-parse.h:118
@ PLUS_PLUS
Definition: oct-parse.h:94
@ OCTAVE_EOF
Definition: oct-parse.h:62
@ END_OF_INPUT
Definition: oct-parse.h:139
@ DIV_EQ
Definition: oct-parse.h:68
@ GET
Definition: oct-parse.h:134
@ NUMBER
Definition: oct-parse.h:98
@ SUPERCLASSREF
Definition: oct-parse.h:132
@ ELEFTDIV
Definition: oct-parse.h:91
@ EXPR_LT
Definition: oct-parse.h:82
@ DQ_STRING
Definition: oct-parse.h:102
@ IF
Definition: oct-parse.h:110
@ MINUS_MINUS
Definition: oct-parse.h:95
@ POW
Definition: oct-parse.h:96
@ WHILE
Definition: oct-parse.h:106
@ TRANSPOSE
Definition: oct-parse.h:93
@ OR_EQ
Definition: oct-parse.h:76
@ EXPR_AND_AND
Definition: oct-parse.h:77
@ EXPR_NE
Definition: oct-parse.h:85
@ EXPR_OR_OR
Definition: oct-parse.h:78
@ CONTINUE
Definition: oct-parse.h:117
@ EPOW_EQ
Definition: oct-parse.h:74
@ EVENTS
Definition: oct-parse.h:129
@ SWITCH
Definition: oct-parse.h:113
@ OCTAVE_error
Definition: oct-parse.h:63
@ TRY
Definition: oct-parse.h:121
@ EPOW
Definition: oct-parse.h:97
@ SQ_STRING
Definition: oct-parse.h:103
@ MUL_EQ
Definition: oct-parse.h:67
@ AND_EQ
Definition: oct-parse.h:75
@ NAME
Definition: oct-parse.h:100
@ EMUL_EQ
Definition: oct-parse.h:71
@ INPUT_FILE
Definition: oct-parse.h:140
@ ELSEIF
Definition: oct-parse.h:111
@ POW_EQ
Definition: oct-parse.h:70
@ CATCH
Definition: oct-parse.h:122
@ ARGUMENTS
Definition: oct-parse.h:137
@ OCTAVE_UNDEF
Definition: oct-parse.h:64
@ ADD_EQ
Definition: oct-parse.h:65
@ ELSE
Definition: oct-parse.h:112
@ BREAK
Definition: oct-parse.h:116
@ SUB_EQ
Definition: oct-parse.h:66
@ CASE
Definition: oct-parse.h:114
@ PERSISTENT
Definition: oct-parse.h:124
@ UNTIL
Definition: oct-parse.h:108
@ FOR
Definition: oct-parse.h:104
@ UNARY
Definition: oct-parse.h:141
@ EXPR_NOT
Definition: oct-parse.h:81
@ EXPR_LE
Definition: oct-parse.h:83
@ SET
Definition: oct-parse.h:135
@ PARFOR
Definition: oct-parse.h:105
@ DO
Definition: oct-parse.h:107
@ STRUCT_ELT
Definition: oct-parse.h:99
@ EXPR_GE
Definition: oct-parse.h:86
@ LEXICAL_ERROR
Definition: oct-parse.h:138
@ ENUMERATION
Definition: oct-parse.h:130
@ OCTAVE_EMPTY
Definition: oct-parse.h:61
@ METHODS
Definition: oct-parse.h:128
@ FCN
Definition: oct-parse.h:136
@ OTHERWISE
Definition: oct-parse.h:115
@ EXPR_OR
Definition: oct-parse.h:80
@ CLEANUP
Definition: oct-parse.h:120
@ FQ_IDENT
Definition: oct-parse.h:133
@ METAQUERY
Definition: oct-parse.h:131
@ EMUL
Definition: oct-parse.h:89
@ LEFTDIV_EQ
Definition: oct-parse.h:69
@ END
Definition: oct-parse.h:101
@ CLASSDEF
Definition: oct-parse.h:126
@ SPMD
Definition: oct-parse.h:109
@ HERMITIAN
Definition: oct-parse.h:92
@ EDIV_EQ
Definition: oct-parse.h:72
@ ELEFTDIV_EQ
Definition: oct-parse.h:73
@ EXPR_GT
Definition: oct-parse.h:87
@ UNWIND
Definition: oct-parse.h:119
@ EXPR_EQ
Definition: oct-parse.h:84
@ GLOBAL
Definition: oct-parse.h:123
@ EXPR_AND
Definition: oct-parse.h:79
int octave_debug
octave::tree_switch_command * tree_switch_command_type
Definition: oct-parse.h:181
octave::tree_arg_validation_fcns * tree_arg_validation_fcns_type
Definition: oct-parse.h:194
int dummy_type
Definition: oct-parse.h:152
octave::tree_argument_list * tree_argument_list_type
Definition: oct-parse.h:175
octave::tree_switch_case * tree_switch_case_type
Definition: oct-parse.h:182
octave::tree_classdef_enum * tree_classdef_enum_type
Definition: oct-parse.h:211
octave::tree_classdef_methods_block * tree_classdef_methods_block_type
Definition: oct-parse.h:207
octave::tree_arguments_block * tree_arguments_block_type
Definition: oct-parse.h:189
octave::tree_command * tree_command_type
Definition: oct-parse.h:177
octave::tree_if_clause * tree_if_clause_type
Definition: oct-parse.h:179
octave::tree_expression * tree_expression_type
Definition: oct-parse.h:165
octave::tree_classdef_body * tree_classdef_body_type
Definition: oct-parse.h:202
octave::tree_classdef_properties_block * tree_classdef_properties_block_type
Definition: oct-parse.h:205
octave::tree_classdef_events_list * tree_classdef_events_list_type
Definition: oct-parse.h:209
octave::tree_classdef_events_block * tree_classdef_events_block_type
Definition: oct-parse.h:210
octave::tree_classdef_enum_list * tree_classdef_enum_list_type
Definition: oct-parse.h:212
octave::tree_if_command * tree_if_command_type
Definition: oct-parse.h:178
octave::tree_decl_elt * tree_decl_elt_type
Definition: oct-parse.h:184
octave::tree_parameter_list * tree_parameter_list_type
Definition: oct-parse.h:176
octave::tree_index_expression * tree_index_expression_type
Definition: oct-parse.h:173
octave::tree_anon_fcn_handle * tree_anon_fcn_handle_type
Definition: oct-parse.h:171
octave::tree_classdef_superclass * tree_classdef_superclass_type
Definition: oct-parse.h:200
octave::comment_list * comment_type
Definition: oct-parse.h:158
octave::tree * tree_type
Definition: oct-parse.h:162
octave::tree_constant * tree_constant_type
Definition: oct-parse.h:166
octave::tree_decl_command * tree_decl_command_type
Definition: oct-parse.h:186
octave::tree_metaclass_query * tree_metaclass_query_type
Definition: oct-parse.h:169
octave::tree_superclass_ref * tree_superclass_ref_type
Definition: oct-parse.h:168
octave::tree_matrix * tree_matrix_type
Definition: oct-parse.h:163
octave::tree_colon_expression * tree_colon_expression_type
Definition: oct-parse.h:174
octave::token * tok_val
Definition: oct-parse.h:155
octave::tree_args_block_validation_list * tree_args_block_validation_list_type
Definition: oct-parse.h:191
octave::tree_classdef_attribute * tree_classdef_attribute_type
Definition: oct-parse.h:198
octave::tree_classdef_property_list * tree_classdef_property_list_type
Definition: oct-parse.h:204
octave::tree_statement * tree_statement_type
Definition: oct-parse.h:187
octave::tree_statement_list * tree_statement_list_type
Definition: oct-parse.h:188
octave::tree_if_command_list * tree_if_command_list_type
Definition: oct-parse.h:180
octave::tree_decl_init_list * tree_decl_init_list_type
Definition: oct-parse.h:185
octave::tree_classdef * tree_classdef_type
Definition: oct-parse.h:197
octave::tree_identifier * tree_identifier_type
Definition: oct-parse.h:172
octave::tree_arg_validation * tree_arg_validation_type
Definition: oct-parse.h:193
octave::tree_args_block_attribute_list * tree_args_block_attribute_list_type
Definition: oct-parse.h:190
octave::tree_fcn_handle * tree_fcn_handle_type
Definition: oct-parse.h:167
octave::tree_classdef_attribute_list * tree_classdef_attribute_list_type
Definition: oct-parse.h:199
octave::tree_switch_case_list * tree_switch_case_list_type
Definition: oct-parse.h:183
octave::tree_arg_size_spec * tree_arg_size_spec_type
Definition: oct-parse.h:192
octave::tree_function_def * tree_function_def_type
Definition: oct-parse.h:170
octave::tree_classdef_property * tree_classdef_property_type
Definition: oct-parse.h:203
char punct_type
Definition: oct-parse.h:161
octave::tree_classdef_methods_list * tree_classdef_methods_list_type
Definition: oct-parse.h:206
octave::tree_classdef_superclass_list * tree_classdef_superclass_list_type
Definition: oct-parse.h:201
octave_user_function * octave_user_function_type
Definition: oct-parse.h:195
octave::tree_classdef_enum_block * tree_classdef_enum_block_type
Definition: oct-parse.h:213
octave::tree_classdef_event * tree_classdef_event_type
Definition: oct-parse.h:208
octave::tree_cell * tree_cell_type
Definition: oct-parse.h:164