Certain tokens are not placed optimally in the nested parse data with
compute_parse_data_nested()
. For example, the token of arithmetic
operations 1 + 1 + 1 should all be on the same level of nesting since
the indention is the same for all but the first two terminals. Setting the
indention correctly is easier to achieve if they are put on the same level
of nesting.
flatten_operators(pd_nested)
pd_nested | A nested parse table to partially flatten. |
---|