We prove polynomial boson-fermion identities for the generating function of the number of partitions of n of the form n=∑j=1L−1jfj
Nearby in the stack
, with
f1≤i−1
,
fL−1≤i′−1
and
fj+fj+1≤k
. The bosonic side of the identities involves
q
-deformations of the coefficients of
xa
in the expansion of
(1+x+⋯+xk)L
. A combinatorial interpretation for these
q
-multinomial coefficients is given using Durfee dissection partitions. The fermionic side of the polynomial identities arises as the partition function of a one-dimensional lattice-gas of fermionic particles. In the limit
L→∞
, our identities reproduce the analytic form of Gordon's generalization of the Rogers--Ramanujan identities, as found by Andrews. Using the
q→1/q
duality, identities are obtained for branching functions corresponding to cosets of type