mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
35184: Additional case fix for 35168.
Lexical analysis flags got screwed up after a "|", so we didn't parse patterns properly, in particular those with parentheses.
This commit is contained in:
parent
52aeb9aaeb
commit
2d6569e590
3 changed files with 18 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
2015-05-18 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 35184: Src/parse.c, Test/A01grammar.ztst: fix pattern parsing
|
||||
after "|" in 35168.
|
||||
|
||||
* 35168: Completion/Unix/Command/_ant,
|
||||
Completion/Unix/Command/_cp, Completion/Unix/Command/_locate,
|
||||
Completion/Unix/Command/_make, Completion/Unix/Command/_tar,
|
||||
|
|
|
@ -1174,8 +1174,6 @@ par_case(int *cmplx)
|
|||
if (!strcmp(tokstr, "esac"))
|
||||
break;
|
||||
str = dupstring(tokstr);
|
||||
incasepat = 0;
|
||||
incmdpos = 1;
|
||||
type = WC_CASE_OR;
|
||||
pp = ecadd(0);
|
||||
palts = ecadd(0);
|
||||
|
|
|
@ -543,6 +543,7 @@
|
|||
. ./bad_syntax
|
||||
126: Attempt to "." file with bad syntax.
|
||||
?./bad_syntax:2: parse error near `\n'
|
||||
# `
|
||||
|
||||
echo 'false' >dot_false
|
||||
. ./dot_false
|
||||
|
@ -650,3 +651,17 @@
|
|||
>Pattern matched five
|
||||
>Pattern matched six
|
||||
>Character class matched abecedinarian
|
||||
|
||||
case grumph in
|
||||
( no | (grumph) )
|
||||
print 1 OK
|
||||
;;
|
||||
esac
|
||||
case snruf in
|
||||
( fleer | (|snr(|[au]f)) )
|
||||
print 2 OK
|
||||
;;
|
||||
esac
|
||||
0: case patterns within words
|
||||
>1 OK
|
||||
>2 OK
|
||||
|
|
Loading…
Reference in a new issue