diff options
| author | Enrico Tassi | 2019-06-17 13:36:47 +0200 |
|---|---|---|
| committer | Enrico Tassi | 2019-06-17 13:36:47 +0200 |
| commit | 658db3a8b75a338df6b07d0f0e5034bb81bcfd16 (patch) | |
| tree | e63e0c217ed75e4a8bafcf6c30d7cf5a1bcf0a61 /doc/plugin_tutorial/tuto2/theories/Demo.v | |
| parent | 5d18dfed8e68dd964bca5d64ca6bdd9f8ffbb1df (diff) | |
| parent | 2f5fefcd76259d5e0aee5ef5076ae4c4dd662ec1 (diff) | |
Merge PR #10368: Update, expand, and document plugin tutorial 2
Ack-by: SkySkimmer
Reviewed-by: gares
Ack-by: tlringer
Diffstat (limited to 'doc/plugin_tutorial/tuto2/theories/Demo.v')
| -rw-r--r-- | doc/plugin_tutorial/tuto2/theories/Demo.v | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/doc/plugin_tutorial/tuto2/theories/Demo.v b/doc/plugin_tutorial/tuto2/theories/Demo.v new file mode 100644 index 0000000000..73b5fcca62 --- /dev/null +++ b/doc/plugin_tutorial/tuto2/theories/Demo.v @@ -0,0 +1,63 @@ +From Tuto2 Require Import Loader. + +(*** A no-op command ***) + +Nothing. + +(*** No-op commands with arguments ***) + +(* + * Terminal parameters: + *) +Command With Some Terminal Parameters. +(* Command. *) (* does not parse *) + +(* + * A single non-terminal argument: + *) +Pass 42. +(* Pass. *) (* does not parse *) +(* Pass True. *) (* does not parse *) +(* Pass 15 20. *) (* does not parse *) + +(* + * A list of non-terminal arguments: + *) +Accept 100 200 300 400. +Accept. +Accept 2. + +(* + * A custom argument: + *) +Foobar Foo. +Foobar Bar. + +(*** Commands that give feedback ***) + +(* + * Simple feedback: + *) +Is Everything Awesome. + +(*** Storage and side effects ***) + +(* + * Local side effects: + *) +Count. +Count. +Count. +(* + * See Count.v for behavior in modules that import this one. + *) + +(* + * Persistent side effects: + *) +Count Persistent. +Count Persistent. +Count Persistent. +(* + * See Count.v for behavior in modules that import this one. + *) |
