vgg - Produces a graph for a Eyapp grammar or a tree term
# for tree terms vgg -t 'Operator(LeftBinaryOp(expr,term),RightBinaryOp(power),PreUnaryOp(uneg),PostUnaryOp(factorial))' # dump to stdout vgg -t 'Operator(LeftBinaryOp(expr,term),RightBinaryOp(power),PreUnaryOp(uneg),PostUnaryOp(factorial))' tree.txt # for grammars vgg Calc vgg Calc.output vgg -f ps Calc vgg I<-h>
For this script to work, you have to install GraphViz and Text::Tree first
Here is an example of use:
$ vgg -t 'Operator(LeftBinaryOp(expr,term),RightBinaryOp(power),PreUnaryOp(uneg),PostUnaryOp(factorial))' +--------+ |Operator| +--------+ .---------------.----^--------.-------------. +------------+ +-------------+ +----------+ +-----------+ |LeftBinaryOp| |RightBinaryOp| |PreUnaryOp| |PostUnaryOp| +------------+ +-------------+ +----------+ +-----------+ .---^--. | | | +----+ +----+ +-----+ +----+ +---------+ |expr| |term| |power| |uneg| |factorial| +----+ +----+ +-----+ +----+ +---------+
GraphViz
Text::Tree
eyapp,
The pdf file in http://nereida.deioc.ull.es/~pl/perlexamples/Eyapp.pdf
This work has been supported by CEE (FEDER) and the Spanish Ministry of Educacion y Ciencia through Plan Nacional I+D+I number TIN2005-08818-C04-04 (ULL::OPLINK project http://www.oplink.ull.es/). Support from Gobierno de Canarias was through GC02210601 (Grupos Consolidados). The University of La Laguna has also supported my work in many ways and for many years.
I wish to thank Leon Brocard for his GraphViz::Parse::Yacc module.
Casiano Rodriguez-Leon
(c) Copyright 2006 Casiano Rodriguez-Leon
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Parse::Eyapp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parse::Eyapp
CPAN shell
perl -MCPAN -e shell install Parse::Eyapp
For more information on module installation, please visit the detailed CPAN module installation guide.