Mercurial > hg > octave-nkf
comparison libinterp/parse-tree/oct-parse.yy @ 16164:c5bfdc4c0963
move end_of_input flag from octve_parser class to octave_lexer class
* lex.h, lex.ll, parse.h, oct-parse.yy, toplev.cc
(octave_lexer::end_of_input): Move data member from octave_parser.
Change all uses.
* lex.h, lex.ll (octave_lexer::handle_end_of_input): New function.
(<<EOF>>): Use it.
({CCHAR}, .): USe it instead of simply returning END_OF_INPUT token.
* lex.ll (octave_lexer::xunput): Don't unput EOF.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 01 Mar 2013 07:10:31 -0500 |
parents | 7eb614760ddb |
children | 22bb3aa9f025 |
comparison
equal
deleted
inserted
replaced
16163:34898b3fc32a | 16164:c5bfdc4c0963 |
---|---|
340 | 340 |
341 input1 : '\n' | 341 input1 : '\n' |
342 { $$ = 0; } | 342 { $$ = 0; } |
343 | END_OF_INPUT | 343 | END_OF_INPUT |
344 { | 344 { |
345 curr_parser->end_of_input = true; | 345 curr_lexer->end_of_input = true; |
346 $$ = 0; | 346 $$ = 0; |
347 } | 347 } |
348 | simple_list | 348 | simple_list |
349 { $$ = $1; } | 349 { $$ = $1; } |
350 | simple_list '\n' | 350 | simple_list '\n' |
4299 || tree_return_command::returning | 4299 || tree_return_command::returning |
4300 || tree_break_command::breaking | 4300 || tree_break_command::breaking |
4301 || tree_continue_command::continuing) | 4301 || tree_continue_command::continuing) |
4302 break; | 4302 break; |
4303 } | 4303 } |
4304 else if (curr_parser->end_of_input) | 4304 else if (curr_parser->curr_lexer->end_of_input) |
4305 break; | 4305 break; |
4306 } | 4306 } |
4307 } | 4307 } |
4308 while (parse_status == 0); | 4308 while (parse_status == 0); |
4309 | 4309 |