1[comment {-*- tcl -*- --- !doctools ---}]
2[manpage_begin pt::peg::from::[vset PACKAGE] n [vset VERSION]]
3[include ../module.inc]
4[include ../keywords_convert.inc]
5[titledesc "PEG Conversion. Read [vset NAME] format"]
6[require pt::peg::from::[vset PACKAGE] [opt [vset VERSION]]]
7[include format/[vset REQUIRE].inc]
8[description]
9[include ../ref_intro.inc]
10
11This package implements the converter from [vset NAME] markup to
12parsing expression grammars.
13
14[para]
15
16It resides in the Import section of the Core Layer of Parser Tools,
17and can be used either directly with the other packages of this layer,
18or indirectly through the import manager provided by
19[package pt::peg::import]. The latter is intented for use in untrusted
20environments and done through the corresponding import plugin
21[package pt::peg::import::[vset PACKAGE]] sitting between converter
22and import manager.
23
24[para][image arch_core_iplugins][para]
25
26[section API]
27
28The API provided by this package satisfies the specification of the
29Converter API found in the [manpage {Parser Tools Import API}]
30specification.
31
32[list_begin definitions]
33
34[call [cmd pt::peg::from::[vset PACKAGE]] [method convert] [arg text]]
35
36This command takes the [vset NAME] markup encoding a parsing
37expression grammar and contained in [arg text], and generates the
38canonical serialization of said grammar, as specified in section
39[sectref {PEG serialization format}].
40
41The created value is then returned as the result of the command.
42
43[list_end]
44
45[include ../format/[vset PACKAGE].inc]
46[include ../serial/pegrammar.inc]
47[include ../serial/pexpression.inc]
48[include ../feedback.inc]
49[manpage_end]
50