2

動作しているように見える文法がありますが、大量の警告が生成されます。これらの警告はどれほど深刻であり、誰かがそれらを修正する方法についていくつかのガイダンスを与えることができますか?

Warning 200
Decision can match input such as "LCURLY LPAREN" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input

Warning 200:
Decision can match input such as "LCURLY PLUS" using multiple alternatives: 1, 2

As a result, alternative(s) 2 were disabled for that input
Semantic predicates were present but were hidden by actions.

Warning 203
Input such as "Date" is insufficiently covered with predicates at locations: alt 1: line 346: at Date, al
t 2: line 346: at Date

警告(200)の場合、代替を無効にするとどのような影響がありますか?私が思う主なことは、どの代替案が無効にされたかによって、潜在的なASTの形が異なる可能性があるということです。

警告(203)の意味がわかりません。

4

1 に答える 1

1

同じ入力文字列を複数の代替パスで解析できるという点で、おそらくあなたの文法はあいまいです。したがって、パーサーはどちらが「正しい」方法であるかを知りません。あいまいさを防ぐために、文法または意味述部を修正する必要があります。

于 2014-06-09T12:19:22.330 に答える