diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l index cf90f2939..b7c1d19f8 100644 --- a/src/libexpr/lexer.l +++ b/src/libexpr/lexer.l @@ -124,7 +124,7 @@ inherit { return INHERIT; } . return yytext[0]; /* just in case: shouldn't be reached */ \'\'(\ *\n)? { BEGIN(IND_STRING); return IND_STRING_OPEN; } -([^\$\']|\$[^\{\']|\'[^\'])+ { +([^\$\']|\$[^\{\']|\'[^\'\$])+ { yylval->t = makeIndStr(toATerm(yytext)); return IND_STR; } @@ -142,6 +142,10 @@ inherit { return INHERIT; } } \$\{ { BEGIN(INITIAL); return DOLLAR_CURLY; } \'\' { BEGIN(INITIAL); return IND_STRING_CLOSE; } +\' { + yylval->t = makeIndStr(toATerm("'")); + return IND_STR; + } . return yytext[0]; /* just in case: shouldn't be reached */ {PATH} { yylval->t = toATerm(yytext); return PATH; /* !!! alloc */ }