diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-02-03 22:21:50 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-02-03 22:21:50 +0200 |
commit | c9b866094dab452054c85971d96ebcb3afdcaacf (patch) | |
tree | 775ef664028c6364977ae4e404a852a24d249f86 | |
parent | 348cdff0b903121e4a3d21dec69947fa4fc779cd (diff) | |
download | egawk-c9b866094dab452054c85971d96ebcb3afdcaacf.tar.gz egawk-c9b866094dab452054c85971d96ebcb3afdcaacf.tar.bz2 egawk-c9b866094dab452054c85971d96ebcb3afdcaacf.zip |
Update TODO, disallow @/.../ as second arg to index.
-rwxr-xr-x | ChangeLog | 5 | ||||
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | awkgram.c | 2 | ||||
-rw-r--r-- | awkgram.y | 2 |
4 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2019-02-03 Arnold D. Robbins <arnold@skeeve.com> + + * awkgram.y (snode): Disallow @/.../ as second param of index, also. + * TODO: Updated. + 2019-02-02 Arnold D. Robbins <arnold@skeeve.com> * awkgram.c, command.c: Regenerated with Bison 3.3. @@ -1,4 +1,4 @@ -Wed Dec 12 21:29:16 IST 2018 +Sun Feb 3 20:34:46 IST 2019 ============================ There were too many files tracking different thoughts and ideas for @@ -41,6 +41,8 @@ Minor New Features Consider relaxing the strictness of --posix. + Enhance --lint=invalid to apply in more places. + ? Add an optional base to strtonum, allowing 2-36. ? Optional third argument for index indicating where to start the @@ -7293,7 +7293,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r) else if (r->builtin == do_index) { arg = subn->nexti->lasti->nexti; /* 2nd arg list */ ip = arg->lasti; - if (ip->opcode == Op_match_rec) + if (ip->opcode == Op_match_rec || ip->opcode == Op_push_re) fatal(_("index: regexp constant as second argument is not allowed")); } #ifdef ARRAYDEBUG @@ -4799,7 +4799,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r) else if (r->builtin == do_index) { arg = subn->nexti->lasti->nexti; /* 2nd arg list */ ip = arg->lasti; - if (ip->opcode == Op_match_rec) + if (ip->opcode == Op_match_rec || ip->opcode == Op_push_re) fatal(_("index: regexp constant as second argument is not allowed")); } #ifdef ARRAYDEBUG |