Bioscanners Project Main - Ptlex |
||
DESCRIPTIONPtlex is a scanner generator for Flex-like input files. Written in the crossplatform Tcl-scripting language it can be used to translated Flex-like input files for the scripting languages Perl, Python, Ruby, and Tcl into standalone applications. INSTALLATION
$ tclkit-runtime /path/to/ptlex.kit This should display something like: This is ptlex - A Tcl based flexlike scanner generator. $Revision: 1.26 $ How to use ptlex: tclkit-runtime ptlex.kit [options] flexfile outfile Valid options are: -+ Object Oriented scanner (Tcl, Perl and Python) --buffersize num Set buffersize of scanner to num --flexfile file Set flexfile ... Your installation is done. USAGE$ tclkit-runtime ptlex.kit [options] lexfile outfile The following options are implemented:
EXAMPLESLets assume we hava flex input file written in Tcl whic counts the number of characters, lines and words in files like the unix tool wc. This file is called wc.ftl. The source can be viewed here $ head samples/wc.ftl %{ global nline nword nchar set nline 0 set nword 0 set nchar 0 %} %option buffersize=1024 $ tclkit85 ptlex.kit samples/wc.ftl samples/wc.tcl Success: Language=tcl Script-file=samples/wc.tcl generated! $ tclkit85 samples/wc.tcl samples/wc.tcl 144 507 3847 samples/wc.tcl Let's compare the results with the original $ wc samples/wc.tcl 144 507 3847 samples/wc.tcl SAMPLESSource code for samples at sourceforge:
LICENSEBSD-like AUTHORSDr. Detlef Groth (Potsdam University) SEE ALSO |
|||||||||||||||||||||||||||||||||
Edit -
History -
Print -
Recent Changes -
Search
Page last modified on August 26, 2009, at 01:59 PM Using Modified Blue Zinfandel Wordpress Theme created by Brian Adjusted for by Dr. Detlef Groth www.dgroth.de |