It is possible but you have to do things very differently, for example use monoids. There are a few compilers implemented on GPU, including Aaron Hsu's co-dfns and Voetter's compiler project[1]. The parentheses matching problem itself (the core of parsing) has long known efficient parallel algorithms and those have been ported to compute shaders[2] (disclosure: blatant self-promotion).
[1]: https://dl.acm.org/doi/pdf/10.1145/3528416.3530249
[2]: https://arxiv.org/pdf/2205.11659.pdf