I noticed that while dimension is spec'ced as follows
dimension = (expr? start, expr? length)
concrete examples of dimension print out as in the following
(Integer 4 [2 3] [4]) # a ttype for an array of 4-byte ints;
# [2 3] and [4] are of ASDL type "dimension"
instead of as
(Integer 4 [(IntegerConstant 2 (Integer 4 [])) (IntegerConstant 3 (Integer 4[]))]
[(IntegerConstant 4 (Integer 4 []))])
This is surprising because 2, 3, and 4 in [2 3] [4] are not exprs.
Is this just shorthand in the printout? Is the long-form acceptable input to ASR processors?
I noticed that while
dimensionis spec'ced as followsconcrete examples of dimension print out as in the following
instead of as
This is surprising because 2, 3, and 4 in
[2 3] [4]are notexprs.Is this just shorthand in the printout? Is the long-form acceptable input to ASR processors?