annotate libinterp/parse-tree/octave.gperf @ 19628:fe689210525c gui-release

maint: Periodic merge of stable to gui-release.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:05:42 -0500
parents e0775b4f41dd 446c46af4b42
children 0e1f5a750d00
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
1 %{
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
2 /*
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
3
17744
d63878346099 maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
4 Copyright (C) 1995-2013 John W. Eaton
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
5
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
6 This file is part of Octave.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
7
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
9 under the terms of the GNU General Public License as published by the
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
10 Free Software Foundation; either version 3 of the License, or (at
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
11 your option) any later version.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
12
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
16 for more details.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
17
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
18 You should have received a copy of the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
19 along with Octave; see the file COPYING. If not, see
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
20 <http://www.gnu.org/licenses/>.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
21
8775
a2a9dc5e8565 octave.gperf: eliminate whitespace to allow gperf 2.7.2 to work
John W. Eaton <jwe@octave.org>
parents: 7587
diff changeset
22 NOTE: gperf 2.7.2 will silently generate bad code if there are blank
a2a9dc5e8565 octave.gperf: eliminate whitespace to allow gperf 2.7.2 to work
John W. Eaton <jwe@octave.org>
parents: 7587
diff changeset
23 lines following the "%{" marker above. This comment block seems to be
a2a9dc5e8565 octave.gperf: eliminate whitespace to allow gperf 2.7.2 to work
John W. Eaton <jwe@octave.org>
parents: 7587
diff changeset
24 handled correctly.
a2a9dc5e8565 octave.gperf: eliminate whitespace to allow gperf 2.7.2 to work
John W. Eaton <jwe@octave.org>
parents: 7587
diff changeset
25
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6547
diff changeset
26 */
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
27 enum octave_kw_id
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
28 {
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
29 break_kw,
2764
2c0f259cf83d [project @ 1997-03-01 02:30:26 by jwe]
jwe
parents: 1496
diff changeset
30 case_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
31 catch_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
32 classdef_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
33 continue_kw,
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 3174
diff changeset
34 do_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
35 else_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
36 elseif_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
37 end_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
38 end_try_catch_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
39 end_unwind_protect_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
40 endclassdef_kw,
13249
7861a5fd3479 accept enumeration keyword
John W. Eaton <jwe@octave.org>
parents: 13246
diff changeset
41 endenumeration_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
42 endevents_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
43 endfor_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
44 endfunction_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
45 endif_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
46 endmethods_kw,
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 13245
diff changeset
47 endparfor_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
48 endproperties_kw,
2764
2c0f259cf83d [project @ 1997-03-01 02:30:26 by jwe]
jwe
parents: 1496
diff changeset
49 endswitch_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
50 endwhile_kw,
13249
7861a5fd3479 accept enumeration keyword
John W. Eaton <jwe@octave.org>
parents: 13246
diff changeset
51 enumeration_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
52 events_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
53 for_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
54 function_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
55 get_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
56 global_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
57 if_kw,
3174
390d5e396682 [project @ 1998-05-04 16:36:17 by jwe]
jwe
parents: 2846
diff changeset
58 magic_file_kw,
390d5e396682 [project @ 1998-05-04 16:36:17 by jwe]
jwe
parents: 2846
diff changeset
59 magic_line_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
60 methods_kw,
2764
2c0f259cf83d [project @ 1997-03-01 02:30:26 by jwe]
jwe
parents: 1496
diff changeset
61 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
62 parfor_kw,
14294
9e3983c8963c deprecate the static keyword
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
63 persistent_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
64 properties_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
65 return_kw,
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
66 set_kw,
2846
52e7c4509983 [project @ 1997-03-26 23:27:35 by jwe]
jwe
parents: 2804
diff changeset
67 static_kw,
2764
2c0f259cf83d [project @ 1997-03-01 02:30:26 by jwe]
jwe
parents: 1496
diff changeset
68 switch_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
69 try_kw,
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 3174
diff changeset
70 until_kw,
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
71 unwind_protect_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
72 unwind_protect_cleanup_kw,
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
73 while_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
74 };
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
75 %}
2804
eedc2f3f61f7 [project @ 1997-03-11 04:34:50 by jwe]
jwe
parents: 2764
diff changeset
76 struct octave_kw { const char *name; int tok; octave_kw_id kw_id; };
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
77 %%
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
78 break, BREAK, break_kw
2764
2c0f259cf83d [project @ 1997-03-01 02:30:26 by jwe]
jwe
parents: 1496
diff changeset
79 case, CASE, case_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
80 catch, CATCH, catch_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
81 classdef, CLASSDEF, classdef_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
82 continue, CONTINUE, continue_kw
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 3174
diff changeset
83 do, DO, do_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
84 else, ELSE, else_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
85 elseif, ELSEIF, elseif_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
86 end, END, end_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
87 end_try_catch, END, end_try_catch_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
88 end_unwind_protect, END, end_unwind_protect_kw
19627
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
89 endclassdef, END, endclassdef_kw
13249
7861a5fd3479 accept enumeration keyword
John W. Eaton <jwe@octave.org>
parents: 13246
diff changeset
90 endenumeration, END, endenumeration_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
91 endevents, END, endevents_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
92 endfor, END, endfor_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
93 endfunction, END, endfunction_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
94 endif, END, endif_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
95 endmethods, END, endmethods_kw
13246
0c69a564f2be additional parfor changes
John W. Eaton <jwe@octave.org>
parents: 13245
diff changeset
96 endparfor, END, endparfor_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
97 endproperties, END, endproperties_kw
2764
2c0f259cf83d [project @ 1997-03-01 02:30:26 by jwe]
jwe
parents: 1496
diff changeset
98 endswitch, END, endswitch_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
99 endwhile, END, endwhile_kw
13249
7861a5fd3479 accept enumeration keyword
John W. Eaton <jwe@octave.org>
parents: 13246
diff changeset
100 enumeration, ENUMERATION, enumeration_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
101 events, EVENTS, events_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
102 for, FOR, for_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
103 function, FCN, function_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
104 get, GET, get_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
105 global, GLOBAL, global_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
106 if, IF, if_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
107 methods, METHODS, methods_kw
2764
2c0f259cf83d [project @ 1997-03-01 02:30:26 by jwe]
jwe
parents: 1496
diff changeset
108 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
109 parfor, PARFOR, parfor_kw
14294
9e3983c8963c deprecate the static keyword
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
110 persistent, PERSISTENT, persistent_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
111 properties, PROPERTIES, properties_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
112 return, FUNC_RET, return_kw
9476
d9b25c5b8ee5 handle classdef syntax in lexer and parser
Ryan Rusaw
parents: 8775
diff changeset
113 set, SET, set_kw
14294
9e3983c8963c deprecate the static keyword
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
114 static, PERSISTENT, static_kw
2764
2c0f259cf83d [project @ 1997-03-01 02:30:26 by jwe]
jwe
parents: 1496
diff changeset
115 switch, SWITCH, switch_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
116 try, TRY, try_kw
3484
8b1f46ac2b64 [project @ 2000-01-27 23:30:45 by jwe]
jwe
parents: 3174
diff changeset
117 until, UNTIL, until_kw
1496
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
118 unwind_protect, UNWIND, unwind_protect_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
119 unwind_protect_cleanup, CLEANUP, unwind_protect_cleanup_kw
8bd5499ae4ef [project @ 1995-09-30 21:57:45 by jwe]
jwe
parents:
diff changeset
120 while, WHILE, while_kw
5279
bd32f770c09a [project @ 2005-04-12 21:55:31 by jwe]
jwe
parents: 5102
diff changeset
121 __FILE__, DQ_STRING, magic_file_kw
3174
390d5e396682 [project @ 1998-05-04 16:36:17 by jwe]
jwe
parents: 2846
diff changeset
122 __LINE__, NUM, magic_line_kw