Mercurial > octave
annotate libinterp/parse-tree/parse.h @ 31605:e88a07dec498 stable
maint: Use macros to begin/end C++ namespaces.
* oct-conf-post-public.in.h: Define two macros (OCTAVE_BEGIN_NAMESPACE,
OCTAVE_END_NAMESPACE) that can be used to start/end a namespace.
* mk-opts.pl, build-env.h, build-env.in.cc, __betainc__.cc, __contourc__.cc,
__dsearchn__.cc, __eigs__.cc, __expint__.cc, __ftp__.cc, __gammainc__.cc,
__ichol__.cc, __ilu__.cc, __isprimelarge__.cc, __lin_interpn__.cc,
__magick_read__.cc, __pchip_deriv__.cc, __qp__.cc, amd.cc, auto-shlib.cc,
auto-shlib.h, balance.cc, base-text-renderer.cc, base-text-renderer.h,
besselj.cc, bitfcns.cc, bsxfun.cc, c-file-ptr-stream.cc, c-file-ptr-stream.h,
call-stack.cc, call-stack.h, ccolamd.cc, cellfun.cc, chol.cc, colamd.cc,
colloc.cc, conv2.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, data.h, debug.cc,
defaults.cc, defaults.h, defun-int.h, defun.cc, det.cc, dirfns.cc, display.cc,
display.h, dlmread.cc, dmperm.cc, dot.cc, dynamic-ld.cc, dynamic-ld.h, eig.cc,
ellipj.cc, environment.cc, environment.h, error.cc, error.h, errwarn.h,
event-manager.cc, event-manager.h, event-queue.cc, event-queue.h, fcn-info.cc,
fcn-info.h, fft.cc, fft2.cc, fftn.cc, file-io.cc, filter.cc, find.cc,
ft-text-renderer.cc, ft-text-renderer.h, gcd.cc, getgrent.cc, getpwent.cc,
getrusage.cc, givens.cc, gl-render.cc, gl-render.h, gl2ps-print.cc,
gl2ps-print.h, graphics-toolkit.cc, graphics-toolkit.h, graphics.cc,
graphics.in.h, gsvd.cc, gtk-manager.cc, gtk-manager.h, hash.cc, help.cc,
help.h, hess.cc, hex2num.cc, hook-fcn.cc, hook-fcn.h, input.cc, input.h,
interpreter-private.cc, interpreter-private.h, interpreter.cc, interpreter.h,
inv.cc, jsondecode.cc, jsonencode.cc, kron.cc, latex-text-renderer.cc,
latex-text-renderer.h, load-path.cc, load-path.h, load-save.cc, load-save.h,
lookup.cc, ls-ascii-helper.cc, ls-ascii-helper.h, ls-oct-text.cc, ls-utils.cc,
ls-utils.h, lsode.cc, lu.cc, mappers.cc, matrix_type.cc, max.cc, mex-private.h,
mex.cc, mgorth.cc, nproc.cc, oct-fstrm.cc, oct-fstrm.h, oct-hdf5-types.cc,
oct-hdf5-types.h, oct-hist.cc, oct-hist.h, oct-iostrm.cc, oct-iostrm.h,
oct-opengl.h, oct-prcstrm.cc, oct-prcstrm.h, oct-procbuf.cc, oct-procbuf.h,
oct-process.cc, oct-process.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h,
oct-strstrm.cc, oct-strstrm.h, oct-tex-lexer.in.ll, oct-tex-parser.yy,
ordqz.cc, ordschur.cc, pager.cc, pager.h, pinv.cc, pow2.cc, pr-flt-fmt.cc,
pr-output.cc, procstream.cc, procstream.h, psi.cc, qr.cc, quad.cc, quadcc.cc,
qz.cc, rand.cc, rcond.cc, regexp.cc, schur.cc, settings.cc, settings.h,
sighandlers.cc, sighandlers.h, sparse-xdiv.cc, sparse-xdiv.h, sparse-xpow.cc,
sparse-xpow.h, sparse.cc, spparms.cc, sqrtm.cc, stack-frame.cc, stack-frame.h,
stream-euler.cc, strfind.cc, strfns.cc, sub2ind.cc, svd.cc, sylvester.cc,
symbfact.cc, syminfo.cc, syminfo.h, symrcm.cc, symrec.cc, symrec.h,
symscope.cc, symscope.h, symtab.cc, symtab.h, syscalls.cc, sysdep.cc, sysdep.h,
text-engine.cc, text-engine.h, text-renderer.cc, text-renderer.h, time.cc,
toplev.cc, tril.cc, tsearch.cc, typecast.cc, url-handle-manager.cc,
url-handle-manager.h, urlwrite.cc, utils.cc, utils.h, variables.cc,
variables.h, xdiv.cc, xdiv.h, xnorm.cc, xnorm.h, xpow.cc, xpow.h,
__delaunayn__.cc, __fltk_uigetfile__.cc, __glpk__.cc, __init_fltk__.cc,
__init_gnuplot__.cc, __ode15__.cc, __voronoi__.cc, audiodevinfo.cc,
audioread.cc, convhulln.cc, fftw.cc, gzip.cc, mk-build-env-features.sh,
mk-builtins.pl, cdef-class.cc, cdef-class.h, cdef-fwd.h, cdef-manager.cc,
cdef-manager.h, cdef-method.cc, cdef-method.h, cdef-object.cc, cdef-object.h,
cdef-package.cc, cdef-package.h, cdef-property.cc, cdef-property.h,
cdef-utils.cc, cdef-utils.h, ov-base.cc, ov-base.h, ov-bool-mat.cc,
ov-builtin.h, ov-cell.cc, ov-class.cc, ov-class.h, ov-classdef.cc,
ov-classdef.h, ov-complex.cc, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn.h,
ov-java.cc, ov-java.h, ov-mex-fcn.h, ov-null-mat.cc, ov-oncleanup.cc,
ov-struct.cc, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h,
ov.cc, ov.h, octave.cc, octave.h, mk-ops.sh, op-b-b.cc, op-b-bm.cc,
op-b-sbm.cc, op-bm-b.cc, op-bm-bm.cc, op-bm-sbm.cc, op-cdm-cdm.cc, op-cell.cc,
op-chm.cc, op-class.cc, op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc,
op-cm-scm.cc, op-cm-sm.cc, op-cs-cm.cc, op-cs-cs.cc, op-cs-m.cc, op-cs-s.cc,
op-cs-scm.cc, op-cs-sm.cc, op-dm-dm.cc, op-dm-scm.cc, op-dm-sm.cc,
op-dm-template.cc, op-dms-template.cc, op-fcdm-fcdm.cc, op-fcm-fcm.cc,
op-fcm-fcs.cc, op-fcm-fm.cc, op-fcm-fs.cc, op-fcn.cc, op-fcs-fcm.cc,
op-fcs-fcs.cc, op-fcs-fm.cc, op-fcs-fs.cc, op-fdm-fdm.cc, op-fm-fcm.cc,
op-fm-fcs.cc, op-fm-fm.cc, op-fm-fs.cc, op-fs-fcm.cc, op-fs-fcs.cc,
op-fs-fm.cc, op-fs-fs.cc, op-i16-i16.cc, op-i32-i32.cc, op-i64-i64.cc,
op-i8-i8.cc, op-int-concat.cc, op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc,
op-m-scm.cc, op-m-sm.cc, op-mi.cc, op-pm-pm.cc, op-pm-scm.cc, op-pm-sm.cc,
op-pm-template.cc, op-range.cc, op-s-cm.cc, op-s-cs.cc, op-s-m.cc, op-s-s.cc,
op-s-scm.cc, op-s-sm.cc, op-sbm-b.cc, op-sbm-bm.cc, op-sbm-sbm.cc,
op-scm-cm.cc, op-scm-cs.cc, op-scm-m.cc, op-scm-s.cc, op-scm-scm.cc,
op-scm-sm.cc, op-sm-cm.cc, op-sm-cs.cc, op-sm-m.cc, op-sm-s.cc, op-sm-scm.cc,
op-sm-sm.cc, op-str-m.cc, op-str-s.cc, op-str-str.cc, op-struct.cc,
op-ui16-ui16.cc, op-ui32-ui32.cc, op-ui64-ui64.cc, op-ui8-ui8.cc, ops.h,
anon-fcn-validator.cc, anon-fcn-validator.h, bp-table.cc, bp-table.h,
comment-list.cc, comment-list.h, filepos.h, lex.h, lex.ll, oct-lvalue.cc,
oct-lvalue.h, oct-parse.yy, parse.h, profiler.cc, profiler.h,
pt-anon-scopes.cc, pt-anon-scopes.h, pt-arg-list.cc, pt-arg-list.h,
pt-args-block.cc, pt-args-block.h, pt-array-list.cc, pt-array-list.h,
pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.cc, pt-bp.h,
pt-cbinop.cc, pt-cbinop.h, pt-cell.cc, pt-cell.h, pt-check.cc, pt-check.h,
pt-classdef.cc, pt-classdef.h, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc,
pt-const.h, pt-decl.cc, pt-decl.h, pt-eval.cc, pt-eval.h, pt-except.cc,
pt-except.h, pt-exp.cc, pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc,
pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc,
pt-mat.h, pt-misc.cc, pt-misc.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc,
pt-select.h, pt-spmd.cc, pt-spmd.h, pt-stmt.cc, pt-stmt.h, pt-tm-const.cc,
pt-tm-const.h, pt-unop.cc, pt-unop.h, pt-vm-eval.cc, pt-walk.cc, pt-walk.h,
pt.cc, pt.h, token.cc, token.h, Range.cc, Range.h, idx-vector.cc, idx-vector.h,
range-fwd.h, CollocWt.cc, CollocWt.h, aepbalance.cc, aepbalance.h, chol.cc,
chol.h, gepbalance.cc, gepbalance.h, gsvd.cc, gsvd.h, hess.cc, hess.h,
lo-mappers.cc, lo-mappers.h, lo-specfun.cc, lo-specfun.h, lu.cc, lu.h,
oct-convn.cc, oct-convn.h, oct-fftw.cc, oct-fftw.h, oct-norm.cc, oct-norm.h,
oct-rand.cc, oct-rand.h, oct-spparms.cc, oct-spparms.h, qr.cc, qr.h, qrp.cc,
qrp.h, randgamma.cc, randgamma.h, randmtzig.cc, randmtzig.h, randpoisson.cc,
randpoisson.h, schur.cc, schur.h, sparse-chol.cc, sparse-chol.h, sparse-lu.cc,
sparse-lu.h, sparse-qr.cc, sparse-qr.h, svd.cc, svd.h, child-list.cc,
child-list.h, dir-ops.cc, dir-ops.h, file-ops.cc, file-ops.h, file-stat.cc,
file-stat.h, lo-sysdep.cc, lo-sysdep.h, lo-sysinfo.cc, lo-sysinfo.h,
mach-info.cc, mach-info.h, oct-env.cc, oct-env.h, oct-group.cc, oct-group.h,
oct-password.cc, oct-password.h, oct-syscalls.cc, oct-syscalls.h, oct-time.cc,
oct-time.h, oct-uname.cc, oct-uname.h, action-container.cc, action-container.h,
base-list.h, cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h, f77-fcn.h,
file-info.cc, file-info.h, lo-array-errwarn.cc, lo-array-errwarn.h, lo-hash.cc,
lo-hash.h, lo-ieee.h, lo-regexp.cc, lo-regexp.h, lo-utils.cc, lo-utils.h,
oct-base64.cc, oct-base64.h, oct-glob.cc, oct-glob.h, oct-inttypes.h,
oct-mutex.cc, oct-mutex.h, oct-refcount.h, oct-shlib.cc, oct-shlib.h,
oct-sparse.cc, oct-sparse.h, oct-string.h, octave-preserve-stream-state.h,
pathsearch.cc, pathsearch.h, quit.cc, quit.h, unwind-prot.cc, unwind-prot.h,
url-transfer.cc, url-transfer.h : Use new macros to begin/end C++ namespaces.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 01 Dec 2022 14:23:45 -0800 |
parents | 7781b1e77406 |
children | aac27ad79be6 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
30390
diff
changeset
|
3 // Copyright (C) 1993-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
1 | 25 |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
26 #if ! defined (octave_parse_h) |
383 | 27 #define octave_parse_h 1 |
1 | 28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21139
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21139
diff
changeset
|
30 |
3021 | 31 #include <cstdio> |
32 | |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
33 #include <deque> |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
34 #include <map> |
27504
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
35 #include <memory> |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
36 #include <set> |
27504
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
37 #include <string> |
4426 | 38 |
28266
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
39 #include "input.h" |
16139
2fd39ab12209
move a function and data member from lexical_feedback to octave_parser
John W. Eaton <jwe@octave.org>
parents:
16138
diff
changeset
|
40 #include "lex.h" |
23654
da89ce0d49eb
avoid possible memory leak in parser
John W. Eaton <jwe@octave.org>
parents:
23653
diff
changeset
|
41 #include "pt-misc.h" |
24362
3fc24b792a24
avoid including symtab.h, symscope.h, or symrec.h unnecessarily
John W. Eaton <jwe@octave.org>
parents:
24361
diff
changeset
|
42 #include "symscope.h" |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
43 #include "token.h" |
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
44 |
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
45 class octave_function; |
29864
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
46 class octave_user_code; |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
47 class octave_user_function; |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
48 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31394
diff
changeset
|
49 OCTAVE_BEGIN_NAMESPACE(octave) |
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31394
diff
changeset
|
50 |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
51 class comment_list; |
29864
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
52 class parse_exception; |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
53 class tree; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
54 class tree_anon_fcn_handle; |
29724
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
55 class tree_arg_size_spec; |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
56 class tree_arg_validation; |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
57 class tree_arg_validation_fcns; |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
58 class tree_args_block_attribute_list; |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
59 class tree_args_block_validation_list; |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
60 class tree_argument_list; |
29724
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
61 class tree_arguments_block; |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
62 class tree_array_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
63 class tree_cell; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
64 class tree_classdef; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
65 class tree_classdef_attribute_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
66 class tree_classdef_body; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
67 class tree_classdef_enum_block; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
68 class tree_classdef_enum_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
69 class tree_classdef_events_block; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
70 class tree_classdef_events_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
71 class tree_classdef_methods_block; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
72 class tree_classdef_methods_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
73 class tree_classdef_properties_block; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
74 class tree_classdef_property_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
75 class tree_classdef_superclass_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
76 class tree_colon_expression; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
77 class tree_command; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
78 class tree_constant; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
79 class tree_decl_command; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
80 class tree_decl_init_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
81 class tree_expression; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
82 class tree_fcn_handle; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
83 class tree_function_def; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
84 class tree_identifier; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
85 class tree_if_clause; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
86 class tree_if_command; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
87 class tree_if_command_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
88 class tree_index_expression; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
89 class tree_matrix; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
90 class tree_matrix; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
91 class tree_parameter_list; |
28518
b8ab8b58547d
accept spmd command blocks as language elements (bug #58676)
John W. Eaton <jwe@octave.org>
parents:
28516
diff
changeset
|
92 class tree_spmd_command; |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
93 class tree_statement; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
94 class tree_statement_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
95 class tree_statement_listtree_statement; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
96 class tree_switch_case; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
97 class tree_switch_case_list; |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
98 class tree_switch_command; |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31394
diff
changeset
|
99 |
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31394
diff
changeset
|
100 OCTAVE_END_NAMESPACE(octave) |
3772 | 101 |
20940
48b2ad5ee801
maint: Rename oct-obj.[cc|h] to ovl.[cc|h] for clarity.
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
102 #include "ovl.h" |
1 | 103 |
104 // Nonzero means print parser debugging info (-d). | |
4753 | 105 extern int octave_debug; |
1 | 106 |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31394
diff
changeset
|
107 OCTAVE_BEGIN_NAMESPACE(octave) |
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31394
diff
changeset
|
108 |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
109 class base_parser |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
110 { |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
111 private: |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
112 |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
113 class parent_scope_info |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
114 { |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
115 public: |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
116 |
24361
8bcfddad15ec
use shared_ptr to manage symbol_scope objects
John W. Eaton <jwe@octave.org>
parents:
24270
diff
changeset
|
117 typedef std::pair<symbol_scope, std::string> value_type; |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
118 |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
119 typedef std::deque<value_type>::iterator iterator; |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
120 typedef std::deque<value_type>::const_iterator const_iterator; |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
121 |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
122 typedef std::deque<value_type>::reverse_iterator reverse_iterator; |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
123 typedef std::deque<value_type>::const_reverse_iterator const_reverse_iterator; |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
124 |
28698
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
125 parent_scope_info (void) = delete; |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
126 |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
127 parent_scope_info (base_parser& parser) |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
128 : m_parser (parser), m_info (), m_all_names () |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
129 { } |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
130 |
28718
45d958bc3437
disable copying for base_parser::parent_scope_info class
John W. Eaton <jwe@octave.org>
parents:
28698
diff
changeset
|
131 // No copying! |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
132 |
28718
45d958bc3437
disable copying for base_parser::parent_scope_info class
John W. Eaton <jwe@octave.org>
parents:
28698
diff
changeset
|
133 parent_scope_info (const parent_scope_info&) = delete; |
45d958bc3437
disable copying for base_parser::parent_scope_info class
John W. Eaton <jwe@octave.org>
parents:
28698
diff
changeset
|
134 |
45d958bc3437
disable copying for base_parser::parent_scope_info class
John W. Eaton <jwe@octave.org>
parents:
28698
diff
changeset
|
135 parent_scope_info& operator = (const parent_scope_info&) = delete; |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
136 |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
137 ~parent_scope_info (void) = default; |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
138 |
29572
aef11bb4e6d1
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29359
diff
changeset
|
139 OCTINTERP_API std::size_t size (void) const; |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
140 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
141 OCTINTERP_API void push (const value_type& elt); |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
142 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
143 OCTINTERP_API void push (const symbol_scope& id); |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
144 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
145 OCTINTERP_API void pop (void); |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
146 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
147 OCTINTERP_API bool name_ok (const std::string& name); |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
148 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
149 OCTINTERP_API bool name_current_scope (const std::string& name); |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
150 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
151 OCTINTERP_API symbol_scope parent_scope (void) const; |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
152 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
153 OCTINTERP_API std::string parent_name (void) const; |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
154 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
155 OCTINTERP_API void clear (void); |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
156 |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
157 private: |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
158 |
28698
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
159 base_parser& m_parser; |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
160 std::deque<value_type> m_info; |
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
161 std::set<std::string> m_all_names; |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
162 }; |
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
163 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
164 public: |
16195
b52d2f9294b6
use class for reading lexer input
John W. Eaton <jwe@octave.org>
parents:
16177
diff
changeset
|
165 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
166 OCTINTERP_API base_parser (base_lexer& lxr); |
16157
335041cc657a
optionally use push parser interface
John W. Eaton <jwe@octave.org>
parents:
16153
diff
changeset
|
167 |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
168 // No copying! |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
169 |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
170 base_parser (const base_parser&) = delete; |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
171 |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
172 base_parser& operator = (const base_parser&) = delete; |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
173 |
29752
e04b4706ca18
declare base_parser destructor virtual
John W. Eaton <jwe@octave.org>
parents:
29654
diff
changeset
|
174 virtual ~base_parser (void); |
16139
2fd39ab12209
move a function and data member from lexical_feedback to octave_parser
John W. Eaton <jwe@octave.org>
parents:
16138
diff
changeset
|
175 |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
176 base_lexer& get_lexer (void) const { return m_lexer; } |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
177 |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
178 bool at_end_of_input (void) const { return m_lexer.m_end_of_input; } |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
179 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
180 OCTINTERP_API void reset (void); |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
181 |
27504
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
182 void classdef_object (const std::shared_ptr<tree_classdef>& obj) |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
183 { |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
184 m_classdef_object = obj; |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
185 } |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
186 |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
187 std::shared_ptr<tree_classdef> classdef_object (void) const |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
188 { |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
189 return m_classdef_object; |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
190 } |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
191 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
192 OCTINTERP_API void statement_list (std::shared_ptr<tree_statement_list>& lst); |
27504
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
193 |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
194 std::shared_ptr<tree_statement_list> statement_list (void) const |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
195 { |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
196 return m_stmt_list; |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
197 } |
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
198 |
28698
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
199 void parsing_subfunctions (bool flag) |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
200 { |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
201 m_parsing_subfunctions = flag; |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
202 } |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
203 |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
204 bool parsing_subfunctions (void) const |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
205 { |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
206 return m_parsing_subfunctions; |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
207 } |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
208 |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
209 void parsing_local_functions (bool flag) |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
210 { |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
211 m_parsing_local_functions = flag; |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
212 } |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
213 |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
214 bool parsing_local_functions (void) const |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
215 { |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
216 return m_parsing_local_functions; |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
217 } |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
218 |
28698
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
219 int curr_fcn_depth (void) const |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
220 { |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
221 return m_curr_fcn_depth; |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
222 } |
d45d1b4bb919
allow functions to be redefined in scripts (bug #52851)
John W. Eaton <jwe@octave.org>
parents:
28511
diff
changeset
|
223 |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
224 void endfunction_found (bool flag) |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
225 { |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
226 m_endfunction_found = flag; |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
227 } |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
228 |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
229 bool endfunction_found (void) const |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
230 { |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
231 return m_endfunction_found; |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
232 } |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
233 |
27956
2310164737b3
fix many spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents:
26512
diff
changeset
|
234 // Error messages for mismatched end tokens. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
235 OCTINTERP_API void |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
236 end_token_error (token *tok, token::end_tok_type expected); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
237 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
238 // Check to see that end tokens are properly matched. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
239 OCTINTERP_API bool end_token_ok (token *tok, token::end_tok_type expected); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
240 |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
241 // Handle pushing symbol table for new function scope. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
242 OCTINTERP_API bool push_fcn_symtab (void); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
243 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
244 // Build a constant. |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
245 OCTINTERP_API tree_constant * make_constant (token *tok_val); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
246 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
247 OCTINTERP_API tree_black_hole * make_black_hole (void); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
248 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
249 OCTINTERP_API tree_matrix * make_matrix (tree_argument_list *row); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
250 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
251 OCTINTERP_API tree_matrix * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
252 append_matrix_row (tree_matrix *matrix, tree_argument_list *row); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
253 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
254 OCTINTERP_API tree_cell * make_cell (tree_argument_list *row); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
255 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
256 OCTINTERP_API tree_cell * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
257 append_cell_row (tree_cell *cell, tree_argument_list *row); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
258 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
259 // Build a function handle. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
260 OCTINTERP_API tree_fcn_handle * make_fcn_handle (token *tok_val); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
261 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
262 // Build an anonymous function handle. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
263 OCTINTERP_API tree_anon_fcn_handle * |
23600
db947ba52118
explicitly limit anonymous functions to a single expression
John W. Eaton <jwe@octave.org>
parents:
23502
diff
changeset
|
264 make_anon_fcn_handle (tree_parameter_list *param_list, |
30390
a61e1a0f6024
maint: style check C++ files in libinterp/ ahead of 7.1 release.
Rik <rik@octave.org>
parents:
30144
diff
changeset
|
265 tree_expression *expr, const filepos& at_pos); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
266 |
23655
bbcc1e08aaed
improve colon expression construction and avoid possible memory leak
John W. Eaton <jwe@octave.org>
parents:
23654
diff
changeset
|
267 // Build a colon expression. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
268 OCTINTERP_API tree_expression * |
23655
bbcc1e08aaed
improve colon expression construction and avoid possible memory leak
John W. Eaton <jwe@octave.org>
parents:
23654
diff
changeset
|
269 make_colon_expression (tree_expression *base, tree_expression *limit, |
bbcc1e08aaed
improve colon expression construction and avoid possible memory leak
John W. Eaton <jwe@octave.org>
parents:
23654
diff
changeset
|
270 tree_expression *incr = nullptr); |
bbcc1e08aaed
improve colon expression construction and avoid possible memory leak
John W. Eaton <jwe@octave.org>
parents:
23654
diff
changeset
|
271 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
272 // Build a binary expression. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
273 OCTINTERP_API tree_expression * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
274 make_binary_op (int op, tree_expression *op1, token *tok_val, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
275 tree_expression *op2); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
276 |
31394
7781b1e77406
use separate class for braindead shortcircuit evaluation
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
277 // Maybe convert EXPR to a braindead_shortcircuit expression. |
7781b1e77406
use separate class for braindead shortcircuit evaluation
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
278 OCTINTERP_API void |
7781b1e77406
use separate class for braindead shortcircuit evaluation
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
279 maybe_convert_to_braindead_shortcircuit (tree_expression*& expr); |
7781b1e77406
use separate class for braindead shortcircuit evaluation
John W. Eaton <jwe@octave.org>
parents:
30564
diff
changeset
|
280 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
281 // Build a boolean expression. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
282 OCTINTERP_API tree_expression * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
283 make_boolean_op (int op, tree_expression *op1, token *tok_val, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
284 tree_expression *op2); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
285 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
286 // Build a prefix expression. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
287 OCTINTERP_API tree_expression * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
288 make_prefix_op (int op, tree_expression *op1, token *tok_val); |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
289 |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
290 // Build a postfix expression. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
291 OCTINTERP_API tree_expression * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
292 make_postfix_op (int op, tree_expression *op1, token *tok_val); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
293 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
294 // Build an unwind-protect command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
295 OCTINTERP_API tree_command * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
296 make_unwind_command (token *unwind_tok, tree_statement_list *body, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
297 tree_statement_list *cleanup, token *end_tok, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
298 comment_list *lc, comment_list *mc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
299 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
300 // Build a try-catch command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
301 OCTINTERP_API tree_command * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
302 make_try_command (token *try_tok, tree_statement_list *body, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
303 char catch_sep, tree_statement_list *cleanup, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
304 token *end_tok, comment_list *lc, |
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
305 comment_list *mc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
306 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
307 // Build a while command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
308 OCTINTERP_API tree_command * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
309 make_while_command (token *while_tok, tree_expression *expr, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
310 tree_statement_list *body, token *end_tok, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
311 comment_list *lc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
312 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
313 // Build a do-until command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
314 OCTINTERP_API tree_command * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
315 make_do_until_command (token *until_tok, tree_statement_list *body, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
316 tree_expression *expr, comment_list *lc); |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
317 |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
318 // Build a for command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
319 OCTINTERP_API tree_command * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
320 make_for_command (int tok_id, token *for_tok, tree_argument_list *lhs, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
321 tree_expression *expr, tree_expression *maxproc, |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
322 tree_statement_list *body, token *end_tok, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
323 comment_list *lc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
324 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
325 // Build a break command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
326 OCTINTERP_API tree_command * make_break_command (token *break_tok); |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
327 |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
328 // Build a continue command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
329 OCTINTERP_API tree_command * make_continue_command (token *continue_tok); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
330 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
331 // Build a return command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
332 OCTINTERP_API tree_command * make_return_command (token *return_tok); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
333 |
28518
b8ab8b58547d
accept spmd command blocks as language elements (bug #58676)
John W. Eaton <jwe@octave.org>
parents:
28516
diff
changeset
|
334 // Build an spmd command. |
b8ab8b58547d
accept spmd command blocks as language elements (bug #58676)
John W. Eaton <jwe@octave.org>
parents:
28516
diff
changeset
|
335 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
336 OCTINTERP_API tree_spmd_command * |
28518
b8ab8b58547d
accept spmd command blocks as language elements (bug #58676)
John W. Eaton <jwe@octave.org>
parents:
28516
diff
changeset
|
337 make_spmd_command (token *spmd_tok, tree_statement_list *body, |
b8ab8b58547d
accept spmd command blocks as language elements (bug #58676)
John W. Eaton <jwe@octave.org>
parents:
28516
diff
changeset
|
338 token *end_tok, comment_list *lc, comment_list *tc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
339 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
340 // Start an if command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
341 OCTINTERP_API tree_if_command_list * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
342 start_if_command (tree_expression *expr, tree_statement_list *list); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
343 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
344 // Finish an if command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
345 OCTINTERP_API tree_if_command * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
346 finish_if_command (token *if_tok, tree_if_command_list *list, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
347 token *end_tok, comment_list *lc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
348 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
349 // Build an elseif clause. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
350 OCTINTERP_API tree_if_clause * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
351 make_elseif_clause (token *elseif_tok, tree_expression *expr, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
352 tree_statement_list *list, comment_list *lc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
353 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
354 OCTINTERP_API tree_if_clause * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
355 make_else_clause (token *else_tok, comment_list *lc, |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
356 tree_statement_list *list); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
357 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
358 OCTINTERP_API tree_if_command_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
359 append_if_clause (tree_if_command_list *list, tree_if_clause *clause); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
360 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
361 // Finish a switch command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
362 OCTINTERP_API tree_switch_command * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
363 finish_switch_command (token *switch_tok, tree_expression *expr, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
364 tree_switch_case_list *list, token *end_tok, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
365 comment_list *lc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
366 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
367 OCTINTERP_API tree_switch_case_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
368 make_switch_case_list (tree_switch_case *switch_case); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
369 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
370 // Build a switch case. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
371 OCTINTERP_API tree_switch_case * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
372 make_switch_case (token *case_tok, tree_expression *expr, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
373 tree_statement_list *list, comment_list *lc); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
374 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
375 OCTINTERP_API tree_switch_case * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
376 make_default_switch_case (token *default_tok, comment_list *lc, |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
377 tree_statement_list *list); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
378 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
379 OCTINTERP_API tree_switch_case_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
380 append_switch_case (tree_switch_case_list *list, tree_switch_case *elt); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
381 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
382 // Build an assignment to a variable. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
383 OCTINTERP_API tree_expression * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
384 make_assign_op (int op, tree_argument_list *lhs, token *eq_tok, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
385 tree_expression *rhs); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
386 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
387 // Define a script. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
388 OCTINTERP_API void |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
389 make_script (tree_statement_list *cmds, tree_statement *end_script); |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
390 |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
391 // Handle identifier that is recognized as a function name. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
392 OCTINTERP_API tree_identifier * |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
393 make_fcn_name (tree_identifier *id); |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
394 |
23673
1d1ce4df5255
refactor bison rules for parsing functions
John W. Eaton <jwe@octave.org>
parents:
23655
diff
changeset
|
395 // Define a function. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
396 OCTINTERP_API tree_function_def * |
23673
1d1ce4df5255
refactor bison rules for parsing functions
John W. Eaton <jwe@octave.org>
parents:
23655
diff
changeset
|
397 make_function (token *fcn_tok, tree_parameter_list *ret_list, |
1d1ce4df5255
refactor bison rules for parsing functions
John W. Eaton <jwe@octave.org>
parents:
23655
diff
changeset
|
398 tree_identifier *id, tree_parameter_list *param_list, |
1d1ce4df5255
refactor bison rules for parsing functions
John W. Eaton <jwe@octave.org>
parents:
23655
diff
changeset
|
399 tree_statement_list *body, tree_statement *end_fcn_stmt, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
400 comment_list *lc); |
23673
1d1ce4df5255
refactor bison rules for parsing functions
John W. Eaton <jwe@octave.org>
parents:
23655
diff
changeset
|
401 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
402 // Begin defining a function. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
403 OCTINTERP_API octave_user_function * |
23673
1d1ce4df5255
refactor bison rules for parsing functions
John W. Eaton <jwe@octave.org>
parents:
23655
diff
changeset
|
404 start_function (tree_identifier *id, tree_parameter_list *param_list, |
1d1ce4df5255
refactor bison rules for parsing functions
John W. Eaton <jwe@octave.org>
parents:
23655
diff
changeset
|
405 tree_statement_list *body, tree_statement *end_function); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
406 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
407 // Create a no-op statement for end_function. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
408 OCTINTERP_API tree_statement * |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
409 make_end (const std::string& type, bool eof, |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
410 const filepos& beg_pos, const filepos& end_pos); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
411 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
412 // Do most of the work for defining a function. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
413 OCTINTERP_API octave_user_function * |
23673
1d1ce4df5255
refactor bison rules for parsing functions
John W. Eaton <jwe@octave.org>
parents:
23655
diff
changeset
|
414 frob_function (tree_identifier *id, octave_user_function *fcn); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
415 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
416 // Finish defining a function. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
417 OCTINTERP_API tree_function_def * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
418 finish_function (tree_parameter_list *ret_list, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
419 octave_user_function *fcn, comment_list *lc, |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
420 int l, int c); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
421 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
422 OCTINTERP_API tree_statement_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
423 append_function_body (tree_statement_list *body, tree_statement_list *list); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
424 |
29724
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
425 // Make an arguments validation block. |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
426 OCTINTERP_API tree_arguments_block * |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
427 make_arguments_block (token *arguments_tok, |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
428 tree_args_block_attribute_list *attr_list, |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
429 tree_args_block_validation_list *validation_list, |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
430 token *end_tok, comment_list *lc, comment_list *tc); |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
431 |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
432 OCTINTERP_API tree_args_block_attribute_list * |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
433 make_args_attribute_list (tree_identifier *attribute_name); |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
434 |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
435 // Make an argument validation. |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
436 OCTINTERP_API tree_arg_validation * |
29729
d0ce7260978d
also accept validation syntax for classdef properties
John W. Eaton <jwe@octave.org>
parents:
29724
diff
changeset
|
437 make_arg_validation (tree_arg_size_spec *size_spec, |
29724
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
438 tree_identifier *class_name, |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
439 tree_arg_validation_fcns *validation_fcns, |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
440 tree_expression *default_value); |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
441 |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
442 // Make an argument validation list. |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
443 OCTINTERP_API tree_args_block_validation_list * |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
444 make_args_validation_list (tree_arg_validation *arg_validation); |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
445 |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
446 // Append an argument validation to an existing list. |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
447 OCTINTERP_API tree_args_block_validation_list * |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
448 append_args_validation_list (tree_args_block_validation_list *list, |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
449 tree_arg_validation *arg_validation); |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
450 |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
451 // Make an argument size specification object. |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
452 OCTINTERP_API tree_arg_size_spec * |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
453 make_arg_size_spec (tree_argument_list *size_args); |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
454 |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
455 // Make a list of argument validation functions. |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
456 OCTINTERP_API tree_arg_validation_fcns * |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
457 make_arg_validation_fcns (tree_argument_list *fcn_args); |
c19f8cbe0fd5
initial implementation of parsing for arguments validaton block (bug #59405)
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
458 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
459 // Reset state after parsing function. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
460 OCTINTERP_API void |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
461 recover_from_parsing_function (void); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
462 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
463 OCTINTERP_API tree_classdef * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
464 make_classdef (token *tok_val, tree_classdef_attribute_list *a, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
465 tree_identifier *id, tree_classdef_superclass_list *sc, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
466 tree_classdef_body *body, token *end_tok, |
28511
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
467 comment_list *lc, comment_list *tc); |
16155
0259254a3ccc
maint: periodic merge of default to classdef
John W. Eaton <jwe@octave.org>
parents:
16153
diff
changeset
|
468 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
469 OCTINTERP_API tree_classdef_properties_block * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
470 make_classdef_properties_block (token *tok_val, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
471 tree_classdef_attribute_list *a, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
472 tree_classdef_property_list *plist, |
28511
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
473 token *end_tok, comment_list *lc, |
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
474 comment_list *tc); |
16155
0259254a3ccc
maint: periodic merge of default to classdef
John W. Eaton <jwe@octave.org>
parents:
16153
diff
changeset
|
475 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
476 OCTINTERP_API tree_classdef_property_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
477 make_classdef_property_list (tree_classdef_property *prop); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
478 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
479 OCTINTERP_API tree_classdef_property * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
480 make_classdef_property (comment_list *lc, tree_identifier *id, |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
481 tree_arg_validation *av); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
482 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
483 OCTINTERP_API tree_classdef_property_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
484 append_classdef_property (tree_classdef_property_list *list, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
485 tree_classdef_property *elt); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
486 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
487 OCTINTERP_API tree_classdef_methods_block * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
488 make_classdef_methods_block (token *tok_val, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
489 tree_classdef_attribute_list *a, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
490 tree_classdef_methods_list *mlist, |
28511
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
491 token *end_tok, comment_list *lc, |
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
492 comment_list *tc); |
16155
0259254a3ccc
maint: periodic merge of default to classdef
John W. Eaton <jwe@octave.org>
parents:
16153
diff
changeset
|
493 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
494 OCTINTERP_API tree_classdef_events_block * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
495 make_classdef_events_block (token *tok_val, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
496 tree_classdef_attribute_list *a, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
497 tree_classdef_events_list *elist, |
28511
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
498 token *end_tok, comment_list *lc, |
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
499 comment_list *tc); |
16155
0259254a3ccc
maint: periodic merge of default to classdef
John W. Eaton <jwe@octave.org>
parents:
16153
diff
changeset
|
500 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
501 OCTINTERP_API tree_classdef_events_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
502 make_classdef_events_list (tree_classdef_event *e); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
503 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
504 OCTINTERP_API tree_classdef_event * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
505 make_classdef_event (comment_list *lc, tree_identifier *id); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
506 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
507 OCTINTERP_API tree_classdef_events_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
508 append_classdef_event (tree_classdef_events_list *list, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
509 tree_classdef_event *elt); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
510 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
511 OCTINTERP_API tree_classdef_enum_block * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
512 make_classdef_enum_block (token *tok_val, |
16155
0259254a3ccc
maint: periodic merge of default to classdef
John W. Eaton <jwe@octave.org>
parents:
16153
diff
changeset
|
513 tree_classdef_attribute_list *a, |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
514 tree_classdef_enum_list *elist, |
28511
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
515 token *end_tok, comment_list *lc, |
59dfd9ed72a3
capture comments for classdef classes, properties, events, and enumerations
John W. Eaton <jwe@octave.org>
parents:
28407
diff
changeset
|
516 comment_list *tc); |
16155
0259254a3ccc
maint: periodic merge of default to classdef
John W. Eaton <jwe@octave.org>
parents:
16153
diff
changeset
|
517 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
518 OCTINTERP_API tree_classdef_enum_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
519 make_classdef_enum_list (tree_classdef_enum *e); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
520 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
521 OCTINTERP_API tree_classdef_enum * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
522 make_classdef_enum (tree_identifier *id, tree_expression *expr, |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
523 comment_list *lc); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
524 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
525 OCTINTERP_API tree_classdef_enum_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
526 append_classdef_enum (tree_classdef_enum_list *list, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
527 tree_classdef_enum *elt); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
528 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
529 OCTINTERP_API tree_classdef_superclass_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
530 make_classdef_superclass_list (tree_classdef_superclass *sc); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
531 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
532 OCTINTERP_API tree_classdef_superclass * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
533 make_classdef_superclass (token *fqident); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
534 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
535 OCTINTERP_API tree_classdef_superclass_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
536 append_classdef_superclass (tree_classdef_superclass_list *list, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
537 tree_classdef_superclass *elt); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
538 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
539 OCTINTERP_API tree_classdef_attribute_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
540 make_classdef_attribute_list (tree_classdef_attribute *attr); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
541 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
542 OCTINTERP_API tree_classdef_attribute * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
543 make_classdef_attribute (tree_identifier *id, |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
544 tree_expression *expr = nullptr); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
545 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
546 OCTINTERP_API tree_classdef_attribute * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
547 make_not_classdef_attribute (tree_identifier *id); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
548 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
549 OCTINTERP_API tree_classdef_attribute_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
550 append_classdef_attribute (tree_classdef_attribute_list *list, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
551 tree_classdef_attribute *elt); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
552 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
553 OCTINTERP_API tree_classdef_body * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
554 make_classdef_body (tree_classdef_properties_block *pb); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
555 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
556 OCTINTERP_API tree_classdef_body * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
557 make_classdef_body (tree_classdef_methods_block *mb); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
558 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
559 OCTINTERP_API tree_classdef_body * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
560 make_classdef_body (tree_classdef_events_block *evb); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
561 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
562 OCTINTERP_API tree_classdef_body * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
563 make_classdef_body (tree_classdef_enum_block *enb); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
564 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
565 OCTINTERP_API tree_classdef_body * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
566 append_classdef_properties_block (tree_classdef_body *body, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
567 tree_classdef_properties_block *block); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
568 |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
569 OCTINTERP_API tree_classdef_body * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
570 append_classdef_methods_block (tree_classdef_body *body, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
571 tree_classdef_methods_block *block); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
572 |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
573 OCTINTERP_API tree_classdef_body * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
574 append_classdef_events_block (tree_classdef_body *body, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
575 tree_classdef_events_block *block); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
576 |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
577 OCTINTERP_API tree_classdef_body * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
578 append_classdef_enum_block (tree_classdef_body *body, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
579 tree_classdef_enum_block *block); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
580 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
581 OCTINTERP_API octave_user_function * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
582 start_classdef_external_method (tree_identifier *id, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
583 tree_parameter_list *pl); |
16155
0259254a3ccc
maint: periodic merge of default to classdef
John W. Eaton <jwe@octave.org>
parents:
16153
diff
changeset
|
584 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
585 OCTINTERP_API tree_function_def * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
586 finish_classdef_external_method (octave_user_function *fcn, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
587 tree_parameter_list *ret_list, |
23750
ea879bc55272
move comment_list and comment_elt classes to octave namespace
John W. Eaton <jwe@octave.org>
parents:
23696
diff
changeset
|
588 comment_list *cl); |
18262
69990d5edcc2
Allow to parse external methods declaration in classdef files.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
17856
diff
changeset
|
589 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
590 OCTINTERP_API tree_classdef_methods_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
591 make_classdef_methods_list (tree_function_def *fcn_def); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
592 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
593 OCTINTERP_API tree_classdef_methods_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
594 append_classdef_method (tree_classdef_methods_list *list, |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
595 tree_function_def *fcn_def); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
596 |
29864
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
597 OCTINTERP_API bool |
24067
5b88383b9a69
install local functions after classdef parse is complete (bug #52080)
John W. Eaton <jwe@octave.org>
parents:
23750
diff
changeset
|
598 finish_classdef_file (tree_classdef *cls, |
5b88383b9a69
install local functions after classdef parse is complete (bug #52080)
John W. Eaton <jwe@octave.org>
parents:
23750
diff
changeset
|
599 tree_statement_list *local_fcns); |
5b88383b9a69
install local functions after classdef parse is complete (bug #52080)
John W. Eaton <jwe@octave.org>
parents:
23750
diff
changeset
|
600 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
601 // Make an index expression. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
602 OCTINTERP_API tree_index_expression * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
603 make_index_expression (tree_expression *expr, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
604 tree_argument_list *args, char type); |
18262
69990d5edcc2
Allow to parse external methods declaration in classdef files.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
17856
diff
changeset
|
605 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
606 // Make an indirect reference expression. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
607 OCTINTERP_API tree_index_expression * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
608 make_indirect_ref (tree_expression *expr, const std::string&); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
609 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
610 // Make an indirect reference expression with dynamic field name. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
611 OCTINTERP_API tree_index_expression * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
612 make_indirect_ref (tree_expression *expr, tree_expression *field); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
613 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
614 // Make a declaration command. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
615 OCTINTERP_API tree_decl_command * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
616 make_decl_command (int tok, token *tok_val, tree_decl_init_list *lst); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
617 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
618 OCTINTERP_API tree_decl_init_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
619 make_decl_init_list (tree_decl_elt *elt); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
620 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
621 OCTINTERP_API tree_decl_elt * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
622 make_decl_elt (tree_identifier *id, token *eq_op = nullptr, |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
623 tree_expression *expr = nullptr); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
624 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
625 OCTINTERP_API tree_decl_init_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
626 append_decl_init_list (tree_decl_init_list *list, tree_decl_elt *elt); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
627 |
23654
da89ce0d49eb
avoid possible memory leak in parser
John W. Eaton <jwe@octave.org>
parents:
23653
diff
changeset
|
628 // Validate an function parameter list. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
629 OCTINTERP_API bool |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
630 validate_param_list (tree_parameter_list *lst, |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
631 tree_parameter_list::in_or_out type); |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
632 // Validate matrix or cell |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
633 OCTINTERP_API bool validate_array_list (tree_expression *e); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
634 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
635 // Validate matrix object used in "[lhs] = ..." assignments. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
636 OCTINTERP_API tree_argument_list * |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
637 validate_matrix_for_assignment (tree_expression *e); |
16273
c5e5f6ccac5d
9/10 commits reworking the lexer
John W. Eaton <jwe@octave.org>
parents:
16237
diff
changeset
|
638 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
639 // Finish building an array_list (common action for finish_matrix |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
640 // and finish_cell). |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
641 OCTINTERP_API tree_expression * |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
642 finish_array_list (tree_array_list *a, token *open_delim, |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
643 token *close_delim); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
644 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
645 // Finish building a matrix list. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
646 OCTINTERP_API tree_expression * |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
647 finish_matrix (tree_matrix *m, token *open_delim, token *close_delim); |
16237
70f465930546
rearrange class heirarchy for tree_cell and tree_matrix
John W. Eaton <jwe@octave.org>
parents:
16210
diff
changeset
|
648 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
649 // Finish building a cell list. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
650 OCTINTERP_API tree_expression * |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
651 finish_cell (tree_cell *c, token *open_delim, token *close_delim); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
652 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
653 OCTINTERP_API tree_identifier * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
654 make_identifier (token *ident); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
655 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
656 OCTINTERP_API tree_superclass_ref * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
657 make_superclass_ref (token *superclassref); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
658 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
659 OCTINTERP_API tree_metaclass_query * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
660 make_metaclass_query (token *metaquery); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
661 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
662 // Set the print flag for a statement based on the separator type. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
663 OCTINTERP_API tree_statement_list * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
664 set_stmt_print_flag (tree_statement_list *, char, bool); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
665 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
666 // Finish building a statement. |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
667 template <typename T> |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
668 OCTINTERP_API tree_statement * make_statement (T *arg); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
669 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
670 // Create a statement list. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
671 OCTINTERP_API tree_statement_list * |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
672 make_statement_list (tree_statement *stmt); |
17693
efbe746f8fa8
eliminate octave_comment_buffer singleton
John W. Eaton <jwe@octave.org>
parents:
17283
diff
changeset
|
673 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
674 // Append a statement to an existing statement list. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
675 OCTINTERP_API tree_statement_list * |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
676 append_statement_list (tree_statement_list *list, char sep, |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
677 tree_statement *stmt, bool warn_missing_semi); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
678 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
679 OCTINTERP_API tree_argument_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
680 make_argument_list (tree_expression *expr); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
681 |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
682 OCTINTERP_API tree_argument_list * |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
683 append_argument_list (tree_argument_list *list, tree_expression *expr); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
684 |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
685 OCTINTERP_API tree_parameter_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
686 make_parameter_list (tree_parameter_list::in_or_out io); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
687 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
688 OCTINTERP_API tree_parameter_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
689 make_parameter_list (tree_parameter_list::in_or_out io, tree_decl_elt *t); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
690 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
691 OCTINTERP_API tree_parameter_list * |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
692 make_parameter_list (tree_parameter_list::in_or_out io, |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
693 tree_identifier *id); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
694 |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
695 OCTINTERP_API tree_parameter_list * |
30144
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
696 append_parameter_list (tree_parameter_list *list, tree_decl_elt *t); |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
697 |
3c2dee80b542
attempt more uniform handling of list concatenation in the parser
John W. Eaton <jwe@octave.org>
parents:
30140
diff
changeset
|
698 OCTINTERP_API tree_parameter_list * |
30140
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
699 append_parameter_list (tree_parameter_list *list, tree_identifier *id); |
a001811a68e6
use parser functions to build parse tree objects in grammar rule actions
John W. Eaton <jwe@octave.org>
parents:
29864
diff
changeset
|
700 |
26662
05fc703b419a
update handling of command-style function call syntax in eval
John W. Eaton <jwe@octave.org>
parents:
26513
diff
changeset
|
701 // Don't allow parsing command syntax. If the parser/lexer is |
05fc703b419a
update handling of command-style function call syntax in eval
John W. Eaton <jwe@octave.org>
parents:
26513
diff
changeset
|
702 // reset, this setting is also reset to the default (allow command |
05fc703b419a
update handling of command-style function call syntax in eval
John W. Eaton <jwe@octave.org>
parents:
26513
diff
changeset
|
703 // syntax). |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
704 OCTINTERP_API void disallow_command_syntax (void); |
26662
05fc703b419a
update handling of command-style function call syntax in eval
John W. Eaton <jwe@octave.org>
parents:
26513
diff
changeset
|
705 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
706 // Generic error messages. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
707 OCTINTERP_API void bison_error (const std::string& s); |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
708 OCTINTERP_API void bison_error (const std::string& s, const filepos& pos); |
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
709 OCTINTERP_API void bison_error (const std::string& s, int line, int column); |
29864
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
710 OCTINTERP_API void bison_error (const std::list<parse_exception>& pe); |
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
711 OCTINTERP_API void bison_error (const parse_exception& pe); |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
712 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
713 friend OCTINTERP_API octave_value |
27509
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
714 parse_fcn_file (interpreter& interp, const std::string& full_file, |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
715 const std::string& file, const std::string& dir_name, |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
716 const std::string& dispatch_type, |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
717 const std::string& package_name, bool require_file, |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
718 bool force_script, bool autoload, bool relative_lookup); |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
719 |
28266
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
720 // Thih interface allows push or pull parsers to be used |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
721 // equivalently, provided that the push parser also owns its input |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
722 // method (see below). Alternatively, the push parser interface may |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
723 // use a separate run method and completely separate input from |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
724 // lexical analysis and parsing. |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
725 |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
726 virtual int run (void) = 0; |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
727 |
29864
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
728 // Check primary script or function generated by the parser for |
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
729 // semantic errors. |
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
730 OCTINTERP_API bool validate_primary_fcn (void); |
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
731 |
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
732 OCTINTERP_API bool finish_input (tree_statement_list *lst, |
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
733 bool at_eof = false); |
e2e493712818
improve previous change for command syntax parsing (bug #60882)
John W. Eaton <jwe@octave.org>
parents:
29753
diff
changeset
|
734 |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
735 protected: |
16134
ec9c6222ef5a
move static parser helper functions to octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16133
diff
changeset
|
736 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
737 // Contains error message if Bison-generated parser returns non-zero |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
738 // status. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
739 std::string m_parse_error_msg; |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
740 |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
741 // Have we found an explicit end to a function? |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
742 bool m_endfunction_found; |
16142
26d65d677557
rename yyerror to bison_error and make it a member of octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16139
diff
changeset
|
743 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
744 // TRUE means we are in the process of autoloading a function. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
745 bool m_autoloading; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
746 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
747 // TRUE means the current function file was found in a relative path |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
748 // element. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
749 bool m_fcn_file_from_relative_lookup; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
750 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
751 // FALSE if we are still at the primary function. Subfunctions can |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
752 // only be declared inside function files. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
753 bool m_parsing_subfunctions; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
754 |
23343
49f051ef6f2f
local functions in classdef files (bug #41723)
John W. Eaton <jwe@octave.org>
parents:
23342
diff
changeset
|
755 // TRUE if we are parsing local functions defined at after a |
49f051ef6f2f
local functions in classdef files (bug #41723)
John W. Eaton <jwe@octave.org>
parents:
23342
diff
changeset
|
756 // classdef block. Local functions can only be declared inside |
49f051ef6f2f
local functions in classdef files (bug #41723)
John W. Eaton <jwe@octave.org>
parents:
23342
diff
changeset
|
757 // classdef files. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
758 bool m_parsing_local_functions; |
23343
49f051ef6f2f
local functions in classdef files (bug #41723)
John W. Eaton <jwe@octave.org>
parents:
23342
diff
changeset
|
759 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
760 // Maximum function depth detected. Used to determine whether |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
761 // we have nested functions or just implicitly ended subfunctions. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
762 int m_max_fcn_depth; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
763 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
764 // = 0 currently outside any function. |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
765 // = 1 inside the primary function or a subfunction. |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
766 // > 1 means we are looking at a function definition that seems to be |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
767 // inside a function. Note that the function still might not be a |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
768 // nested function. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
769 int m_curr_fcn_depth; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
770 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
771 // Scope where we install all subfunctions and nested functions. Only |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
772 // used while reading function files. |
24361
8bcfddad15ec
use shared_ptr to manage symbol_scope objects
John W. Eaton <jwe@octave.org>
parents:
24270
diff
changeset
|
773 symbol_scope m_primary_fcn_scope; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
774 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
775 // Name of the current class when we are parsing class methods or |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
776 // constructors. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
777 std::string m_curr_class_name; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
778 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
779 // Name of the current package when we are parsing an element contained |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
780 // in a package directory (+-directory). |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
781 std::string m_curr_package_name; |
16676
7368654f302f
Initial support for (classdef) packages.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
16644
diff
changeset
|
782 |
23054
564e959a0e89
avoid invalid nested function and subfunctions definitions (bug #50014)
John W. Eaton <jwe@octave.org>
parents:
22869
diff
changeset
|
783 // Nested function scopes and names currently being parsed. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
784 parent_scope_info m_function_scopes; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
785 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
786 // Pointer to the primary user function or user script function. |
27505
c409d16b7190
eliminate some uses of bare pointers to octave_function objects
John W. Eaton <jwe@octave.org>
parents:
27504
diff
changeset
|
787 octave_value m_primary_fcn; |
16153
a57c2c8c8163
move some variables into the octave_parser class
John W. Eaton <jwe@octave.org>
parents:
16149
diff
changeset
|
788 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
789 // List of subfunction names, initially in the order they are |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
790 // installed in the symbol table, then ordered as they appear in the |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
791 // file. Eventually stashed in the primary function object. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
792 std::list<std::string> m_subfunction_names; |
16627
de91b1621260
adjust location of eof marker for files with subfunctions but no explicit end statements
John W. Eaton <jwe@octave.org>
parents:
16335
diff
changeset
|
793 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
794 // Pointer to the classdef object we just parsed, if any. |
27504
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
795 std::shared_ptr<tree_classdef> m_classdef_object; |
16211
3449bf257514
maint: fix botched merge of default to classdef
John W. Eaton <jwe@octave.org>
parents:
16205
diff
changeset
|
796 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
797 // Result of parsing input. |
27504
7a31b25e3252
use shared_ptr for storing classdef and statement_list objects in parser
John W. Eaton <jwe@octave.org>
parents:
27016
diff
changeset
|
798 std::shared_ptr <tree_statement_list> m_stmt_list; |
16177
a7669b4d27f6
eliminate global global_command variable
John W. Eaton <jwe@octave.org>
parents:
16164
diff
changeset
|
799 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
800 // State of the lexer. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
801 base_lexer& m_lexer; |
16149
49dfba4fd3c5
use pure parser and reentrant lexer interfaces
John W. Eaton <jwe@octave.org>
parents:
16142
diff
changeset
|
802 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
803 // Internal state of the Bison parser. |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
804 void *m_parser_state; |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
805 |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
806 private: |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
807 |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
808 // Maybe print a warning if an assignment expression is used as the |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
809 // test in a logical expression. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
810 OCTINTERP_API void maybe_warn_assign_as_truth_value (tree_expression *expr); |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
811 |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
812 // Maybe print a warning about switch labels that aren't constants. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
813 OCTINTERP_API void maybe_warn_variable_switch_label (tree_expression *expr); |
27510
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
814 |
5438a82a18fb
declare base_parser class data protected
John W. Eaton <jwe@octave.org>
parents:
27509
diff
changeset
|
815 // Maybe print a warning. |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
816 OCTINTERP_API void maybe_warn_missing_semi (tree_statement_list *); |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
817 }; |
16287
04a7953496a7
create base class for parser; use reference for curr_lexer
John W. Eaton <jwe@octave.org>
parents:
16273
diff
changeset
|
818 |
27509
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
819 // Publish externally used friend functions. |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
820 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
821 extern OCTINTERP_API octave_value |
27509
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
822 parse_fcn_file (interpreter& interp, const std::string& full_file, |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
823 const std::string& file, const std::string& dir_name, |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
824 const std::string& dispatch_type, |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
825 const std::string& package_name, bool require_file, |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
826 bool force_script, bool autoload, bool relative_lookup); |
fefc780b4e2e
move parse_fcn_file from interpreter member function to parser friend
John W. Eaton <jwe@octave.org>
parents:
27507
diff
changeset
|
827 |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
828 class parser : public base_parser |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
829 { |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
830 public: |
16287
04a7953496a7
create base class for parser; use reference for curr_lexer
John W. Eaton <jwe@octave.org>
parents:
16273
diff
changeset
|
831 |
25441
143007dad864
store reference instead of pointer to interpreter in lexer
John W. Eaton <jwe@octave.org>
parents:
25103
diff
changeset
|
832 parser (interpreter& interp) |
143007dad864
store reference instead of pointer to interpreter in lexer
John W. Eaton <jwe@octave.org>
parents:
25103
diff
changeset
|
833 : base_parser (*(new lexer (interp))) |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
834 { } |
16287
04a7953496a7
create base class for parser; use reference for curr_lexer
John W. Eaton <jwe@octave.org>
parents:
16273
diff
changeset
|
835 |
25441
143007dad864
store reference instead of pointer to interpreter in lexer
John W. Eaton <jwe@octave.org>
parents:
25103
diff
changeset
|
836 parser (FILE *file, interpreter& interp) |
143007dad864
store reference instead of pointer to interpreter in lexer
John W. Eaton <jwe@octave.org>
parents:
25103
diff
changeset
|
837 : base_parser (*(new lexer (file, interp))) |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
838 { } |
16287
04a7953496a7
create base class for parser; use reference for curr_lexer
John W. Eaton <jwe@octave.org>
parents:
16273
diff
changeset
|
839 |
28953
dff830c84726
Add function "dir_encoding" to set a file encoding per directory (bug #49685).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28719
diff
changeset
|
840 parser (FILE *file, interpreter& interp, std::string encoding) |
dff830c84726
Add function "dir_encoding" to set a file encoding per directory (bug #49685).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28719
diff
changeset
|
841 : base_parser (*(new lexer (file, interp, encoding))) |
dff830c84726
Add function "dir_encoding" to set a file encoding per directory (bug #49685).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28719
diff
changeset
|
842 { } |
dff830c84726
Add function "dir_encoding" to set a file encoding per directory (bug #49685).
Markus Mützel <markus.muetzel@gmx.de>
parents:
28719
diff
changeset
|
843 |
25441
143007dad864
store reference instead of pointer to interpreter in lexer
John W. Eaton <jwe@octave.org>
parents:
25103
diff
changeset
|
844 parser (const std::string& eval_string, interpreter& interp) |
143007dad864
store reference instead of pointer to interpreter in lexer
John W. Eaton <jwe@octave.org>
parents:
25103
diff
changeset
|
845 : base_parser (*(new lexer (eval_string, interp))) |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
846 { } |
16287
04a7953496a7
create base class for parser; use reference for curr_lexer
John W. Eaton <jwe@octave.org>
parents:
16273
diff
changeset
|
847 |
26512
4d6392c879d7
avoid double free of lexer on exit (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26423
diff
changeset
|
848 // The lexer must be allocated with new. The parser object |
4d6392c879d7
avoid double free of lexer on exit (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26423
diff
changeset
|
849 // takes ownership of and deletes the lexer object in its |
4d6392c879d7
avoid double free of lexer on exit (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26423
diff
changeset
|
850 // destructor. |
4d6392c879d7
avoid double free of lexer on exit (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26423
diff
changeset
|
851 |
4d6392c879d7
avoid double free of lexer on exit (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26423
diff
changeset
|
852 parser (lexer *lxr) |
4d6392c879d7
avoid double free of lexer on exit (bug #55347)
John W. Eaton <jwe@octave.org>
parents:
26423
diff
changeset
|
853 : base_parser (*lxr) |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
854 { } |
16335
bef822a80ffb
if not interactive, bypass readline and read stdin as a file (bug #38520)
John W. Eaton <jwe@octave.org>
parents:
16294
diff
changeset
|
855 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
856 // No copying! |
16133
249d62b3fac8
new class for parser state
John W. Eaton <jwe@octave.org>
parents:
16122
diff
changeset
|
857 |
22865
89756f2f085b
use c++11 style for deleting default copy constructor and assignment operator
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
858 parser (const parser&) = delete; |
16133
249d62b3fac8
new class for parser state
John W. Eaton <jwe@octave.org>
parents:
16122
diff
changeset
|
859 |
22865
89756f2f085b
use c++11 style for deleting default copy constructor and assignment operator
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
860 parser& operator = (const parser&) = delete; |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
861 |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
862 ~parser (void) = default; |
16287
04a7953496a7
create base class for parser; use reference for curr_lexer
John W. Eaton <jwe@octave.org>
parents:
16273
diff
changeset
|
863 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
864 OCTINTERP_API int run (void); |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
865 }; |
16133
249d62b3fac8
new class for parser state
John W. Eaton <jwe@octave.org>
parents:
16122
diff
changeset
|
866 |
23694
4a62da62af09
use m_ prefix for member variables in parser
John W. Eaton <jwe@octave.org>
parents:
23673
diff
changeset
|
867 class push_parser : public base_parser |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
868 { |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
869 public: |
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
870 |
25441
143007dad864
store reference instead of pointer to interpreter in lexer
John W. Eaton <jwe@octave.org>
parents:
25103
diff
changeset
|
871 push_parser (interpreter& interp) |
28266
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
872 : base_parser (*(new push_lexer (interp))), |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
873 m_interpreter (interp), m_reader () |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
874 { } |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
875 |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
876 // The parser assumes ownership of READER, which must be created |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
877 // with new. |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
878 |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
879 push_parser (interpreter& interp, input_reader *reader) |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
880 : base_parser (*(new push_lexer (interp))), |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
881 m_interpreter (interp), m_reader (reader) |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
882 { } |
16294
0925d1f6875e
push parser/lexer interface
John W. Eaton <jwe@octave.org>
parents:
16293
diff
changeset
|
883 |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
884 // No copying! |
16294
0925d1f6875e
push parser/lexer interface
John W. Eaton <jwe@octave.org>
parents:
16293
diff
changeset
|
885 |
22865
89756f2f085b
use c++11 style for deleting default copy constructor and assignment operator
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
886 push_parser (const push_parser&) = delete; |
16294
0925d1f6875e
push parser/lexer interface
John W. Eaton <jwe@octave.org>
parents:
16293
diff
changeset
|
887 |
22865
89756f2f085b
use c++11 style for deleting default copy constructor and assignment operator
John W. Eaton <jwe@octave.org>
parents:
22755
diff
changeset
|
888 push_parser& operator = (const push_parser&) = delete; |
22869
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
889 |
f75d289645ec
make deleted functions public
John W. Eaton <jwe@octave.org>
parents:
22868
diff
changeset
|
890 ~push_parser (void) = default; |
16294
0925d1f6875e
push parser/lexer interface
John W. Eaton <jwe@octave.org>
parents:
16293
diff
changeset
|
891 |
28266
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
892 // Use the push parser in the same way as the pull parser. The |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
893 // parser arranges for input through the M_READER object. See, for |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
894 // example, interpreter::main_loop. |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
895 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
896 OCTINTERP_API int run (void); |
28266
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
897 |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
898 // Parse INPUT. M_READER is not used. The user is responsible for |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
899 // collecting input. |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
900 |
29235
d16d73a050b2
Set API tags in remaining files in libinterp (patch #8919).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29151
diff
changeset
|
901 OCTINTERP_API int run (const std::string& input, bool eof); |
28266
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
902 |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
903 private: |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
904 |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
905 interpreter& m_interpreter; |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
906 |
ce7a5b60e102
restore pull parser interface when input is not interactive (bug #58198)
John W. Eaton <jwe@octave.org>
parents:
27957
diff
changeset
|
907 std::shared_ptr<input_reader> m_reader; |
22196
dd992fd74fce
put parser, lexer, and evaluator in namespace; interpreter now owns evaluator
John W. Eaton <jwe@octave.org>
parents:
21751
diff
changeset
|
908 }; |
16294
0925d1f6875e
push parser/lexer interface
John W. Eaton <jwe@octave.org>
parents:
16293
diff
changeset
|
909 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
910 extern OCTINTERP_API std::string |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
911 get_help_from_file (const std::string& nm, bool& symbol_found, |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
912 std::string& file); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
913 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
914 extern OCTINTERP_API std::string |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
915 get_help_from_file (const std::string& nm, bool& symbol_found); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
916 |
23653
3bb0a937c071
avoid possible memory errors when parsing function files
John W. Eaton <jwe@octave.org>
parents:
23615
diff
changeset
|
917 extern OCTINTERP_API octave_value |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
918 load_fcn_from_file (const std::string& file_name, |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
919 const std::string& dir_name = "", |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
920 const std::string& dispatch_type = "", |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
921 const std::string& package_name = "", |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
922 const std::string& fcn_name = "", |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
923 bool autoload = false); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
924 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
925 extern OCTINTERP_API void |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
926 source_file (const std::string& file_name, |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
927 const std::string& context = "", |
27507
2d537a089e5d
eliminate warn_for argument for source_file and parse_fcn_file functions
John W. Eaton <jwe@octave.org>
parents:
27505
diff
changeset
|
928 bool verbose = false, bool require_file = true); |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
929 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
930 extern OCTINTERP_API octave_value_list |
26883
a2aed4b49be3
fix const-ness of feval arguments
John W. Eaton <jwe@octave.org>
parents:
26686
diff
changeset
|
931 feval (const char *name, |
a2aed4b49be3
fix const-ness of feval arguments
John W. Eaton <jwe@octave.org>
parents:
26686
diff
changeset
|
932 const octave_value_list& args = octave_value_list (), |
a2aed4b49be3
fix const-ness of feval arguments
John W. Eaton <jwe@octave.org>
parents:
26686
diff
changeset
|
933 int nargout = 0); |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
934 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
935 extern OCTINTERP_API octave_value_list |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
936 feval (const std::string& name, |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
937 const octave_value_list& args = octave_value_list (), |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
938 int nargout = 0); |
16294
0925d1f6875e
push parser/lexer interface
John W. Eaton <jwe@octave.org>
parents:
16293
diff
changeset
|
939 |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
940 extern OCTINTERP_API octave_value_list |
23502
c6714ae1c06c
eliminate remaining do_multi_index_op methods
John W. Eaton <jwe@octave.org>
parents:
23473
diff
changeset
|
941 feval (octave_function *fcn, |
23473
55916f99b8b6
prefer feval over do_multi_index_op
John W. Eaton <jwe@octave.org>
parents:
23446
diff
changeset
|
942 const octave_value_list& args = octave_value_list (), |
55916f99b8b6
prefer feval over do_multi_index_op
John W. Eaton <jwe@octave.org>
parents:
23446
diff
changeset
|
943 int nargout = 0); |
55916f99b8b6
prefer feval over do_multi_index_op
John W. Eaton <jwe@octave.org>
parents:
23446
diff
changeset
|
944 |
55916f99b8b6
prefer feval over do_multi_index_op
John W. Eaton <jwe@octave.org>
parents:
23446
diff
changeset
|
945 extern OCTINTERP_API octave_value_list |
26883
a2aed4b49be3
fix const-ness of feval arguments
John W. Eaton <jwe@octave.org>
parents:
26686
diff
changeset
|
946 feval (const octave_value& val, |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
947 const octave_value_list& args = octave_value_list (), |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
948 int nargout = 0); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
949 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
950 extern OCTINTERP_API octave_value_list |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
951 feval (const octave_value_list& args, int nargout = 0); |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
952 |
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
953 extern OCTINTERP_API void |
23696
08036a7f3660
remove octave:: namespace tag from symbols used inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23694
diff
changeset
|
954 cleanup_statement_list (tree_statement_list **lst); |
31605
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31394
diff
changeset
|
955 |
e88a07dec498
maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents:
31394
diff
changeset
|
956 OCTAVE_END_NAMESPACE(octave) |
23075
4e3d47dc7e25
move parse tree classes inside octave namespace
John W. Eaton <jwe@octave.org>
parents:
23054
diff
changeset
|
957 |
1 | 958 #endif |