annotate src/lex.h @ 8701:1652e39b934e

handle command names in declaration lists
author John W. Eaton <jwe@octave.org>
date Mon, 09 Feb 2009 12:23:12 -0500
parents ff9e7873f8ea
children 6dc61981d18b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
1 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
2
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
3 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002,
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
4 2003, 2004, 2005, 2006, 2007 John W. Eaton
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
5
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
7
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5775
diff changeset
10 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5775
diff changeset
11 option) any later version.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
12
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
16 for more details.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
17
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5775
diff changeset
19 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 5775
diff changeset
20 <http://www.gnu.org/licenses/>.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
21
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
22 */
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
23
383
0b52c68ec81f [project @ 1994-03-09 21:19:44 by jwe]
jwe
parents: 247
diff changeset
24 #if !defined (octave_lex_h)
0b52c68ec81f [project @ 1994-03-09 21:19:44 by jwe]
jwe
parents: 247
diff changeset
25 #define octave_lex_h 1
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
26
5775
ace8d8d26933 [project @ 2006-04-24 19:13:06 by jwe]
jwe
parents: 5307
diff changeset
27 // FIXME -- these input buffer things should be members of a
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
28 // parser input stream class.
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
29
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
30 typedef struct yy_buffer_state *YY_BUFFER_STATE;
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
31
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
32 // Associate a buffer with a new file to read.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
33 extern YY_BUFFER_STATE create_buffer (FILE *f);
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
34
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
35 // Report the current buffer.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
36 extern YY_BUFFER_STATE current_buffer (void);
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
37
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
38 // Connect to new buffer buffer.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
39 extern void switch_to_buffer (YY_BUFFER_STATE buf);
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
40
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
41 // Delete a buffer.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
42 extern void delete_buffer (YY_BUFFER_STATE buf);
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
43
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
44 // Restore a buffer (for unwind-prot).
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
45 extern void restore_input_buffer (void *buf);
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
46
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
47 // Delete a buffer (for unwind-prot).
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
48 extern void delete_input_buffer (void *buf);
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
49
4867
c7f9ea142fda [project @ 2004-04-20 19:41:11 by jwe]
jwe
parents: 4753
diff changeset
50 // Is the given string a keyword?
c7f9ea142fda [project @ 2004-04-20 19:41:11 by jwe]
jwe
parents: 4753
diff changeset
51 extern bool is_keyword (const std::string& s);
c7f9ea142fda [project @ 2004-04-20 19:41:11 by jwe]
jwe
parents: 4753
diff changeset
52
7715
5b4d278ec828 parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents: 7634
diff changeset
53 extern void prep_lexer_for_script (void);
5b4d278ec828 parse scripts completely before executing
John W. Eaton <jwe@octave.org>
parents: 7634
diff changeset
54
8001
ff9e7873f8ea improve handling of command-style names in matrix_or_assign_lhs context
John W. Eaton <jwe@octave.org>
parents: 7723
diff changeset
55 extern void force_local_variable (const std::string& name);
ff9e7873f8ea improve handling of command-style names in matrix_or_assign_lhs context
John W. Eaton <jwe@octave.org>
parents: 7723
diff changeset
56
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
57 // For communication between the lexer and parser.
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
58
3585
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3351
diff changeset
59 class
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3351
diff changeset
60 lexical_feedback
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
61 {
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
62 public:
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
63
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
64 lexical_feedback (void) { init (); }
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
65
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
66 ~lexical_feedback (void) { }
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
67
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
68 void init (void);
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
69
3351
8623649c967c [project @ 1999-11-15 16:17:01 by jwe]
jwe
parents: 3225
diff changeset
70 // Square bracket level count.
8623649c967c [project @ 1999-11-15 16:17:01 by jwe]
jwe
parents: 3225
diff changeset
71 int bracketflag;
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
72
4613
d1786f2d8a3c [project @ 2003-11-14 22:46:19 by jwe]
jwe
parents: 4240
diff changeset
73 // Curly brace level count.
d1786f2d8a3c [project @ 2003-11-14 22:46:19 by jwe]
jwe
parents: 4240
diff changeset
74 int braceflag;
d1786f2d8a3c [project @ 2003-11-14 22:46:19 by jwe]
jwe
parents: 4240
diff changeset
75
2877
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
76 // TRUE means we're in the middle of defining a loop.
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
77 int looping;
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
78
2877
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
79 // TRUE means that we should convert spaces to a comma inside a
2857
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
80 // matrix definition.
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
81 bool convert_spaces_to_comma;
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
82
2877
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
83 // TRUE means we're in the middle of defining a function.
2857
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
84 bool defining_func;
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
85
4930
bdb307dc8613 [project @ 2004-08-05 04:55:26 by jwe]
jwe
parents: 4867
diff changeset
86 // Nonzero means we are parsing a function handle.
bdb307dc8613 [project @ 2004-08-05 04:55:26 by jwe]
jwe
parents: 4867
diff changeset
87 int looking_at_function_handle;
bdb307dc8613 [project @ 2004-08-05 04:55:26 by jwe]
jwe
parents: 4867
diff changeset
88
2877
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
89 // TRUE means we're parsing the return list for a function.
2857
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
90 bool looking_at_return_list;
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
91
2877
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
92 // TRUE means we're parsing the parameter list for a function.
2857
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
93 bool looking_at_parameter_list;
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
94
8701
1652e39b934e handle command names in declaration lists
John W. Eaton <jwe@octave.org>
parents: 8001
diff changeset
95 // TRUE means we're parsing a declaration list (global or
1652e39b934e handle command names in declaration lists
John W. Eaton <jwe@octave.org>
parents: 8001
diff changeset
96 // persistent).
1652e39b934e handle command names in declaration lists
John W. Eaton <jwe@octave.org>
parents: 8001
diff changeset
97 bool looking_at_decl_list;
1652e39b934e handle command names in declaration lists
John W. Eaton <jwe@octave.org>
parents: 8001
diff changeset
98
7634
ae90e05ad299 fix parameter list initializer bug
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
99 // TRUE means we are looking at the initializer expression for a
ae90e05ad299 fix parameter list initializer bug
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
100 // parameter list element.
ae90e05ad299 fix parameter list initializer bug
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
101 bool looking_at_initializer_expression;
ae90e05ad299 fix parameter list initializer bug
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
102
3189
bef7b73c0724 [project @ 1998-10-16 18:05:26 by jwe]
jwe
parents: 3165
diff changeset
103 // TRUE means we're parsing a matrix or the left hand side of
bef7b73c0724 [project @ 1998-10-16 18:05:26 by jwe]
jwe
parents: 3165
diff changeset
104 // multi-value assignment statement.
bef7b73c0724 [project @ 1998-10-16 18:05:26 by jwe]
jwe
parents: 3165
diff changeset
105 bool looking_at_matrix_or_assign_lhs;
bef7b73c0724 [project @ 1998-10-16 18:05:26 by jwe]
jwe
parents: 3165
diff changeset
106
4237
9c8034434982 [project @ 2002-12-25 03:14:37 by jwe]
jwe
parents: 4234
diff changeset
107 // Nonzero means we're parsing an indexing operation for an object.
9c8034434982 [project @ 2002-12-25 03:14:37 by jwe]
jwe
parents: 4234
diff changeset
108 int looking_at_object_index;
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4182
diff changeset
109
2857
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
110 // GAG. Stupid kludge so that [[1,2][3,4]] will work.
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
111 bool do_comma_insert;
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
112
5102
b04b30d30c66 [project @ 2004-12-28 01:59:05 by jwe]
jwe
parents: 4930
diff changeset
113 // TRUE means we're doing a raw input command.
b04b30d30c66 [project @ 2004-12-28 01:59:05 by jwe]
jwe
parents: 4930
diff changeset
114 bool doing_rawcommand;
b04b30d30c66 [project @ 2004-12-28 01:59:05 by jwe]
jwe
parents: 4930
diff changeset
115
2877
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
116 // TRUE means we're looking at an indirect reference to a
2857
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
117 // structure element.
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
118 bool looking_at_indirect_ref;
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
119
2877
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
120 // TRUE means that we've already seen the name of this function.
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
121 // Should only matter if defining_func is also TRUE.
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
122 bool parsed_function_name;
5c1b9e545dd1 [project @ 1997-04-24 09:07:39 by jwe]
jwe
parents: 2857
diff changeset
123
4240
8627d992beb8 [project @ 2002-12-25 23:07:03 by jwe]
jwe
parents: 4238
diff changeset
124 // Are we parsing a nested function?
8627d992beb8 [project @ 2002-12-25 23:07:03 by jwe]
jwe
parents: 4238
diff changeset
125 // 1 ==> Yes.
8627d992beb8 [project @ 2002-12-25 23:07:03 by jwe]
jwe
parents: 4238
diff changeset
126 // 0 ==> No.
8627d992beb8 [project @ 2002-12-25 23:07:03 by jwe]
jwe
parents: 4238
diff changeset
127 // -1 ==> Yes, but it is the last one because we have seen EOF.
8627d992beb8 [project @ 2002-12-25 23:07:03 by jwe]
jwe
parents: 4238
diff changeset
128 int parsing_nested_function;
4238
a5a68c0afe56 [project @ 2002-12-25 21:04:33 by jwe]
jwe
parents: 4237
diff changeset
129
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
130 // TRUE means we are parsing a class method.
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
131 bool parsing_class_method;
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
132
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
133 // Return transpose or start a string?
2857
5448c8cba402 [project @ 1997-03-31 07:06:10 by jwe]
jwe
parents: 2847
diff changeset
134 bool quote_is_transpose;
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
135
8001
ff9e7873f8ea improve handling of command-style names in matrix_or_assign_lhs context
John W. Eaton <jwe@octave.org>
parents: 7723
diff changeset
136 // Set of identifiers that might be local variable names.
ff9e7873f8ea improve handling of command-style names in matrix_or_assign_lhs context
John W. Eaton <jwe@octave.org>
parents: 7723
diff changeset
137 std::set<std::string> pending_local_variables;
ff9e7873f8ea improve handling of command-style names in matrix_or_assign_lhs context
John W. Eaton <jwe@octave.org>
parents: 7723
diff changeset
138
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
139 private:
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
140
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
141 lexical_feedback (const lexical_feedback&);
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
142
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
143 lexical_feedback& operator = (const lexical_feedback&);
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
144 };
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
145
7720
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
146 class
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
147 stream_reader
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
148 {
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
149 public:
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
150 virtual int getc (void) = 0;
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
151 virtual int ungetc (int c) = 0;
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
152
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
153 protected:
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
154 stream_reader (void) { }
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
155 ~stream_reader (void) { }
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
156
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
157 private:
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
158
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
159 // No copying!
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
160 stream_reader (const stream_reader&);
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
161 stream_reader& operator = (const stream_reader&);
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
162 };
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
163
7723
74f5e0c7de9e first pass at handling block comments
John W. Eaton <jwe@octave.org>
parents: 7720
diff changeset
164 extern std::string
74f5e0c7de9e first pass at handling block comments
John W. Eaton <jwe@octave.org>
parents: 7720
diff changeset
165 grab_comment_block (stream_reader& reader, bool at_bol, bool& eof);
7720
4e2eafef689c unify comment and help text processing in lex.l and parse.y
John W. Eaton <jwe@octave.org>
parents: 7715
diff changeset
166
3883
69b6bd271277 [project @ 2002-04-02 21:05:10 by jwe]
jwe
parents: 3585
diff changeset
167 // TRUE means that we have encountered EOF on the input stream.
69b6bd271277 [project @ 2002-04-02 21:05:10 by jwe]
jwe
parents: 3585
diff changeset
168 extern bool parser_end_of_input;
69b6bd271277 [project @ 2002-04-02 21:05:10 by jwe]
jwe
parents: 3585
diff changeset
169
1826
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
170 // Flags that need to be shared between the lexer and parser.
b14829582cc4 [project @ 1996-02-02 03:05:07 by jwe]
jwe
parents: 1315
diff changeset
171 extern lexical_feedback lexer_flags;
440
e27d10f2e573 [project @ 1994-05-30 03:33:37 by jwe]
jwe
parents: 383
diff changeset
172
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
173 #endif
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
174
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
175 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
176 ;;; Local Variables: ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
177 ;;; mode: C++ ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
178 ;;; End: ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
179 */