An Attribute Grammar Evaluator in Haskell
暂无分享,去创建一个
A tool that enablesHaskell functionsto be automaticallyderivedfrom attributegrammar definitionsis presented. Basedon work in [Joh87],it is able to dealwith generalattributegrammars, providedthe datadependenciescan be resolvedunder lazy evaluation.The tool takesthe form of a pre-processor, taking attribute grammarspecificationsand producingHaskell that can be compiled through the preferred compilation route. The paper includes a brief introduction to attribute grammars,why they are useful in the implementationof certain types of problems,and how the evaluatorcan generatenative Haskell codefrom their specifications.Examplesare usedthroughout, andexecutablescriptsareprovidedasanappendix.
[1] WadlerPhilip,et al. Report on the programming language Haskell , 1992 .
[2] Richard A. Frost,et al. Constructing Programs as Executable Attribute Grammars , 1992, Comput. J..
[3] Thomas Johnsson,et al. Attribute grammars as a functional programming paradigm , 1987, FPCA.
[4] Thomas Johnsson,et al. Lambda Lifting: Treansforming Programs to Recursive Equations , 1985, FPCA.