Skip to main content
2 votes

Adding constraints in grammar for Grammatical Evolution

You can enforce that units match by duplicating nonterminals, one per unit. For instance, instead of var, you can have varA and ...
D.W.'s user avatar
  • 161k
1 vote

Confused about substitution in grammar in certain cases

There's no particular reason why the first $T$ should be replaced by $empty$. The other replacement would have been equally acceptable. A grammar rule says "you can replace this string by this other" ...
Rick Decker's user avatar
  • 14.8k
1 vote

How to intuitively come up with an example for an ambiguous grammar and how to make that grammar unambiguous?

The simple way of seeing this class of ambiguities is to observe that if two right-hand sides for the same non-terminal overlap, then they could be applied in either order: ...
rici's user avatar
  • 12.1k

Only top scored, non community-wiki answers of a minimum length are eligible