diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-12-06T10·20+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-12-06T10·20+0000 |
commit | b42ef9c0544009b372e3da0275553ce08cf0ea2a (patch) | |
tree | 28afd5929bde8db2fa5f82583193c6beb20d998f /src | |
parent | d4950f207f18e635cc13e3ee33103fd501456384 (diff) |
* Syntax to escape '', ${.
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/lexer.l | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l index 23a14324f32c..cf90f2939d24 100644 --- a/src/libexpr/lexer.l +++ b/src/libexpr/lexer.l @@ -128,6 +128,18 @@ inherit { return INHERIT; } yylval->t = makeIndStr(toATerm(yytext)); return IND_STR; } +<IND_STRING>\'\'\$ { + yylval->t = makeIndStr(toATerm("$")); + return IND_STR; + } +<IND_STRING>\'\'\' { + yylval->t = makeIndStr(toATerm("''")); + return IND_STR; + } +<IND_STRING>\'\'\\. { + yylval->t = unescapeStr(yytext + 2); + return IND_STR; + } <IND_STRING>\$\{ { BEGIN(INITIAL); return DOLLAR_CURLY; } <IND_STRING>\'\' { BEGIN(INITIAL); return IND_STRING_CLOSE; } <IND_STRING>. return yytext[0]; /* just in case: shouldn't be reached */ |