generated from KOLANICH/python_project_boilerplate.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fulling_motor_name.yug
436 lines (375 loc) · 8.69 KB
/
fulling_motor_name.yug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
meta:
id: fulling_motor_name
title: Changzhou Fulling Motor Co., Ltd. model nameber
license: Unlicense
class: regular
doc: A grammar for parsing Changzhou Fulling Motor Co., Ltd. model namebers
chars:
- id: Three
lit: "3"
- id: RestOfDigits
alt:
- range: ["0", "2"]
- range: ["4", "9"]
- id: Dash
alt:
- lit: '-'
- lit: '–'
- id: dot
lit: "."
- id: A
lit: A
- id: B
lit: B
- id: C
lit: C
- id: E
lit: E
- id: F
lit: F
- id: G
lit: G
- id: H
lit: H
- id: I
lit: I
- id: K
lit: K
- id: L
lit: L
- id: M
lit: M
- id: P
lit: P
- id: R
lit: R
- id: S
lit: S
- id: T
lit: T
- id: V
lit: V
- id: W
lit: W
tokens:
- id: fl
seq:
- ref: F
- ref: L
- id: permanent_marker
seq:
- ref: P
- ref: M
- id: brushless_marker_base
seq:
- ref: B
- ref: L
- id: rounded_marker
opt:
ref: R
- id: brushless_flat_marker
opt:
ref: W
fragmented:
- id: digit
alt:
- ref: RestOfDigits
- ref: Three
- id: square_marker
opt:
ref: S
- id: stepper_series
alt:
- cap: standard
ref: T
- cap: hybrid
ref: H
- id: stepper_modifiers_t
cap: stepper_modifiers
alt:
- ref: H # high_torque
- ref: C # hyper_torque (a.k.a hyper_step, but the docs says that it's just torque higher than high-torque)
- id: price_performance_or_unknown_C_marker
opt:
ref: C
- id: electrical_unit
alt:
- ref: A
- ref: V
- id: shafts_count_marker
alt:
- ref: A
- ref: B
- id: one_or_two_digit_number
seq:
- ref: digit
- opt:
ref: digit
prefer: shift
- id: two_digit_number
seq:
- ref: digit
- ref: digit
# max: 2 # BUG: emits 1 digit
- id: three_digit_number
seq:
- ref: two_digit_number
- ref: digit
- id: two_or_three_digit_number
seq:
- ref: two_digit_number
- opt:
ref: digit
prefer: shift
- id: any_integer
ref: digit
min: 1
- id: fractional_part
seq:
- ref: dot
- opt:
ref: any_integer
- id: float_number
seq:
- ref: any_integer
- opt:
ref: fractional_part
- id: integrated_electronic_marker
seq:
- ref: Dash
- ref: I
- ref: E
- id: brushless_modifier_poles_torque_letter # usually determines count of poles, A models have more poles (usually 10) than non-lettered models (usually 8), B models have more poles (usually 6) than non-lettered models, but some B models have no A analogues and have 8 poles and C models usually have no analogues and also have 8 poles.
alt:
- ref: A
- ref: B
- id: three_phase_marker
seq:
- ref: Three
- ref: P
- id: hollow_specifier
seq:
- ref: Dash
- ref: H
prods:
- id: main
seq:
- uncap:
opt:
ref: fl
- cap: size
ref: two_or_three_digit_number
- ref: type_specific
cap: typed
- spacer: 1
- id: gearbox_specifier
seq:
- uncap:
ref: G
- cap: ratio
ref: float_number
- id: type_specific
alt:
- cap: stepper
ref: stepper_t
- cap: permanent
ref: permanent_t
- cap: brushless
ref: brushless_t
- cap: three_phase
ref: three_phase_t
- id: three_phase_t
seq:
- cap: type_marker
ref: three_phase_marker
- cap: motor_body_length
ref: two_or_three_digit_number
- cap: suffix
ref: three_phase_suffix_opt_our
- id: three_phase_suffix_opt_our
opt:
ref: three_phase_suffix_t
- id: three_phase_suffix_t
seq:
- uncap:
ref: Dash
- cap: current_per_phase_over_ten
ref: two_digit_number
- cap: leads
ref: two_digit_number
- cap: shafts_count
ref: shafts_count_marker_opt_our
- id: stepper_suffix_t
seq:
- uncap:
ref: Dash
- cap: suffix_body
ref: suffix_with_or_without_tail
- id: suffix_with_or_without_tail
alt:
- cap: with_current
ref: suffix_with_current
- cap: without_current
ref: stepper_suffix_tail
- id: suffix_with_current
seq:
- cap: current
ref: three_digit_number
- cap: tail
ref: stepper_suffix_tail
- id: double_step_rate_marker
opt:
ref: M
- id: encoder_presence_marker
opt:
ref: E
- id: unknown_marker_F
opt:
ref: F
- id: keyway_marker
opt:
ref: K
- id: screwed_shaft_marker
opt:
ref: C
- id: gearbox_specifier_opt_our
opt:
ref: gearbox_specifier
- id: hollow_specifier_opt_our
opt:
ref: hollow_specifier
- id: shafts_count_marker_opt_our
opt:
ref: shafts_count_marker
- id: shafts_count_and_step_rate_any_order_1_t
seq:
- cap: shafts_count
ref: shafts_count_marker_opt_our
- ref: double_step_rate_marker
cap: step_rate
- id: shafts_count_and_step_rate_any_order_2_t
seq:
- ref: double_step_rate_marker
cap: step_rate
- cap: shafts_count
ref: shafts_count_marker_opt_our
- id: shafts_count_and_step_rate_any_order_t
alt:
- cap: shafts_count_and_step_rate_any_order_1
ref: shafts_count_and_step_rate_any_order_1_t
- cap: shafts_count_and_step_rate_any_order_2
ref: shafts_count_and_step_rate_any_order_2_t
- id: stepper_suffix_tail
seq:
- cap: variant # usually determines rated voltage, resistance and phase current
# For some models determines input count!
ref: digit
- cap: shafts_count_and_step_rate_any_order
ref: shafts_count_and_step_rate_any_order_t
- ref: encoder_presence_marker
cap: encoder
- ref: unknown_marker_F
cap: unknown_F
- ref: keyway_marker
cap: key_way
- ref: screwed_shaft_marker
cap: screwed_shaft
- cap: gearbox
ref: gearbox_specifier_opt_our
- cap: hollow
ref: hollow_specifier_opt_our
- id: stepper_modifiers_opt_our
opt:
ref: stepper_modifiers_t
- id: stepper_t
seq:
- cap: type_marker
ref: stepper_marker
- cap: stepper_modifiers
ref: stepper_modifiers_opt_our
- cap: motor_body_length
ref: two_or_three_digit_number
- cap: suffix
ref: stepper_suffix_t
- id: stepper_series_opt_our
opt:
ref: stepper_series
prefer: shift
- id: stepper_marker
seq:
- uncap:
ref: S
- cap: series
ref: stepper_series_opt_our
- id: permanent_t
seq:
- cap: type_marker
ref: permanent_marker
- cap: motor_body_length
ref: two_digit_number
- cap: suffix
ref: stepper_suffix_t
- id: brushless_marker
seq:
- cap: is_price_performance
ref: price_performance_or_unknown_C_marker
- cap: is_round
ref: rounded_marker
- uncap:
ref: brushless_marker_base
- cap: is_flat
ref: brushless_flat_marker
- cap: is_square
ref: square_marker
- cap: is_unknown_C
ref: price_performance_or_unknown_C_marker
- id: execution_configuration_t
seq:
- uncap:
ref: Dash
- cap: number
ref: any_integer
- cap: unit
ref: electrical_unit
- id: brushless_modifier_variants
alt:
- cap: poles_torque
ref: brushless_modifier_poles_torque
- cap: length_electronics_electrics
ref: brushless_modifier_length_electronics_electrics
- id: brushless_modifier_poles_torque
seq:
- cap: poles_or_other
ref: brushless_modifier_poles_torque_letter
- cap: variant # determines torque, sometimes it is arythm progression, but not always
ref: two_digit_number
- id: brushless_modifier_length_electronics_electrics
seq:
- cap: motor_body_length
ref: two_or_three_digit_number
- cap: tail
ref: brushless_tail_opt_our
- id: brushless_tail_opt_our
opt:
ref: brushless_tail
- id: brushless_t
seq:
- cap: type_marker
ref: brushless_marker
- cap: modifier
ref: brushless_modifier_variants
- id: brushless_tail
alt:
- cap: electronic
ref: brushless_electronic_tail
- cap: no_electronic
ref: execution_configuration_t
- id: execution_configuration_opt_our
opt:
ref: execution_configuration_t
- id: brushless_electronic_tail
seq:
- cap: has_electronics
ref: integrated_electronic_marker
- cap: cfg
ref: execution_configuration_opt_our