Generalizations of Dyck languages?
I believe that a type of automata that your are looking for could be &quot;visibly counter automata&quot;. It is easy to imagine what they should be - they are just standard automata but equipped with a set of non-negative unbounded counters that can be incremented/decremented after you read a specific letter (like in the case of VPA).
You might want to check the paper &quot;Regularity Problems for Visibly Pushdown Languages&quot; by Barany et al.: https://www.logic.rwth-aachen.de/~vbarany/BLS_stacs06_withAppendix.pdf