aboutsummaryrefslogtreecommitdiff
path: root/test/option.g
diff options
context:
space:
mode:
Diffstat (limited to 'test/option.g')
-rw-r--r--test/option.g17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/option.g b/test/option.g
new file mode 100644
index 0000000..5980362
--- /dev/null
+++ b/test/option.g
@@ -0,0 +1,17 @@
+
+%%
+
+parser test_option:
+ ignore: r'\s+'
+ token a: 'a'
+ token b: 'b'
+ token EOF: r'$'
+
+ rule test_brackets: a [b] EOF
+
+ rule test_question_mark: a b? EOF
+
+%%
+
+# The generated code for test_brackets and test_question_mark should
+# be the same.