summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-05 12:09:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-05 12:09:42 +0000
commit8cbd6c0a65371f408e43864f81f2c0c01b5ba6aa (patch)
tree1ecb6f14cf16a7d2d275ef1bfc30eec485e795b0
parent3291484d6a31fde4af887afd91eccd34c291b629 (diff)
downloadperl-MDK-Common-8cbd6c0a65371f408e43864f81f2c0c01b5ba6aa.tar
perl-MDK-Common-8cbd6c0a65371f408e43864f81f2c0c01b5ba6aa.tar.gz
perl-MDK-Common-8cbd6c0a65371f408e43864f81f2c0c01b5ba6aa.tar.bz2
perl-MDK-Common-8cbd6c0a65371f408e43864f81f2c0c01b5ba6aa.tar.xz
perl-MDK-Common-8cbd6c0a65371f408e43864f81f2c0c01b5ba6aa.zip
warn when a PO: comment is not followed by N(...)
-rw-r--r--perl_checker.src/parser.mly1
1 files changed, 1 insertions, 0 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly
index e124296..f9b5e9d 100644
--- a/perl_checker.src/parser.mly
+++ b/perl_checker.src/parser.mly
@@ -465,6 +465,7 @@ word_paren:
| BAREWORD_PAREN { new_1esp (Ident(None, $1.any, get_pos $1)) $1 }
| RAW_IDENT_PAREN { new_1esp (to_Ident $1) $1 }
| PO_COMMENT word_paren { po_comment($1); new_esp M_special $2.any $1 $2 }
+| PO_COMMENT { die_rule "N(...) must follow the #-PO: comment, with nothing in between" }
arraylen: ARRAYLEN_IDENT {new_esp M_int (deref_arraylen (to_Ident $1)) $1 $1} | ARRAYLEN scalar {sp_0($2); new_esp M_int (deref_arraylen $2.any ) $1 $1 } | ARRAYLEN bracket_subscript {new_esp M_int (deref_arraylen $2.any) $1 $2}