-操作符应该支持否定,但我不能让它工作:
raw-type = "DINT" | "REAL" | "SINT" | "BIT"
custom-type = - raw-type每次尝试时,我都会得到错误:RuntimeException - occurs on the right-hand side of your grammar, but not on the left instaparse.cfg/check-grammar (cfg.clj:252)。我把-放在哪里似乎并不重要。
那么如何克服这个错误呢?或者,有没有其他方法来完成上面的custom-type?
发布于 2016-08-26 01:03:51
!是否定。使用!而不是-。
https://stackoverflow.com/questions/39136634
复制相似问题