轉換ANTLR的3語法ANTLR的4。這是MySQL的解析器寫在v3中,我試圖轉換到V4。錯誤在'finally'的底部。錯誤說」 ‘在‘終於’’ // Comment from server yacc grammar:
// Keywords that we allow for labels in SPs. Anything that's the beginning of a statemen
將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; }: joi
令牌先行選項已在ANTLR 4時如何刪除「K」選項,所以...... 這是ANTLR 3碼: declarations: // Order is important here.
(options { k = 3; }: DECLARE_SYMBOL identifier (variable_declaration | condition_declaration))*
curs