50 likes | 141 Views
Using AG tool. Dr. Ir. I.S.W.B. Prasetya wishnu@cs.uu.nl A. Azurat S.Kom. ade@cs.uu.nl. What is UU_AG ?. UU_AG is Attribute Grammar Tools initiated by Doaitse Swiestra from Utrecht University, currently maintained by : Doaitse Siwestra, Arthur Baars, & Andreas Loh.
E N D
Using AG tool Dr. Ir. I.S.W.B. Prasetya wishnu@cs.uu.nl A. Azurat S.Kom. ade@cs.uu.nl
What is UU_AG ? UU_AG is Attribute Grammar Tools initiated by Doaitse Swiestra from Utrecht University, currently maintained by : Doaitse Siwestra, Arthur Baars, & Andreas Loh. UU_AG generates (Possible Lazy) Haskell Code
What is UU_AG for ? UU_AG can be used to generate semantic analyzer → Compiler generator Other Examples : • Type Check and Type Inference • Pretty Printing • Simplifier • Program Transformation • …..
Features • Provide Lazy Code • Reference to the parse tree • Provide Copy rule • Modular and compositional
How to use ? (some important) Command Line Arguments : -d → Generate data type definition -f → Generate semantic function -m → Generate haskell module headers --self → Generate reference to the parse tree -a → Do all options -o file → Specify output file -h → Get usage information AG –a PropAg.ag –o Output1.hs (complete reference see : AGMan.pdf )