cskit 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -4
  3. data/History.txt +5 -0
  4. data/cskit.gemspec +5 -8
  5. data/lib/cskit.rb +15 -66
  6. data/lib/cskit/annotated_string.rb +1 -1
  7. data/lib/cskit/annotator.rb +1 -3
  8. data/lib/cskit/formatters.rb +3 -4
  9. data/lib/cskit/formatters/bible.rb +4 -5
  10. data/lib/cskit/formatters/bible/bible_html_formatter.rb +2 -2
  11. data/lib/cskit/formatters/bible/bible_json_formatter.rb +17 -0
  12. data/lib/cskit/formatters/bible/bible_plain_text_formatter.rb +3 -3
  13. data/lib/cskit/formatters/science_health.rb +3 -5
  14. data/lib/cskit/formatters/science_health/science_health_html_formatter.rb +3 -4
  15. data/lib/cskit/formatters/science_health/science_health_plain_text_formatter.rb +5 -4
  16. data/lib/cskit/lesson.rb +3 -5
  17. data/lib/cskit/lesson/lesson.rb +3 -3
  18. data/lib/cskit/lesson/section.rb +1 -1
  19. data/lib/cskit/parsers.rb +6 -3
  20. data/lib/cskit/parsers/bible.rb +10 -0
  21. data/lib/cskit/parsers/bible/bible_parser.rb +192 -0
  22. data/lib/cskit/parsers/bible/bible_tokenizer.rb +32 -0
  23. data/lib/cskit/parsers/parser.rb +68 -0
  24. data/lib/cskit/parsers/science_health.rb +10 -0
  25. data/lib/cskit/parsers/science_health/science_health_parser.rb +201 -0
  26. data/lib/cskit/parsers/science_health/science_health_tokenizer.rb +33 -0
  27. data/lib/cskit/parsers/token.rb +17 -0
  28. data/lib/cskit/parsers/tokenizer.rb +43 -0
  29. data/lib/cskit/readers.rb +4 -4
  30. data/lib/cskit/readers/bible_reader.rb +2 -2
  31. data/lib/cskit/readers/reading.rb +8 -1
  32. data/lib/cskit/readers/science_health_reader.rb +8 -8
  33. data/lib/cskit/registry.rb +65 -0
  34. data/lib/cskit/resources/volumes.rb +3 -3
  35. data/lib/cskit/resources/volumes/bible.rb +11 -9
  36. data/lib/cskit/resources/volumes/science_health.rb +10 -9
  37. data/lib/cskit/version.rb +1 -1
  38. data/lib/cskit/volume.rb +1 -1
  39. data/spec/parsers/bible/bible_parser_spec.rb +205 -0
  40. data/spec/parsers/science_health/science_health_parser_spec.rb +153 -0
  41. data/spec/spec_helper.rb +8 -0
  42. metadata +16 -38
  43. data/lib/cskit/parsers/bible/bible.rb +0 -1005
  44. data/lib/cskit/parsers/bible/bible.treetop +0 -64
  45. data/lib/cskit/parsers/bible/nodes.rb +0 -153
  46. data/lib/cskit/parsers/bible/objects.rb +0 -81
  47. data/lib/cskit/parsers/science_health/nodes.rb +0 -82
  48. data/lib/cskit/parsers/science_health/objects.rb +0 -47
  49. data/lib/cskit/parsers/science_health/science_health.rb +0 -607
  50. 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