comparison src/lex.ll @ 14638:5b0872b5b234

fix missing backslash quoting in lexer rules * lex.ll (\?{IDENT}\.{IDENT}{S}*): Quote . to recognize as literal "." character. Properly quote \ in LEXER_DEBUG rules. From James Laird <james.laird@nicta.com.au>.
author John W. Eaton <jwe@octave.org>
date Wed, 16 May 2012 16:22:00 -0400
parents c20de00a66a9
children 6edd02858516
comparison
equal deleted inserted replaced
14637:e12a0ac530b4 14638:5b0872b5b234
763 %{ 763 %{
764 // Metaclass query 764 // Metaclass query
765 %} 765 %}
766 766
767 \?{IDENT}{S}* | 767 \?{IDENT}{S}* |
768 \?{IDENT}.{IDENT}{S}* { 768 \?{IDENT}\.{IDENT}{S}* {
769 LEXER_DEBUG ("\?{IDENT}{S}* | \?{IDENT}.{IDENT}{S}*"); 769 LEXER_DEBUG ("\\?{IDENT}{S}*|\\?{IDENT}\\.{IDENT}{S}*");
770 770
771 int id_tok = handle_meta_identifier (); 771 int id_tok = handle_meta_identifier ();
772 772
773 if (id_tok >= 0) 773 if (id_tok >= 0)
774 { 774 {
852 %{ 852 %{
853 // Double quotes always begin strings. 853 // Double quotes always begin strings.
854 %} 854 %}
855 855
856 \" { 856 \" {
857 LEXER_DEBUG ("\""); 857 LEXER_DEBUG ("\\"");
858 858
859 current_input_column++; 859 current_input_column++;
860 int tok = handle_string ('"'); 860 int tok = handle_string ('"');
861 861
862 COUNT_TOK_AND_RETURN (tok); 862 COUNT_TOK_AND_RETURN (tok);