"single ref constructor",
"reference-type operator",
"bless",
- "backticks",
+ "quoted execution (``, qx)",
"glob",
"<HANDLE>",
"append I/O operator",
"regexp comp once",
"regexp reset interpolation flag",
"regexp compilation",
- "pattern match",
- "pattern quote",
- "substitution",
+ "pattern match (m//)",
+ "pattern quote (qr//)",
+ "substitution (s///)",
"substitution cont",
- "character translation",
+ "character translation (tr///)",
"scalar assignment",
"list assignment",
"chop",
"undef operator",
"study",
"match position",
- "preincrement",
- "integer preincrement",
- "predecrement",
- "integer predecrement",
- "postincrement",
- "integer postincrement",
- "postdecrement",
- "integer postdecrement",
- "exponentiation",
- "multiplication",
- "integer multiplication",
- "division",
- "integer division",
- "modulus",
- "integer modulus",
- "repeat",
- "addition",
- "integer addition",
- "subtraction",
- "integer subtraction",
- "concatenation",
+ "preincrement (++)",
+ "integer preincrement (++)",
+ "predecrement (--)",
+ "integer predecrement (--)",
+ "postincrement (++)",
+ "integer postincrement (++)",
+ "postdecrement (--)",
+ "integer postdecrement (--)",
+ "exponentiation (**)",
+ "multiplication (*)",
+ "integer multiplication (*)",
+ "division (/)",
+ "integer division (/)",
+ "modulus (%)",
+ "integer modulus (%)",
+ "repeat (x)",
+ "addition (+)",
+ "integer addition (+)",
+ "subtraction (-)",
+ "integer subtraction (-)",
+ "concatenation (.)",
"string",
- "left bitshift",
- "right bitshift",
- "numeric lt",
- "integer lt",
- "numeric gt",
- "integer gt",
- "numeric le",
- "integer le",
- "numeric ge",
- "integer ge",
- "numeric eq",
- "integer eq",
- "numeric ne",
- "integer ne",
- "spaceship operator",
- "integer spaceship",
+ "left bitshift (<<)",
+ "right bitshift (>>)",
+ "numeric lt (<)",
+ "integer lt (<)",
+ "numeric gt (>)",
+ "integer gt (>)",
+ "numeric le (<=)",
+ "integer le (<=)",
+ "numeric ge (>=)",
+ "integer ge (>=)",
+ "numeric eq (==)",
+ "integer eq (==)",
+ "numeric ne (!=)",
+ "integer ne (!=)",
+ "numeric comparison (<=>)",
+ "integer comparison (<=>)",
"string lt",
"string gt",
"string le",
"string ge",
"string eq",
"string ne",
- "string comparison",
- "bitwise and",
- "bitwise xor",
- "bitwise or",
- "negate",
- "integer negate",
+ "string comparison (cmp)",
+ "bitwise and (&)",
+ "bitwise xor (^)",
+ "bitwise or (|)",
+ "negate (-)",
+ "integer negate (-)",
"not",
- "1's complement",
+ "1's complement (~)",
"atan2",
"sin",
"cos",
"ord",
"chr",
"crypt",
- "upper case first",
- "lower case first",
- "upper case",
- "lower case",
- "quote metachars",
+ "ucfirst",
+ "lcfirst",
+ "uc",
+ "lc",
+ "quotemeta",
"array deref",
"known array element",
"array element",
"values",
"keys",
"delete",
- "exists operator",
+ "exists",
"hash deref",
"hash elem",
"hash slice",
"join",
"list",
"list slice",
- "anonymous list",
- "anonymous hash",
+ "anonymous list ([])",
+ "anonymous hash ({})",
"splice",
"push",
"pop",
"flipflop",
"range (or flip)",
"range (or flop)",
- "logical and",
- "logical or",
+ "logical and (&&)",
+ "logical or (||)",
"logical xor",
- "conditional expression",
- "logical and assignment",
- "logical or assignment",
+ "conditional operator (?:)",
+ "logical and assignment (&&=)",
+ "logical or assignment (||=)",
"method lookup",
"subroutine entry",
"subroutine exit",
"semop",
"require",
"do 'file'",
- "eval string",
+ "eval \"string\"",
"eval exit",
- "eval block",
+ "eval {block}",
"eval block exit",
"gethostbyname",
"gethostbyaddr",
END
for (@ops) {
- print qq(\t"$desc{$_}",\n);
+ my($safe_desc) = $desc{$_};
+
+ # Have to escape double quotes and escape characters.
+ $safe_desc =~ s/(^|[^\\])([\\"])/$1\\$2/g;
+
+ print qq(\t"$safe_desc",\n);
}
print <<END;
# Pushy I/O.
-backtick backticks ck_null t%
+backtick quoted execution (``, qx) ck_null t%
# glob defaults its first arg to $_
glob glob ck_glob t@ S? S?
readline <HANDLE> ck_null t%
# Bindable operators.
-regcmaybe regexp comp once ck_fun s1 S
+regcmaybe regexp comp once ck_fun s1 S
regcreset regexp reset interpolation flag ck_fun s1 S
-regcomp regexp compilation ck_null s| S
-match pattern match ck_match d/
-qr pattern quote ck_match s/
-subst substitution ck_null dis/ S
-substcont substitution cont ck_null dis|
-trans character translation ck_null is" S
+regcomp regexp compilation ck_null s| S
+match pattern match (m//) ck_match d/
+qr pattern quote (qr//) ck_match s/
+subst substitution (s///) ck_null dis/ S
+substcont substitution cont ck_null dis|
+trans character translation (tr///) ck_null is" S
# Lvalue operators.
# sassign is special-cased for op class
study study ck_fun su% S?
pos match position ck_lfun stu% S?
-preinc preincrement ck_lfun dIs1 S
-i_preinc integer preincrement ck_lfun dis1 S
-predec predecrement ck_lfun dIs1 S
-i_predec integer predecrement ck_lfun dis1 S
-postinc postincrement ck_lfun dIsT1 S
-i_postinc integer postincrement ck_lfun disT1 S
-postdec postdecrement ck_lfun dIsT1 S
-i_postdec integer postdecrement ck_lfun disT1 S
+preinc preincrement (++) ck_lfun dIs1 S
+i_preinc integer preincrement (++) ck_lfun dis1 S
+predec predecrement (--) ck_lfun dIs1 S
+i_predec integer predecrement (--) ck_lfun dis1 S
+postinc postincrement (++) ck_lfun dIsT1 S
+i_postinc integer postincrement (++) ck_lfun disT1 S
+postdec postdecrement (--) ck_lfun dIsT1 S
+i_postdec integer postdecrement (--) ck_lfun disT1 S
# Ordinary operators.
-pow exponentiation ck_null fsT2 S S
-
-multiply multiplication ck_null IfsT2 S S
-i_multiply integer multiplication ck_null ifsT2 S S
-divide division ck_null IfsT2 S S
-i_divide integer division ck_null ifsT2 S S
-modulo modulus ck_null IifsT2 S S
-i_modulo integer modulus ck_null ifsT2 S S
-repeat repeat ck_repeat mt2 L S
-
-add addition ck_null IfsT2 S S
-i_add integer addition ck_null ifsT2 S S
-subtract subtraction ck_null IfsT2 S S
-i_subtract integer subtraction ck_null ifsT2 S S
-concat concatenation ck_concat fsT2 S S
+pow exponentiation (**) ck_null fsT2 S S
+
+multiply multiplication (*) ck_null IfsT2 S S
+i_multiply integer multiplication (*) ck_null ifsT2 S S
+divide division (/) ck_null IfsT2 S S
+i_divide integer division (/) ck_null ifsT2 S S
+modulo modulus (%) ck_null IifsT2 S S
+i_modulo integer modulus (%) ck_null ifsT2 S S
+repeat repeat (x) ck_repeat mt2 L S
+
+add addition (+) ck_null IfsT2 S S
+i_add integer addition (+) ck_null ifsT2 S S
+subtract subtraction (-) ck_null IfsT2 S S
+i_subtract integer subtraction (-) ck_null ifsT2 S S
+concat concatenation (.) ck_concat fsT2 S S
stringify string ck_fun fsT@ S
-left_shift left bitshift ck_bitop fsT2 S S
-right_shift right bitshift ck_bitop fsT2 S S
-
-lt numeric lt ck_null Iifs2 S S
-i_lt integer lt ck_null ifs2 S S
-gt numeric gt ck_null Iifs2 S S
-i_gt integer gt ck_null ifs2 S S
-le numeric le ck_null Iifs2 S S
-i_le integer le ck_null ifs2 S S
-ge numeric ge ck_null Iifs2 S S
-i_ge integer ge ck_null ifs2 S S
-eq numeric eq ck_null Iifs2 S S
-i_eq integer eq ck_null ifs2 S S
-ne numeric ne ck_null Iifs2 S S
-i_ne integer ne ck_null ifs2 S S
-ncmp spaceship operator ck_null Iifst2 S S
-i_ncmp integer spaceship ck_null ifst2 S S
+left_shift left bitshift (<<) ck_bitop fsT2 S S
+right_shift right bitshift (>>) ck_bitop fsT2 S S
+
+lt numeric lt (<) ck_null Iifs2 S S
+i_lt integer lt (<) ck_null ifs2 S S
+gt numeric gt (>) ck_null Iifs2 S S
+i_gt integer gt (>) ck_null ifs2 S S
+le numeric le (<=) ck_null Iifs2 S S
+i_le integer le (<=) ck_null ifs2 S S
+ge numeric ge (>=) ck_null Iifs2 S S
+i_ge integer ge (>=) ck_null ifs2 S S
+eq numeric eq (==) ck_null Iifs2 S S
+i_eq integer eq (==) ck_null ifs2 S S
+ne numeric ne (!=) ck_null Iifs2 S S
+i_ne integer ne (!=) ck_null ifs2 S S
+ncmp numeric comparison (<=>) ck_null Iifst2 S S
+i_ncmp integer comparison (<=>) ck_null ifst2 S S
slt string lt ck_scmp ifs2 S S
sgt string gt ck_scmp ifs2 S S
sge string ge ck_scmp ifs2 S S
seq string eq ck_null ifs2 S S
sne string ne ck_null ifs2 S S
-scmp string comparison ck_scmp ifst2 S S
+scmp string comparison (cmp) ck_scmp ifst2 S S
-bit_and bitwise and ck_bitop fsT2 S S
-bit_xor bitwise xor ck_bitop fsT2 S S
-bit_or bitwise or ck_bitop fsT2 S S
+bit_and bitwise and (&) ck_bitop fsT2 S S
+bit_xor bitwise xor (^) ck_bitop fsT2 S S
+bit_or bitwise or (|) ck_bitop fsT2 S S
-negate negate ck_null IfsT1 S
-i_negate integer negate ck_null ifsT1 S
+negate negate (-) ck_null IfsT1 S
+i_negate integer negate (-) ck_null ifsT1 S
not not ck_null ifs1 S
-complement 1's complement ck_bitop fsT1 S
+complement 1's complement (~) ck_bitop fsT1 S
# High falutin' math.
-atan2 atan2 ck_fun fsT@ S S
-sin sin ck_fun fsTu% S?
-cos cos ck_fun fsTu% S?
-rand rand ck_fun sT% S?
-srand srand ck_fun s% S?
-exp exp ck_fun fsTu% S?
-log log ck_fun fsTu% S?
-sqrt sqrt ck_fun fsTu% S?
+atan2 atan2 ck_fun fsT@ S S
+sin sin ck_fun fsTu% S?
+cos cos ck_fun fsTu% S?
+rand rand ck_fun sT% S?
+srand srand ck_fun s% S?
+exp exp ck_fun fsTu% S?
+log log ck_fun fsTu% S?
+sqrt sqrt ck_fun fsTu% S?
# Lowbrow math.
ord ord ck_fun ifsTu% S?
chr chr ck_fun fsTu% S?
crypt crypt ck_fun fsT@ S S
-ucfirst upper case first ck_fun_locale fstu% S?
-lcfirst lower case first ck_fun_locale fstu% S?
-uc upper case ck_fun_locale fstu% S?
-lc lower case ck_fun_locale fstu% S?
-quotemeta quote metachars ck_fun fsTu% S?
+ucfirst ucfirst ck_fun_locale fstu% S?
+lcfirst lcfirst ck_fun_locale fstu% S?
+uc uc ck_fun_locale fstu% S?
+lc lc ck_fun_locale fstu% S?
+quotemeta quotemeta ck_fun fsTu% S?
# Arrays.
values values ck_fun t% H
keys keys ck_fun t% H
delete delete ck_delete % S
-exists exists operator ck_exists is% S
+exists exists ck_exists is% S
rv2hv hash deref ck_rvconst dt1
helem hash elem ck_null s2@ H S
hslice hash slice ck_null m@ H L
list list ck_null m@ L
lslice list slice ck_null 2 H L L
-anonlist anonymous list ck_fun ms@ L
-anonhash anonymous hash ck_fun ms@ L
+anonlist anonymous list ([]) ck_fun ms@ L
+anonhash anonymous hash ({}) ck_fun ms@ L
splice splice ck_fun m@ A S? S? L
push push ck_fun imsT@ A L
sort sort ck_sort m@ C? L
reverse reverse ck_fun mt@ L
-grepstart grep ck_grep dm@ C L
-grepwhile grep iterator ck_null dt|
+grepstart grep ck_grep dm@ C L
+grepwhile grep iterator ck_null dt|
-mapstart map ck_grep dm@ C L
-mapwhile map iterator ck_null dt|
+mapstart map ck_grep dm@ C L
+mapwhile map iterator ck_null dt|
# Range stuff.
# Control.
-and logical and ck_null |
-or logical or ck_null |
+and logical and (&&) ck_null |
+or logical or (||) ck_null |
xor logical xor ck_null fs2 S S
-cond_expr conditional expression ck_null d|
-andassign logical and assignment ck_null s|
-orassign logical or assignment ck_null s|
+cond_expr conditional operator (?:) ck_null d|
+andassign logical and assignment (&&=) ck_null s|
+orassign logical or assignment (||=) ck_null s|
method method lookup ck_method d1
entersub subroutine entry ck_subr dmt1 L
require require ck_require du% S?
dofile do 'file' ck_fun d1 S
-entereval eval string ck_eval d% S
+entereval eval "string" ck_eval d% S
leaveeval eval exit ck_null 1 S
#evalonce eval constant string ck_null d1 S
-entertry eval block ck_null |
+entertry eval {block} ck_null |
leavetry eval block exit ck_null @
# Get system info.
eval { getpwnam 1 }; # OP_GPWNAM
eval { getpwuid 1 }; # OP_GPWUID
EXPECT
-Useless use of repeat in void context at - line 3.
+Useless use of repeat (x) in void context at - line 3.
Useless use of wantarray in void context at - line 5.
Useless use of reference-type operator in void context at - line 12.
Useless use of reference constructor in void context at - line 13.
%$c =~ tr/a/b/ ;
}
EXPECT
-Applying pattern match to @array will act on scalar(@array) at - line 5.
-Applying substitution to @array will act on scalar(@array) at - line 6.
-Can't modify private array in substitution at - line 6, near "s/a/b/ ;"
-Applying character translation to @array will act on scalar(@array) at - line 7.
-Applying pattern match to @array will act on scalar(@array) at - line 8.
-Applying substitution to @array will act on scalar(@array) at - line 9.
-Applying character translation to @array will act on scalar(@array) at - line 10.
-Applying pattern match to %hash will act on scalar(%hash) at - line 11.
-Applying substitution to %hash will act on scalar(%hash) at - line 12.
-Applying character translation to %hash will act on scalar(%hash) at - line 13.
-Applying pattern match to %hash will act on scalar(%hash) at - line 14.
-Applying substitution to %hash will act on scalar(%hash) at - line 15.
-Applying character translation to %hash will act on scalar(%hash) at - line 16.
+Applying pattern match (m//) to @array will act on scalar(@array) at - line 5.
+Applying substitution (s///) to @array will act on scalar(@array) at - line 6.
+Can't modify private array in substitution (s///) at - line 6, near "s/a/b/ ;"
+Applying character translation (tr///) to @array will act on scalar(@array) at - line 7.
+Applying pattern match (m//) to @array will act on scalar(@array) at - line 8.
+Applying substitution (s///) to @array will act on scalar(@array) at - line 9.
+Applying character translation (tr///) to @array will act on scalar(@array) at - line 10.
+Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 11.
+Applying substitution (s///) to %hash will act on scalar(%hash) at - line 12.
+Applying character translation (tr///) to %hash will act on scalar(%hash) at - line 13.
+Applying pattern match (m//) to %hash will act on scalar(%hash) at - line 14.
+Applying substitution (s///) to %hash will act on scalar(%hash) at - line 15.
+Applying character translation (tr///) to %hash will act on scalar(%hash) at - line 16.
BEGIN not safe after errors--compilation aborted at - line 18.
########
# op.c
no warnings 'syntax' ;
print (ABC || 1) ;
EXPECT
-Probable precedence problem on logical or at - line 3.
+Probable precedence problem on logical or (||) at - line 3.
########
--FILE-- abc