FreeBSD Bugzilla – Attachment 154253 Details for
Bug 198552
[patch] awk unmatched right parenthesis in regular expressions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to awk 20121220 b.c
b.c.patch (text/plain), 993 bytes, created by
Nathan Weeks
on 2015-03-12 22:08:44 UTC
(
hide
)
Description:
Patch to awk 20121220 b.c
Filename:
MIME Type:
Creator:
Nathan Weeks
Created:
2015-03-12 22:08:44 UTC
Size:
993 bytes
patch
obsolete
>--- b.c.orig 2011-06-11 09:13:52.000000000 -0500 >+++ b.c 2014-06-24 16:29:53.000000000 -0500 >@@ -68,6 +68,7 @@ > > static int setcnt; > static int poscnt; >+static int subexprlvl; /* incremented in parenthesized subexpression */ > > char *patbeg; > int patlen; >@@ -657,13 +658,19 @@ > case '$': > rtok = relex(); > return (unary(op2(CHAR, NIL, NIL))); >+ case ')': >+ np = op2(CHAR, NIL, itonp(')')); >+ rtok = relex(); >+ return (unary(np)); > case '(': > rtok = relex(); > if (rtok == ')') { /* special pleading for () */ > rtok = relex(); > return unary(op2(CCL, NIL, (Node *) tostring(""))); > } >+ subexprlvl++; > np = regexp(); >+ subexprlvl--; > if (rtok == ')') { > rtok = relex(); > return (unary(np)); >@@ -681,6 +688,9 @@ > switch (rtok) { > case CHAR: case DOT: case ALL: case EMPTYRE: case CCL: case NCCL: case '$': case '(': > return (concat(op2(CAT, np, primary()))); >+ case ')': >+ if (!subexprlvl) >+ return (concat(op2(CAT, np, primary()))); > } > return (np); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198552
: 154253