aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-02-01 21:13:51 +0200
committerSergey Poznyakoff <gray@gnu.org>2021-02-01 21:13:51 +0200
commit4c7dfbc3e0296f36c5692ae87c6699f36c641fc8 (patch)
treebcd98121f3646691dc55917816ff8c261a362a4f
parenta9ffc779d3c56b43f216197a65675402ad95e3a1 (diff)
downloadxenv-4c7dfbc3e0296f36c5692ae87c6699f36c641fc8.tar.gz
xenv-4c7dfbc3e0296f36c5692ae87c6699f36c641fc8.tar.bz2
Fix quoted string handling.
-rw-r--r--Makefile2
-rw-r--r--xenv.l6
2 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 477f702..3527d33 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CPPFLAGS =
CFLAGS = -ggdb -Wall
-LEXFLAGS = -F
+LEXFLAGS = -F
PACKAGE = xenv
VERSION = 0.1
diff --git a/xenv.l b/xenv.l
index 0189edf..3c0ad30 100644
--- a/xenv.l
+++ b/xenv.l
@@ -128,8 +128,10 @@ OWS [ \t]*
}
\| { expand_inline_flop(); }
-<DQ,SQ>\" { BEGIN(save_state); ECHO; }
+<DQ>\" { BEGIN(save_state); ECHO; }
\" { save_state = YYSTATE; BEGIN(DQ); ECHO; }
+
+<SQ>"'" { BEGIN(save_state); ECHO; }
"'" { save_state = YYSTATE; BEGIN(SQ); ECHO; }
<INITIAL>"${*" { save_state = YYSTATE; BEGIN(COMMENT); }
@@ -485,8 +487,6 @@ expand_inline_pop(void)
free(ep->varname);
fclose(yyout);
yyout = ep->fp;
- if (expand_inline_tos == -1)
- BEGIN(INITIAL);
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.