about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-05-01T15·29+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-05-01T15·29+0000
commit7276e194eefc807600e1dcd10566a57e557ed1ad (patch)
treebff2c4be8c14acf776345df4bf89f70cf475f4b3
parent0064599a27ec44880e4ff6fa19f453e610b5ef07 (diff)
* Disallow unescaped $ in string literals.
-rw-r--r--src/libexpr/lexer.l5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l
index 47f2bca1e699..bc9a38da42f9 100644
--- a/src/libexpr/lexer.l
+++ b/src/libexpr/lexer.l
@@ -73,10 +73,7 @@ inherit     { return INHERIT; }
             }
 
 \"          { BEGIN(STRING); return '"'; }
-<STRING>([^\$\"\\]|\\.|\$[^\{\$])+ {
-/* Note: a dollar *is* allowed as-is in a string, as long as it's
-   not followed by a open brace.  This should probably be disallowed
-   eventually. */
+<STRING>([^\$\"\\]|\\.)+ {
               yylval->t = unescapeStr(yytext); /* !!! alloc */ 
               return STR;
             }