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
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_LT = 274, /* EXPR_LT */
82 EXPR_LE = 275, /* EXPR_LE */
83 EXPR_EQ = 276, /* EXPR_EQ */
84 EXPR_NE = 277, /* EXPR_NE */
85 EXPR_GE = 278, /* EXPR_GE */
86 EXPR_GT = 279, /* EXPR_GT */
87 LEFTDIV = 280, /* LEFTDIV */
88 EMUL = 281, /* EMUL */
89 EDIV = 282, /* EDIV */
90 ELEFTDIV = 283, /* ELEFTDIV */
91 HERMITIAN = 284, /* HERMITIAN */
92 TRANSPOSE = 285, /* TRANSPOSE */
93 PLUS_PLUS = 286, /* PLUS_PLUS */
94 MINUS_MINUS = 287, /* MINUS_MINUS */
95 POW = 288, /* POW */
96 EPOW = 289, /* EPOW */
97 NUMBER = 290, /* NUMBER */
98 CONSTANT = 291, /* CONSTANT */
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 RETURN = 311, /* RETURN */
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 FUNCTION = 329, /* FUNCTION */
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 "../libinterp/parse-tree/oct-parse.yy"
151
153
154 // The type of the basic tokens returned by the lexer.
155 octave::token *tok;
156
157 // Lists of separators with optional comment lists attached.
158 octave::separator_list *sep_list_type;
159
160 // Types for the nonterminals we generate.
161 octave::tree *tree_type;
162 octave::tree_matrix *tree_matrix_type;
163 octave::tree_cell *tree_cell_type;
164 octave::tree_expression *tree_expression_type;
165 octave::tree_constant *tree_constant_type;
166 octave::tree_fcn_handle *tree_fcn_handle_type;
167 octave::tree_superclass_ref *tree_superclass_ref_type;
168 octave::tree_metaclass_query *tree_metaclass_query_type;
169 octave::tree_function_def *tree_function_def_type;
170 octave::tree_anon_fcn_handle *tree_anon_fcn_handle_type;
171 octave::tree_identifier *tree_identifier_type;
172 octave::tree_index_expression *tree_index_expression_type;
173 octave::tree_colon_expression *tree_colon_expression_type;
174 octave::tree_argument_list *tree_argument_list_type;
175 octave::tree_parameter_list *tree_parameter_list_type;
176 octave::tree_command *tree_command_type;
177 octave::tree_if_command *tree_if_command_type;
178 octave::tree_if_clause *tree_if_clause_type;
179 octave::tree_if_command_list *tree_if_command_list_type;
180 octave::tree_switch_command *tree_switch_command_type;
181 octave::tree_switch_case *tree_switch_case_type;
182 octave::tree_switch_case_list *tree_switch_case_list_type;
183 octave::tree_decl_elt *tree_decl_elt_type;
184 octave::tree_decl_init_list *tree_decl_init_list_type;
185 octave::tree_decl_command *tree_decl_command_type;
186 octave::tree_statement *tree_statement_type;
187 octave::tree_statement_list *tree_statement_list_type;
188 octave::tree_arguments_block *tree_arguments_block_type;
189 octave::tree_args_block_attribute_list *tree_args_block_attribute_list_type;
190 octave::tree_args_block_validation_list *tree_args_block_validation_list_type;
191 octave::tree_arg_size_spec *tree_arg_size_spec_type;
192 octave::tree_arg_validation *tree_arg_validation_type;
193 octave::tree_arg_validation_fcns *tree_arg_validation_fcns_type;
195
196 octave::tree_classdef *tree_classdef_type;
197 octave::tree_classdef_attribute* tree_classdef_attribute_type;
198 octave::tree_classdef_attribute_list* tree_classdef_attribute_list_type;
199 octave::tree_classdef_superclass* tree_classdef_superclass_type;
200 octave::tree_classdef_superclass_list* tree_classdef_superclass_list_type;
201 octave::tree_classdef_body* tree_classdef_body_type;
202 octave::tree_classdef_property* tree_classdef_property_type;
203 octave::tree_classdef_property_list* tree_classdef_property_list_type;
204 octave::tree_classdef_properties_block* tree_classdef_properties_block_type;
205 octave::tree_classdef_method_list* tree_classdef_method_list_type;
206 octave::tree_classdef_methods_block* tree_classdef_methods_block_type;
207 octave::tree_classdef_event* tree_classdef_event_type;
208 octave::tree_classdef_event_list* tree_classdef_event_list_type;
209 octave::tree_classdef_events_block* tree_classdef_events_block_type;
210 octave::tree_classdef_enum* tree_classdef_enum_type;
211 octave::tree_classdef_enum_list* tree_classdef_enum_list_type;
212 octave::tree_classdef_enum_block* tree_classdef_enum_block_type;
213
214#line 215 "libinterp/parse-tree/oct-parse.h"
215
216};
218# define OCTAVE_STYPE_IS_TRIVIAL 1
219# define OCTAVE_STYPE_IS_DECLARED 1
220#endif
221
222
223
224
225#ifndef YYPUSH_MORE_DEFINED
226# define YYPUSH_MORE_DEFINED
227enum { YYPUSH_MORE = 4 };
228#endif
229
231
232
233int octave_parse (octave::base_parser& parser);
235 int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser& parser);
236int octave_pull_parse (octave_pstate *ps, octave::base_parser& parser);
239
240
241#endif /* !YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED */
octave_pstate * octave_pstate_new(void)
int octave_push_parse(octave_pstate *ps, int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser &parser)
enum octave_tokentype octave_token_kind_t
Definition oct-parse.h:143
int octave_pull_parse(octave_pstate *ps, octave::base_parser &parser)
void octave_pstate_delete(octave_pstate *ps)
@ YYPUSH_MORE
Definition oct-parse.h:227
int octave_parse(octave::base_parser &parser)
struct octave_pstate octave_pstate
Definition oct-parse.h:230
octave_tokentype
Definition oct-parse.h:60
@ LEFTDIV
Definition oct-parse.h:87
@ EDIV
Definition oct-parse.h:89
@ PROPERTIES
Definition oct-parse.h:127
@ FCN_HANDLE
Definition oct-parse.h:125
@ PLUS_PLUS
Definition oct-parse.h:93
@ 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:97
@ SUPERCLASSREF
Definition oct-parse.h:132
@ ELEFTDIV
Definition oct-parse.h:90
@ EXPR_LT
Definition oct-parse.h:81
@ DQ_STRING
Definition oct-parse.h:102
@ IF
Definition oct-parse.h:110
@ MINUS_MINUS
Definition oct-parse.h:94
@ POW
Definition oct-parse.h:95
@ WHILE
Definition oct-parse.h:106
@ TRANSPOSE
Definition oct-parse.h:92
@ OR_EQ
Definition oct-parse.h:76
@ EXPR_AND_AND
Definition oct-parse.h:77
@ EXPR_NE
Definition oct-parse.h:84
@ 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
@ RETURN
Definition oct-parse.h:118
@ SWITCH
Definition oct-parse.h:113
@ OCTAVE_error
Definition oct-parse.h:63
@ TRY
Definition oct-parse.h:121
@ EPOW
Definition oct-parse.h:96
@ 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
@ CONSTANT
Definition oct-parse.h:98
@ 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
@ FUNCTION
Definition oct-parse.h:136
@ UNARY
Definition oct-parse.h:141
@ EXPR_LE
Definition oct-parse.h:82
@ 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:85
@ 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
@ 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:88
@ 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:91
@ EDIV_EQ
Definition oct-parse.h:72
@ ELEFTDIV_EQ
Definition oct-parse.h:73
@ EXPR_GT
Definition oct-parse.h:86
@ UNWIND
Definition oct-parse.h:119
@ EXPR_EQ
Definition oct-parse.h:83
@ 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:180
octave::tree_arg_validation_fcns * tree_arg_validation_fcns_type
Definition oct-parse.h:193
octave::tree_argument_list * tree_argument_list_type
Definition oct-parse.h:174
octave::tree_switch_case * tree_switch_case_type
Definition oct-parse.h:181
octave::tree_classdef_enum * tree_classdef_enum_type
Definition oct-parse.h:210
octave::tree_classdef_methods_block * tree_classdef_methods_block_type
Definition oct-parse.h:206
octave::tree_arguments_block * tree_arguments_block_type
Definition oct-parse.h:188
octave::tree_command * tree_command_type
Definition oct-parse.h:176
octave::tree_if_clause * tree_if_clause_type
Definition oct-parse.h:178
octave::tree_expression * tree_expression_type
Definition oct-parse.h:164
octave::tree_classdef_body * tree_classdef_body_type
Definition oct-parse.h:201
octave::tree_classdef_properties_block * tree_classdef_properties_block_type
Definition oct-parse.h:204
octave::tree_classdef_events_block * tree_classdef_events_block_type
Definition oct-parse.h:209
octave::tree_classdef_event_list * tree_classdef_event_list_type
Definition oct-parse.h:208
octave::tree_classdef_enum_list * tree_classdef_enum_list_type
Definition oct-parse.h:211
octave::tree_if_command * tree_if_command_type
Definition oct-parse.h:177
octave::tree_decl_elt * tree_decl_elt_type
Definition oct-parse.h:183
octave::tree_parameter_list * tree_parameter_list_type
Definition oct-parse.h:175
octave::tree_index_expression * tree_index_expression_type
Definition oct-parse.h:172
octave::tree_anon_fcn_handle * tree_anon_fcn_handle_type
Definition oct-parse.h:170
octave::tree_classdef_superclass * tree_classdef_superclass_type
Definition oct-parse.h:199
octave::tree * tree_type
Definition oct-parse.h:161
octave::tree_constant * tree_constant_type
Definition oct-parse.h:165
octave::tree_decl_command * tree_decl_command_type
Definition oct-parse.h:185
octave::tree_metaclass_query * tree_metaclass_query_type
Definition oct-parse.h:168
octave::tree_superclass_ref * tree_superclass_ref_type
Definition oct-parse.h:167
octave::tree_matrix * tree_matrix_type
Definition oct-parse.h:162
octave::tree_colon_expression * tree_colon_expression_type
Definition oct-parse.h:173
octave::tree_args_block_validation_list * tree_args_block_validation_list_type
Definition oct-parse.h:190
octave::tree_classdef_attribute * tree_classdef_attribute_type
Definition oct-parse.h:197
octave::tree_classdef_property_list * tree_classdef_property_list_type
Definition oct-parse.h:203
octave::tree_statement * tree_statement_type
Definition oct-parse.h:186
octave::tree_statement_list * tree_statement_list_type
Definition oct-parse.h:187
octave::token * tok
Definition oct-parse.h:155
octave::separator_list * sep_list_type
Definition oct-parse.h:158
octave::tree_if_command_list * tree_if_command_list_type
Definition oct-parse.h:179
octave::tree_decl_init_list * tree_decl_init_list_type
Definition oct-parse.h:184
octave::tree_classdef * tree_classdef_type
Definition oct-parse.h:196
octave::tree_classdef_method_list * tree_classdef_method_list_type
Definition oct-parse.h:205
octave::tree_identifier * tree_identifier_type
Definition oct-parse.h:171
octave::tree_arg_validation * tree_arg_validation_type
Definition oct-parse.h:192
octave::tree_args_block_attribute_list * tree_args_block_attribute_list_type
Definition oct-parse.h:189
octave::tree_fcn_handle * tree_fcn_handle_type
Definition oct-parse.h:166
octave::tree_classdef_attribute_list * tree_classdef_attribute_list_type
Definition oct-parse.h:198
octave::tree_switch_case_list * tree_switch_case_list_type
Definition oct-parse.h:182
octave::tree_arg_size_spec * tree_arg_size_spec_type
Definition oct-parse.h:191
octave::tree_function_def * tree_function_def_type
Definition oct-parse.h:169
octave::tree_classdef_property * tree_classdef_property_type
Definition oct-parse.h:202
octave::tree_classdef_superclass_list * tree_classdef_superclass_list_type
Definition oct-parse.h:200
octave_user_function * octave_user_function_type
Definition oct-parse.h:194
octave::tree_classdef_enum_block * tree_classdef_enum_block_type
Definition oct-parse.h:212
octave::tree_classdef_event * tree_classdef_event_type
Definition oct-parse.h:207
octave::tree_cell * tree_cell_type
Definition oct-parse.h:163