Parse-DSLUtils
Parse-DSLUtils - A set of tools to help in DSL activities.
use Parse::DSLUtils qw{:all};
use Parse::DSLUtils qw{:regexp};
if( /$__CBB/) { found a "{block ...}" $1={Contents} $2=Contents }
if( /$__BB/) { found a "[block ...]" $1=[Contents] $2=Contents }
if( /$__PB/) { found a "(block ...)" $1=(Contents) $2=Contents }
if( /$__XMLtree/){ found a ".c." block } $3=all $4=aa $5=.c.
if( /$__TEXENV/) { found a "\begin{aa} .... \end{aa}" block }
if( /$__TEXENV1/){ found a "\begin{aa}[bb]{cc} .... \end{aa}" block }
$a = __tag_re("li")
if(/$a/){ to find things like "
..."
$1= attributes; $2= contents }
use Parse::DSLUtils qw{:csv};
#brackts block
$a= __bl_csv(' [ 3, a, sin(x), (c,d) ] ')
## ['3', 'a', 'sin(x)', '(c,d)']
#parentesis block
$a= __pb_csv('( 3, a, sin(x), (c,d) ) ')
## ['3', 'a', 'sin(x)', '(c,d)']
#curly brackets block
$a= __cbb_csv('{ 3, a, sin(x), (c,d) } ')
## ['3', 'a', 'sin(x)', '(c,d)']
$b= __remsp( ' aa bb ccc ') ## "aa bb ccc"
use Parse::DSLUtils qw{:yapp};
$yyst (states (=start condition) for dislex)
$yyFile (text of the file to be parsed)
_yyerror (a tipical yyerror function if lex uses yyFile )
_ppincludes (a tipical preprocessor of includes #include(file))
_slurp8 (returns the contents of a utf8 text file)
yyinitfromfile
yyinitfromstr
yylexdebug
dislex -- a lex-like utility (see man dislex)
use Parse::DSLUtils qw{:ftemplate};
skimport() import the templates in DATA and
transform them in functions
skimport(file*)
INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install
SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc Parse::DSLUtils
LICENSE AND COPYRIGHT
Copyright (C) 2011 J.Joao Almeida