summaryrefslogtreecommitdiff
path: root/regcomp.sym
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-11-11 21:48:53 -0700
committerKarl Williamson <khw@cpan.org>2018-11-16 09:21:35 -0700
commit46167d76640b8ae760665fc0fd2f94ac4760438c (patch)
tree5293f3d96b38ccc90f4ebd7bcd4582243273bb77 /regcomp.sym
parent282634ed6aed040ba8694186b410779d98331944 (diff)
downloadperl-46167d76640b8ae760665fc0fd2f94ac4760438c.tar.gz
regcomp.sym: longj field is a boolean
The comments could lead one to thinking one could specify any of the argument fields that nodes can have. But in fact, the value is a boolean, 0 meaning to use the normal offset field of all regnodes; and 1 meaning to use the ARG field that some regnodes have. If a regnode had more than just the one argument field, the one that corresponds to that would be used. This commit enforces that, and changes regcomp.sym to not use '2', which is misleading. It clarifies the comments about this and what '.' means in the flags field
Diffstat (limited to 'regcomp.sym')
-rw-r--r--regcomp.sym10
1 files changed, 6 insertions, 4 deletions
diff --git a/regcomp.sym b/regcomp.sym
index f275c7b6c8..6305bfbbcf 100644
--- a/regcomp.sym
+++ b/regcomp.sym
@@ -11,8 +11,10 @@
# Note that the order in this file is important.
#
# Format for first section:
-# NAME \s+ TYPE, arg-description [num-args] [flags] [longjump-len] ; DESCRIPTION
-# flag <S> means is REGNODE_SIMPLE; flag <V> means is REGNODE_VARIES
+# NAME \s+ TYPE, arg-description [num-args] [flags] [longjump] ; DESCRIPTION
+# flag <S> means is REGNODE_SIMPLE; flag <V> means is REGNODE_VARIES; <.> is
+# a placeholder
+# longjump is 1 if the (first) argument holds the next offset.
#
#
# run perl regen.pl after editing this file
@@ -162,8 +164,8 @@ LONGJMP LONGJMP, off 1 . 1 ; Jump far away.
BRANCHJ BRANCHJ, off 1 V 1 ; BRANCH with long offset.
#*Special Case Regops
-IFMATCH BRANCHJ, off 1 . 2 ; Succeeds if the following matches.
-UNLESSM BRANCHJ, off 1 . 2 ; Fails if the following matches.
+IFMATCH BRANCHJ, off 1 . 1 ; Succeeds if the following matches.
+UNLESSM BRANCHJ, off 1 . 1 ; Fails if the following matches.
SUSPEND BRANCHJ, off 1 V 1 ; "Independent" sub-RE.
IFTHEN BRANCHJ, off 1 V 1 ; Switch, should be preceded by switcher.
GROUPP GROUPP, num 1 ; Whether the group matched.