On Fri, Sep 30, 2011 at 4:42 PM, Zefram <zefram@fysh.org> wrote: > Eric Brine wrote: > >I don't see how that helps. <<1,2>> was given as an example of a > problematic > >expression and it is neither arithemtic nor a term. > > That's precisely how it helps. "exit 1,2" doesn't match either of the > forms that I listed, for exactly that reason, and indeed it's not parsed > with "1,2" as the argument. "1", however, *is* an arithmetic expression, > and so in "exit 1,2" the argument to exit is the "1". > Sorry if I wasn't clear, but you missed my point. I was saying that your syntaxes don't allow for C<exit(1,2)>, which is allowed. C<1,2> is not a term, which is what you allowed in parens. Yes, precisely. The only arithmetic expressions that you can use with > the "exit ARITHEXPR" form are the ones that don't start with parens. > ok, I was wrong there exit 1 + 2 is not what I thought it was. > >the syntax simply the following: > > > > exit TERM > > > >A TERM is a simple value or an expression in parenthesis. > > That's not what "term" means in the Perl grammar. > Ya, I thought exit 1 + 2 was ( exit 1 ) +2. That's wrong. > > -zefram >Thread Previous | Thread Next