1# pt_peg_import_peg.tcl -- 2# 3# The PEG to PEG (text representation) import plugin. Generation 4# of plain text. 5# 6# Copyright (c) 2009 Andreas Kupries <andreas_kupries@sourceforge.net> 7# 8# See the file "license.terms" for information on usage and redistribution 9# of this file, and for a DISCLAIMER OF ALL WARRANTIES. 10# 11# RCS: @(#) $Id: pt_peg_import_peg.tcl,v 1.1 2010/03/26 05:07:24 andreas_kupries Exp $ 12 13# This package is a plugin for the pt::peg import manager. It takes 14# the human readable text representation of a parsing expression 15# grammar and produces the corresponding canonical serialization. 16 17# ### ### ### ######### ######### ######### 18## Requisites 19 20# @mdgen NODEP: pt::peg::import::plugin 21 22package require Tcl 8.5 23package require pt::peg::import::plugin ; # The presence of this 24 # pseudo package indicates 25 # execution inside of a 26 # properly initialized 27 # plugin interpreter. 28package require pt::peg::from::peg 29 30# ### ### ### ######### ######### ######### 31## API. 32 33proc import {text} { 34 return [pt::peg::from::peg convert $text] 35} 36 37# ### ### ### ######### ######### ######### 38## Ready 39 40package provide pt::peg::import::peg 1 41return 42