haskell grammar for cup file
i am working on a haskell compiler written in java using JLex and cup .i finished my lexer file and now i am working on my parser.cup file where i should define my terminals , non-terminals and the grammar. i have already finished the terminal and non-terminal part but now i am stuck in the grammar part so can anyone help or redirect me to any link where i can find a grammar for haskell in this form :
Variable ::= Nonterminal:name Terminal:name
{:RESULT = /* code to execute when the rule is
matched and the result to be printed out */ ;:}
| blablabla ;
any help would be appreciated .
链接地址: http://www.djcxy.com/p/80806.html上一篇: 如何在Parsec中解析这个语法? (左递归的不寻常情况)
下一篇: 哈斯克尔杯文件的语法