From 2f5fefcd76259d5e0aee5ef5076ae4c4dd662ec1 Mon Sep 17 00:00:00 2001 From: Talia Ringer Date: Fri, 7 Jun 2019 06:59:16 -0400 Subject: Update, expand, and document plugin tutorial 2 --- doc/plugin_tutorial/tuto2/theories/Demo.v | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 doc/plugin_tutorial/tuto2/theories/Demo.v (limited to 'doc/plugin_tutorial/tuto2/theories/Demo.v') 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. + *) -- cgit v1.2.3