jison

    3熱度

    1回答

    我使用jison(一個JavaScript等效於Bison),我遇到以下優先問題。我會用計算器演示它 http://zaach.github.com/jison/try/ 它工作正常。優先級是 和語法是 e : e '+' e {$$ = $1+$3;} | e '-' e {$$ = $1-$3;} | e '*' e {$$ =

    4熱度

    1回答

    我正在使用Jison構建簡單的計算器語言,其中包含變量。我希望這些變量能夠像JavaScript一樣工作,那就是您必須首次使用關鍵字var進行初始化。用我的語言,如果一個變量重新初始化,我想顯示一個錯誤。 var myVar = 4 var myVar = 3 // Error, cannot reinitialise variable myVar on line 2 我的問題是,如何獲取

    2熱度

    1回答

    我想爲允許轉義標記分隔符的標記語言創建Jison(Bison)語法。 這將是有效的: I like apples I like [apples, oranges, pears] I like [apples, oranges, pears] and [peanut butter, jelly] I like [apples, oranges, pears] \[when they're in

    3熱度

    1回答

    我有一個語法文件 - https://github.com/itrelease/fubar-script/blob/jsast/src/grammar.js但我得到conflicts,我真的不知道如何解決這個問題。如果有人能解釋我,這會有所幫助。 這個規則產生conflicts: ParamVar: [ ['Identifier', '$$ = $Identifier;'],

    2熱度

    2回答

    試圖運行Jison單元測試,但命令失敗。 我該如何解決這個問題? $ git clone git://github.com/zaach/jison.git Cloning into 'jison'... remote: Counting objects: 2667, done. remote: Compressing objects: 100% (1106/1106), done. rem