Question: How to parse with certain options?

Hello people in mapleprimes

In the help of parse, there is the following example.

I could not understand why the first one is 4, and next 4^2, and the last 4^3 appeared, there.

Please tell me the way n is increased with the output taking 4, 4^2 and 4^3 sequentially in this example.

n := 0;
                             n := 0
input := "a := 4; a^2; a^3;";
                  input := "a := 4; a^2; a^3;"
parse(input,'lastread'='n','offset'=n,statement);
                               4
parse(input,'lastread'='n','offset'=n,statement);
                               16
parse(input,'lastread'='n','offset'=n,statement);
                               64

I know that it is written in the help that lastread shows the next unparsed character,

with the offset the next statement.

Thanks in advance

taro

Please Wait...