Mercurial > hg > octave-nkf
comparison libinterp/parse-tree/oct-parse.yy @ 16122:6884401b2fbb
move reset_parser lexer helper function to lexical_feedback class
* lex.h, lex.ll (reset_parser): Declare as member function of
lexical_feedback class. Change all uses.
(cleanup_parser): Don't call reset parser.
* parse.h (reset_parser): Delete decl.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 Feb 2013 12:43:15 -0500 |
parents | 4f6c37cfbdce |
children | 3be725cd195b |
comparison
equal
deleted
inserted
replaced
16121:bdf365c5c9bf | 16122:6884401b2fbb |
---|---|
3501 | 3501 |
3502 frame.protect_var (curr_lexer); | 3502 frame.protect_var (curr_lexer); |
3503 curr_lexer = new lexical_feedback (); | 3503 curr_lexer = new lexical_feedback (); |
3504 frame.add_fcn (lexical_feedback::cleanup, curr_lexer); | 3504 frame.add_fcn (lexical_feedback::cleanup, curr_lexer); |
3505 | 3505 |
3506 reset_parser (); | 3506 curr_lexer->reset_parser (); |
3507 | 3507 |
3508 std::string help_txt = gobble_leading_white_space (ffile, eof); | 3508 std::string help_txt = gobble_leading_white_space (ffile, eof); |
3509 | 3509 |
3510 if (! help_txt.empty ()) | 3510 if (! help_txt.empty ()) |
3511 help_buf.push (help_txt); | 3511 help_buf.push (help_txt); |
4342 | 4342 |
4343 switch_to_buffer (new_buf); | 4343 switch_to_buffer (new_buf); |
4344 | 4344 |
4345 do | 4345 do |
4346 { | 4346 { |
4347 reset_parser (); | 4347 curr_lexer->reset_parser (); |
4348 | 4348 |
4349 frame.protect_var (global_command); | 4349 frame.protect_var (global_command); |
4350 | 4350 |
4351 global_command = 0; | 4351 global_command = 0; |
4352 | 4352 |