File: options_container.inc

package info (click to toggle)
tcllib 1.18-dfsg-3
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 64,304 kB
  • ctags: 28,857
  • sloc: tcl: 174,135; ansic: 14,215; sh: 2,643; xml: 1,766; yacc: 1,148; pascal: 583; makefile: 106; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (60 lines) | stat: -rw-r--r-- 1,721 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[list_begin options]
[include options_std.inc]

[opt_def -mode [const bulk]|[const incremental]]

The value of this option controls which methods of

[package pt::peg::container] instances are used to specify the
grammar, i.e. preload it into the container. There are two legal
values, as listed below. The default is [const bulk].

[list_begin definitions]
[def [const bulk]]

In this mode the methods [method start], [method add], [method modes],
and [method rules] are used to specify the grammar in a bulk manner,
i.e. as a set of nonterminal symbols, and two dictionaries mapping
from the symbols to their semantic modes and parsing expressions.

[para]

This mode is the default.

[def [const incremental]]

In this mode the methods [method start], [method add], [method mode],
and [method rule] are used to specify the grammar piecemal, with each
nonterminal having its own block of defining commands.

[list_end]

[opt_def -template string]

The value of this option is a string into which to put the generated
code and the other configuration settings. The various locations for
user-data are expected to be specified with the placeholders listed
below. The default value is "[const @code@]".

[list_begin definitions]

[def [const @user@]]
To be replaced with the value of the option [option -user].

[def [const @format@]]
To be replaced with the the constant [const CONTAINER].

[def [const @file@]]
To be replaced with the value of the option [option -file].

[def [const @name@]]
To be replaced with the value of the option [option -name].

[def [const @mode@]]
To be replaced with the value of the option [option -mode].

[def [const @code@]]
To be replaced with the generated code.

[list_end]
[list_end]