annotate libinterp/parse-tree/module.mk @ 28518:b8ab8b58547d

accept spmd command blocks as language elements (bug #58676) * pt-spmd.h, pt-spmd.cc: New files. * libinterp/parse-tree/module.mk: Update. * parse.h, oct-parse.yy (base_parser::make_spmd_command): New function. (spmd_command): New non-terminal. (command): Include spmd_command in list of possible commands. * pt-all.h: Also include pt-spmd.h. * pt-walk.h, pt-walk.cc (tree_walker::visit_spmd_command): New virtual function. * pt-eval.h, pt-eval.cc (tree_evaluator::visit_spmd_command): New function. * pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit_spmd_command): New function.
author John W. Eaton <jwe@octave.org>
date Tue, 30 Jun 2020 15:52:25 -0400
parents 0ca7f17de041
children c19f8cbe0fd5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21023
ec532a439c6f rework method of disabling warnings from GCC
John W. Eaton <jwe@octave.org>
parents: 20366
diff changeset
1 PARSE_TREE_INC = \
27728
5e92bff668d6 disallow lvalue references in anonymous functions (bug #57255)
John W. Eaton <jwe@octave.org>
parents: 26686
diff changeset
2 %reldir%/anon-fcn-validator.h \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
3 %reldir%/bp-table.h \
23749
6921d8458203 move comment-list.h and comment-list.cc to libinterp/parse-tree directory
John W. Eaton <jwe@octave.org>
parents: 23601
diff changeset
4 %reldir%/comment-list.h \
27766
0ca7f17de041 use file position object to track line and column info in lexer and parser
John W. Eaton <jwe@octave.org>
parents: 27728
diff changeset
5 %reldir%/filepos.h \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
6 %reldir%/jit-ir.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
7 %reldir%/jit-typeinfo.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
8 %reldir%/jit-util.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
9 %reldir%/lex.h \
24350
b991accccd4c move oct-lvalue files from corefcn to parse-tree directory
John W. Eaton <jwe@octave.org>
parents: 24234
diff changeset
10 %reldir%/oct-lvalue.h \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
11 %reldir%/parse.h \
23751
0ebc4f1a5714 move profiler.h and profiler.cc to libinterp/parse-tree directory
John W. Eaton <jwe@octave.org>
parents: 23749
diff changeset
12 %reldir%/profiler.h \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
13 %reldir%/pt-all.h \
25824
91e1ca0e3a9d Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents: 25637
diff changeset
14 %reldir%/pt-anon-scopes.h \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
15 %reldir%/pt-arg-list.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
16 %reldir%/pt-array-list.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
17 %reldir%/pt-assign.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
18 %reldir%/pt-binop.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
19 %reldir%/pt-bp.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
20 %reldir%/pt-cbinop.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
21 %reldir%/pt-cell.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
22 %reldir%/pt-check.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
23 %reldir%/pt-classdef.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
24 %reldir%/pt-cmd.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
25 %reldir%/pt-colon.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
26 %reldir%/pt-const.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
27 %reldir%/pt-decl.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
28 %reldir%/pt-eval.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
29 %reldir%/pt-except.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
30 %reldir%/pt-exp.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
31 %reldir%/pt-fcn-handle.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
32 %reldir%/pt-id.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
33 %reldir%/pt-idx.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
34 %reldir%/pt-jit.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
35 %reldir%/pt-jump.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
36 %reldir%/pt-loop.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
37 %reldir%/pt-mat.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
38 %reldir%/pt-misc.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
39 %reldir%/pt-pr-code.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
40 %reldir%/pt-select.h \
28518
b8ab8b58547d accept spmd command blocks as language elements (bug #58676)
John W. Eaton <jwe@octave.org>
parents: 27766
diff changeset
41 %reldir%/pt-spmd.h \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
42 %reldir%/pt-stmt.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
43 %reldir%/pt-tm-const.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
44 %reldir%/pt-unop.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
45 %reldir%/pt-walk.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
46 %reldir%/pt.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
47 %reldir%/token.h
15057
46b19589b593 maint: Partition src/ directory with more code in subdirs.
Rik <rik@octave.org>
parents:
diff changeset
48
23126
2eb7d330eb7f move JIT compiler files from corefcn to parse-tree directory
John W. Eaton <jwe@octave.org>
parents: 23083
diff changeset
49
21242
ae03a16f3343 don't install oct-gperf.h, oct-parse.h, or oct-tex-parser.h
John W. Eaton <jwe@octave.org>
parents: 21023
diff changeset
50 ## oct-gperf.h and oct-parse.h are in the SRC list so that they will
ae03a16f3343 don't install oct-gperf.h, oct-parse.h, or oct-tex-parser.h
John W. Eaton <jwe@octave.org>
parents: 21023
diff changeset
51 ## be distributed but not installed.
ae03a16f3343 don't install oct-gperf.h, oct-parse.h, or oct-tex-parser.h
John W. Eaton <jwe@octave.org>
parents: 21023
diff changeset
52
15057
46b19589b593 maint: Partition src/ directory with more code in subdirs.
Rik <rik@octave.org>
parents:
diff changeset
53 PARSE_TREE_SRC = \
27728
5e92bff668d6 disallow lvalue references in anonymous functions (bug #57255)
John W. Eaton <jwe@octave.org>
parents: 26686
diff changeset
54 %reldir%/anon-fcn-validator.cc \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
55 %reldir%/bp-table.cc \
23749
6921d8458203 move comment-list.h and comment-list.cc to libinterp/parse-tree directory
John W. Eaton <jwe@octave.org>
parents: 23601
diff changeset
56 %reldir%/comment-list.cc \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
57 %reldir%/jit-ir.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
58 %reldir%/jit-typeinfo.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
59 %reldir%/jit-util.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
60 %reldir%/lex.ll \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
61 %reldir%/oct-gperf.h \
24350
b991accccd4c move oct-lvalue files from corefcn to parse-tree directory
John W. Eaton <jwe@octave.org>
parents: 24234
diff changeset
62 %reldir%/oct-lvalue.cc \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
63 %reldir%/oct-parse.h \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
64 %reldir%/oct-parse.yy \
23751
0ebc4f1a5714 move profiler.h and profiler.cc to libinterp/parse-tree directory
John W. Eaton <jwe@octave.org>
parents: 23749
diff changeset
65 %reldir%/profiler.cc \
25824
91e1ca0e3a9d Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents: 25637
diff changeset
66 %reldir%/pt-anon-scopes.cc \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
67 %reldir%/pt-arg-list.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
68 %reldir%/pt-array-list.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
69 %reldir%/pt-assign.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
70 %reldir%/pt-binop.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
71 %reldir%/pt-bp.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
72 %reldir%/pt-cbinop.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
73 %reldir%/pt-cell.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
74 %reldir%/pt-check.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
75 %reldir%/pt-classdef.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
76 %reldir%/pt-colon.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
77 %reldir%/pt-const.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
78 %reldir%/pt-decl.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
79 %reldir%/pt-eval.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
80 %reldir%/pt-except.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
81 %reldir%/pt-exp.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
82 %reldir%/pt-fcn-handle.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
83 %reldir%/pt-id.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
84 %reldir%/pt-idx.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
85 %reldir%/pt-jit.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
86 %reldir%/pt-loop.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
87 %reldir%/pt-mat.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
88 %reldir%/pt-misc.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
89 %reldir%/pt-pr-code.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
90 %reldir%/pt-select.cc \
28518
b8ab8b58547d accept spmd command blocks as language elements (bug #58676)
John W. Eaton <jwe@octave.org>
parents: 27766
diff changeset
91 %reldir%/pt-spmd.cc \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
92 %reldir%/pt-stmt.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
93 %reldir%/pt-tm-const.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
94 %reldir%/pt-unop.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
95 %reldir%/pt-walk.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
96 %reldir%/pt.cc \
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
97 %reldir%/token.cc
15057
46b19589b593 maint: Partition src/ directory with more code in subdirs.
Rik <rik@octave.org>
parents:
diff changeset
98
15096
909a2797935b maint: Move interp source code without DEFUNs to interp-core/ dir.
Rik <rik@octave.org>
parents: 15087
diff changeset
99 ## Special rules for sources which must be built before rest of compilation.
909a2797935b maint: Move interp source code without DEFUNs to interp-core/ dir.
Rik <rik@octave.org>
parents: 15087
diff changeset
100
909a2797935b maint: Move interp source code without DEFUNs to interp-core/ dir.
Rik <rik@octave.org>
parents: 15087
diff changeset
101 ## Don't use a pipeline to process gperf output since if gperf
909a2797935b maint: Move interp source code without DEFUNs to interp-core/ dir.
Rik <rik@octave.org>
parents: 15087
diff changeset
102 ## is missing but sed is not, the exit status of the pipeline
909a2797935b maint: Move interp source code without DEFUNs to interp-core/ dir.
Rik <rik@octave.org>
parents: 15087
diff changeset
103 ## will still be success and we will end up creating an empty
909a2797935b maint: Move interp source code without DEFUNs to interp-core/ dir.
Rik <rik@octave.org>
parents: 15087
diff changeset
104 ## oct-gperf.h file.
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
105 %reldir%/oct-gperf.h: %reldir%/octave.gperf
19792
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19775
diff changeset
106 $(AM_V_GEN)rm -f $@-t $@t1 $@ && \
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19775
diff changeset
107 $(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash $< > $@-t1 && \
21332
db574711df78 eliminate deprecated register storage class specifier
John W. Eaton <jwe@octave.org>
parents: 21242
diff changeset
108 $(SED) -e 's,lookup\[,gperf_lookup[,' -e 's,register ,,g' < $@-t1 > $@-t && \
19792
4f6ae6b94abe make --enable-silent-rules configure option more useful
John W. Eaton <jwe@octave.org>
parents: 19775
diff changeset
109 mv $@-t $@ && \
15096
909a2797935b maint: Move interp source code without DEFUNs to interp-core/ dir.
Rik <rik@octave.org>
parents: 15087
diff changeset
110 rm -f $@-t1
909a2797935b maint: Move interp source code without DEFUNs to interp-core/ dir.
Rik <rik@octave.org>
parents: 15087
diff changeset
111
16298
faaf60aa457c use separate automake convenience library for bison and flex generated files
John W. Eaton <jwe@octave.org>
parents: 16237
diff changeset
112 noinst_LTLIBRARIES += \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
113 %reldir%/libparse-tree.la
20327
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 19879
diff changeset
114
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
115 %canon_reldir%_libparse_tree_la_SOURCES = $(PARSE_TREE_SRC)
20327
0ce7d8303152 eliminate recursive make invocations in liboctave and libinterp directories
John W. Eaton <jwe@octave.org>
parents: 19879
diff changeset
116
24234
4e93c39b4b97 libinterp/parse-tree/module.mk: Add LLVM flags to libparse_tree_la
Julien Bect <jbect@users.sourceforge.net>
parents: 23751
diff changeset
117 %canon_reldir%_libparse_tree_la_CPPFLAGS = \
4e93c39b4b97 libinterp/parse-tree/module.mk: Add LLVM flags to libparse_tree_la
Julien Bect <jbect@users.sourceforge.net>
parents: 23751
diff changeset
118 $(libinterp_liboctinterp_la_CPPFLAGS) \
4e93c39b4b97 libinterp/parse-tree/module.mk: Add LLVM flags to libparse_tree_la
Julien Bect <jbect@users.sourceforge.net>
parents: 23751
diff changeset
119 $(LLVM_CPPFLAGS)
15107
03381a36f70d generate convenience libraries for new parse-tree and interpfcn subdirectories
John W. Eaton <jwe@octave.org>
parents: 15096
diff changeset
120
20366
9b44691a3520 provide per-directory clean targets
John W. Eaton <jwe@octave.org>
parents: 20327
diff changeset
121 libinterp_EXTRA_DIST += \
23495
8308417aff1c use automake %reldir% feature
John W. Eaton <jwe@octave.org>
parents: 23435
diff changeset
122 %reldir%/octave.gperf