Parsing an array of character strings with len using '*INT'
Trying to parse this:
program myprogram
character(255) :: a(4)
character b(4)*255, c(4)*255
endprogram
Something like this can be added to the grammar in var_sym_decl.
| id "(" array_comp_decl_list ")" "*" TK_INTEGER %dprec 1 {
$$ = VAR_SYM_DIM_LEN($1, $3.p, $3.n, $6, None, @$); }
I'm not familiar enough with working with the AST to know how to add a "kind item". The AST would end up like this and be the same for all of those variables.
(Declaration (AttrType TypeCharacter [(() 255 Value)] () None) [] [(a [(1 4 DimensionExpr)] [] () None ())