examples: ship and install variant.yy

This file was meant to be shown as an example.  Install it.

* README, data/README: Put Emacs metadata in the final section.
* examples/README: New.
* examples/variant.yy: Use %empty.
* examples/local.mk: Install both these files.
This commit is contained in:
Akim Demaille
2018-08-14 07:49:09 +02:00
parent 7ab25ad020
commit 30c179fee8
5 changed files with 55 additions and 8 deletions

View File

@@ -88,13 +88,13 @@ result:
;
list:
/* nothing */ { /* Generates an empty string list */ }
| list item { std::swap ($$, $1); $$.push_back ($2); }
%empty { /* Generates an empty string list */ }
| list item { std::swap ($$, $1); $$.push_back ($2); }
;
item:
TEXT { std::swap ($$, $1); }
| NUMBER { $$ = string_cast ($1); }
TEXT { std::swap ($$, $1); }
| NUMBER { $$ = string_cast ($1); }
;
%%