cskit 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -4
- data/History.txt +5 -0
- data/cskit.gemspec +5 -8
- data/lib/cskit.rb +15 -66
- data/lib/cskit/annotated_string.rb +1 -1
- data/lib/cskit/annotator.rb +1 -3
- data/lib/cskit/formatters.rb +3 -4
- data/lib/cskit/formatters/bible.rb +4 -5
- data/lib/cskit/formatters/bible/bible_html_formatter.rb +2 -2
- data/lib/cskit/formatters/bible/bible_json_formatter.rb +17 -0
- data/lib/cskit/formatters/bible/bible_plain_text_formatter.rb +3 -3
- data/lib/cskit/formatters/science_health.rb +3 -5
- data/lib/cskit/formatters/science_health/science_health_html_formatter.rb +3 -4
- data/lib/cskit/formatters/science_health/science_health_plain_text_formatter.rb +5 -4
- data/lib/cskit/lesson.rb +3 -5
- data/lib/cskit/lesson/lesson.rb +3 -3
- data/lib/cskit/lesson/section.rb +1 -1
- data/lib/cskit/parsers.rb +6 -3
- data/lib/cskit/parsers/bible.rb +10 -0
- data/lib/cskit/parsers/bible/bible_parser.rb +192 -0
- data/lib/cskit/parsers/bible/bible_tokenizer.rb +32 -0
- data/lib/cskit/parsers/parser.rb +68 -0
- data/lib/cskit/parsers/science_health.rb +10 -0
- data/lib/cskit/parsers/science_health/science_health_parser.rb +201 -0
- data/lib/cskit/parsers/science_health/science_health_tokenizer.rb +33 -0
- data/lib/cskit/parsers/token.rb +17 -0
- data/lib/cskit/parsers/tokenizer.rb +43 -0
- data/lib/cskit/readers.rb +4 -4
- data/lib/cskit/readers/bible_reader.rb +2 -2
- data/lib/cskit/readers/reading.rb +8 -1
- data/lib/cskit/readers/science_health_reader.rb +8 -8
- data/lib/cskit/registry.rb +65 -0
- data/lib/cskit/resources/volumes.rb +3 -3
- data/lib/cskit/resources/volumes/bible.rb +11 -9
- data/lib/cskit/resources/volumes/science_health.rb +10 -9
- data/lib/cskit/version.rb +1 -1
- data/lib/cskit/volume.rb +1 -1
- data/spec/parsers/bible/bible_parser_spec.rb +205 -0
- data/spec/parsers/science_health/science_health_parser_spec.rb +153 -0
- data/spec/spec_helper.rb +8 -0
- metadata +16 -38
- data/lib/cskit/parsers/bible/bible.rb +0 -1005
- data/lib/cskit/parsers/bible/bible.treetop +0 -64
- data/lib/cskit/parsers/bible/nodes.rb +0 -153
- data/lib/cskit/parsers/bible/objects.rb +0 -81
- data/lib/cskit/parsers/science_health/nodes.rb +0 -82
- data/lib/cskit/parsers/science_health/objects.rb +0 -47
- data/lib/cskit/parsers/science_health/science_health.rb +0 -607
- data/lib/cskit/parsers/science_health/science_health.treetop +0 -44
@@ -1,44 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
|
-
require 'cskit/parsers/science_health/nodes'
|
4
|
-
require 'cskit/parsers/science_health/objects'
|
5
|
-
|
6
|
-
module CSKit
|
7
|
-
module Parsers
|
8
|
-
|
9
|
-
grammar ScienceHealth
|
10
|
-
rule citation
|
11
|
-
page [\s]* ":" [\s]* line_list <CitationNode>
|
12
|
-
end
|
13
|
-
|
14
|
-
rule page
|
15
|
-
[\d{1,3}|vi{2}|xi{1,2}|i{0,1}x]+ <PageNode>
|
16
|
-
end
|
17
|
-
|
18
|
-
rule line_list
|
19
|
-
line ([\s]* "," [\s]* line_list)? <LineListNode>
|
20
|
-
end
|
21
|
-
|
22
|
-
rule line
|
23
|
-
(compound_line_number / line_number) (only / start_fragment)? <LineNode>
|
24
|
-
end
|
25
|
-
|
26
|
-
rule compound_line_number
|
27
|
-
line_number [\s]* "-" [\s]* line_number <CompoundLineNumberNode>
|
28
|
-
end
|
29
|
-
|
30
|
-
rule line_number
|
31
|
-
[\d]+ <LineNumberNode>
|
32
|
-
end
|
33
|
-
|
34
|
-
rule only
|
35
|
-
[\s]* "(" [\s]* "only" [\s]* ")" [\s]* <OnlyNode>
|
36
|
-
end
|
37
|
-
|
38
|
-
rule start_fragment
|
39
|
-
[^,]+ <StartFragmentNode>
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
end
|
44
|
-
end
|