comparison libinterp/parse-tree/lex.h @ 16105:b7de58feb2d3

move block_comment_nesting_level to lexical_feedback_class * lex.h, lex.ll (block_comment_nesting_level): Move global variable to lexical_feedback class. Change all uses. (reset_parser): Don't reset block_comment_nesting_level.
author John W. Eaton <jwe@octave.org>
date Mon, 25 Feb 2013 21:59:40 -0500
parents c8974e28da59
children 031117f4db7c
comparison
equal deleted inserted replaced
16104:c8974e28da59 16105:b7de58feb2d3
148 maybe_classdef_get_set_method (false), parsing_classdef (false), 148 maybe_classdef_get_set_method (false), parsing_classdef (false),
149 quote_is_transpose (false), parser_end_of_input (false), 149 quote_is_transpose (false), parser_end_of_input (false),
150 input_line_number (1), current_input_column (1), 150 input_line_number (1), current_input_column (1),
151 bracketflag (0), braceflag (0), 151 bracketflag (0), braceflag (0),
152 looping (0), defining_func (0), looking_at_function_handle (0), 152 looping (0), defining_func (0), looking_at_function_handle (0),
153 block_comment_nesting_level (0),
153 looking_at_object_index (), parsed_function_name (), 154 looking_at_object_index (), parsed_function_name (),
154 pending_local_variables (), nesting_level () 155 pending_local_variables (), nesting_level ()
155 { 156 {
156 init (); 157 init ();
157 } 158 }
178 bracketflag (lf.bracketflag), 179 bracketflag (lf.bracketflag),
179 braceflag (lf.braceflag), 180 braceflag (lf.braceflag),
180 looping (lf.looping), 181 looping (lf.looping),
181 defining_func (lf.defining_func), 182 defining_func (lf.defining_func),
182 looking_at_function_handle (lf.looking_at_function_handle), 183 looking_at_function_handle (lf.looking_at_function_handle),
184 block_comment_nesting_level (lf.block_comment_nesting_level),
183 looking_at_object_index (lf.looking_at_object_index), 185 looking_at_object_index (lf.looking_at_object_index),
184 parsed_function_name (lf.parsed_function_name), 186 parsed_function_name (lf.parsed_function_name),
185 pending_local_variables (lf.pending_local_variables), 187 pending_local_variables (lf.pending_local_variables),
186 nesting_level (lf.nesting_level) 188 nesting_level (lf.nesting_level)
187 { } 189 { }
211 bracketflag = lf.bracketflag; 213 bracketflag = lf.bracketflag;
212 braceflag = lf.braceflag; 214 braceflag = lf.braceflag;
213 looping = lf.looping; 215 looping = lf.looping;
214 defining_func = lf.defining_func; 216 defining_func = lf.defining_func;
215 looking_at_function_handle = lf.looking_at_function_handle; 217 looking_at_function_handle = lf.looking_at_function_handle;
218 block_comment_nesting_level = lf.block_comment_nesting_level,
216 looking_at_object_index = lf.looking_at_object_index; 219 looking_at_object_index = lf.looking_at_object_index;
217 parsed_function_name = lf.parsed_function_name; 220 parsed_function_name = lf.parsed_function_name;
218 pending_local_variables = lf.pending_local_variables; 221 pending_local_variables = lf.pending_local_variables;
219 nesting_level = lf.nesting_level; 222 nesting_level = lf.nesting_level;
220 } 223 }
306 int defining_func; 309 int defining_func;
307 310
308 // Nonzero means we are parsing a function handle. 311 // Nonzero means we are parsing a function handle.
309 int looking_at_function_handle; 312 int looking_at_function_handle;
310 313
314 // Nestng level for blcok comments.
315 int block_comment_nesting_level;
316
311 // If the front of the list is TRUE, the closest paren, brace, or 317 // If the front of the list is TRUE, the closest paren, brace, or
312 // bracket nesting is an index for an object. 318 // bracket nesting is an index for an object.
313 std::list<bool> looking_at_object_index; 319 std::list<bool> looking_at_object_index;
314 320
315 // If the top of the stack is TRUE, then we've already seen the name 321 // If the top of the stack is TRUE, then we've already seen the name