search for: toggledq

Displaying 6 results from an estimated 6 matches for "toggledq".

Did you mean: toggled
2019 Jan 25
0
[klibc:update-dash] parser: Add syntax stack for recursive parsing
...case CSQUOTE: - syntax = SQSYNTAX; + synstack->syntax = SQSYNTAX; quotemark: if (eofmark == NULL) { USTPUTC(CTLQUOTEMARK, out); } break; case CDQUOTE: - syntax = DQSYNTAX; - dblquote = 1; + synstack->syntax = DQSYNTAX; + synstack->dblquote = 1; +toggledq: + if (synstack->varnest) + synstack->innerdq ^= 1; goto quotemark; case CENDQUOTE: - if (eofmark && !varnest) + if (eofmark && !synstack->varnest) { USTPUTC(c, out); - else { - if (dqvarnest == 0) { - syntax = BASESYNTAX; - dblq...
2020 Mar 28
0
[klibc:update-dash] dash: parser: Add syntax stack for recursive parsing
...case CSQUOTE: - syntax = SQSYNTAX; + synstack->syntax = SQSYNTAX; quotemark: if (eofmark == NULL) { USTPUTC(CTLQUOTEMARK, out); } break; case CDQUOTE: - syntax = DQSYNTAX; - dblquote = 1; + synstack->syntax = DQSYNTAX; + synstack->dblquote = 1; +toggledq: + if (synstack->varnest) + synstack->innerdq ^= 1; goto quotemark; case CENDQUOTE: - if (eofmark && !varnest) + if (eofmark && !synstack->varnest) { USTPUTC(c, out); - else { - if (dqvarnest == 0) { - syntax = BASESYNTAX; - dblq...
2019 Jan 25
0
[klibc:update-dash] parser: Fix backquote support in here-document EOF mark
....apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/parser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr/dash/parser.c b/usr/dash/parser.c index cd980941..ae76400e 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -1037,6 +1037,11 @@ toggledq: } break; case CBQUOTE: /* '`' */ + if (checkkwd & CHKEOFMARK) { + USTPUTC('`', out); + break; + } + PARSEBACKQOLD(); break; case CEOF:
2019 Jan 25
0
[klibc:update-dash] parser: Fix incorrect eating of backslash newlines
...char *eofmark, int striptabs) goto endword; /* exit outer loop */ USTPUTC(c, out); nlprompt(); - c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); + c = pgetc_top(synstack); goto loop; /* continue outer loop */ case CWORD: USTPUTC(c, out); @@ -1056,7 +1061,7 @@ toggledq: USTPUTC(c, out); } } - c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); + c = pgetc_top(synstack); } } endword:
2020 Mar 28
0
[klibc:update-dash] dash: parser: Fix backquote support in here-document EOF mark
....apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/parser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr/dash/parser.c b/usr/dash/parser.c index cd980941..ae76400e 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -1037,6 +1037,11 @@ toggledq: } break; case CBQUOTE: /* '`' */ + if (checkkwd & CHKEOFMARK) { + USTPUTC('`', out); + break; + } + PARSEBACKQOLD(); break; case CEOF:
2020 Mar 28
0
[klibc:update-dash] dash: parser: Fix incorrect eating of backslash newlines
...char *eofmark, int striptabs) goto endword; /* exit outer loop */ USTPUTC(c, out); nlprompt(); - c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); + c = pgetc_top(synstack); goto loop; /* continue outer loop */ case CWORD: USTPUTC(c, out); @@ -1056,7 +1061,7 @@ toggledq: USTPUTC(c, out); } } - c = syntax == SQSYNTAX ? pgetc() : pgetc_eatbnl(); + c = pgetc_top(synstack); } } endword: