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