summaryrefslogtreecommitdiff
path: root/tests/examplefiles/grammar-test.p6
diff options
context:
space:
mode:
authorRob Hoelz <rob@hoelz.ro>2013-03-18 22:50:06 +0100
committerRob Hoelz <rob@hoelz.ro>2013-03-18 22:50:06 +0100
commita572bb8a60f85efbd36b0f7d46e84d20225eee64 (patch)
treef2291ed433f0055541702efe99016d136d3f22e0 /tests/examplefiles/grammar-test.p6
parenta7848e0fcd9db23f40c64f3b532b5db0536881e8 (diff)
downloadpygments-a572bb8a60f85efbd36b0f7d46e84d20225eee64.tar.gz
Add example files for Perl 6
These files aren't necessarily demonstrative of real Perl 6 code; they are files from the Rakudo Perl 6 compiler itself as well as some cobbled-together examples I made to test the lexer
Diffstat (limited to 'tests/examplefiles/grammar-test.p6')
-rw-r--r--tests/examplefiles/grammar-test.p610
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/examplefiles/grammar-test.p6 b/tests/examplefiles/grammar-test.p6
new file mode 100644
index 00000000..5403d8b9
--- /dev/null
+++ b/tests/examplefiles/grammar-test.p6
@@ -0,0 +1,10 @@
+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>+
+}