Andreas Enge on Mon, 11 Mar 2013 10:41:46 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: PARI 2.6 syntax 2: [f(x)|x<-a,b(x)]


On Sun, Mar 10, 2013 at 08:13:14AM +0000, Bernadette.Perrin-Riou@math.u-psud.fr wrote:
> A naive question. What about [ 1, 2;
> 3,4] if it is sensible to space ?

Normally, a lexical analysis as done for the C or Java languages, for
instance, would split this into the 9 one-character tokens
 [ 1 , 2 ; 3 , 4 ]
White space is allowed between tokens, here between ; and 3. And the special
characters [ , ; ] are easily recognised as tokens of their own. A number
like 12 would be recognised as one token, whereas with a space in between,
it would be two tokens 1 and 2.

Unless I have overlooked something, the proposed change would only mean you
are not allowed any more to have white-space inside numbers, variables and
function names or keywords such as "for" (also function names, strictly
speaking, I suppose).

Andreas