- Add general parsing of annotations. Allow annotations only on input variables.
- Annotations are added to the parser AST. No type checking yet.
- Added test model, to test parsing of annotations. As there is no type checking or pretty printing yet, the annotations 'disappear'.
- When generating the CIF parser, also output the BNF syntax of the grammar, for easier updating of the CIF reference manual.
- Added syntax highlighting to the CIF text editor. I colored the annotation name the same color as comments, but while comments are italic, the annotation names use a normal font.
- I was initially thinking of making the highlighting the whole annotation, including its arguments. However, that is tricky, because annotations as a whole can cover multiple lines, there can be comments in between, etc.
- I did not update the CIF LaTeX syntax highlighting. I checked the documentation of the
listingspackage, and none of the alternatives seems sufficiently powerful for what is needed here (coloring e.g.
@abc:def). The syntax highlighting definition is already incomplete, as it for instance doesn't highlight
u_eas an uncontrollable event, etc.
- Best to review per commit. I'd skip the changes to generated files (scanner, parser, hooks skeleton, etc).