Context-free grammar for palindromes with the mid-point mark

w =



Grammar
S → 0S0 | 1S1 | p