Mercurial > hg > octave-nkf
diff src/lex.l @ 9324:29563379fa9b
don't look for object index after keyword
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 10 Jun 2009 14:31:26 -0400 |
parents | fde2a916b2ac |
children | 25ed2d6aacf6 |
line wrap: on
line diff
--- a/src/lex.l +++ b/src/lex.l @@ -723,11 +723,7 @@ int id_tok = handle_identifier (); if (id_tok >= 0) - { - lexer_flags.looking_for_object_index = true; - - COUNT_TOK_AND_RETURN (id_tok); - } + COUNT_TOK_AND_RETURN (id_tok); } %{ @@ -3104,6 +3100,7 @@ lexer_flags.quote_is_transpose = true; lexer_flags.convert_spaces_to_comma = true; + lexer_flags.looking_for_object_index = true; current_input_column += yyleng; @@ -3141,6 +3138,7 @@ current_input_column += yyleng; lexer_flags.quote_is_transpose = false; lexer_flags.convert_spaces_to_comma = true; + lexer_flags.looking_for_object_index = true; return FCN_HANDLE; } @@ -3156,6 +3154,7 @@ current_input_column += yyleng; lexer_flags.quote_is_transpose = false; lexer_flags.convert_spaces_to_comma = true; + lexer_flags.looking_for_object_index = false; } return kw_token; @@ -3234,6 +3233,9 @@ current_input_column += yyleng; + if (tok != "__end__") + lexer_flags.looking_for_object_index = true; + return NAME; }