我有一個語法文件 - https://github.com/itrelease/fubar-script/blob/jsast/src/grammar.js但我得到conflicts,我真的不知道如何解決這個問題。如果有人能解釋我,這會有所幫助。如何避免語法衝突
這個規則產生conflicts:
ParamVar: [
['Identifier', '$$ = $Identifier;'],
['THIS', '$$ = new yy.ThisExpression();']
],
PrimaryExpression: [
['THIS', '$$ = new yy.ThisExpression();'],
['Literal', '$$ = $Literal;'],
['ArrayLiteral', '$$ = $ArrayLiteral;'],
['Identifier', '$$ = $Identifier;'],
['ObjectLiteral', '$$ = $ObjectLiteral;'],
['(Expression)', '$$ = $Expression;']
],
請在SO上發佈您的語法的必要部分和錯誤。 –
添加到導致衝突的問題規則中。 –
安東,如果您提供重現錯誤的步驟,它將幫助其他人幫助您。 –