Mercurial > octave
annotate libinterp/parse-tree/octave.gperf @ 28517:6e8a9845d118
Add 'spmd' as interpreter keyword for Matlab compatibility (bug #58676).
* op-kw-docs: Document 'spmd', 'endspmd' keywords.
* lex.ll (base_lexer::make_keyword_token): Add case statements for 'spmd',
'endspmd'. Code is not correct, but something is required to prevent segfault.
* oct-parse.yy: Add SPMD token type.
* oct-parse.yy (end_token_as_string): Add case statement for 'endspmd'.
* octave.gperf: Add endspmd_kw, spmd_kw to enum octave_kw_id. Add declarations
to octave_kw struct for endspmd, spmd.
* token.h: Add spmd_end to enm end_tok_type.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 30 Jun 2020 09:34:14 -0700 |
parents | bd51beb6205e |
children | dc8de424fc72 |
rev | line source |
---|---|
1496 | 1 %{ |
7019 | 2 |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
3 //////////////////////////////////////////////////////////////////////// |
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 // Copyright (C) 1995-2020 The Octave Project Developers |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // 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
|
8 // distribution or <https://octave.org/copyright/>. |
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 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // 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
|
13 // 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
|
14 // 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
|
15 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // 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
|
18 // 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
|
19 // 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
|
20 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // 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
|
23 // 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
|
24 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
25 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
26 // NOTE: gperf 2.7.2 will silently generate bad code if there are blank |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
27 // lines following the "%{" marker above. This comment block seems to be |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
28 // handled correctly. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
29 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
30 //////////////////////////////////////////////////////////////////////// |
7019 | 31 |
1496 | 32 enum octave_kw_id |
33 { | |
34 break_kw, | |
2764 | 35 case_kw, |
1496 | 36 catch_kw, |
9476 | 37 classdef_kw, |
1496 | 38 continue_kw, |
3484 | 39 do_kw, |
1496 | 40 else_kw, |
41 elseif_kw, | |
42 end_kw, | |
43 end_try_catch_kw, | |
44 end_unwind_protect_kw, | |
9476 | 45 endclassdef_kw, |
13249
7861a5fd3479
accept enumeration keyword
John W. Eaton <jwe@octave.org>
parents:
13246
diff
changeset
|
46 endenumeration_kw, |
9476 | 47 endevents_kw, |
1496 | 48 endfor_kw, |
49 endfunction_kw, | |
50 endif_kw, | |
9476 | 51 endmethods_kw, |
13246 | 52 endparfor_kw, |
9476 | 53 endproperties_kw, |
28517
6e8a9845d118
Add 'spmd' as interpreter keyword for Matlab compatibility (bug #58676).
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
54 endspmd_kw, |
2764 | 55 endswitch_kw, |
1496 | 56 endwhile_kw, |
13249
7861a5fd3479
accept enumeration keyword
John W. Eaton <jwe@octave.org>
parents:
13246
diff
changeset
|
57 enumeration_kw, |
9476 | 58 events_kw, |
1496 | 59 for_kw, |
60 function_kw, | |
9476 | 61 get_kw, |
1496 | 62 global_kw, |
63 if_kw, | |
3174 | 64 magic_file_kw, |
65 magic_line_kw, | |
9476 | 66 methods_kw, |
2764 | 67 otherwise_kw, |
13245
027a2186cd90
parfor keyword and infrastructure, but handle parfor as normal for loop for now
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
68 parfor_kw, |
14294
9e3983c8963c
deprecate the static keyword
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
69 persistent_kw, |
9476 | 70 properties_kw, |
1496 | 71 return_kw, |
9476 | 72 set_kw, |
28517
6e8a9845d118
Add 'spmd' as interpreter keyword for Matlab compatibility (bug #58676).
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
73 spmd_kw, |
2764 | 74 switch_kw, |
1496 | 75 try_kw, |
3484 | 76 until_kw, |
1496 | 77 unwind_protect_kw, |
78 unwind_protect_cleanup_kw, | |
79 while_kw | |
80 }; | |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
81 |
1496 | 82 %} |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
83 |
2804 | 84 struct octave_kw { const char *name; int tok; octave_kw_id kw_id; }; |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
85 |
1496 | 86 %% |
87 break, BREAK, break_kw | |
2764 | 88 case, CASE, case_kw |
1496 | 89 catch, CATCH, catch_kw |
9476 | 90 classdef, CLASSDEF, classdef_kw |
1496 | 91 continue, CONTINUE, continue_kw |
3484 | 92 do, DO, do_kw |
1496 | 93 else, ELSE, else_kw |
94 elseif, ELSEIF, elseif_kw | |
95 end, END, end_kw | |
96 end_try_catch, END, end_try_catch_kw | |
97 end_unwind_protect, END, end_unwind_protect_kw | |
19593
446c46af4b42
strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
98 endclassdef, END, endclassdef_kw |
13249
7861a5fd3479
accept enumeration keyword
John W. Eaton <jwe@octave.org>
parents:
13246
diff
changeset
|
99 endenumeration, END, endenumeration_kw |
9476 | 100 endevents, END, endevents_kw |
1496 | 101 endfor, END, endfor_kw |
102 endfunction, END, endfunction_kw | |
103 endif, END, endif_kw | |
9476 | 104 endmethods, END, endmethods_kw |
13246 | 105 endparfor, END, endparfor_kw |
9476 | 106 endproperties, END, endproperties_kw |
28517
6e8a9845d118
Add 'spmd' as interpreter keyword for Matlab compatibility (bug #58676).
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
107 endspmd, END, endspmd_kw |
2764 | 108 endswitch, END, endswitch_kw |
1496 | 109 endwhile, END, endwhile_kw |
13249
7861a5fd3479
accept enumeration keyword
John W. Eaton <jwe@octave.org>
parents:
13246
diff
changeset
|
110 enumeration, ENUMERATION, enumeration_kw |
9476 | 111 events, EVENTS, events_kw |
1496 | 112 for, FOR, for_kw |
113 function, FCN, function_kw | |
9476 | 114 get, GET, get_kw |
1496 | 115 global, GLOBAL, global_kw |
116 if, IF, if_kw | |
9476 | 117 methods, METHODS, methods_kw |
2764 | 118 otherwise, OTHERWISE, otherwise_kw |
13245
027a2186cd90
parfor keyword and infrastructure, but handle parfor as normal for loop for now
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
119 parfor, PARFOR, parfor_kw |
14294
9e3983c8963c
deprecate the static keyword
John W. Eaton <jwe@octave.org>
parents:
14138
diff
changeset
|
120 persistent, PERSISTENT, persistent_kw |
9476 | 121 properties, PROPERTIES, properties_kw |
1496 | 122 return, FUNC_RET, return_kw |
9476 | 123 set, SET, set_kw |
28517
6e8a9845d118
Add 'spmd' as interpreter keyword for Matlab compatibility (bug #58676).
Rik <rik@octave.org>
parents:
27923
diff
changeset
|
124 spmd, SPMD, spmd_kw |
2764 | 125 switch, SWITCH, switch_kw |
1496 | 126 try, TRY, try_kw |
3484 | 127 until, UNTIL, until_kw |
1496 | 128 unwind_protect, UNWIND, unwind_protect_kw |
129 unwind_protect_cleanup, CLEANUP, unwind_protect_cleanup_kw | |
130 while, WHILE, while_kw | |
5279 | 131 __FILE__, DQ_STRING, magic_file_kw |
3174 | 132 __LINE__, NUM, magic_line_kw |