2
我有一个似乎正在工作但产生大量警告的语法。 这些警告有多严重,有人可以就如何解决这些警告提供一些指导?这些ANTLR警告是什么意思
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)。
我将ANTLR警告当作错误处理,因为它几乎总是意味着生成的解析器不会像我期望的那样解析,特别是当ANTLR禁用替代方法时。我没有很好的解决这些问题的一般性建议(其他人可能会这样做),但是如果您发布了这部分语法,也许我或其他人可以帮助解决一个或多个警告。 – user1201210
您应该发布语法。 – kierans