簡體   English   中英

如何在此ANTLR語法中刪除“不支持的選項'貪婪'”警告?

[英]How do I remove the “unsupported option 'greedy'” warning in this ANTLR grammar?

將ANTLR 3轉換為ANTLR 4.我有這樣的gabillion警告。 我找到了關於貪婪的其他SO問題,但沒有找到這個特別的問題。

table_reference: // table_ref in sql_yacc.yy, we use table_ref here for a different rule.
    table_factor ( options { greedy = true; }: join)*
;

在此輸入圖像描述

我有C#的答案,

https://blog.lextudio.com/how-to-use-antlr-4-on-net-4361915b670f

您可以對其他語言應用相同的提示,

采用 *? 而不是*作為選項{greedy = false}消失了。

更新:ANTLR 4的官方文檔在這里

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM