dmajda/pegjs — pull request #230 by Mingun (2014-01-19 17:45:04+00:00)
Title: Annotations for rules

This realizes feature for annotations of rules. This annotations may be used by compiler passes for some purposes, for example, per-rule memoization or for creating template rules. Example:
```
// This example only for demonstraiting parsing. Template rules not yet reaized

// This demonstrate another feature, introduced by second commit --
// use parameters for rules. Together with @Template annotation it can
// be used for parametrizate rules.
start = List<'*', ','>;

@Memoize
@Template(item, delimiter)
List
= h:(i:item delimiter {return i})* t:item? {
if (t) h.push(t); return h;
};
```
This pull request can be considered, as the first part of implementation #45.

Annotations looks similarly to annotations in Java: it can have optional parameters (which an identifiers). Any rule can have any count of annotations, it stored in `annotations` field in rule AST node.