grammar-well 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/build/compiler/compiler.d.ts +49 -49
  2. package/build/compiler/compiler.js +227 -227
  3. package/build/compiler/generator.d.ts +23 -23
  4. package/build/compiler/generator.js +213 -212
  5. package/build/compiler/generator.js.map +1 -1
  6. package/build/compiler/import-resolver.d.ts +15 -15
  7. package/build/compiler/import-resolver.js +36 -36
  8. package/build/compiler/outputs/javascript.d.ts +3 -3
  9. package/build/compiler/outputs/javascript.js +14 -14
  10. package/build/compiler/outputs/json.d.ts +2 -2
  11. package/build/compiler/outputs/json.js +7 -7
  12. package/build/compiler/outputs/typescript.d.ts +2 -2
  13. package/build/compiler/outputs/typescript.js +9 -8
  14. package/build/compiler/outputs/typescript.js.map +1 -1
  15. package/build/grammars/gwell.d.ts +1023 -997
  16. package/build/grammars/gwell.js +540 -536
  17. package/build/grammars/gwell.js.map +1 -1
  18. package/build/grammars/json.d.ts +151 -151
  19. package/build/grammars/json.js +111 -111
  20. package/build/grammars/number.d.ts +239 -239
  21. package/build/grammars/number.js +114 -114
  22. package/build/grammars/number.json +1 -1
  23. package/build/grammars/string.d.ts +116 -116
  24. package/build/grammars/string.js +49 -49
  25. package/build/grammars/string.json +1 -1
  26. package/build/grammars/whitespace.d.ts +51 -51
  27. package/build/grammars/whitespace.js +29 -29
  28. package/build/grammars/whitespace.json +1 -1
  29. package/build/index.d.ts +4 -4
  30. package/build/index.js +20 -20
  31. package/build/lexers/character-lexer.d.ts +27 -27
  32. package/build/lexers/character-lexer.js +70 -70
  33. package/build/lexers/stateful-lexer.d.ts +48 -48
  34. package/build/lexers/stateful-lexer.js +308 -308
  35. package/build/lexers/token-buffer.d.ts +32 -32
  36. package/build/lexers/token-buffer.js +91 -91
  37. package/build/parser/algorithms/cyk.d.ts +16 -16
  38. package/build/parser/algorithms/cyk.js +57 -57
  39. package/build/parser/algorithms/earley.d.ts +48 -48
  40. package/build/parser/algorithms/earley.js +157 -157
  41. package/build/parser/algorithms/lr.d.ts +10 -10
  42. package/build/parser/algorithms/lr.js +33 -33
  43. package/build/parser/parser.d.ts +26 -26
  44. package/build/parser/parser.js +73 -73
  45. package/build/typings.d.ts +199 -198
  46. package/build/typings.js +2 -2
  47. package/build/utility/general.d.ts +55 -55
  48. package/build/utility/general.js +175 -165
  49. package/build/utility/general.js.map +1 -1
  50. package/build/utility/lint.d.ts +2 -2
  51. package/build/utility/lint.js +27 -27
  52. package/build/utility/lr.d.ts +52 -52
  53. package/build/utility/lr.js +129 -129
  54. package/build/utility/text-format.d.ts +11 -11
  55. package/build/utility/text-format.js +83 -83
  56. package/package.json +1 -1
  57. package/src/compiler/generator.ts +1 -0
  58. package/src/compiler/outputs/typescript.ts +2 -1
  59. package/src/grammars/gwell.gwell +15 -13
  60. package/src/grammars/gwell.js +17 -13
  61. package/src/grammars/gwell.json +1 -1
  62. package/src/typings.ts +1 -0
  63. package/src/utility/general.ts +31 -19
@@ -1,239 +1,239 @@
1
- export default GWLanguage;
2
- declare function GWLanguage(): {
3
- grammar: {
4
- start: string;
5
- rules: {
6
- unsigned_int$RPT1Nx1: ({
7
- name: string;
8
- symbols: RegExp[];
9
- postprocess?: undefined;
10
- } | {
11
- name: string;
12
- symbols: (string | RegExp)[];
13
- postprocess: ({ data }: {
14
- data: any;
15
- }) => any;
16
- })[];
17
- unsigned_int: {
18
- name: string;
19
- symbols: string[];
20
- postprocess: ({ data }: {
21
- data: any;
22
- }) => number;
23
- }[];
24
- int$RPT01x1$SUBx1: {
25
- name: string;
26
- symbols: {
27
- literal: string;
28
- }[];
29
- }[];
30
- int$RPT01x1: {
31
- name: string;
32
- symbols: string[];
33
- postprocess: ({ data }: {
34
- data: any;
35
- }) => any;
36
- }[];
37
- int$RPT1Nx1: ({
38
- name: string;
39
- symbols: RegExp[];
40
- postprocess?: undefined;
41
- } | {
42
- name: string;
43
- symbols: (string | RegExp)[];
44
- postprocess: ({ data }: {
45
- data: any;
46
- }) => any;
47
- })[];
48
- int: {
49
- name: string;
50
- symbols: string[];
51
- postprocess: ({ data }: {
52
- data: any;
53
- }) => number;
54
- }[];
55
- unsigned_decimal$RPT1Nx1: ({
56
- name: string;
57
- symbols: RegExp[];
58
- postprocess?: undefined;
59
- } | {
60
- name: string;
61
- symbols: (string | RegExp)[];
62
- postprocess: ({ data }: {
63
- data: any;
64
- }) => any;
65
- })[];
66
- unsigned_decimal$RPT01x1$SUBx1$RPT1Nx1: ({
67
- name: string;
68
- symbols: RegExp[];
69
- postprocess?: undefined;
70
- } | {
71
- name: string;
72
- symbols: (string | RegExp)[];
73
- postprocess: ({ data }: {
74
- data: any;
75
- }) => any;
76
- })[];
77
- unsigned_decimal$RPT01x1$SUBx1: {
78
- name: string;
79
- symbols: (string | {
80
- literal: string;
81
- })[];
82
- }[];
83
- unsigned_decimal$RPT01x1: {
84
- name: string;
85
- symbols: string[];
86
- postprocess: ({ data }: {
87
- data: any;
88
- }) => any;
89
- }[];
90
- unsigned_decimal: {
91
- name: string;
92
- symbols: string[];
93
- postprocess: ({ data }: {
94
- data: any;
95
- }) => number;
96
- }[];
97
- decimal$RPT01x1: {
98
- name: string;
99
- symbols: {
100
- literal: string;
101
- }[];
102
- postprocess: ({ data }: {
103
- data: any;
104
- }) => any;
105
- }[];
106
- decimal$RPT1Nx1: ({
107
- name: string;
108
- symbols: RegExp[];
109
- postprocess?: undefined;
110
- } | {
111
- name: string;
112
- symbols: (string | RegExp)[];
113
- postprocess: ({ data }: {
114
- data: any;
115
- }) => any;
116
- })[];
117
- decimal$RPT01x2$SUBx1$RPT1Nx1: ({
118
- name: string;
119
- symbols: RegExp[];
120
- postprocess?: undefined;
121
- } | {
122
- name: string;
123
- symbols: (string | RegExp)[];
124
- postprocess: ({ data }: {
125
- data: any;
126
- }) => any;
127
- })[];
128
- decimal$RPT01x2$SUBx1: {
129
- name: string;
130
- symbols: (string | {
131
- literal: string;
132
- })[];
133
- }[];
134
- decimal$RPT01x2: {
135
- name: string;
136
- symbols: string[];
137
- postprocess: ({ data }: {
138
- data: any;
139
- }) => any;
140
- }[];
141
- decimal: {
142
- name: string;
143
- symbols: string[];
144
- postprocess: ({ data }: {
145
- data: any;
146
- }) => number;
147
- }[];
148
- percentage: {
149
- name: string;
150
- symbols: (string | {
151
- literal: string;
152
- })[];
153
- postprocess: ({ data }: {
154
- data: any;
155
- }) => number;
156
- }[];
157
- jsonfloat$RPT01x1: {
158
- name: string;
159
- symbols: {
160
- literal: string;
161
- }[];
162
- postprocess: ({ data }: {
163
- data: any;
164
- }) => any;
165
- }[];
166
- jsonfloat$RPT1Nx1: ({
167
- name: string;
168
- symbols: RegExp[];
169
- postprocess?: undefined;
170
- } | {
171
- name: string;
172
- symbols: (string | RegExp)[];
173
- postprocess: ({ data }: {
174
- data: any;
175
- }) => any;
176
- })[];
177
- jsonfloat$RPT01x2$SUBx1$RPT1Nx1: ({
178
- name: string;
179
- symbols: RegExp[];
180
- postprocess?: undefined;
181
- } | {
182
- name: string;
183
- symbols: (string | RegExp)[];
184
- postprocess: ({ data }: {
185
- data: any;
186
- }) => any;
187
- })[];
188
- jsonfloat$RPT01x2$SUBx1: {
189
- name: string;
190
- symbols: (string | {
191
- literal: string;
192
- })[];
193
- }[];
194
- jsonfloat$RPT01x2: {
195
- name: string;
196
- symbols: string[];
197
- postprocess: ({ data }: {
198
- data: any;
199
- }) => any;
200
- }[];
201
- jsonfloat$RPT01x3$SUBx1$RPT01x1: {
202
- name: string;
203
- symbols: RegExp[];
204
- postprocess: ({ data }: {
205
- data: any;
206
- }) => any;
207
- }[];
208
- jsonfloat$RPT01x3$SUBx1$RPT1Nx1: ({
209
- name: string;
210
- symbols: RegExp[];
211
- postprocess?: undefined;
212
- } | {
213
- name: string;
214
- symbols: (string | RegExp)[];
215
- postprocess: ({ data }: {
216
- data: any;
217
- }) => any;
218
- })[];
219
- jsonfloat$RPT01x3$SUBx1: {
220
- name: string;
221
- symbols: (string | RegExp)[];
222
- }[];
223
- jsonfloat$RPT01x3: {
224
- name: string;
225
- symbols: string[];
226
- postprocess: ({ data }: {
227
- data: any;
228
- }) => any;
229
- }[];
230
- jsonfloat: {
231
- name: string;
232
- symbols: string[];
233
- postprocess: ({ data }: {
234
- data: any;
235
- }) => number;
236
- }[];
237
- };
238
- };
239
- };
1
+ export default GWLanguage;
2
+ declare function GWLanguage(): {
3
+ grammar: {
4
+ start: string;
5
+ rules: {
6
+ unsigned_int$RPT1Nx1: ({
7
+ name: string;
8
+ symbols: RegExp[];
9
+ postprocess?: undefined;
10
+ } | {
11
+ name: string;
12
+ symbols: (string | RegExp)[];
13
+ postprocess: ({ data }: {
14
+ data: any;
15
+ }) => any;
16
+ })[];
17
+ unsigned_int: {
18
+ name: string;
19
+ symbols: string[];
20
+ postprocess: ({ data }: {
21
+ data: any;
22
+ }) => number;
23
+ }[];
24
+ int$RPT01x1$SUBx1: {
25
+ name: string;
26
+ symbols: {
27
+ literal: string;
28
+ }[];
29
+ }[];
30
+ int$RPT01x1: {
31
+ name: string;
32
+ symbols: string[];
33
+ postprocess: ({ data }: {
34
+ data: any;
35
+ }) => any;
36
+ }[];
37
+ int$RPT1Nx1: ({
38
+ name: string;
39
+ symbols: RegExp[];
40
+ postprocess?: undefined;
41
+ } | {
42
+ name: string;
43
+ symbols: (string | RegExp)[];
44
+ postprocess: ({ data }: {
45
+ data: any;
46
+ }) => any;
47
+ })[];
48
+ int: {
49
+ name: string;
50
+ symbols: string[];
51
+ postprocess: ({ data }: {
52
+ data: any;
53
+ }) => number;
54
+ }[];
55
+ unsigned_decimal$RPT1Nx1: ({
56
+ name: string;
57
+ symbols: RegExp[];
58
+ postprocess?: undefined;
59
+ } | {
60
+ name: string;
61
+ symbols: (string | RegExp)[];
62
+ postprocess: ({ data }: {
63
+ data: any;
64
+ }) => any;
65
+ })[];
66
+ unsigned_decimal$RPT01x1$SUBx1$RPT1Nx1: ({
67
+ name: string;
68
+ symbols: RegExp[];
69
+ postprocess?: undefined;
70
+ } | {
71
+ name: string;
72
+ symbols: (string | RegExp)[];
73
+ postprocess: ({ data }: {
74
+ data: any;
75
+ }) => any;
76
+ })[];
77
+ unsigned_decimal$RPT01x1$SUBx1: {
78
+ name: string;
79
+ symbols: (string | {
80
+ literal: string;
81
+ })[];
82
+ }[];
83
+ unsigned_decimal$RPT01x1: {
84
+ name: string;
85
+ symbols: string[];
86
+ postprocess: ({ data }: {
87
+ data: any;
88
+ }) => any;
89
+ }[];
90
+ unsigned_decimal: {
91
+ name: string;
92
+ symbols: string[];
93
+ postprocess: ({ data }: {
94
+ data: any;
95
+ }) => number;
96
+ }[];
97
+ decimal$RPT01x1: {
98
+ name: string;
99
+ symbols: {
100
+ literal: string;
101
+ }[];
102
+ postprocess: ({ data }: {
103
+ data: any;
104
+ }) => any;
105
+ }[];
106
+ decimal$RPT1Nx1: ({
107
+ name: string;
108
+ symbols: RegExp[];
109
+ postprocess?: undefined;
110
+ } | {
111
+ name: string;
112
+ symbols: (string | RegExp)[];
113
+ postprocess: ({ data }: {
114
+ data: any;
115
+ }) => any;
116
+ })[];
117
+ decimal$RPT01x2$SUBx1$RPT1Nx1: ({
118
+ name: string;
119
+ symbols: RegExp[];
120
+ postprocess?: undefined;
121
+ } | {
122
+ name: string;
123
+ symbols: (string | RegExp)[];
124
+ postprocess: ({ data }: {
125
+ data: any;
126
+ }) => any;
127
+ })[];
128
+ decimal$RPT01x2$SUBx1: {
129
+ name: string;
130
+ symbols: (string | {
131
+ literal: string;
132
+ })[];
133
+ }[];
134
+ decimal$RPT01x2: {
135
+ name: string;
136
+ symbols: string[];
137
+ postprocess: ({ data }: {
138
+ data: any;
139
+ }) => any;
140
+ }[];
141
+ decimal: {
142
+ name: string;
143
+ symbols: string[];
144
+ postprocess: ({ data }: {
145
+ data: any;
146
+ }) => number;
147
+ }[];
148
+ percentage: {
149
+ name: string;
150
+ symbols: (string | {
151
+ literal: string;
152
+ })[];
153
+ postprocess: ({ data }: {
154
+ data: any;
155
+ }) => number;
156
+ }[];
157
+ jsonfloat$RPT01x1: {
158
+ name: string;
159
+ symbols: {
160
+ literal: string;
161
+ }[];
162
+ postprocess: ({ data }: {
163
+ data: any;
164
+ }) => any;
165
+ }[];
166
+ jsonfloat$RPT1Nx1: ({
167
+ name: string;
168
+ symbols: RegExp[];
169
+ postprocess?: undefined;
170
+ } | {
171
+ name: string;
172
+ symbols: (string | RegExp)[];
173
+ postprocess: ({ data }: {
174
+ data: any;
175
+ }) => any;
176
+ })[];
177
+ jsonfloat$RPT01x2$SUBx1$RPT1Nx1: ({
178
+ name: string;
179
+ symbols: RegExp[];
180
+ postprocess?: undefined;
181
+ } | {
182
+ name: string;
183
+ symbols: (string | RegExp)[];
184
+ postprocess: ({ data }: {
185
+ data: any;
186
+ }) => any;
187
+ })[];
188
+ jsonfloat$RPT01x2$SUBx1: {
189
+ name: string;
190
+ symbols: (string | {
191
+ literal: string;
192
+ })[];
193
+ }[];
194
+ jsonfloat$RPT01x2: {
195
+ name: string;
196
+ symbols: string[];
197
+ postprocess: ({ data }: {
198
+ data: any;
199
+ }) => any;
200
+ }[];
201
+ jsonfloat$RPT01x3$SUBx1$RPT01x1: {
202
+ name: string;
203
+ symbols: RegExp[];
204
+ postprocess: ({ data }: {
205
+ data: any;
206
+ }) => any;
207
+ }[];
208
+ jsonfloat$RPT01x3$SUBx1$RPT1Nx1: ({
209
+ name: string;
210
+ symbols: RegExp[];
211
+ postprocess?: undefined;
212
+ } | {
213
+ name: string;
214
+ symbols: (string | RegExp)[];
215
+ postprocess: ({ data }: {
216
+ data: any;
217
+ }) => any;
218
+ })[];
219
+ jsonfloat$RPT01x3$SUBx1: {
220
+ name: string;
221
+ symbols: (string | RegExp)[];
222
+ }[];
223
+ jsonfloat$RPT01x3: {
224
+ name: string;
225
+ symbols: string[];
226
+ postprocess: ({ data }: {
227
+ data: any;
228
+ }) => any;
229
+ }[];
230
+ jsonfloat: {
231
+ name: string;
232
+ symbols: string[];
233
+ postprocess: ({ data }: {
234
+ data: any;
235
+ }) => number;
236
+ }[];
237
+ };
238
+ };
239
+ };