This question already has an answer here:

How can you tell if something is a CFG or not? I am wondering if you could create a math/LaTeX parser using a parsing expression grammar (PEG), or not. Is this possible, and how can you tell?

marked as duplicate by Malipivo, Christian, Heiko Oberdiek, Peter Jansson, yo' Apr 19 '14 at 22:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 7
    No, TeX is at least context sensitive. Edit: this answer might enlight things: Parsing TeX is Turing complete. – Paulo Cereda Apr 19 '14 at 20:21
  • @PauloCereda Which makes this question a duplicate since BNF and context-free grammars are equivalent. Edit: Malipivo was a bit quicker :) – Christian Apr 19 '14 at 21:11

Browse other questions tagged or ask your own question.