Mercurial > octave-dspies
comparison libinterp/parse-tree/lex.ll @ 16207:0467d68ca891
move current_input_line to lexical_feedback class
* input.h, input.cc, lex.h, lex.ll (current_input_line): Declare as
member of lexical_feedback class.
(octave_base_reader::octave_gets, octave_terminal_reader::get_input,
octave_file_reader::get_input, octave_eval_string_reader::get_input):
Don't set current_input_line.
(octave_lexer::read): Set current_input_line.
* oct-parse.in.yy (octave_parser::bison_error): Use
curr_lexer->current_input_line.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 06 Mar 2013 19:39:48 -0500 |
parents | 127cccb037bf |
children | e7ff32e7cf82 |
comparison
equal
deleted
inserted
replaced
16206:9ba5c5ed3aeb | 16207:0467d68ca891 |
---|---|
1335 looping = 0; | 1335 looping = 0; |
1336 defining_func = 0; | 1336 defining_func = 0; |
1337 looking_at_function_handle = 0; | 1337 looking_at_function_handle = 0; |
1338 block_comment_nesting_level = 0; | 1338 block_comment_nesting_level = 0; |
1339 token_count = 0; | 1339 token_count = 0; |
1340 current_input_line = ""; | |
1340 help_text = ""; | 1341 help_text = ""; |
1341 fcn_file_name = ""; | 1342 fcn_file_name = ""; |
1342 fcn_file_full_name = ""; | 1343 fcn_file_full_name = ""; |
1343 looking_at_object_index.clear (); | 1344 looking_at_object_index.clear (); |
1344 looking_at_object_index.push_front (false); | 1345 looking_at_object_index.push_front (false); |
1477 int status = 0; | 1478 int status = 0; |
1478 | 1479 |
1479 if (input_buf.empty ()) | 1480 if (input_buf.empty ()) |
1480 { | 1481 { |
1481 bool eof = false; | 1482 bool eof = false; |
1482 std::string input = input_reader.get_input (eof); | 1483 current_input_line = input_reader.get_input (eof); |
1483 input_buf.fill (input, eof); | 1484 input_buf.fill (current_input_line, eof); |
1484 } | 1485 } |
1485 | 1486 |
1486 if (! input_buf.empty ()) | 1487 if (! input_buf.empty ()) |
1487 status = input_buf.copy_chunk (buf, max_size); | 1488 status = input_buf.copy_chunk (buf, max_size); |
1488 else | 1489 else |