annotate Lib/IMPL/Text/Schema.pm @ 174:d920d2b70230

minor changes
author sergey
date Tue, 04 Oct 2011 17:55:38 +0400
parents 4267a2ac3d46
children d1676be8afcc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
1 package IMPL::Text::Schema;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
2 use strict;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
3 use warnings;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
4
166
4267a2ac3d46 Added Class::Template,
wizard
parents: 49
diff changeset
5 use parent qw(IMPL::DOM::Schema);
49
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
6
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
7 __PACKAGE__->PassThroughArgs;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
8
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
9 1;
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
10
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
11 __END__
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
12
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
13 =pod
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
14
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
15 =head1 SINOPSYS
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
16
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
17 <schema>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
18 <ComplexNode name="syntax">
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
19 <Node name="Define" type="Statement" minOccur="1" maxOccur="unbounded">
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
20 <Property name="name" type="Word"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
21 </Node>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
22 </ComplexNode>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
23 <ComplexType type="Statement" nativeType="IMPL::Text::Schema::Statement">
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
24 <NodeList>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
25 <SwitchNode minOccur="1" maxOccur="unbounded">
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
26 <Node name="Word" type="Word"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
27 <Node name="Statement" type="Word"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
28 <Node name="Regexp" type="Regexp"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
29 <Node name="Switch" type="Switch"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
30 <Node name="Repeat" type="List"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
31 </SwitchNode>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
32 </NodeList>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
33 </ComplexType>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
34 <SimpleType type="Word" nativeType="IMPL::Text::Schema::Word"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
35 <SimpleType type="Regexp" nativeType="IMPL::Text::Schema::Regexp"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
36 <ComplexType type="Switch" nativeType="IMPL::Text::Schema::Switch">
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
37 <NodeList>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
38 <SwitchNode minOccur="1" maxOccur="unbounded">
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
39 <Node name="Word" type="Word"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
40 <Node name="Statement" type="Word"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
41 <Node name="Regexp" type="Regexp"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
42 <Node name="Switch" type="Switch"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
43 <Node name="Repeat" type="List"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
44 </SwitchNode>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
45 </NodeList>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
46 </ComplexType>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
47 <ComplexType type="Repeat" nativeType="IMPL::Text::Schema::Repeat">
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
48 <NodeList>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
49 <SwitchNode minOccur="1" maxOccur="unbounded">
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
50 <Node name="Word" type="Word"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
51 <Node name="Statement" type="Word"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
52 <Node name="Regexp" type="Regexp"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
53 <Node name="Switch" type="Switch"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
54 <Node name="Repeat" type="List"/>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
55 </SwitchNode>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
56 </NodeList>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
57 </CoomplexType>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
58 </schema>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
59
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
60 =head1 DESCRIPTION
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
61
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
62 Схема текстового файла, которую можно использовать для разбора содержимого
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
63 текстового файла.
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
64
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
65 Схема текстового файла состоит из выражений.
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
66 1. Регулярное выражение является выражением
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
67 2. Строковое значение является выражением.
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
68 3. Выражения объединенные логическими операторами также выражение.
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
69
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
70 Допускаются следующие операторы
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
71 1. Повтор
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
72 2. Ветвление
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
73
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
74 =head1 METHODS
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
75
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
76 =over
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
77
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
78 =item C<<$schema->compile()>>
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
79
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
80 Возвращает объект для разбора текста.
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
81
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
82 =back
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
83
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
84 =head1 INTERNALS
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
85
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
86
16ada169ca75 migrating to the Eclipse IDE
wizard@linux-odin.local
parents: 26
diff changeset
87 =cut