comparison libinterp/parse-tree/lex.ll @ 19793:0e1f5a750d00

maint: Periodic merge of gui-release to default.
author John W. Eaton <jwe@octave.org>
date Tue, 20 Jan 2015 10:24:46 -0500
parents 5db5619fe54e fe689210525c
children 4197fc428c7d
comparison
equal deleted inserted replaced
19789:37d37297acf8 19793:0e1f5a750d00
179 { \ 179 { \
180 return curr_lexer->handle_incompatible_op (PATTERN, TOK, false); \ 180 return curr_lexer->handle_incompatible_op (PATTERN, TOK, false); \
181 } \ 181 } \
182 } \ 182 } \
183 while (0) 183 while (0)
184 184
185 #define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \ 185 #define CMD_OR_UNARY_OP(PATTERN, TOK, COMPAT) \
186 \ 186 \
187 do \ 187 do \
188 { \ 188 { \
189 curr_lexer->lexer_debug (PATTERN); \ 189 curr_lexer->lexer_debug (PATTERN); \
762 if (! (c == ' ' || c == '\t' || c == '\n' || c == '\r')) 762 if (! (c == ' ' || c == '\t' || c == '\n' || c == '\r'))
763 { 763 {
764 looks_like_block_comment = false; 764 looks_like_block_comment = false;
765 break; 765 break;
766 } 766 }
767 } 767 }
768 768
769 if (looks_like_block_comment) 769 if (looks_like_block_comment)
770 { 770 {
771 yyless (0); 771 yyless (0);
772 772
797 <LINE_COMMENT_START>{ANY_INCLUDING_NL} { 797 <LINE_COMMENT_START>{ANY_INCLUDING_NL} {
798 curr_lexer->lexer_debug ("<LINE_COMMENT_START>{ANY_INCLUDING_NL}"); 798 curr_lexer->lexer_debug ("<LINE_COMMENT_START>{ANY_INCLUDING_NL}");
799 799
800 curr_lexer->xunput (yytext[0]); 800 curr_lexer->xunput (yytext[0]);
801 801
802 curr_lexer->finish_comment (octave_comment_elt::full_line); 802 curr_lexer->finish_comment (octave_comment_elt::full_line);
803 803
804 curr_lexer->pop_start_state (); 804 curr_lexer->pop_start_state ();
805 } 805 }
806 806
807 %{ 807 %{
1989 looking_at_return_list = false; 1989 looking_at_return_list = false;
1990 looking_at_parameter_list = false; 1990 looking_at_parameter_list = false;
1991 looking_at_decl_list = false; 1991 looking_at_decl_list = false;
1992 looking_at_initializer_expression = false; 1992 looking_at_initializer_expression = false;
1993 looking_at_matrix_or_assign_lhs = false; 1993 looking_at_matrix_or_assign_lhs = false;
1994 looking_for_object_index = false; 1994 looking_for_object_index = false;
1995 looking_at_indirect_ref = false; 1995 looking_at_indirect_ref = false;
1996 parsing_class_method = false; 1996 parsing_class_method = false;
1997 parsing_classdef = false; 1997 parsing_classdef = false;
1998 maybe_classdef_get_set_method = false; 1998 maybe_classdef_get_set_method = false;
1999 parsing_classdef_get_method = false; 1999 parsing_classdef_get_method = false;
3408 3408
3409 if (lexer_debug_flag) 3409 if (lexer_debug_flag)
3410 { 3410 {
3411 std::cerr << "R: "; 3411 std::cerr << "R: ";
3412 display_token (tok); 3412 display_token (tok);
3413 std::cerr << std::endl; 3413 std::cerr << std::endl;
3414 } 3414 }
3415 3415
3416 return tok; 3416 return tok;
3417 } 3417 }
3418 3418
3447 { 3447 {
3448 int status = 0; 3448 int status = 0;
3449 3449
3450 if (input_buf.empty () && ! input_buf.at_eof ()) 3450 if (input_buf.empty () && ! input_buf.at_eof ())
3451 input_buf.fill (std::string (1, static_cast<char> (1)), false); 3451 input_buf.fill (std::string (1, static_cast<char> (1)), false);
3452 3452
3453 if (! input_buf.empty ()) 3453 if (! input_buf.empty ())
3454 status = input_buf.copy_chunk (buf, max_size); 3454 status = input_buf.copy_chunk (buf, max_size);
3455 else 3455 else
3456 status = YY_NULL; 3456 status = YY_NULL;
3457 3457