summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2014-11-05 14:15:05 -0500
committerAdrian Thurston <thurston@complang.org>2014-11-05 14:15:05 -0500
commitdf5e3883b01eec9464fb86d4fac3e9e87e3a9d9c (patch)
treec088f024f2b3bef1cd4f0cf01530b937ef194922 /test
parent4fe262ad8adbc9c22276e28a71002b661c095885 (diff)
downloadcolm-df5e3883b01eec9464fb86d4fac3e9e87e3a9d9c.tar.gz
need to force ordering in python parsing test case
Diffstat (limited to 'test')
-rw-r--r--test/generate1.lm12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/generate1.lm b/test/generate1.lm
index 11239f2e..aecf2bcc 100644
--- a/test/generate1.lm
+++ b/test/generate1.lm
@@ -134,6 +134,10 @@ context generate
# Blank lines or comment lines at the beginning of the file.
token LEADER / ( [ \t]* ('#' [^\n]*)? '\n' )* /
+ # Ordering productions for resolving ambiguities.
+ def O1 []
+ def O2 []
+
def start
[file_input]
@@ -266,8 +270,8 @@ context generate
def target_ext
[attributeref]
- | [subscription]
- | [slicing]
+ | [O1 subscription]
+ | [O2 slicing]
def print_stmt
[`print opt_expression_list]
@@ -338,8 +342,8 @@ context generate
def primary_ext
[attributeref]
- | [subscription]
- | [slicing]
+ | [O1 subscription]
+ | [O2 slicing]
| [call]
def pyliteral