summaryrefslogtreecommitdiff
path: root/tests/examplefiles/grammar-test.p6
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examplefiles/grammar-test.p6')
-rw-r--r--tests/examplefiles/grammar-test.p622
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/examplefiles/grammar-test.p6 b/tests/examplefiles/grammar-test.p6
new file mode 100644
index 00000000..28107f3e
--- /dev/null
+++ b/tests/examplefiles/grammar-test.p6
@@ -0,0 +1,22 @@
+token pod_formatting_code {
+ $<code>=<[A..Z]>
+ '<' { $*POD_IN_FORMATTINGCODE := 1 }
+ $<content>=[ <!before '>'> <pod_string_character> ]+
+ '>' { $*POD_IN_FORMATTINGCODE := 0 }
+}
+
+token pod_string {
+ <pod_string_character>+
+}
+
+token something:sym«<» {
+ <!>
+}
+
+token name {
+ <!>
+}
+
+token comment:sym<#> {
+ '#' {} \N*
+}