3 ms·
Context free grammars are insidious to use in general. The natural way to use them is to either generate all/random legal strings or check if a string matches t
by afiori 6y ago
Context free grammars are insidious to use in general. The natural way to use them is to either generate all/random legal strings or check if a string matches the grammar.
Often what you want is instead to generate an AST, in that case you will run into ambiguosness problems.