annotate Lib/IMPL/Text/Schema.pm @ 35:f25d021780b3

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