Mercurial > hg > octave-nkf
comparison libinterp/parse-tree/lex.ll @ 17246:8be8a65d3ca8
Ignore anything after the continuation marker '...' (bug #38653)
* lex.ll: Ignore any text following '...' line continuation marker.
* line-continue.tst: New test.
author | Stefan Mahr <dac922@gmx.de> |
---|---|
date | Mon, 12 Aug 2013 17:36:54 +0200 |
parents | 9de751a10910 |
children | e993fa124b46 |
comparison
equal
deleted
inserted
replaced
17245:7babcdb9bc13 | 17246:8be8a65d3ca8 |
---|---|
248 %} | 248 %} |
249 | 249 |
250 D [0-9] | 250 D [0-9] |
251 S [ \t] | 251 S [ \t] |
252 NL ((\n)|(\r)|(\r\n)) | 252 NL ((\n)|(\r)|(\r\n)) |
253 CONT ((\.\.\.)|(\\)) | |
254 Im [iIjJ] | 253 Im [iIjJ] |
255 CCHAR [#%] | 254 CCHAR [#%] |
256 IDENT ([_$a-zA-Z][_$a-zA-Z0-9]*) | 255 IDENT ([_$a-zA-Z][_$a-zA-Z0-9]*) |
257 EXPON ([DdEe][+-]?{D}+) | 256 EXPON ([DdEe][+-]?{D}+) |
258 NUMBER (({D}+\.?{D}*{EXPON}?)|(\.{D}+{EXPON}?)|(0[xX][0-9a-fA-F]+)) | 257 NUMBER (({D}+\.?{D}*{EXPON}?)|(\.{D}+{EXPON}?)|(0[xX][0-9a-fA-F]+)) |
962 | 961 |
963 %{ | 962 %{ |
964 // Continuation lines. Allow comments after continuations. | 963 // Continuation lines. Allow comments after continuations. |
965 %} | 964 %} |
966 | 965 |
967 {CONT}{S}*{NL} | | 966 \\{S}*{NL} | |
968 {CONT}{S}*{CCHAR}.*{NL} { | 967 \\{S}*{CCHAR}.*{NL} | |
969 curr_lexer->lexer_debug ("{CONT}{S}*{NL}|{CONT}{S}*{CCHAR}.*{NL}"); | 968 \.\.\..*{NL} { |
969 curr_lexer->lexer_debug ("\\.\\.\\..*{NL}|\\\\{S}*{NL}|\\\\{S}*{CCHAR}.*{NL}"); | |
970 | 970 |
971 curr_lexer->handle_continuation (); | 971 curr_lexer->handle_continuation (); |
972 } | 972 } |
973 | 973 |
974 %{ | 974 %{ |