glaemscribe 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/glaemresources/charsets/tengwar_ds_annatar.cst +36 -34
  3. data/glaemresources/charsets/tengwar_ds_eldamar.cst +6 -4
  4. data/glaemresources/charsets/tengwar_ds_elfica.cst +14 -14
  5. data/glaemresources/charsets/tengwar_ds_parmaite.cst +6 -3
  6. data/glaemresources/charsets/tengwar_ds_sindarin.cst +6 -3
  7. data/glaemresources/charsets/tengwar_freemono.cst +7 -2
  8. data/glaemresources/modes/adunaic.glaem +9 -2
  9. data/glaemresources/modes/blackspeech.glaem +11 -8
  10. data/glaemresources/modes/english-ipa.glaem.ignored +382 -0
  11. data/glaemresources/modes/{french-ipa.glaem → french-ipa.glaem.ignored} +0 -0
  12. data/glaemresources/modes/futhark-runicus.glaem +8 -5
  13. data/glaemresources/modes/futhark-younger.glaem +9 -6
  14. data/glaemresources/modes/futhorc.glaem +8 -5
  15. data/glaemresources/modes/gothic.glaem +4 -1
  16. data/glaemresources/modes/japanese-tengwar.glaem.ignored +548 -0
  17. data/glaemresources/modes/khuzdul.glaem +7 -9
  18. data/glaemresources/modes/mercian.glaem +58 -37
  19. data/glaemresources/modes/quenya-sarati.glaem +4 -1
  20. data/glaemresources/modes/quenya.glaem +10 -4
  21. data/glaemresources/modes/raw-tengwar.glaem +90 -73
  22. data/glaemresources/modes/rlyehian.glaem +8 -3
  23. data/glaemresources/modes/sindarin-beleriand.glaem +8 -2
  24. data/glaemresources/modes/sindarin-daeron.glaem +4 -1
  25. data/glaemresources/modes/sindarin.glaem +11 -4
  26. data/glaemresources/modes/telerin.glaem +10 -4
  27. data/glaemresources/modes/valarin-sarati.glaem +9 -7
  28. data/glaemresources/modes/westron.glaem +10 -3
  29. data/glaemresources/modes/westsaxon.glaem +52 -36
  30. data/lib/api/constants.rb +4 -0
  31. data/lib/api/fragment.rb +1 -5
  32. data/lib/api/mode.rb +9 -0
  33. data/lib/api/mode_parser.rb +2 -0
  34. data/lib/api/rule.rb +1 -1
  35. data/lib/api/rule_group.rb +3 -0
  36. data/lib/api/sheaf_chain_iterator.rb +4 -2
  37. metadata +6 -5
  38. data/glaemresources/modes/english-ipa.glaem +0 -245
@@ -213,6 +213,8 @@ module Glaemscribe
213
213
  @mode.authors = doc.root_node.gpath('authors').first.args.first
214
214
  @mode.version = doc.root_node.gpath('version').first.args.first
215
215
  @mode.raw_mode_name = doc.root_node.gpath('raw_mode').first.args.first if doc.root_node.gpath('raw_mode').first
216
+ @mode.invention = doc.root_node.gpath('invention').first.args.first if doc.root_node.gpath('invention').first
217
+ @mode.world = doc.root_node.gpath('world').first.args.first if doc.root_node.gpath('world').first
216
218
 
217
219
  doc.root_node.gpath("options.option").each{ |option_element|
218
220
  values = {}
data/lib/api/rule.rb CHANGED
@@ -62,7 +62,7 @@ module Glaemscribe
62
62
 
63
63
  srcp = srccounter.prototype
64
64
  dstp = dstcounter.prototype
65
-
65
+
66
66
  if srcp != dstp
67
67
  @mode.errors << Glaeml::Error.new(@line, "Source and destination are not compatible (#{srcp} vs #{dstp})")
68
68
  return
@@ -140,6 +140,9 @@ module Glaemscribe
140
140
  @rules = []
141
141
 
142
142
  add_var("NULL","")
143
+
144
+ add_var("UNDERSCORE", SPECIAL_CHAR_UNDERSCORE)
145
+ add_var("NBSP", SPECIAL_CHAR_NBSP)
143
146
 
144
147
  descend_if_tree(@root_code_block, trans_options)
145
148
 
@@ -56,7 +56,8 @@ module Glaemscribe
56
56
  }
57
57
 
58
58
  @cross_array = identity_cross_array
59
- @prototype = prototype_array.join('x') || 'CONST'
59
+ @prototype = prototype_array.join('x')
60
+ @prototype = 'CONST' if @prototype.empty?
60
61
 
61
62
  # Construct the cross array
62
63
  if cross_schema
@@ -87,7 +88,8 @@ module Glaemscribe
87
88
  end
88
89
 
89
90
  # Recalculate prototype
90
- @prototype = prototype_array.join('x') || 'CONST'
91
+ @prototype = prototype_array.join('x')
92
+ @prototype = 'CONST' if @prototype.empty?
91
93
  end
92
94
 
93
95
  def iterate
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glaemscribe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin 'Talagan' Babut
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2017-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -48,12 +48,13 @@ files:
48
48
  - glaemresources/charsets/unicode_runes.cst
49
49
  - glaemresources/modes/adunaic.glaem
50
50
  - glaemresources/modes/blackspeech.glaem
51
- - glaemresources/modes/english-ipa.glaem
52
- - glaemresources/modes/french-ipa.glaem
51
+ - glaemresources/modes/english-ipa.glaem.ignored
52
+ - glaemresources/modes/french-ipa.glaem.ignored
53
53
  - glaemresources/modes/futhark-runicus.glaem
54
54
  - glaemresources/modes/futhark-younger.glaem
55
55
  - glaemresources/modes/futhorc.glaem
56
56
  - glaemresources/modes/gothic.glaem
57
+ - glaemresources/modes/japanese-tengwar.glaem.ignored
57
58
  - glaemresources/modes/khuzdul.glaem
58
59
  - glaemresources/modes/mercian.glaem
59
60
  - glaemresources/modes/quenya-sarati.glaem
@@ -117,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
118
  version: '0'
118
119
  requirements: []
119
120
  rubyforge_project:
120
- rubygems_version: 2.6.11
121
+ rubygems_version: 2.6.13
121
122
  signing_key:
122
123
  specification_version: 4
123
124
  summary: Glǽmscribe
@@ -1,245 +0,0 @@
1
- \**
2
-
3
- Glǽmscribe (also written Glaemscribe) is a software dedicated to
4
- the transcription of texts between writing systems, and more
5
- specifically dedicated to the transcription of J.R.R. Tolkien's
6
- invented languages to some of his devised writing systems.
7
-
8
- Copyright (C) 2015 Benjamin Babut (Talagan).
9
-
10
- This program is free software: you can redistribute it and/or modify
11
- it under the terms of the GNU Affero General Public License as published by
12
- the Free Software Foundation, either version 3 of the License, or
13
- any later version.
14
-
15
- This program is distributed in the hope that it will be useful,
16
- but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- GNU Affero General Public License for more details.
19
-
20
- You should have received a copy of the GNU Affero General Public License
21
- along with this program. If not, see <http://www.gnu.org/licenses/>.
22
-
23
- **\
24
-
25
- \** FOR NOW THIS IS JUST A TEMPLATE **\
26
-
27
- \beg changelog
28
- \end
29
-
30
- \language "English"
31
- \writing "Tengwar"
32
- \mode "Phonemic IPA"
33
- \version "0.0.1"
34
- \authors "J.R.R. Tolkien, impl. Talagan (Benjamin Babut)"
35
-
36
- \charset tengwar_ds_sindarin false
37
- \charset tengwar_ds_parmaite false
38
- \charset tengwar_ds_eldamar false
39
- \charset tengwar_ds_annatar true
40
- \charset tengwar_freemono false
41
-
42
- \beg options
43
- \beg option espeak_voice ESPEAK_VOICE_EN_GB_JRRT
44
- \value ESPEAK_VOICE_EN_GB_JRRT 0
45
- \value ESPEAK_VOICE_EN_US_JRRT 1
46
- \end
47
- \beg option ancient_voiceless_labiovelar_fricative_wh WH_VLVF_HWESTA_SINDARINWA
48
- \value WH_VLVF_HWESTA_SINDARINWA 0
49
- \value WH_VLVF_WHINE_MERGER 1
50
- \end
51
- \end
52
-
53
- \beg preprocessor
54
- \downcase
55
-
56
- \** Remove phonetics accentuation marks **\
57
- \substitute "[ˈˌ]" ""
58
-
59
- \** Normalize ɚ : with or without ə ? **\
60
- \** Option "remove schwas ?" with and without unutixe ? **\
61
- \substitute "ɚ" "əɹ"
62
-
63
- \** Next sounds will all use unutixe. **\
64
- \** Long versions should resolve to short version + ore **\
65
- \** Only ɜː would normally exist but let's be large **\
66
- \rxsubstitute "([ʌɜəɐ])ː" "\\1ɹ"
67
-
68
- \** Too much ore kills ore **\
69
- \rxsubstitute "ɹ+" "əɹ"
70
-
71
- \end
72
-
73
- \beg processor
74
-
75
- \beg rules litteral
76
-
77
- \** e (accent) : e * ɛ **\
78
- \** æ (trois points pointe en bas): æ **\
79
- \** ʌ (unutixe) : ʌ * ɜ * ə (schwa du e) * ɐ (schwa du a) **\
80
- \** a : a * ɑ (stop/rob/swan) **\
81
- \** o : o * ɒ (lot anglais) / ɔ (lord) **\
82
- \** u : u * ʊ **\
83
- \** i (amatixe) : i * ɪ * ᵻ **\
84
-
85
- {A} === (a,ɑ)
86
- {AE} === (æ)
87
- {E} === (e,ɛ)
88
-
89
- \** TODO : CASSER EN DEUX LES SCHWAS ET LES NON SCHWA pour avoir potentiellement un traitement différent en fonction de l'activation de l'option qui vire les schwa **\
90
- {ER} === (ʌ,ɜ,ə,ɐ) \** ɚ **\
91
- {I} === (i,ɪ,ᵻ)
92
- {O} === (o,ɒ,ɔ)
93
- {U} === (u,ʊ)
94
-
95
-
96
- \** GB DIPHTONGS **\
97
- \** +dˈeɪ +skˈaɪ +bˈɔɪ +bˈiə +bˈeə +tˈʊə +ɡˌəʊ +kˈaʊ **\
98
- \** US DIPHTONGS **\
99
- \** =dˈeɪ =skˈaɪ =bˈɔɪ -bˈɪɹ -bˈɛɹ -tˈʊɹ +ɡˌoʊ =kˈaʊ **\
100
-
101
- \** Principe **\
102
- \** 3 Diphtongues en ʊ : aʊ (cow) / əʊ (GB : go) / oʊ (US : go) . Utiliser VALA **\
103
- \** 3 Diphtongues en i/ɪ : eɪ (day) / aɪ (sky) / ɔɪ (boy) . Utiliser ANNA (et pas YANTA!!) **\
104
- \** 3 Diphtongues en ə : iə (GB : beer) / eə (GB: bear) / ʊə (US: tour) . Utiliser ? **\
105
-
106
- {AU} === (aʊ) \** cow **\
107
- {OU} === (oʊ) \** US most / mˈoʊst **\
108
- {EU} === (əʊ) \** GB go **\
109
-
110
- {AJ} === (aɪ) \** nine / nˈaɪn **\
111
- {EJ} === (eɪ) \** game / ɡˈeɪm **\
112
- {OJ} === (ɔɪ) \** boy **\
113
-
114
- {IER} === (iə) \** GB Beer **\
115
- {EAR} === (eə) \** GB Bear **\
116
- {UER} === (ʊə) \** GB Tour **\
117
-
118
-
119
- \** ᵻ == schwi, pourrait avoir une option i ou schwa ou rien ou peut être autre **\
120
-
121
- {VOWELS} === {A}
122
-
123
-
124
- {_WH_} === HWESTA_SINDARINWA
125
- \if "ancient_voiceless_labiovelar_fricative_wh == WH_VLVF_WHINE_MERGER"
126
- {_WH_} === VALA
127
- \endif
128
-
129
-
130
- t --> TINCO
131
- p --> PARMA
132
- tʃ --> CALMA
133
- k --> QUESSE
134
-
135
- d --> ANDO
136
- b --> UMBAR
137
- dʒ --> ANGA
138
- ɡ --> UNGWE
139
-
140
- θ --> SULE
141
- f --> FORMEN
142
- ʃ --> AHA
143
- x --> HWESTA
144
-
145
- ð --> ANTO
146
- v --> AMPA
147
- ʒ --> ANCA
148
- ɣ --> UNQUE
149
-
150
- n --> NUMEN
151
- m --> MALTA
152
- nj --> NOLDO
153
- ŋ --> NWALME
154
-
155
- ɹ --> ORE
156
- w --> VALA
157
- j --> ANNA
158
- \** VILYA **\
159
-
160
- ɹ --> ROMEN \** != ORE **\
161
- \** ARDA **\
162
- l --> LAMBE
163
- \** ALDA **\
164
-
165
- s --> SILME
166
- s --> SILME_NUQUERNA
167
- z --> ESSE
168
- z --> ESSE_NUQUERNA
169
-
170
- h --> HYARMEN
171
- ʍ --> {_WH_}
172
- \** YANTA **\
173
- \** URE **\
174
-
175
- \** US : left : ɾ ʔ n̩ **\
176
-
177
- \end
178
-
179
- \beg rules punctuation
180
- . --> PUNCT_DDOT
181
- .. --> PUNCT_DOT PUNCT_DDOT PUNCT_DOT
182
- ... --> PUNCT_TILD
183
- … --> PUNCT_TILD
184
- .... --> PUNCT_TILD
185
- ..... --> PUNCT_TILD
186
- ...... --> PUNCT_TILD
187
- ....... --> PUNCT_TILD
188
-
189
- , --> PUNCT_DOT
190
- : --> PUNCT_DOT
191
- ; --> PUNCT_DOT
192
- ! --> PUNCT_EXCLAM
193
- ? --> PUNCT_INTERR
194
- · --> {NULL}
195
-
196
- - --> {NULL}
197
- – --> PUNCT_TILD
198
- — --> PUNCT_TILD
199
-
200
- \** Apostrophe **\
201
-
202
- ' --> {NULL}
203
- ’ --> {NULL}
204
-
205
- \** Quotes **\
206
-
207
- “ --> DQUOT_OPEN
208
- ” --> DQUOT_CLOSE
209
- « --> DQUOT_OPEN
210
- » --> DQUOT_CLOSE
211
-
212
- [ --> PUNCT_PAREN_L
213
- ] --> PUNCT_PAREN_R
214
- ( --> PUNCT_PAREN_L
215
- ) --> PUNCT_PAREN_R
216
- { --> PUNCT_PAREN_L
217
- } --> PUNCT_PAREN_R
218
- < --> PUNCT_PAREN_L
219
- > --> PUNCT_PAREN_R
220
-
221
- \** Not universal between fonts ... **\
222
- $ --> BOOKMARK_SIGN
223
- ≤ --> RING_MARK_L \** Ring inscription left beautiful stuff **\
224
- ≥ --> RING_MARK_R \** Ring inscription right beautiful stuff **\
225
- \end
226
-
227
- \beg rules numbers
228
- 0 --> NUM_0
229
- 1 --> NUM_1
230
- 2 --> NUM_2
231
- 3 --> NUM_3
232
- 4 --> NUM_4
233
- 5 --> NUM_5
234
- 6 --> NUM_6
235
- 7 --> NUM_7
236
- 8 --> NUM_8
237
- 9 --> NUM_9
238
- A --> NUM_10
239
- B --> NUM_11
240
- \end
241
- \end
242
-
243
- \beg postprocessor
244
- \resolve_virtuals
245
- \end