-
Notifications
You must be signed in to change notification settings - Fork 0
/
espWord.grammar
86 lines (75 loc) · 2.47 KB
/
espWord.grammar
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
start_word: (word WHITESPACE+)* word
!word: (((root | prefix | suffix) connective)? (root | prefix | suffix))+ ending
| memstaro
| correlative
!ending: verb
| noun num_and_case
| adjective num_and_case
| adverb directional_accusative?
verb: _FUTURE -> verb_future
| _PERFECT -> verb_perfect
| _PRESENCE -> verb_presence
| _SUBJUNCTIVE -> verb_subjunctive
| _IMPERATIVE -> verb_imperative
| _INFINITIVE -> verb_infinitive
noun: "o"
adjective: "a"
adverb: "e"
num_and_case: [plural] [accusative]
plural: "j"
accusative: "n"
directional_accusative: "n"
_FUTURE: "os"
_PERFECT: "is"
_PRESENCE: "as"
_SUBJUNCTIVE: "us"
_IMPERATIVE: "u"
_INFINITIVE: "i"
connective: "o" -> connection
| "a" -> connection
| "e" -> connection
!root: LETTER LETTER+
LETTER: "a" | "b" | "c" | "ĉ" | "d" | "e" | "f"
| "g" | "ĝ" | "h" | "ĥ" | "i" | "j" | "ĵ"
| "k" | "l" | "m" | "n" | "o" | "p" | "r"
| "s" | "ŝ" | "t" | "u" | "ŭ" | "ǔ" | "û"
| "v" | "z" | "x" | "-" | "A" | "B" | "C"
| "Ĉ" | "D" | "E" | "F" | "G" | "Ĝ" | "H"
| "Ĥ" | "I" | "J" | "Ĵ" | "K" | "L" | "M"
| "N" | "O" | "P" | "R" | "S" | "Ŝ" | "T"
| "U" | "Ŭ" | "Ǔ" | "Û" | "V" | "Z" | "X"
%import common.WS -> WHITESPACE
correlative: pref_corr (suff_corr_indecl | suff_corr_decl num_and_case | suff_corr_decl_no_num accusative? | suff_corr_decl_dir_acc directional_accusative?)
pref_corr: "ki" -> ki_question
| "ti" -> ti_indication
| "i" -> i_indefinite
| "ĉi" -> cxi_universal
| "neni" -> neni_negative
suff_corr_indecl: "am" -> am_time
| "el" -> el_manner
| "om" -> om_amount
| "al" -> al_reason
| "es" -> es_posession
suff_corr_decl: "u" -> u_individual
| "a" -> a_quality
suff_corr_decl_no_num: "o" -> o_thing
suff_corr_decl_dir_acc: "e" -> e_place
start_num: number
_delimitor: " "
_dek: "dek"
_cent: "cent"
_mil: "mil"
_MILIONO: "miliono"
_MILIARDO: "miliardo"
_BILIONO: "biliono"
_BILIARDO: "biliardo"
!digit: "du" | "tri" | "kvar" | "kvin" | "ses" | "sep" | "ok" | "naŭ"
!digit_term: (digit | "unu") _delimitor
!digit_alone: (digit_term | "nulo") _delimitor
!dekpot: (digit? _dek _delimitor)
!centpot: (digit? _cent _delimitor)
!milpot: (pot? _mil _delimitor)
!pot: (centpot? dekpot? digit_term?)
_plural: "j" _delimitor
!bigger_pot{potency}: (potency _delimitor | pot potency _plural)
!number: digit_alone | bigger_pot{_BILIARDO}? bigger_pot{_BILIONO}? bigger_pot{_MILIARDO}? bigger_pot{_MILIONO}? milpot? centpot? dekpot? digit_term?