Map a direct declarator to an object declarator in the language definition.
(ldm-dirdeclor-obj dirdeclor) → (mv erp declor1)
The abstract syntax in the language definition does not have a separate type for direct object declarators, so we return an object declarator here. The input direct declarator may be an identifier followed by zero or more square-bracketed optional integer constant expressions; these zero or more array declarator constructs are handled recursively. We also allow a parenthesized declarator, which we handle with the mutually recursive function.
This function will always result in a c::obj-declor
of the
This function is called when we expect an object declarator, not a function declarator, for which we have a separate function.