0

I have the following syntax definition with two reserved keywords and two similar statements:

module Test

// parse(#Statement,"do c") succeeds
// parse(#Statement,"define c") gives an ambiguity

start syntax Statement = 
    do: "do"  Identifier+
  | define: "define" Identifier+;

layout MyLayout = [\t\n\ \r\f]*;

lexical Identifier = ([a-z0-9] !<< [a-z][a-z0-9]* !>> [a-z0-9]) \ MyKeywords;

keyword MyKeywords =  "do" | "define";

Then

parse(#Statement,"do c")

parses fine, the similar case

parse(#Statement,"define c")

gives an ambiguity.

What do I do wrong?

1 Answers1

0

Sorry guys, the case has been resolved, the Test module was interfered by another module that caused the ambiguity.