BRANCHJ off 1 1 BRANCH with long offset.
# Special Case Regops
- IFMATCH off 1 2 Succeeds if the following matches.
- UNLESSM off 1 2 Fails if the following matches.
+ IFMATCH off 1 1 Succeeds if the following matches.
+ UNLESSM off 1 1 Fails if the following matches.
SUSPEND off 1 1 "Independent" sub-RE.
IFTHEN off 1 1 Switch, should be preceded by switcher.
GROUPP num 1 Whether the group matched.
# 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
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.
# code Op what code is associated with this node (???)
# args Op what type of args the node has (which regnode struct)
# flags Op (???)
-# longj Op Whether this node is a longjump
+# longj Op Boolean as to if this node is a longjump
# comment Both Comment about node, if any
# pod_comment Both Special comments for pod output (preceding lines in def)
$node->{id}= 0 + @all;
push @all, $node;
$all{ $node->{name} }= $node;
+
+ if ($node->{longj} && $node->{longj} != 1) {
+ die "longj field must be in [01] if present in ", Dumper($node);
+ }
+
}
# Parse and add an opcode definition to the global state.