Re: [perl #33892] Add Interix support
[p5sagit/p5-mst-13.2.git] / perly.y
diff --git a/perly.y b/perly.y
index 9224537..11c1bd3 100644 (file)
--- a/perly.y
+++ b/perly.y
  * All that is gold does not glitter, not all those who wander are lost.'
  */
 
+/* This file holds the grammar for the Perl language. If edited, you need
+ * to run regen_perly.pl, which re-creates the files perly.h, perly.tab
+ * and perly.act which are derived from this.
+ *
+ * The main job of of this grammar is to call the various newFOO()
+ * functions in op.c to build a syntax tree of OP structs.
+ * It relies on the lexer in toke.c to do the tokenizing.
+ */
+
 /*  Make the parser re-entrant. */
 
 %pure_parser
@@ -666,10 +675,8 @@ term       :       termbinop
                        { $$ = newOP($1, OPf_SPECIAL); }
        |       FUNC1 '(' expr ')'                   /* not($foo) */
                        { $$ = newUNOP($1, 0, $3); }
-       |       PMFUNC '(' term ')'                  /* /foo/ */
-                       { $$ = pmruntime($1, $3, Nullop); }
-       |       PMFUNC '(' term ',' term ')'         /* s/foo/bar/ (or tr) */
-                       { $$ = pmruntime($1, $3, $5); }
+       |       PMFUNC '(' argexpr ')'           /* m//, s///, tr/// */
+                       { $$ = pmruntime($1, $3, 1); }
        |       WORD
        |       listop
        ;