0
我有以下的語法定義有兩個保留關鍵字和兩個類似的聲明(?):Ambuigity與保留關鍵字
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";
然後
parse(#Statement,"do c")
解析精細,同樣的情況下
parse(#Statement,"define c")
給出了一個含糊之處。
我該怎麼做?
然後最好刪除整個問題! – jurgenv