You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+3-33Lines changed: 3 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ License MIT
84
84
85
85
## Combinators
86
86
87
-
ParseBox provides a set of combinators that map to notation expressable in BNF (Backus-Naur Form). These combinators are named Const, Tuple, Union, Array and Optional respectively to describe the produced type given by each combinator. These combinators service as building blocks for constructing parsers.
87
+
ParseBox provides a set of combinators that map to notation expressible in (E)BNF (Backus-Naur Form). These combinators are named Const, Tuple, Union, Array, and Optional, respectively, to describe the types produced by each combinator. These combinators serve as building blocks for constructing parsers.
88
88
89
89
### Const
90
90
@@ -96,12 +96,6 @@ The Const combinator parses for the next occurrence of the specified string. Whi
96
96
<T> ::= "X"
97
97
```
98
98
99
-
**Type**
100
-
101
-
```typescript
102
-
typeT='X'
103
-
```
104
-
105
99
**TypeScript**
106
100
107
101
```typescript
@@ -123,12 +117,6 @@ The Tuple parser matches a sequence of interior parsers. An empty tuple can be u
123
117
<T> ::= "X" "Y" "Z"
124
118
```
125
119
126
-
**Type**
127
-
128
-
```typescript
129
-
typeT= ['X', 'Y', 'Z']
130
-
```
131
-
132
120
**TypeScript**
133
121
134
122
```typescript
@@ -155,12 +143,6 @@ The Union combinator parses using one of the interior parsers, attempting each i
The Array combinator will parse for zero or more the interior parser. This combinator will always return a result with an empty array for no matches.
167
+
The Array combinator will parse for zero or more the interior parser. This combinator will always return a result with an empty array given for no matches.
The Optional combinator will parse for zero or one of the interior parser. This combinator always succeeds, returning either a tuple with one element, or zero for no match.
192
+
The Optional combinator will parse for zero or one of the interior parser. This combinator always succeeds, returning either a tuple with one element, or zero elements for no match.
0 commit comments