comparison libinterp/parse-tree/lex.ll @ 19628:fe689210525c gui-release

maint: Periodic merge of stable to gui-release.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:05:42 -0500
parents c1ce43276b86 446c46af4b42
children 0e1f5a750d00
comparison
equal deleted inserted replaced
19624:6d75f1683ce8 19628:fe689210525c
177 { \ 177 { \
178 return curr_lexer->handle_incompatible_op (PATTERN, TOK, false); \ 178 return curr_lexer->handle_incompatible_op (PATTERN, TOK, false); \
179 } \ 179 } \
180 } \ 180 } \
181 while (0) 181 while (0)
182 182
183 #define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \ 183 #define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \
184 \ 184 \
185 do \ 185 do \
186 { \ 186 { \
187 curr_lexer->lexer_debug (PATTERN); \ 187 curr_lexer->lexer_debug (PATTERN); \
727 if (! (c == ' ' || c == '\t' || c == '\n' || c == '\r')) 727 if (! (c == ' ' || c == '\t' || c == '\n' || c == '\r'))
728 { 728 {
729 looks_like_block_comment = false; 729 looks_like_block_comment = false;
730 break; 730 break;
731 } 731 }
732 } 732 }
733 733
734 if (looks_like_block_comment) 734 if (looks_like_block_comment)
735 { 735 {
736 yyless (0); 736 yyless (0);
737 737
762 <LINE_COMMENT_START>{ANY_INCLUDING_NL} { 762 <LINE_COMMENT_START>{ANY_INCLUDING_NL} {
763 curr_lexer->lexer_debug ("<LINE_COMMENT_START>{ANY_INCLUDING_NL}"); 763 curr_lexer->lexer_debug ("<LINE_COMMENT_START>{ANY_INCLUDING_NL}");
764 764
765 curr_lexer->xunput (yytext[0]); 765 curr_lexer->xunput (yytext[0]);
766 766
767 curr_lexer->finish_comment (octave_comment_elt::full_line); 767 curr_lexer->finish_comment (octave_comment_elt::full_line);
768 768
769 curr_lexer->pop_start_state (); 769 curr_lexer->pop_start_state ();
770 } 770 }
771 771
772 %{ 772 %{
1962 looking_at_return_list = false; 1962 looking_at_return_list = false;
1963 looking_at_parameter_list = false; 1963 looking_at_parameter_list = false;
1964 looking_at_decl_list = false; 1964 looking_at_decl_list = false;
1965 looking_at_initializer_expression = false; 1965 looking_at_initializer_expression = false;
1966 looking_at_matrix_or_assign_lhs = false; 1966 looking_at_matrix_or_assign_lhs = false;
1967 looking_for_object_index = false; 1967 looking_for_object_index = false;
1968 looking_at_indirect_ref = false; 1968 looking_at_indirect_ref = false;
1969 parsing_class_method = false; 1969 parsing_class_method = false;
1970 maybe_classdef_get_set_method = false; 1970 maybe_classdef_get_set_method = false;
1971 parsing_classdef = false; 1971 parsing_classdef = false;
1972 force_script = false; 1972 force_script = false;
3375 3375
3376 if (lexer_debug_flag) 3376 if (lexer_debug_flag)
3377 { 3377 {
3378 std::cerr << "R: "; 3378 std::cerr << "R: ";
3379 display_token (tok); 3379 display_token (tok);
3380 std::cerr << std::endl; 3380 std::cerr << std::endl;
3381 } 3381 }
3382 3382
3383 return tok; 3383 return tok;
3384 } 3384 }
3385 3385
3408 { 3408 {
3409 int status = 0; 3409 int status = 0;
3410 3410
3411 if (input_buf.empty () && ! input_buf.at_eof ()) 3411 if (input_buf.empty () && ! input_buf.at_eof ())
3412 input_buf.fill (std::string (1, static_cast<char> (1)), false); 3412 input_buf.fill (std::string (1, static_cast<char> (1)), false);
3413 3413
3414 if (! input_buf.empty ()) 3414 if (! input_buf.empty ())
3415 status = input_buf.copy_chunk (buf, max_size); 3415 status = input_buf.copy_chunk (buf, max_size);
3416 else 3416 else
3417 status = YY_NULL; 3417 status = YY_NULL;
3418 3418