say, we add the option of allowing
let expressions to context free grammars:
let defines a variable that defines an expression from a specific Symbol of the grammar, and every instance of the variable has to be the exact same expression
T := (let ((z -> U) z + z) U := x | y | Const | U +U | U ∗U | T
In the above example,
T:= U + U, except that the two occurrences of
have to be identical.
So, this grammar only allows expressions which are a sum of 2 identical expressions.
I think this grammar is strictly more powerful than context free grammar, but can anyone tell me if they are equivalent to any other known type of grammar.