If you use add_custom_command to generate the grammar file,
it can be removed by "make clean". This then means the user will
need to get it back from Git, or regenerate it with Lemon.
Changing to add_custom_command removes the output file
from the clean list. The incantation to rebuild the grammar
remains the same: "make libeval_grammar", and it is still not
required to have lemon installed for a normal build.
Fixes: lp:1809610
* https://bugs.launchpad.net/kicad/+bug/1809610
The libeval grammar can now be rebuilt with "make libeval_grammar".
This is only possible when lemon is installed.
Also a couple of modifications to the lemon grammar to
account for external changes since the grammer was last generated.
Also move the grammar defines into grammar.h - this is how
Lemon produces them, and by manually copying into the target .cpp,
it make automated regeneration impossible.