私はAntlworkでC文法を書こうとしています.使用しない多くのブロックとバックトラッキングを削除して、よりシンプルにします。そして、ここに私が持っているものがあります: http://www.archive-host.com/files/1956778/24fe084677d7655eb57ba66e1864081450017dd9/CNew.txt
次に、ctrl + D を実行すると、次のような多くの警告とエラーが表示されます。
[21:20:54] warning(200): C:\CNew.g:188:2: Decision can match input such as "'{' '}'" using multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
[21:20:54] warning(200): C:\CNew.g:210:2: Decision can match input such as "'for' '('" using multiple alternatives: 2, 3
As a result, alternative(s) 3 were disabled for that input
[21:20:54] error(201): C:\CNew.g:210:2: The following alternatives can never be matched: 3
[21:20:54] error(208): C:\CNew.g:250:1: The following token definitions can never be matched because prior tokens match the same input: CHAR
これらすべての警告が表示される理由がよくわかりません。競合があってはなりません。