Mercurial > hg > octave-lyh
diff 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 |
line wrap: on
line diff
--- a/src/lex.ll +++ b/src/lex.ll @@ -765,8 +765,8 @@ %} \?{IDENT}{S}* | -\?{IDENT}.{IDENT}{S}* { - LEXER_DEBUG ("\?{IDENT}{S}* | \?{IDENT}.{IDENT}{S}*"); +\?{IDENT}\.{IDENT}{S}* { + LEXER_DEBUG ("\\?{IDENT}{S}*|\\?{IDENT}\\.{IDENT}{S}*"); int id_tok = handle_meta_identifier (); @@ -854,7 +854,7 @@ %} \" { - LEXER_DEBUG ("\""); + LEXER_DEBUG ("\\""); current_input_column++; int tok = handle_string ('"');