Mercurial > hg > octave-nkf
comparison libinterp/parse-tree/lex.ll @ 16325:fc565603ccbb
also accept "." as possibly beginning a command
* lex.ll ("."): If it looks like a command, parse it like one.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 16 Mar 2013 04:43:30 -0400 |
parents | 09f0cb9cac7d |
children | 06aa4c0f2018 |
comparison
equal
deleted
inserted
replaced
16324:c130939b0d1c | 16325:fc565603ccbb |
---|---|
1023 } | 1023 } |
1024 | 1024 |
1025 "." { | 1025 "." { |
1026 curr_lexer->lexer_debug ("."); | 1026 curr_lexer->lexer_debug ("."); |
1027 | 1027 |
1028 curr_lexer->looking_for_object_index = false; | 1028 if (curr_lexer->previous_token_may_be_command () |
1029 curr_lexer->at_beginning_of_statement = false; | 1029 && curr_lexer->space_follows_previous_token ()) |
1030 | 1030 { |
1031 return curr_lexer->handle_token ('.'); | 1031 yyless (0); |
1032 curr_lexer->push_start_state (COMMAND_START); | |
1033 } | |
1034 else | |
1035 { | |
1036 curr_lexer->looking_for_object_index = false; | |
1037 curr_lexer->at_beginning_of_statement = false; | |
1038 | |
1039 return curr_lexer->handle_token ('.'); | |
1040 } | |
1032 } | 1041 } |
1033 | 1042 |
1034 %{ | 1043 %{ |
1035 // = and op= operators. | 1044 // = and op= operators. |
1036 %} | 1045 %} |